diff --git a/GribSpatialCache.java b/GribSpatialCache.java new file mode 100644 index 0000000000..feac8b8fa9 --- /dev/null +++ b/GribSpatialCache.java @@ -0,0 +1,750 @@ +/** + * 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.edex.plugin.grib.spatial; + +import java.io.File; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Iterator; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.opengis.metadata.spatial.PixelOrientation; + +import com.raytheon.edex.plugin.grib.dao.GribModelDao; +import com.raytheon.edex.plugin.grib.dao.GridCoverageDao; +import com.raytheon.edex.plugin.grib.dao.IGridCoverageDao; +import com.raytheon.edex.site.SiteUtil; +import com.raytheon.uf.common.awipstools.GetWfoCenterPoint; +import com.raytheon.uf.common.dataplugin.grib.exception.GribException; +import com.raytheon.uf.common.dataplugin.grib.spatial.projections.GridCoverage; +import com.raytheon.uf.common.dataplugin.grib.subgrid.SubGrid; +import com.raytheon.uf.common.dataplugin.grib.subgrid.SubGridDef; +import com.raytheon.uf.common.dataplugin.grib.util.GribModelLookup; +import com.raytheon.uf.common.dataplugin.grib.util.GridModel; +import com.raytheon.uf.common.geospatial.MapUtil; +import com.raytheon.uf.common.localization.IPathManager; +import com.raytheon.uf.common.localization.LocalizationContext; +import com.raytheon.uf.common.localization.LocalizationContext.LocalizationLevel; +import com.raytheon.uf.common.localization.LocalizationContext.LocalizationType; +import com.raytheon.uf.common.localization.LocalizationFile; +import com.raytheon.uf.common.localization.PathManagerFactory; +import com.raytheon.uf.common.serialization.SerializationException; +import com.raytheon.uf.common.serialization.SerializationUtil; +import com.raytheon.uf.edex.awipstools.GetWfoCenterHandler; +import com.raytheon.uf.edex.core.EDEXUtil; +import com.raytheon.uf.edex.database.DataAccessLayerException; +import com.raytheon.uf.edex.database.cluster.ClusterLockUtils; +import com.raytheon.uf.edex.database.cluster.ClusterLockUtils.LockState; +import com.raytheon.uf.edex.database.cluster.ClusterTask; +import com.raytheon.uf.edex.database.dao.CoreDao; +import com.raytheon.uf.edex.database.dao.DaoConfig; +import com.vividsolutions.jts.geom.Coordinate; + +/** + * Cache used for holding GridCoverage objects. Since creating geometries and + * CRS objects are expensive operations, this cache is used to store + * GridCoverages as they are produced. + * + *
+ * 
+ * SOFTWARE HISTORY
+ * 
+ * Date         Ticket#     Engineer    Description
+ * ------------ ----------  ----------- --------------------------
+ * 4/7/09       1994        bphillip    Initial Creation
+ * 
+ * 
+ * + * @author bphillip + * @version 1 + */ +public class GribSpatialCache { + + /** The logger */ + protected transient Log logger = LogFactory.getLog(getClass()); + + /** The singleton instance */ + private static GribSpatialCache instance = new GribSpatialCache(); + + /** + * Map containing the GridCoverages
+ * The key for this map is the id field of the GridCoverage object stored as + * the value of the map + */ + private Map spatialMap; + + /** + * Map containing the GridCoverages
+ * The key for this map is the name field of the GridCoverage object stored + * as the value of the map. This is only used internally for lookup of a + * coverage by name aka gridId. + */ + private Map spatialNameMap; + + /** + * Map containing the subGrid coverage based on a model name. + */ + private Map subGridCoverageMap; + + /** + * Map containing the subGrid definition based on a model name. + */ + private Map definedSubGridMap; + + /** + * Gets the singleton instance of GribSpatialCache + * + * @return The singleton instance of the GribSpatialCache + */ + public static GribSpatialCache getInstance() { + return instance; + } + + /** + * Creates a new GribSpatialCache + */ + private GribSpatialCache() { + spatialMap = new HashMap(); + spatialNameMap = new HashMap(); + definedSubGridMap = new HashMap(); + subGridCoverageMap = new HashMap(); + initializeGrids(); + } + + /** + * Retrieves a grid from the map. If the grid does not exist, null is + * returned + * + * @param id + * The id of the GridCoverage to retrieve + * @return The GridCoverage object, null if not present + * @throws GribException + * @throws DataAccessLayerException + */ + public GridCoverage getGrid(GridCoverage coverage) throws GribException { + GridCoverage retVal = spatialMap.get(coverage.getId()); + + if (retVal == null) { + /* + * Coverage not found in cache, but the values provided in the GDS + * may be slightly different than those for the grid in the cache. + * Check the database to be sure. + */ + try { + retVal = ((IGridCoverageDao) EDEXUtil.getESBComponent(coverage + .getProjectionType().replaceAll(" ", "") + "Dao")) + .checkGrid(coverage); + } catch (DataAccessLayerException e) { + throw new GribException("Error querying for grib coverage!", e); + } + + if (retVal != null) { + spatialMap.put(coverage.getId(), retVal); + spatialNameMap.put(coverage.getName(), retVal); + } + + } + + return retVal; + } + + public GridCoverage getGrid(int id) { + return spatialMap.get(id); + } + + public GridCoverage getGrid(String modelName) { + GridCoverage rval = null; + + if (modelName != null) { + if (subGridCoverageMap.containsKey(modelName)) { + rval = spatialMap.get(subGridCoverageMap.get(modelName)); + } else { + GridModel model = GribModelLookup.getInstance().getModelByName( + modelName); + if (model != null) { + rval = spatialNameMap.get(model.getGrid().toString()); + } + } + } + + return rval; + } + + public GridCoverage getGridByName(String name) { + return spatialNameMap.get(name); + } + + /** + * Puts a grid into the GribSpatialCache. + * + * @param grid + * The grid to store + * @param persistToDb + * True if this GridCoverage object is to be persisted to the + * database + * @throws GribException + * If problems occur while initializing the grid + */ + public void putGrid(GridCoverage grid, boolean initializeGrid, + boolean persistToDb) throws GribException { + if (initializeGrid) { + /* + * Prepare the grid to be stored into the cache. Initializes the + * geometry and crs objects and generates the id field + */ + grid.initialize(); + if (grid.getName() == null) { + grid.generateName(); + } + } + + // Persist to the database if desired + if (persistToDb) { + new CoreDao(DaoConfig.DEFAULT).saveOrUpdate(grid); + } + + spatialMap.put(grid.getId(), grid); + spatialNameMap.put(grid.getName(), grid); + } + + public SubGrid getSubGrid(String modelName) { + return definedSubGridMap.get(modelName); + } + + public GridCoverage getSubGridCoverage(String modelName) { + GridCoverage rval = null; + + if (subGridCoverageMap.containsKey(modelName)) { + rval = spatialMap.get(subGridCoverageMap.get(modelName)); + } + + return rval; + } + + /** + * Initializes the predefined set of grids. The grids are stored in xml + * format in the utility folder so the localization service has access to + * them.
+ * GridCoverage are created from the xml via JaxB and placed in the cache + */ + private void initializeGrids() { + ClusterTask ct = null; + + do { + ct = ClusterLockUtils.lock("grib", "spatialCache", 120000, true); + } while (!LockState.SUCCESSFUL.equals(ct.getLockState())); + + try { + // pull all the coverage from the database + GridCoverageDao dao = new GridCoverageDao(); + FileDataList previousFdl = getPreviousFileDataList(); + FileDataList currentFdl = generateFileDataList(); + + if (isDefintionChanged(previousFdl, currentFdl)) { + processBaseGridsChanged(dao, currentFdl); + saveFileDataList(currentFdl); + } else { + List baseCoverages = dao + .loadBaseGrids(); + + if (baseCoverages != null && baseCoverages.size() > 0) { + for (Object obj : baseCoverages) { + try { + putGrid((GridCoverage) obj, false, false); + } catch (Exception e) { + // Log error but do not throw exception, technically + // is + // only from initialize which isn't being called + logger.error( + "Unable to load grid coverage into cache " + + obj, e); + } + } + } else { + // database wiped/plugin re-initialized need to repopulate + processBaseGridsChanged(dao, currentFdl); + saveFileDataList(currentFdl); + } + } + + processUnknownGrids(dao); + processSubGrids(dao, currentFdl); + } finally { + ClusterLockUtils.unlock(ct, false); + } + } + + /** + * A non subgridded definition has been added, deleted, or changed. + * Changed/delete both delete all records, models, and coverage defintion. + * Then Change/Add put in a new coverage definition. + * + * TODO: Post process Unknown definitions to see if they are now known. If + * now known delete definitions of unknown. + * + * @param dao + * @param currentFdl + */ + private void processBaseGridsChanged(GridCoverageDao dao, + FileDataList currentFdl) { + List baseCoverages = dao.loadBaseGrids(); + Map fileCoverageMap = loadGridDefinitionsFromDisk(currentFdl); + + // update needs to delete all hdf5 same as delete, so update is + // a delete and then an add to simplify logic and handle primary + // key changes. + List coveragesToDelete = new LinkedList(); + HashSet validDbCoverageNames = new HashSet( + (int) (baseCoverages.size() * 1.25) + 1); + + Iterator iter = baseCoverages.iterator(); + while (iter.hasNext()) { + GridCoverage dbCov = iter.next(); + GridCoverage fileCoverage = fileCoverageMap.get(dbCov.getName()); + if (!dbCov.equals(fileCoverage)) { + // coverage not in flat file or coverage has changed, + // delete coverage old coverage + coveragesToDelete.add(dbCov); + iter.remove(); + } else { + // current coverage still valid + validDbCoverageNames.add(dbCov.getName()); + } + } + + // delete grids, models, coverages, and hdf5 for namesToDelete. + for (GridCoverage cov : coveragesToDelete) { + logger.info("GridCoverage " + cov.getName() + + " has changed. Deleting out of date data"); + if (!dao.deleteCoverageAssociatedData(cov, true)) { + logger.warn("Failed to delete GridCoverage " + cov.getName() + + ". Manual intervention required."); + } else { + logger.info("GridCoverage successfully deleted"); + } + } + + // remove the valid db coverages from the map + fileCoverageMap.keySet().removeAll(validDbCoverageNames); + + // add new grids in bulk + for (GridCoverage cov : fileCoverageMap.values()) { + try { + putGrid(cov, true, false); + } catch (Exception e) { + logger.error( + "Failed to initialize grid definition " + cov.getName(), + e); + } + } + + // bulk persist the spatial maps + if (spatialMap.size() > 0) { + dao.persistAll(spatialMap.values()); + } + + for (GridCoverage cov : baseCoverages) { + try { + putGrid(cov, false, false); + } catch (Exception e) { + logger.error( + "Failed to initialize grid definition " + cov.getName(), + e); + } + } + } + + /** + * A non subGridd definition has been added, deleted, or changed. + * Changed/delete both delete all records, models, and coverage defintion. + * Then Change/Add put in a new coverage definition, and also delete any + * data associated with base model definition. + * + * @param dao + * @param currentFdl + */ + private void processSubGrids(GridCoverageDao dao, FileDataList currentFdl) { + List oldSubGridCoverages = dao.loadSubGrids(); + Map fileSubGridCoverageMap = loadSubGridDefinitionsFromDisk(currentFdl); + + // update needs to delete all hdf5 same as delete, so update is + // a delete and then an add to simplify logic and handle primary + // key changes. + List coveragesToDelete = new LinkedList(); + HashSet validDbCoverageNames = new HashSet( + (int) (oldSubGridCoverages.size() * 1.25) + 1); + + Iterator iter = oldSubGridCoverages.iterator(); + while (iter.hasNext()) { + GridCoverage dbCov = iter.next(); + GridCoverage fileCoverage = fileSubGridCoverageMap.get(dbCov + .getName()); + if (!dbCov.equals(fileCoverage)) { + // coverage not in flat file or coverage has changed, + // delete coverage + coveragesToDelete.add(dbCov); + iter.remove(); + } else { + // current coverage still valid + validDbCoverageNames.add(dbCov.getName()); + } + } + + // delete grids, models, coverages, and hdf5 for namesToDelete. + for (GridCoverage cov : coveragesToDelete) { + logger.info("Model " + + cov.getSubGridModel() + + " has changed subGrid definition, deleting out of date data"); + if (!dao.deleteCoverageAssociatedData(cov, true)) { + logger.warn("Failed to delete GridCoverage " + cov.getName() + + ". Manual intervention required."); + } else { + logger.info("GridModel successfully deleted"); + } + } + + // remove the valid db coverages from the map + fileSubGridCoverageMap.keySet().removeAll(validDbCoverageNames); + + // need to delete model information for new adds, as old grid may not + // have been subgridded + GribModelDao modelDao = new GribModelDao(); + for (GridCoverage cov : fileSubGridCoverageMap.values()) { + logger.info("Model " + + cov.getSubGridModel() + + " has changed subGrid definition, deleting out of date data"); + // look up parent + if (modelDao.deleteModelAndAssociatedData(cov.getSubGridModel()) < 0) { + logger.warn("Failed to delete SubGrid Model " + + cov.getSubGridModel() + + ". Manual intervention required."); + } else { + logger.info("GridModel successfully deleted"); + } + } + + // add new grids, persisting individually + for (GridCoverage cov : fileSubGridCoverageMap.values()) { + try { + putGrid(cov, true, true); + subGridCoverageMap.put(cov.getSubGridModel(), cov.getId()); + } catch (Exception e) { + logger.error( + "Failed to initialize grid definition " + cov.getName(), + e); + } + } + + // put database grids into map + for (GridCoverage cov : oldSubGridCoverages) { + try { + putGrid(cov, true, true); + subGridCoverageMap.put(cov.getSubGridModel(), cov.getId()); + } catch (Exception e) { + logger.error( + "Failed to initialize grid definition " + cov.getName(), + e); + } + } + } + + private void processUnknownGrids(GridCoverageDao dao) { + List unknownGrids = dao.loadUnknownGrids(); + for (GridCoverage cov : unknownGrids) { + try { + GridCoverage dbCov = getGrid(cov); + if (!cov.getName().equals(dbCov.getName())) { + logger.info("Unknown grid " + cov.getName() + + " is now mapped by " + dbCov.getName() + + ". Deleting unknown grid"); + dao.deleteCoverageAssociatedData(cov, true); + } + } catch (Exception e) { + logger.error("Erro occurred scanning unknown grids", e); + } + } + } + + private Map loadSubGridDefinitionsFromDisk( + FileDataList currentFdl) { + GribModelLookup gribModelLUT = GribModelLookup.getInstance(); + List subGridDefs = currentFdl.getSubGridFileList(); + Map subGrids = null; + + if (subGridDefs != null && subGridDefs.size() > 0) { + subGrids = new HashMap(subGridDefs.size() * 3); + Coordinate wfoCenterPoint = null; + String wfo = SiteUtil.getSite(); + GetWfoCenterPoint centerPointRequest = new GetWfoCenterPoint(wfo); + try { + wfoCenterPoint = new GetWfoCenterHandler() + .handleRequest(centerPointRequest); + } catch (Exception e) { + logger.error( + "Failed to generate sub grid definitions. Unable to lookup WFO Center Point", + e); + return new HashMap(0); + } + + for (FileData fd : subGridDefs) { + try { + SubGridDef subGridDef = loadSubGridDef(fd.getFilePath()); + + if (subGridDef != null) { + String referenceModel = subGridDef.getReferenceModel(); + + GridCoverage gridCoverage = getGrid(referenceModel); + + if (gridCoverage != null) { + Coordinate wfoCenter = MapUtil + .latLonToGridCoordinate(wfoCenterPoint, + PixelOrientation.CENTER, + gridCoverage); + + double xCenterPoint = wfoCenter.x; + double yCenterPoint = wfoCenter.y; + + double xDistance = subGridDef.getNx() / 2; + double yDistance = subGridDef.getNy() / 2; + Coordinate lowerLeftPosition = new Coordinate( + xCenterPoint - xDistance, yCenterPoint + + yDistance); + Coordinate upperRightPosition = new Coordinate( + xCenterPoint + xDistance, yCenterPoint + - yDistance); + + lowerLeftPosition = MapUtil.gridCoordinateToLatLon( + lowerLeftPosition, PixelOrientation.CENTER, + gridCoverage); + upperRightPosition = MapUtil + .gridCoordinateToLatLon(upperRightPosition, + PixelOrientation.CENTER, + gridCoverage); + + subGridDef.setLowerLeftLon(lowerLeftPosition.x); + subGridDef.setLowerLeftLat(lowerLeftPosition.y); + subGridDef.setUpperRightLon(upperRightPosition.x); + subGridDef.setUpperRightLat(upperRightPosition.y); + + // verify numbers in -180 -> 180 range + subGridDef.setLowerLeftLon(MapUtil + .correctLon(subGridDef.getLowerLeftLon())); + subGridDef.setUpperRightLon(MapUtil + .correctLon(subGridDef.getUpperRightLon())); + + // do a reverse lookup of the model name to get its + // associated grid id + + for (String modelName : subGridDef.getModelNames()) { + GridModel model = gribModelLUT + .getModelByName(modelName); + if (model != null) { + GridCoverage baseCoverage = spatialNameMap + .get(model.getGrid().toString()); + + if (baseCoverage != null) { + SubGrid subGrid = new SubGrid(); + subGrid.setModelName(modelName); + GridCoverage subGridCoverage = baseCoverage + .trim(subGridDef, subGrid); + if (subGridCoverage != null) { + subGrids.put( + subGridCoverage.getName(), + subGridCoverage); + definedSubGridMap.put(modelName, + subGrid); + } + } + } + } + } else { + logger.error("Failed to generate sub grid for " + + fd.getFilePath() + + ". Unable to determine coverage for referenceModel [" + + referenceModel + "]"); + } + } + } catch (Exception e) { + // Log error but do not throw exception + logger.error( + "Failed processing sub grid file: " + + fd.getFilePath(), e); + } + } + } else { + subGrids = new HashMap(0); + } + + return subGrids; + } + + /** + * Loads and validates subGridDef pointed to by filePath. If definition + * empty/invalid returns null. + * + * @param filePath + * @return + */ + private SubGridDef loadSubGridDef(String filePath) { + SubGridDef rval = null; + File f = new File(filePath); + + if (f.length() > 0) { + try { + rval = (SubGridDef) SerializationUtil + .jaxbUnmarshalFromXmlFile(f); + if (rval.getReferenceModel() == null + || rval.getModelNames() == null + || rval.getModelNames().size() == 0) { + // sub grid didn't have required definitions + rval = null; + } + } catch (SerializationException e) { + logger.error("Failed reading sub grid file: " + filePath, e); + } + } + + return rval; + } + + private static boolean isDefintionChanged(FileDataList previousFdl, + FileDataList currentFdl) { + boolean rval = true; + if (currentFdl != null) { + rval = !currentFdl.equals(previousFdl); + } else { + rval = previousFdl != null; + } + + return rval; + } + + private FileDataList generateFileDataList() { + /* + * Retrieve the list of files from the localization service + */ + IPathManager pm = PathManagerFactory.getPathManager(); + FileDataList fileList = new FileDataList(); + LocalizationContext[] contexts = pm + .getLocalSearchHierarchy(LocalizationType.EDEX_STATIC); + fileList.addCoverageFiles(pm.listFiles(contexts, "/grib/grids", + new String[] { "xml" }, true, true)); + fileList.addSubGridFiles(pm.listFiles(contexts, "/grib/subgrids", + new String[] { "xml" }, true, true)); + + return fileList; + } + + private FileDataList getPreviousFileDataList() { + IPathManager pm = PathManagerFactory.getPathManager(); + File previousFileData = pm.getFile(pm.getContext( + LocalizationType.EDEX_STATIC, LocalizationLevel.CONFIGURED), + "/grib/gridDefFileListing.xml"); + FileDataList rval = null; + + if (previousFileData.exists() && previousFileData.length() > 0) { + try { + Object obj = SerializationUtil + .jaxbUnmarshalFromXmlFile(previousFileData); + if (obj instanceof FileDataList) { + rval = (FileDataList) obj; + } else { + logger.error("Error occurred deserializing " + + previousFileData.getAbsolutePath() + + ", expected type " + FileDataList.class + + " received " + obj.getClass()); + } + } catch (Exception e) { + logger.error( + "Error occurred deserializing " + + previousFileData.getAbsolutePath(), e); + } + } + return rval; + } + + private Map loadGridDefinitionsFromDisk( + FileDataList currentFdl) { + List coverageFiles = currentFdl.getCoverageFileList(); + Map fileCoverageMap = new HashMap( + (int) (coverageFiles.size() * 1.25) + 1); + + /* + * Iterate over file list. Unmarshal to GridCoverage object + */ + for (FileData fd : coverageFiles) { + try { + GridCoverage grid = (GridCoverage) SerializationUtil + .jaxbUnmarshalFromXmlFile(fd.getFilePath()); + GridCoverage previousGrid = fileCoverageMap.put(grid.getName(), + grid); + if (previousGrid != null) { + for (FileData fd2 : coverageFiles) { + GridCoverage grid2 = (GridCoverage) SerializationUtil + .jaxbUnmarshalFromXmlFile(fd2.getFilePath()); + if (grid.getName().equals(grid2.getName())) { + logger.error("Grid " + grid.getName() + + " has already been defined. " + + fd.getFilePath() + " and " + + fd2.getFilePath() + + " have same name. Using " + + fd2.getFilePath()); + break; + } + } + } + } catch (Exception e) { + // Log error but do not throw exception + logger.error( + "Unable to read default grids file: " + + fd.getFilePath(), e); + } + } + + return fileCoverageMap; + } + + private void saveFileDataList(FileDataList fdl) { + try { + IPathManager pm = PathManagerFactory.getPathManager(); + LocalizationFile lf = pm.getLocalizationFile( + pm.getContext(LocalizationType.EDEX_STATIC, + LocalizationLevel.CONFIGURED), + "/grib/gridDefFileListing.xml"); + SerializationUtil.jaxbMarshalToXmlFile(fdl, lf.getFile() + .getAbsolutePath()); + lf.save(); + } catch (Exception e) { + logger.error( + "Failed to save coverage file data list, coverages may be reloaded on next restart", + e); + } + } + + public static void reinitialize() { + GribSpatialCache newInstance = new GribSpatialCache(); + instance = newInstance; + } +} diff --git a/PurgeDao.java b/PurgeDao.java new file mode 100644 index 0000000000..492c27e9c7 --- /dev/null +++ b/PurgeDao.java @@ -0,0 +1,282 @@ +/** + * 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.edex.purgesrv; + +import java.sql.Timestamp; +import java.util.Calendar; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.TimeZone; + +import org.hibernate.Query; +import org.hibernate.Session; +import org.springframework.transaction.TransactionStatus; +import org.springframework.transaction.support.TransactionCallback; +import org.springframework.transaction.support.TransactionCallbackWithoutResult; + +import com.raytheon.uf.edex.database.dao.CoreDao; +import com.raytheon.uf.edex.database.dao.DaoConfig; + +/** + * + * Data access object for accessing purge job status objects + * + *
+ * 
+ * SOFTWARE HISTORY
+ * 
+ * Date         Ticket#    Engineer    Description
+ * ------------ ---------- ----------- --------------------------
+ * May 1, 2012  #470      bphillip     Initial creation
+ * 
+ * 
+ * + * @author bphillip + * @version 1.0 + */ +public class PurgeDao extends CoreDao { + + /** + * Constructs a new purge data access object + */ + public PurgeDao() { + super(DaoConfig.forClass(PurgeJobStatus.class)); + } + + /** + * Gets the number of purge jobs currently running on the cluster. A job is + * considered running if the 'running' flag is set to true and the job has + * been started since validStartTime and has not met or exceeded the failed + * count. + * + * @param validStartTime + * @param failedCount + * @return The number of purge jobs currently running on the cluster + */ + public int getRunningClusterJobs(final Date validStartTime, + final int failedCount) { + final String query = "from " + + daoClass.getName() + + " obj where obj.running = true and obj.startTime > :startTime and obj.failedCount <= :failedCount"; + return (Integer) txTemplate.execute(new TransactionCallback() { + @Override + public Object doInTransaction(TransactionStatus status) { + Query hibQuery = getSession(false).createQuery(query); + hibQuery.setTimestamp("startTime", validStartTime); + hibQuery.setInteger("failedCount", failedCount); + List queryResult = hibQuery.list(); + if (queryResult == null) { + return 0; + } else { + return queryResult.size(); + } + } + }); + } + + /** + * Returns the jobs that have met or exceed the failed count. + * + * @param failedCount + * @return + */ + @SuppressWarnings("unchecked") + public List getFailedJobs(final int failedCount) { + final String query = "from " + daoClass.getName() + + " obj where obj.failedCount >= :failedCount"; + return (List) txTemplate + .execute(new TransactionCallback() { + @Override + public List doInTransaction( + TransactionStatus status) { + Query hibQuery = getSession(false).createQuery(query); + hibQuery.setInteger("failedCount", failedCount); + return hibQuery.list(); + } + }); + } + + @SuppressWarnings("unchecked") + public List getTimedOutJobs(final Date validStartTime) { + final String query = "from " + + daoClass.getName() + + " obj where obj.running = true and obj.startTime <= :startTime"; + return (List) txTemplate + .execute(new TransactionCallback() { + @Override + public List doInTransaction( + TransactionStatus status) { + Query hibQuery = getSession(false).createQuery(query); + hibQuery.setTimestamp("startTime", validStartTime); + return hibQuery.list(); + } + }); + } + + @SuppressWarnings("unchecked") + public Map> getRunningServerJobs() { + final String query = "from " + + daoClass.getName() + + " obj where obj.running = true and obj.timedOut = false and obj.failed = false and obj.id.server=':SERVER'"; + return (Map>) txTemplate + .execute(new TransactionCallback() { + @Override + public Map> doInTransaction( + TransactionStatus status) { + Map> serverMap = new HashMap>(); + Query serverQuery = getSession(false).createQuery( + "select distinct obj.id.server from " + + daoClass.getName() + + " obj order by obj.id.server asc"); + List result = serverQuery.list(); + for (String server : result) { + Query query2 = getSession(false).createQuery( + query.replace(":SERVER", server)); + serverMap.put(server, query2.list()); + } + return serverMap; + } + }); + } + + /** + * Gets the amount of time in milliseconds since the last purge of a given + * plugin + * + * @param plugin + * The plugin name + * @return Number of milliseconds since the purge job was run for the given + * plugin + */ + public long getTimeSinceLastPurge(String plugin) { + final String query = "select obj.startTime from " + daoClass.getName() + + " obj where obj.id.plugin='" + plugin + "'"; + return (Long) txTemplate.execute(new TransactionCallback() { + @Override + public Object doInTransaction(TransactionStatus status) { + Query hibQuery = getSession(false).createQuery(query); + Timestamp queryResult = (Timestamp) hibQuery.uniqueResult(); + if (queryResult == null) { + return -1; + } else { + return System.currentTimeMillis() - queryResult.getTime(); + } + } + }); + } + + /** + * Gets the purge job status for a plugin + * + * @param plugin + * The plugin to get the purge job status for + * @return The purge job statuses + */ + public PurgeJobStatus getJobForPlugin(String plugin) { + final String query = "from " + daoClass.getName() + + " obj where obj.id.plugin='" + plugin + "'"; + return (PurgeJobStatus) txTemplate.execute(new TransactionCallback() { + @Override + public PurgeJobStatus doInTransaction(TransactionStatus status) { + Query hibQuery = getSession(false).createQuery(query); + PurgeJobStatus queryResult = (PurgeJobStatus) hibQuery + .uniqueResult(); + return queryResult; + } + }); + } + + /** + * Sets a purge job to running status and sets the startTime to current + * time. If was previously running, will increment the failed count. + * + * @param plugin + * The plugin row to update + */ + public void startJob(final String plugin) { + final String query = "from " + daoClass.getName() + + " obj where obj.id.plugin='" + plugin + "'"; + txTemplate.execute(new TransactionCallback() { + @Override + public PurgeJobStatus doInTransaction(TransactionStatus status) { + Session sess = getSession(false); + Query hibQuery = sess.createQuery(query); + PurgeJobStatus queryResult = (PurgeJobStatus) hibQuery + .uniqueResult(); + if (queryResult == null) { + queryResult = new PurgeJobStatus(); + queryResult.setFailedCount(0); + queryResult.setPlugin(plugin); + queryResult.setRunning(false); + sess.save(queryResult); + } + + if (queryResult.isRunning()) { + // query was previously running, update failed count + queryResult.incrementFailedCount(); + } + + queryResult.setStartTime(Calendar.getInstance( + TimeZone.getTimeZone("GMT")).getTime()); + queryResult.setRunning(true); + sess.update(queryResult); + return queryResult; + } + }); + } + + /** + * Retrieves the plugins order by startTime. + * + * @param latestStartTime + * @param failedCount + * @return + */ + @SuppressWarnings("unchecked") + public List getPluginsByPurgeTime() { + final String query = "select obj.id.plugin from " + daoClass.getName() + + " obj order by obj.startTime asc, obj.plugin asc"; + return (List) txTemplate.execute(new TransactionCallback() { + @Override + public List doInTransaction(TransactionStatus status) { + Query hibQuery = getSession(false).createQuery(query); + List result = (List) hibQuery.list(); + return result; + } + }); + } + + /** + * Updates a purge job status object + * + * @param jobStatus + * The object to update + */ + public void update(final PurgeJobStatus jobStatus) { + txTemplate.execute(new TransactionCallbackWithoutResult() { + @Override + public void doInTransactionWithoutResult(TransactionStatus status) { + getHibernateTemplate().update(jobStatus); + } + }); + } +} diff --git a/PurgeJob.java b/PurgeJob.java new file mode 100644 index 0000000000..d71ca475d1 --- /dev/null +++ b/PurgeJob.java @@ -0,0 +1,302 @@ +/** + * 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.edex.purgesrv; + +import java.lang.reflect.Method; +import java.sql.SQLException; +import java.util.Calendar; +import java.util.Date; +import java.util.Map; +import java.util.TimeZone; + +import com.raytheon.uf.edex.database.cluster.ClusterLockUtils; +import com.raytheon.uf.edex.database.cluster.ClusterTask; +import com.raytheon.uf.edex.database.plugin.PluginDao; +import com.raytheon.uf.edex.database.plugin.PluginFactory; +import com.raytheon.uf.edex.database.purge.PurgeLogger; + +/** + * + * This class encapsulates the purge activity for a plugin into a cluster task. + * + *
+ * 
+ * SOFTWARE HISTORY
+ * 
+ * Date         Ticket#    Engineer    Description
+ * ------------ ---------- ----------- --------------------------
+ * Apr 19, 2012 #470       bphillip     Initial creation
+ * 
+ * 
+ * + * @author bphillip + * @version 1.0 + */ +public class PurgeJob extends Thread { + + /** The type of purge */ + public enum PURGE_JOB_TYPE { + PURGE_ALL, PURGE_EXPIRED + } + + private long startTime; + + /** The cluster task name to use for purge jobs */ + public static final String TASK_NAME = "Purge Plugin Data"; + + /** The plugin associated with this purge job */ + private String pluginName; + + /** The type of purge job being executed */ + private PURGE_JOB_TYPE purgeType; + + /** Last time job has printed a timed out message */ + private long lastTimeOutMessage = 0; + + /** + * Creates a new Purge job for the specified plugin. + * + * @param pluginName + * The plugin to be purged + * @param purgeType + * The type of purge to be executed + */ + public PurgeJob(String pluginName, PURGE_JOB_TYPE purgeType) { + // Give the thread a name + this.setName("Purge-" + pluginName.toUpperCase() + "-Thread"); + this.pluginName = pluginName; + this.purgeType = purgeType; + } + + public void run() { + + // Flag used to track if this job has failed + boolean failed = false; + startTime = System.currentTimeMillis(); + PurgeLogger.logInfo("Purging expired data...", pluginName); + PluginDao dao = null; + + try { + dao = PluginFactory.getInstance().getPluginDao(pluginName); + if (dao.getDaoClass() != null) { + dao.purgeExpiredData(); + PurgeLogger.logInfo("Data successfully Purged!", pluginName); + } else { + Method m = dao.getClass().getMethod("purgeExpiredData", + new Class[] {}); + if (m != null) { + if (m.getDeclaringClass().equals(PluginDao.class)) { + PurgeLogger + .logWarn( + "Unable to purge data. This plugin does not specify a record class and does not implement a custom purger.", + pluginName); + } else { + if (this.purgeType.equals(PURGE_JOB_TYPE.PURGE_EXPIRED)) { + dao.purgeExpiredData(); + } else { + dao.purgeAllData(); + } + PurgeLogger.logInfo("Data successfully Purged!", + pluginName); + } + } + } + } catch (Exception e) { + failed = true; + // keep getting next exceptions with sql exceptions to ensure + // we can see the underlying error + PurgeLogger + .logError("Error purging expired data!\n", pluginName, e); + Throwable t = e.getCause(); + while (t != null) { + if (t instanceof SQLException) { + SQLException se = ((SQLException) t).getNextException(); + PurgeLogger.logError("Next exception:", pluginName, se); + } + t = t.getCause(); + } + } finally { + ClusterTask purgeLock = PurgeManager.getInstance().getPurgeLock(); + try { + /* + * Update the status accordingly if the purge failed or + * succeeded + */ + PurgeDao purgeDao = new PurgeDao(); + PurgeJobStatus status = purgeDao + .getJobForPlugin(this.pluginName); + if (status == null) { + PurgeLogger.logError( + "Purge job completed but no status object found!", + this.pluginName); + } else { + if (failed) { + status.incrementFailedCount(); + if (status.getFailedCount() >= PurgeManager + .getInstance().getFatalFailureCount()) { + PurgeLogger + .logFatal( + "Purger for this plugin has reached or exceeded consecutive failure limit of " + + PurgeManager + .getInstance() + .getFatalFailureCount() + + ". Data will no longer being purged for this plugin.", + pluginName); + } else { + PurgeLogger.logError("Purge job has failed " + + status.getFailedCount() + + " consecutive times.", this.pluginName); + // Back the start time off by half an hour to try to + // purgin soon, don't want to start immediately so + // it doesn't ping pong between servers in a time + // out scenario + Date startTime = status.getStartTime(); + startTime.setTime(startTime.getTime() - (1800000)); + } + } else { + status.setFailedCount(0); + } + + /* + * This purger thread has exceeded the time out duration but + * finally finished. Output a message and update the status + */ + int deadPurgeJobAge = PurgeManager.getInstance() + .getDeadPurgeJobAge(); + Calendar purgeTimeOutLimit = Calendar.getInstance(); + purgeTimeOutLimit.setTimeZone(TimeZone.getTimeZone("GMT")); + purgeTimeOutLimit.add(Calendar.MINUTE, -deadPurgeJobAge); + if (startTime < purgeTimeOutLimit.getTimeInMillis()) { + PurgeLogger + .logInfo( + "Purge job has recovered from timed out state!!", + pluginName); + } + status.setRunning(false); + purgeDao.update(status); + /* + * Log execution times + */ + long executionTime = getAge(); + long execTimeInMinutes = executionTime / 60000; + if (execTimeInMinutes > 0) { + PurgeLogger.logInfo("Purge run time: " + executionTime + + " ms (" + execTimeInMinutes + " minutes)", + this.pluginName); + } else { + PurgeLogger.logInfo("Purge run time: " + executionTime + + " ms", this.pluginName); + } + } + } catch (Throwable e) { + PurgeLogger + .logError( + "An unexpected error occurred upon completion of the purge job", + this.pluginName, e); + } finally { + ClusterLockUtils.unlock(purgeLock, false); + } + } + } + + public void printTimedOutMessage(int deadPurgeJobAge) { + // only print message every 5 minutes + if (System.currentTimeMillis() - lastTimeOutMessage > 300000) { + PurgeLogger.logFatal( + "Purger running time has exceeded timeout duration of " + + deadPurgeJobAge + + " minutes. Current running time: " + + (getAge() / 60000) + " minutes", pluginName); + printStackTrace(); + } + } + + /** + * Prints the stack trace for this job thread. + */ + public void printStackTrace() { + StringBuffer buffer = new StringBuffer(); + buffer.append("Stack trace for Purge Job Thread:\n"); + buffer.append(getStackTrace(this)); + // If this thread is blocked, output the stack traces for the other + // blocked threads to assist in determining the source of the + // deadlocked + // threads + if (this.getState().equals(State.BLOCKED)) { + buffer.append("\tDUMPING OTHER BLOCKED THREADS\n"); + buffer.append(getBlockedStackTraces()); + + } + PurgeLogger.logError(buffer.toString(), this.pluginName); + + } + + /** + * Gets the stack traces for all other threads in the BLOCKED state in the + * JVM + * + * @return The stack traces for all other threads in the BLOCKED state in + * the JVM + */ + private String getBlockedStackTraces() { + StringBuffer buffer = new StringBuffer(); + Map threads = Thread.getAllStackTraces(); + for (Thread t : threads.keySet()) { + if (t.getState().equals(State.BLOCKED)) { + if (t.getId() != this.getId()) { + buffer.append(getStackTrace(t)); + } + } + } + + return buffer.toString(); + } + + /** + * Gets the stack trace for the given thread + * + * @param thread + * The thread to get the stack trace for + * @return The stack trace as a String + */ + private String getStackTrace(Thread thread) { + StringBuffer buffer = new StringBuffer(); + StackTraceElement[] stack = Thread.getAllStackTraces().get(thread); + buffer.append("\tThread ID: ").append(thread.getId()) + .append(" Thread state: ").append(this.getState()) + .append("\n"); + if (stack == null) { + buffer.append("No stack trace could be retrieved for this thread"); + } else { + for (int i = 0; i < stack.length; i++) { + buffer.append("\t\t").append(stack[i]).append("\n"); + } + } + return buffer.toString(); + } + + public long getStartTime() { + return startTime; + } + + public long getAge() { + return System.currentTimeMillis() - startTime; + } +} diff --git a/PurgeManager.java b/PurgeManager.java new file mode 100644 index 0000000000..a21bb7fc7e --- /dev/null +++ b/PurgeManager.java @@ -0,0 +1,488 @@ +/** + * 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.edex.purgesrv; + +import java.lang.Thread.State; +import java.util.ArrayList; +import java.util.Calendar; +import java.util.Collections; +import java.util.Date; +import java.util.HashSet; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.TimeZone; +import java.util.concurrent.ConcurrentHashMap; + +import com.raytheon.uf.edex.core.dataplugin.PluginRegistry; +import com.raytheon.uf.edex.database.cluster.ClusterLockUtils; +import com.raytheon.uf.edex.database.cluster.ClusterLockUtils.LockState; +import com.raytheon.uf.edex.database.cluster.ClusterTask; +import com.raytheon.uf.edex.database.purge.PurgeLogger; +import com.raytheon.uf.edex.database.status.StatusConstants; +import com.raytheon.uf.edex.purgesrv.PurgeJob.PURGE_JOB_TYPE; + +/** + * + * Object for managing purge jobs. The purge manager relies on the purgejobs + * table to coordinate information. The executePurge() method on this class is + * executed every minute via a quartz timer defined in the purge-spring.xml + * Spring configuration file. + *

+ * The purge manager is designed to adhere to the following rules: + *

+ * · The cluster may have no more than 6 purge jobs running simultaneously by + * default. This property is configurable in the project.properties file
+ * · Any given server may have no more than 2 purge jobs running simultaneously + * by default. This property is configurable in the project.properties file
+ * · A purge job for a plugin is considered 'hung' if it has been running for + * more than 20 minutes by default. This property is configurable in the + * project.properties file
+ * · If a purge job that was previously determined to be hung actually finishes + * it's execution, the cluster lock is updated appropriately and the purge job + * is able to resume normal operation. This is in place so if a hung purge + * process goes unnoticed for a period of time, the server will still try to + * recover autonomously if it can.
+ * · If a purge job is determined to be hung, the stack trace for the thread + * executing the job is output to the log. Furthermore, if the job is in the + * BLOCKED state, the stack traces for all other BLOCKED threads is output to + * the purge log as part of a rudimentary deadlock detection strategy to be used + * by personnel attempting to remedy the situation.
+ * · By default, a fatal condition occurs if a given plugin's purge job fails 3 + * consecutive times.
+ * · If a purge job hangs on one server in the cluster, it will try and run on + * another cluster member at the next purge interval.
+ * · If the purge manager attempts to purge a plugin that has been running for + * longer than the 20 minute threshold, it is considered a failure, and the + * failure count is updated. + *

+ * + * + *

+ * 
+ * SOFTWARE HISTORY
+ * 
+ * Date         Ticket#    Engineer    Description
+ * ------------ ---------- ----------- --------------------------
+ * Apr 18, 2012 #470       bphillip    Initial creation
+ * 
+ * 
+ * + * @author bphillip + * @version 1.0 + */ +public class PurgeManager { + + /** Purge Manager task name */ + private static final String PURGE_TASK_NAME = "Purge Manager"; + + /** Purge Manager task details */ + private static final String PURGE_TASK_DETAILS = "Purge Manager Job"; + + /** Purge Manager task override timeout. Currently 2 minutes */ + private static final long PURGE_MANAGER_TIMEOUT = 120000; + + /** + * The cluster limit property to be set via Spring with the value defined in + * project.properties + */ + private int clusterLimit = 6; + + /** + * The server limit property to be set via Spring with the value defined in + * project.properties + */ + private int serverLimit = 2; + + /** + * The time in minutes at which a purge job is considered 'dead' or 'hung' + * set via Spring with the value defined in project.properties + */ + private int deadPurgeJobAge = 20; + + /** + * The frequency, in minutes, that a plugin may be purged set via Spring + * with the value defined in project.properties + */ + private int purgeFrequency = 60; + + /** + * How many times a purger is allowed to fail before it is considered fatal. + * Set via Spring with the value defined in project.properties + */ + private int fatalFailureCount = 3; + + /** + * The master switch defined in project.properties that enables and disables + * data purging + */ + private boolean purgeEnabled = true; + + /** Map of purge jobs */ + private Map purgeJobs = new ConcurrentHashMap(); + + private PurgeDao dao = new PurgeDao(); + + private static PurgeManager instance = new PurgeManager(); + + public static PurgeManager getInstance() { + return instance; + } + + /** + * Creates a new PurgeManager + */ + private PurgeManager() { + } + + /** + * Executes the purge routine + */ + public void executePurge() { + if (!purgeEnabled) { + PurgeLogger.logWarn( + "Data purging has been disabled. No data will be purged.", + null); + return; + } + + ClusterTask purgeMgrTask = getPurgeLock(); + + try { + // Prune the job map + Iterator iter = purgeJobs.values().iterator(); + while (iter.hasNext()) { + if (!iter.next().isAlive()) { + iter.remove(); + } + } + + Calendar purgeTimeOutLimit = Calendar.getInstance(); + purgeTimeOutLimit.setTimeZone(TimeZone.getTimeZone("GMT")); + purgeTimeOutLimit.add(Calendar.MINUTE, -deadPurgeJobAge); + Calendar purgeFrequencyLimit = Calendar.getInstance(); + purgeFrequencyLimit.setTimeZone(TimeZone.getTimeZone("GMT")); + purgeFrequencyLimit.add(Calendar.MINUTE, -purgeFrequency); + + // Gets the list of plugins in ascending order by the last time they + // were purged + List pluginList = dao.getPluginsByPurgeTime(); + + // check for any new plugins or database being purged and needing + // entries recreated + Set availablePlugins = new HashSet(PluginRegistry + .getInstance().getRegisteredObjects()); + + // Merge the lists + availablePlugins.removeAll(pluginList); + + if (availablePlugins.size() > 0) { + // generate new list with them at the beginning + List newSortedPlugins = new ArrayList( + availablePlugins); + Collections.sort(newSortedPlugins); + newSortedPlugins.addAll(pluginList); + pluginList = newSortedPlugins; + } + + boolean canPurge = true; + int jobsStarted = 0; + int maxNumberOfJobsToStart = Math.min( + clusterLimit + - dao.getRunningClusterJobs( + purgeTimeOutLimit.getTime(), + fatalFailureCount), serverLimit + - getNumberRunningJobsOnServer(purgeTimeOutLimit)); + for (String plugin : pluginList) { + try { + // initialize canPurge based on number of jobs started + canPurge = jobsStarted < maxNumberOfJobsToStart; + PurgeJob jobThread = purgeJobs.get(plugin); + PurgeJobStatus job = dao.getJobForPlugin(plugin); + + if (job == null) { + // no job in database, generate empty job + + try { + job = new PurgeJobStatus(); + job.setPlugin(plugin); + job.setFailedCount(0); + job.setRunning(false); + job.setStartTime(new Date(0)); + dao.create(job); + } catch (Throwable e) { + PurgeLogger.logError( + "Failed to create new purge job entry", + plugin, e); + } + } + + // Check to see if this job has met the fatal failure count + if (job.getFailedCount() >= fatalFailureCount) { + canPurge = false; + PurgeLogger + .logFatal( + "Purger for this plugin has reached or exceeded consecutive failure limit of " + + fatalFailureCount + + ". Data will no longer being purged for this plugin.", + plugin); + } + + // is purge job currently running on this server + if (jobThread != null) { + // job currently running on our server, don't start + // another + canPurge = false; + + if (purgeTimeOutLimit.getTimeInMillis() > jobThread + .getStartTime()) { + jobThread.printTimedOutMessage(deadPurgeJobAge); + } + } else { + if (job.isRunning()) { + // check if job has timed out + if (purgeTimeOutLimit.getTime().before( + job.getStartTime())) { + canPurge = false; + } + // else if no one else sets canPurge = false will + // start purging on this server + } else { + // not currently running, check if need to be purged + Date startTime = job.getStartTime(); + if (startTime != null + && startTime.after(purgeFrequencyLimit + .getTime())) { + canPurge = false; + } + } + } + + if (canPurge) { + purgeJobs.put(plugin, purgeExpiredData(plugin)); + jobsStarted++; + } + } catch (Throwable e) { + PurgeLogger + .logError( + "An unexpected error occured during the purge job check for plugin", + plugin, e); + } + } + } catch (Throwable e) { + PurgeLogger + .logError( + "An unexpected error occured during the data purge process", + StatusConstants.CATEGORY_PURGE, e); + } finally { + // Unlock the purge task to allow other servers to run. + ClusterLockUtils.unlock(purgeMgrTask, false); + // PurgeLogger.logInfo(getPurgeStatus(true), null); + } + } + + @SuppressWarnings("unused") + private String getPurgeStatus(boolean verbose) { + Calendar purgeTimeOutLimit = Calendar.getInstance(); + purgeTimeOutLimit.setTimeZone(TimeZone.getTimeZone("GMT")); + purgeTimeOutLimit.add(Calendar.MINUTE, -deadPurgeJobAge); + + StringBuilder builder = new StringBuilder(); + List failedJobs = dao.getFailedJobs(fatalFailureCount); + + List timedOutJobs = dao + .getTimedOutJobs(purgeTimeOutLimit.getTime()); + int clusterJobs = dao.getRunningClusterJobs( + purgeTimeOutLimit.getTime(), fatalFailureCount); + Map> serverMap = dao + .getRunningServerJobs(); + builder.append("\nPURGE JOB STATUS:"); + builder.append("\n\tTotal Jobs Running On Cluster: ").append( + clusterJobs); + List jobs = null; + for (String server : serverMap.keySet()) { + jobs = serverMap.get(server); + builder.append("\n\tJobs Running On ").append(server).append(": ") + .append(jobs.size()); + if (verbose && !jobs.isEmpty()) { + builder.append(" Plugins: "); + for (int i = 0; i < jobs.size(); i++) { + builder.append(jobs.get(i).getPlugin()); + if (i != jobs.size() - 1) { + builder.append(","); + } + } + } + } + if (verbose) { + builder.append("\n\tFailed Jobs: "); + if (failedJobs.isEmpty()) { + builder.append("0"); + } else { + PurgeJobStatus currentJob = null; + for (int i = 0; i < failedJobs.size(); i++) { + currentJob = failedJobs.get(i); + builder.append(currentJob.getPlugin()); + if (i != failedJobs.size() - 1) { + builder.append(","); + } + } + } + + builder.append("\n\tTimed Out Jobs: "); + if (timedOutJobs.isEmpty()) { + builder.append("0"); + } else { + PurgeJobStatus currentJob = null; + for (int i = 0; i < timedOutJobs.size(); i++) { + currentJob = timedOutJobs.get(i); + builder.append(currentJob.getPlugin()); + if (i != timedOutJobs.size() - 1) { + builder.append(","); + } + } + } + } + return builder.toString(); + } + + public ClusterTask getPurgeLock() { + // Lock so only one cluster member may start purge processes + ClusterTask purgeMgrTask = ClusterLockUtils.lock(PURGE_TASK_NAME, + PURGE_TASK_DETAILS, PURGE_MANAGER_TIMEOUT, true); + + LockState purgeMgrLockState = purgeMgrTask.getLockState(); + switch (purgeMgrLockState) { + case FAILED: + PurgeLogger.logError( + "Purge Manager failed to acquire cluster task lock", + StatusConstants.CATEGORY_PURGE); + return null; + case OLD: + PurgeLogger.logWarn("Purge Manager acquired old cluster task lock", + StatusConstants.CATEGORY_PURGE); + break; + case ALREADY_RUNNING: + PurgeLogger + .logWarn( + "Purge Manager acquired currently running cluster task lock", + StatusConstants.CATEGORY_PURGE); + return null; + case SUCCESSFUL: + break; + } + return purgeMgrTask; + } + + private int getNumberRunningJobsOnServer(Calendar timeOutTime) { + int rval = 0; + for (PurgeJob job : purgeJobs.values()) { + // if job has not timed out or if the job is not blocked consider it + // running on this server + if (timeOutTime.getTimeInMillis() < job.getStartTime() + || !job.getState().equals(State.BLOCKED)) { + rval++; + } + + } + return rval; + } + + /** + * Starts a purge expired data job for the specified plugin. Using this + * method allows for exceeding failure count via a manual purge as well as + * kicking off a second purge for one already running on a server. + * + * @param plugin + * The plugin to purge the expired data for + * @return The PurgeJob that was started + */ + public PurgeJob purgeExpiredData(String plugin) { + dao.startJob(plugin); + PurgeJob job = new PurgeJob(plugin, PURGE_JOB_TYPE.PURGE_EXPIRED); + job.start(); + return job; + } + + /** + * Starts a purge all data job for the specified plugin. Using this method + * allows for exceeding failure count via a manual purge as well as kicking + * off a second purge for one already running on a server. + * + * @param plugin + * The plugin to purge all data for + * @return The PurgeJob that was started + */ + public PurgeJob purgeAllData(String plugin) { + dao.startJob(plugin); + PurgeJob job = new PurgeJob(plugin, PURGE_JOB_TYPE.PURGE_ALL); + job.start(); + return job; + } + + public int getClusterLimit() { + return clusterLimit; + } + + public void setClusterLimit(int clusterLimit) { + this.clusterLimit = clusterLimit; + } + + public int getServerLimit() { + return serverLimit; + } + + public void setServerLimit(int serverLimit) { + this.serverLimit = serverLimit; + } + + public int getDeadPurgeJobAge() { + return deadPurgeJobAge; + } + + public void setDeadPurgeJobAge(int deadPurgeJobAge) { + this.deadPurgeJobAge = deadPurgeJobAge; + } + + public int getPurgeFrequency() { + return purgeFrequency; + } + + public void setPurgeFrequency(int purgeFrequency) { + this.purgeFrequency = purgeFrequency; + } + + public int getFatalFailureCount() { + return this.fatalFailureCount; + } + + public void setFatalFailureCount(int fatalFailureCount) { + this.fatalFailureCount = fatalFailureCount; + } + + public void setPurgeEnabled(boolean purgeEnabled) { + this.purgeEnabled = purgeEnabled; + } + + public boolean getPurgeEnabled() { + return purgeEnabled; + } +} diff --git a/RadarServer/com.raytheon.rcm.lib/component-deploy.xml b/RadarServer/com.raytheon.rcm.lib/component-deploy.xml index 16bfb5a74f..fb828b1a35 100644 --- a/RadarServer/com.raytheon.rcm.lib/component-deploy.xml +++ b/RadarServer/com.raytheon.rcm.lib/component-deploy.xml @@ -5,6 +5,7 @@ - + + - \ No newline at end of file + diff --git a/RadarServer/com.raytheon.rcm.lib/src/com/raytheon/rcm/config/awips1/Awips1RpsListUtil.java b/RadarServer/com.raytheon.rcm.lib/src/com/raytheon/rcm/config/awips1/Awips1RpsListUtil.java index 39c6acb5c9..abc057eba0 100755 --- a/RadarServer/com.raytheon.rcm.lib/src/com/raytheon/rcm/config/awips1/Awips1RpsListUtil.java +++ b/RadarServer/com.raytheon.rcm.lib/src/com/raytheon/rcm/config/awips1/Awips1RpsListUtil.java @@ -32,6 +32,20 @@ import com.raytheon.rcm.message.GSM; import com.raytheon.rcm.request.Request; import com.raytheon.rcm.request.RpsList; +/** + * Utility class for dealing with AWIPS 1 RPS lists. + * + *
+ *  SOFTWARE HISTORY
+ * 
+ *  Date         Ticket#     Engineer    Description
+ *  ------------ ----------  ----------- --------------------------
+ *  2009                     dfriedma    Initial version
+ *  2012-04-30   DR 14908    D. Friedman Require radar name for valid RPS
+ *                                       file names.
+ * 
+ * + */ public class Awips1RpsListUtil { // is 'maint' an opMode?? public static class Selector { @@ -187,7 +201,7 @@ public class Awips1RpsListUtil { } protected static final Pattern selectorPattern = Pattern - .compile("^(?:(.+)\\.)?(.+)\\.VCP(\\d+)(?:\\.(.*))?$"); + .compile("^(.+)\\.(.+)\\.VCP(\\d+)(?:\\.(.*))?$"); protected static final Pattern maintPattern = Pattern .compile("^([^\\.]+)\\.maint(?:\\.(.*))?$"); @@ -197,9 +211,7 @@ public class Awips1RpsListUtil { if (m.matches()) { Selector sel = new Selector(); - if (m.group(1) != null) { - sel.radar = m.group(1).toLowerCase(); - } + sel.radar = m.group(1).toLowerCase(); String opModeString = m.group(2).toLowerCase(); if (opModeString.equals("clear-air")) diff --git a/RadarServer/com.raytheon.rcm.server/src/com/raytheon/rcm/config/awips1/Awips1ConfigProvider.java b/RadarServer/com.raytheon.rcm.server/src/com/raytheon/rcm/config/awips1/Awips1ConfigProvider.java index 5a4003cc80..a77b4cef82 100755 --- a/RadarServer/com.raytheon.rcm.server/src/com/raytheon/rcm/config/awips1/Awips1ConfigProvider.java +++ b/RadarServer/com.raytheon.rcm.server/src/com/raytheon/rcm/config/awips1/Awips1ConfigProvider.java @@ -48,6 +48,15 @@ import com.raytheon.rcm.server.Log; * com.raytheon.rcm.config.awips1.FXA_LOCAL_SITE property. * * Note: Does not recognize the FILE_SERVER_DEFAULT_PATHS environment variable. + * + *
+ *  SOFTWARE HISTORY
+ * 
+ *  Date         Ticket#     Engineer    Description
+ *  ------------ ----------  ----------- --------------------------
+ *  2009                     dfriedma    Initial version
+ *  2012-04-30   DR 14904    D. Friedman Add backup links to dial ORPGs.
+ * 
*/ public class Awips1ConfigProvider implements ConfigurationProvider { @@ -410,10 +419,8 @@ public class Awips1ConfigProvider implements ConfigurationProvider { String radarName = ls.next().toLowerCase(); int nexradId = ls.nextInt(); - RadarConfig rc = radars.get(radarName.toLowerCase()); //config.getConfigForRadar(radarName); - // so only getting entries for current purpose .. does not - // allow easy switching - if (rc == null || rc.isDedicated() != dedicated) + RadarConfig rc = radars.get(radarName.toLowerCase()); + if (rc == null) continue; if (nexradId != rc.getNexradID()) { // warn... @@ -428,8 +435,6 @@ public class Awips1ConfigProvider implements ConfigurationProvider { lr.setLinkIndex(ls.nextInt()); lr.setTcmPassword(ls.next()); lr.setDedicated(dedicated); - // TODO: do something with max rps size? - // lr.setBackup(backup); if (dedicated) { lr.setMaxRpsListSize(ls.nextInt()); diff --git a/TextDao.java b/TextDao.java new file mode 100644 index 0000000000..069873d95d --- /dev/null +++ b/TextDao.java @@ -0,0 +1,72 @@ +/** + * 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.edex.plugin.text.dao; + +import java.util.Calendar; + +import com.raytheon.edex.db.dao.DefaultPluginDao; +import com.raytheon.edex.textdb.dbapi.impl.TextDB; +import com.raytheon.uf.common.dataplugin.PluginException; +import com.raytheon.uf.edex.database.purge.PurgeLogger; + +/** + * DAO for text products + * + *
+ * 
+ * SOFTWARE HISTORY
+ * 
+ * Date       	Ticket#		Engineer	Description
+ * ------------	----------	-----------	--------------------------
+ * Jul 10, 2009 2191        rjpeter     Update retention time handling.
+ * Aug 18, 2009 2191        rjpeter     Changed to version purging.
+ * 
+ * + * @author + * @version 1 + */ +public class TextDao extends DefaultPluginDao { + + public TextDao(String pluginName) throws PluginException { + super(pluginName); + } + + @Override + public void purgeAllData() { + logger.warn("purgeAllPluginData not implemented for text. No data will be purged."); + } + + protected void loadScripts() throws PluginException { + // no op + } + + public void purgeExpiredData() throws PluginException { + int deletedRecords = 0; + + // only do full purge every few hours since incremental purge runs every + // minute + if (Calendar.getInstance().get(Calendar.HOUR_OF_DAY) % 3 == 0) { + TextDB.purgeStdTextProducts(); + } + + PurgeLogger.logInfo("Purged " + deletedRecords + " items total.", + "text"); + } +} diff --git a/after.txt b/after.txt new file mode 100644 index 0000000000..1f9927016d --- /dev/null +++ b/after.txt @@ -0,0 +1,13 @@ +-rw-r--r-- 1 dmsys dmtool 94518 May 17 14:24 cave/com.raytheon.uf.viz.monitor.ffmp/src/com/raytheon/uf/viz/monitor/ffmp/FFMPMonitor.java +-rw-r--r-- 1 dmsys dmtool 7156 May 17 14:24 cave/com.raytheon.uf.viz.monitor.ffmp/src/com/raytheon/uf/viz/monitor/ffmp/ui/dialogs/FFMPTableCellData.java +-rw-r--r-- 1 dmsys dmtool 71285 May 17 14:24 cave/com.raytheon.uf.viz.monitor.ffmp/src/com/raytheon/uf/viz/monitor/ffmp/ui/dialogs/FfmpBasinTableDlg.java +-rw-r--r-- 1 dmsys dmtool 9851 May 17 14:24 cave/com.raytheon.uf.viz.monitor.ffmp/src/com/raytheon/uf/viz/monitor/ffmp/ui/rsc/FFMPColorUtils.java +-rw-r--r-- 1 dmsys dmtool 40157 May 17 14:24 cave/com.raytheon.uf.viz.monitor.ffmp/src/com/raytheon/uf/viz/monitor/ffmp/ui/rsc/FFMPDataGenerator.java +-rw-r--r-- 1 dmsys dmtool 18611 May 17 14:24 cave/com.raytheon.uf.viz.monitor.ffmp/src/com/raytheon/uf/viz/monitor/ffmp/ui/rsc/FFMPDataLoader.java +-rw-r--r-- 1 dmsys dmtool 147202 May 17 14:24 cave/com.raytheon.uf.viz.monitor.ffmp/src/com/raytheon/uf/viz/monitor/ffmp/ui/rsc/FFMPResource.java +-rw-r--r-- 1 dmsys dmtool 14664 May 17 14:24 edexOsgi/com.raytheon.uf.common.dataplugin.ffmp/src/com/raytheon/uf/common/dataplugin/ffmp/FFMPDataContainer.java +-rw-r--r-- 1 dmsys dmtool 26923 May 17 14:24 edexOsgi/com.raytheon.uf.common.dataplugin.ffmp/src/com/raytheon/uf/common/dataplugin/ffmp/FFMPRecord.java +-rw-r--r-- 1 dmsys dmtool 61981 May 17 14:24 edexOsgi/com.raytheon.uf.common.monitor/src/com/raytheon/uf/common/monitor/scan/ScanUtils.java +-rw-r--r-- 1 dmsys dmtool 17730 May 17 14:24 edexOsgi/com.raytheon.uf.edex.plugin.ffmp/src/com/raytheon/uf/edex/plugin/ffmp/FFMPURIFilter.java +-rw-r--r-- 1 dmsys dmtool 65982 May 17 14:24 edexOsgi/com.raytheon.uf.edex.plugin.ffmp/src/com/raytheon/uf/edex/plugin/ffmp/common/FFMPProcessor.java +-rw-r--r-- 1 dmsys dmtool 36163 May 17 14:24 edexOsgi/com.raytheon.uf.edex.plugin.ffmp/src/com/raytheon/uf/edex/plugin/ffmp/common/FFTI.java diff --git a/after_purge.out b/after_purge.out new file mode 100644 index 0000000000..1256a29121 --- /dev/null +++ b/after_purge.out @@ -0,0 +1,5 @@ +-rw-r--r-- 1 dmsys dmtool 24661 May 24 17:52 edexOsgi/com.raytheon.edex.plugin.grib/src/com/raytheon/edex/plugin/grib/spatial/GribSpatialCache.java +-rw-r--r-- 1 dmsys dmtool 2197 May 24 17:52 edexOsgi/com.raytheon.edex.plugin.text/src/com/raytheon/edex/plugin/text/dao/TextDao.java +-rw-r--r-- 1 dmsys dmtool 9250 May 24 17:53 edexOsgi/com.raytheon.uf.edex.purgesrv/src/com/raytheon/uf/edex/purgesrv/PurgeDao.java +-rw-r--r-- 1 dmsys dmtool 9574 May 24 17:53 edexOsgi/com.raytheon.uf.edex.purgesrv/src/com/raytheon/uf/edex/purgesrv/PurgeJob.java +-rw-r--r-- 1 dmsys dmtool 15681 May 24 17:53 edexOsgi/com.raytheon.uf.edex.purgesrv/src/com/raytheon/uf/edex/purgesrv/PurgeManager.java diff --git a/before.txt b/before.txt new file mode 100644 index 0000000000..31b3c9450e --- /dev/null +++ b/before.txt @@ -0,0 +1,13 @@ +-rw-r--r-- 1 dmsys dmtool 95993 May 10 11:41 cave/com.raytheon.uf.viz.monitor.ffmp/src/com/raytheon/uf/viz/monitor/ffmp/FFMPMonitor.java +-r--r--r-- 1 dmsys dmtool 7016 Nov 10 2011 cave/com.raytheon.uf.viz.monitor.ffmp/src/com/raytheon/uf/viz/monitor/ffmp/ui/dialogs/FFMPTableCellData.java +-rw-r--r-- 1 dmsys dmtool 71722 May 10 11:41 cave/com.raytheon.uf.viz.monitor.ffmp/src/com/raytheon/uf/viz/monitor/ffmp/ui/dialogs/FfmpBasinTableDlg.java +-r--r--r-- 1 dmsys dmtool 10752 Dec 7 15:05 cave/com.raytheon.uf.viz.monitor.ffmp/src/com/raytheon/uf/viz/monitor/ffmp/ui/rsc/FFMPColorUtils.java +-rw-r--r-- 1 dmsys dmtool 40273 May 10 11:41 cave/com.raytheon.uf.viz.monitor.ffmp/src/com/raytheon/uf/viz/monitor/ffmp/ui/rsc/FFMPDataGenerator.java +-r--r--r-- 1 dmsys dmtool 19531 Jan 31 07:54 cave/com.raytheon.uf.viz.monitor.ffmp/src/com/raytheon/uf/viz/monitor/ffmp/ui/rsc/FFMPDataLoader.java +-rw-r--r-- 1 dmsys dmtool 147364 May 10 11:41 cave/com.raytheon.uf.viz.monitor.ffmp/src/com/raytheon/uf/viz/monitor/ffmp/ui/rsc/FFMPResource.java +-rw-r--r-- 1 dmsys dmtool 15108 May 10 11:41 edexOsgi/com.raytheon.uf.common.dataplugin.ffmp/src/com/raytheon/uf/common/dataplugin/ffmp/FFMPDataContainer.java +-r--r--r-- 1 dmsys dmtool 27099 Apr 16 08:06 edexOsgi/com.raytheon.uf.common.dataplugin.ffmp/src/com/raytheon/uf/common/dataplugin/ffmp/FFMPRecord.java +-r--r--r-- 1 dmsys dmtool 61329 Feb 24 14:37 edexOsgi/com.raytheon.uf.common.monitor/src/com/raytheon/uf/common/monitor/scan/ScanUtils.java +-r--r--r-- 1 dmsys dmtool 21327 Apr 18 12:03 edexOsgi/com.raytheon.uf.edex.plugin.ffmp/src/com/raytheon/uf/edex/plugin/ffmp/FFMPURIFilter.java +-rw-r--r-- 1 dmsys dmtool 65837 May 7 10:47 edexOsgi/com.raytheon.uf.edex.plugin.ffmp/src/com/raytheon/uf/edex/plugin/ffmp/common/FFMPProcessor.java +-rw-r--r-- 1 dmsys dmtool 36591 May 10 11:41 edexOsgi/com.raytheon.uf.edex.plugin.ffmp/src/com/raytheon/uf/edex/plugin/ffmp/common/FFTI.java diff --git a/before_purge.out b/before_purge.out new file mode 100644 index 0000000000..8563dd00e2 --- /dev/null +++ b/before_purge.out @@ -0,0 +1,5 @@ +-rw-r--r-- 1 dmsys dmtool 23911 May 10 11:41 edexOsgi/com.raytheon.edex.plugin.grib/src/com/raytheon/edex/plugin/grib/spatial/GribSpatialCache.java +-r--r--r-- 1 dmsys dmtool 2000 Jun 15 2011 edexOsgi/com.raytheon.edex.plugin.text/src/com/raytheon/edex/plugin/text/dao/TextDao.java +-rw-r--r-- 1 dmsys dmtool 9022 May 10 11:41 edexOsgi/com.raytheon.uf.edex.purgesrv/src/com/raytheon/uf/edex/purgesrv/PurgeDao.java +-rw-r--r-- 1 dmsys dmtool 9090 May 10 11:41 edexOsgi/com.raytheon.uf.edex.purgesrv/src/com/raytheon/uf/edex/purgesrv/PurgeJob.java +-rw-r--r-- 1 dmsys dmtool 15020 May 10 11:41 edexOsgi/com.raytheon.uf.edex.purgesrv/src/com/raytheon/uf/edex/purgesrv/PurgeManager.java diff --git a/cave/build/cave/memorySettings.xml b/cave/build/cave/memorySettings.xml index 3f1b79fe5e..711e74b738 100644 --- a/cave/build/cave/memorySettings.xml +++ b/cave/build/cave/memorySettings.xml @@ -30,7 +30,7 @@ Xmx - 1024M + 1280M diff --git a/cave/build/p2-build.xml b/cave/build/p2-build.xml index 3ab4e6046c..dd00a25f0e 100644 --- a/cave/build/p2-build.xml +++ b/cave/build/p2-build.xml @@ -270,10 +270,6 @@ - - - @@ -409,4 +405,4 @@ - \ No newline at end of file + diff --git a/cave/build/static/common/cave/etc/aviation/python/EtaData.py b/cave/build/static/common/cave/etc/aviation/python/EtaData.py index 9e6399596a..ecbc806d72 100644 --- a/cave/build/static/common/cave/etc/aviation/python/EtaData.py +++ b/cave/build/static/common/cave/etc/aviation/python/EtaData.py @@ -400,9 +400,9 @@ class _NetCDFFile: # v = self._fh.variables['refTime'] # itime = int(v[records[0]]) - import PointDataRetrieve + import ForecastPointDataRetrieve self.Model = 'ETA' - pdc = PointDataRetrieve.retrieve('modelsounding', ident, PARAMETERS, refTime=refTime, constraint={'reportType':self.Model}) + pdc = ForecastPointDataRetrieve.retrieve('modelsounding', ident, PARAMETERS, refTime=refTime, constraint={'reportType':self.Model}) self.NumData = min(self.MaxData, len(pdc.keys())) keys = pdc.keys() keys.sort() diff --git a/cave/build/static/common/cave/etc/aviation/python/LLWSThread.py b/cave/build/static/common/cave/etc/aviation/python/LLWSThread.py index 41f77662f3..6bb755b890 100644 --- a/cave/build/static/common/cave/etc/aviation/python/LLWSThread.py +++ b/cave/build/static/common/cave/etc/aviation/python/LLWSThread.py @@ -698,7 +698,7 @@ class Server(object): """ Process the newly arrived profiler data """ - import PointDataRetrieve, NoDataException + import RefTimePointDataRetrieve, NoDataException PARAMETERS = ["profilerId", "validTime", "numProfLvls", "height", "uComponent", "vComponent", "uvQualityCode"] site = AvnParser.getTafSiteCfg(ident) @@ -706,9 +706,9 @@ class Server(object): if len(profilerList) > 0: for profilerName in profilerList: try : - pdc = PointDataRetrieve.retrieve('profiler', None, PARAMETERS, + pdc = RefTimePointDataRetrieve.retrieve('profiler', None, PARAMETERS, keyId='validTime', constraint={'profilerId':profilerName}, - forecast=False, maxSize=1) + maxSize=1) except NoDataException.NoDataException: _Logger.info("Error reading profiler " + profilerName) profilerList.remove(profilerName) diff --git a/cave/build/static/common/cave/etc/aviation/python/MetarData.py b/cave/build/static/common/cave/etc/aviation/python/MetarData.py index a5fd876974..0cf08392d1 100644 --- a/cave/build/static/common/cave/etc/aviation/python/MetarData.py +++ b/cave/build/static/common/cave/etc/aviation/python/MetarData.py @@ -19,8 +19,9 @@ ## import Avn, MetarDecoder -import PointDataRetrieve import NoDataException +import HoursRefTimePointDataRetrieve + # # Retrieves metar data through pointdata interfaces @@ -31,6 +32,7 @@ import NoDataException # Date Ticket# Engineer Description # ------------ ---------- ----------- -------------------------- # 08/26/09 njensen Initial Creation. +# 26APR2012 14688 rferrel Use HoursRefTimePointDataRetrieve. # # # @@ -41,7 +43,7 @@ def retrieve(siteID, size=1): if type(siteID) is str: siteID = [siteID] try : - pdc = PointDataRetrieve.retrieve('obs', siteID[0], PARAMETERS, keyId='timeObs', maxSize=size, forecast=False) + pdc = HoursRefTimePointDataRetrieve.retrieve('obs', siteID[0], PARAMETERS, keyId='timeObs', maxSize=size) except NoDataException.NoDataException: raise NoDataException.NoDataException('No METAR data available for site %s' % siteID[0]) decoder = MetarDecoder.Decoder() diff --git a/cave/build/static/common/cave/etc/aviation/python/MetarDecoder.py b/cave/build/static/common/cave/etc/aviation/python/MetarDecoder.py index 08e8f5e59e..2f9299bdc1 100644 --- a/cave/build/static/common/cave/etc/aviation/python/MetarDecoder.py +++ b/cave/build/static/common/cave/etc/aviation/python/MetarDecoder.py @@ -181,7 +181,7 @@ _TokList = [ ('autocor', r'AUTO|COR|RTD'), ('wind', r'(VRB|\d{3})\d{2,3}(G\d{2,3})?(KT|MPS)'), ('wind_vrb', r'\d{3}V\d{3}'), - ('vsby', r'(M\d/\d|%s|\d{1,4})SM|0|50|\d{3,4}[NEWS]{0,2}' % _Fract), + ('vsby', r'(M\d/\d|%s|\d{1,3})SM|\d{1,4}[NEWS]{0,2}' % _Fract), ('rvr', r'R\w+/[MP]?\d{3,4}(V?P?\d{4})?(FT)?'), ('funnel', r'[+]?FC'), ('pcp', r'%s|TS(\s+%s)?' % (_pcptok, _pcptok)), diff --git a/cave/build/static/common/cave/etc/aviation/python/MosData.py b/cave/build/static/common/cave/etc/aviation/python/MosData.py index ff74753267..956587fc00 100644 --- a/cave/build/static/common/cave/etc/aviation/python/MosData.py +++ b/cave/build/static/common/cave/etc/aviation/python/MosData.py @@ -624,9 +624,9 @@ class _NetCDFFile: # if recno is None: # return None - import PointDataRetrieve + import ForecastPointDataRetrieve # print 'makeData: ident (%s), selfModel(%s) refTime(%s):' % (ident, self.Model, refTime) - pdc = PointDataRetrieve.retrieve('bufrmos' + self.Model, ident, PARAMETERS, refTime=refTime) + pdc = ForecastPointDataRetrieve.retrieve('bufrmos' + self.Model, ident, PARAMETERS, refTime=refTime) self.NumData = min(self.NumData, len(pdc.keys())) self.issuetime = pdc.refTime.getTime() / 1000 fcstHrList = pdc.keys() @@ -655,8 +655,8 @@ class _NetCDFFile: return result def makeReport(self, ident): - import PointDataRetrieve - pdc = PointDataRetrieve.retrieve('bufrmos' + self.Model, ident, PARAMETERS) + import ForecastPointDataRetrieve + pdc = ForecastPointDataRetrieve.retrieve('bufrmos' + self.Model, ident, PARAMETERS) self.NumData = min(self.NumData, len(pdc.keys())) self.issuetime = pdc.refTime.getTime() / 1000 fcstHrList = pdc.keys() @@ -1064,8 +1064,8 @@ class _GfsLampNetCDFFile(_NetCDFFile): return g def makeReport(self, ident): - import PointDataRetrieve - pdc = PointDataRetrieve.retrieve('bufrmos' + self.Model, ident, PARAMETERS) + import ForecastPointDataRetrieve + pdc = ForecastPointDataRetrieve.retrieve('bufrmos' + self.Model, ident, PARAMETERS) self.NumData = min(self.NumData, len(pdc.keys())) self.issuetime = pdc.refTime.getTime() / 1000 fcstHrList = pdc.keys() diff --git a/cave/build/static/common/cave/etc/aviation/python/RadLtgData.py b/cave/build/static/common/cave/etc/aviation/python/RadLtgData.py index ae5eb5e047..d65c8d3e71 100644 --- a/cave/build/static/common/cave/etc/aviation/python/RadLtgData.py +++ b/cave/build/static/common/cave/etc/aviation/python/RadLtgData.py @@ -20,7 +20,7 @@ import logging import Avn -import PointDataRetrieve, NoDataException +import ForecastPointDataRetrieve, NoDataException # # Retrieves mos lightning data through pointdata interfaces @@ -31,6 +31,7 @@ import PointDataRetrieve, NoDataException # Date Ticket# Engineer Description # ------------ ---------- ----------- -------------------------- # 09/15/09 njensen Initial Creation. +# 26APR2012 14688 rferrel Use ForecastPointDataRetrieve. # # # @@ -43,7 +44,7 @@ _Logger = logging.getLogger(Avn.CATEGORY) def retrieve(siteID): try: - pdc = PointDataRetrieve.retrieve('bufrmosLAMP', siteID, PARAMETERS) + pdc = ForecastPointDataRetrieve.retrieve('bufrmosLAMP', siteID, PARAMETERS) except NoDataException.NoDataException: return None pots = [] diff --git a/cave/build/static/common/cave/etc/colormaps/scan/16 Level Reflectivity (DHR).cmap b/cave/build/static/common/cave/etc/colormaps/scan/16 Level Reflectivity (DHR).cmap deleted file mode 100644 index f5573981ca..0000000000 --- a/cave/build/static/common/cave/etc/colormaps/scan/16 Level Reflectivity (DHR).cmap +++ /dev/null @@ -1,231 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ffmp/guiConfig/DefaultFFMPconfig_basin.xml b/cave/build/static/common/cave/etc/ffmp/guiConfig/DefaultFFMPconfig_basin.xml index 97e25aee6b..4b8cc87856 100644 --- a/cave/build/static/common/cave/etc/ffmp/guiConfig/DefaultFFMPconfig_basin.xml +++ b/cave/build/static/common/cave/etc/ffmp/guiConfig/DefaultFFMPconfig_basin.xml @@ -93,7 +93,7 @@ GUID - false + true 6.0 1.0 3.0 diff --git a/cave/build/static/common/cave/etc/gfe/userPython/gfeConfig/gfeConfig.py b/cave/build/static/common/cave/etc/gfe/userPython/gfeConfig/gfeConfig.py index ecdd4958dd..c67a721978 100644 --- a/cave/build/static/common/cave/etc/gfe/userPython/gfeConfig/gfeConfig.py +++ b/cave/build/static/common/cave/etc/gfe/userPython/gfeConfig/gfeConfig.py @@ -1599,6 +1599,9 @@ Png_legendFormat_LT_end = "%b %d %I:%M %p %Z" # ifpIMAGE only Scripts = [ "Send Grids to NDFD..:" + "sendGridsToNDFD.sh {site} &", + + "Send Point and Click Grids to Consolidated Web Farm..:" + + "/awips2/GFESuite/bin/rsyncGridsToCWF_client.sh {site} &", "Png Images...:" + "ifpIMAGE " +\ diff --git a/cave/build/static/common/cave/etc/gfe/userPython/textUtilities/regular/CallToActions.py b/cave/build/static/common/cave/etc/gfe/userPython/textUtilities/regular/CallToActions.py index 7b9858786f..db22124814 100644 --- a/cave/build/static/common/cave/etc/gfe/userPython/textUtilities/regular/CallToActions.py +++ b/cave/build/static/common/cave/etc/gfe/userPython/textUtilities/regular/CallToActions.py @@ -525,7 +525,7 @@ IF YOU BECOME CAUGHT IN A RIP CURRENT...DO NOT PANIC. REMAIN CALM AND BEGIN TO S def ctaSEW(self): return [ - """A HAZARDOUS SEAS WARNING MEANS HAZARDOUS SEA CONDITIONS ARE IMMINENT OR OCCURING. RECREATIONAL BOATERS SHOULD REMAIN IN PORT...OR TAKE SHELTER UNTIL WAVES SUBSIDE. COMMERCIAL VESSELS SHOULD PREPARE FOR ROUGH SEAS<85>AND CONSIDER REMAINING IN PORT OR TAKING SHELTER IN PORT UNTIL HAZARDOUS SEAS SUBSIDE.""", + """A HAZARDOUS SEAS WARNING MEANS HAZARDOUS SEA CONDITIONS ARE IMMINENT OR OCCURING. RECREATIONAL BOATERS SHOULD REMAIN IN PORT...OR TAKE SHELTER UNTIL WAVES SUBSIDE. COMMERCIAL VESSELS SHOULD PREPARE FOR ROUGH SEAS AND CONSIDER REMAINING IN PORT OR TAKING SHELTER IN PORT UNTIL HAZARDOUS SEAS SUBSIDE.""", ] def ctaSIY(self): diff --git a/cave/build/static/common/cave/etc/gfe/userPython/utilities/HazardUtils.py b/cave/build/static/common/cave/etc/gfe/userPython/utilities/HazardUtils.py index 6450088498..47e2594371 100644 --- a/cave/build/static/common/cave/etc/gfe/userPython/utilities/HazardUtils.py +++ b/cave/build/static/common/cave/etc/gfe/userPython/utilities/HazardUtils.py @@ -793,7 +793,7 @@ class HazardUtils(SmartScript.SmartScript): def _lockHazards(self): "Flag the hazards parm as being edited. Return the hazards parm and its grid." hazParm = self.getParm(MODEL, ELEMENT, LEVEL) - startAbsTime = current() + startAbsTime = AbsTime(int(current().unixTime() /3600)*3600) endAbsTime = startAbsTime + LOCK_HOURS() * HOUR_SECONDS() timeRange = TimeRange(startAbsTime, endAbsTime) diff --git a/cave/build/static/common/cave/etc/gfe/userPython/utilities/ProcessVariableList.py b/cave/build/static/common/cave/etc/gfe/userPython/utilities/ProcessVariableList.py index 99664285e2..b0aed174cc 100644 --- a/cave/build/static/common/cave/etc/gfe/userPython/utilities/ProcessVariableList.py +++ b/cave/build/static/common/cave/etc/gfe/userPython/utilities/ProcessVariableList.py @@ -169,7 +169,8 @@ def buildWidgetList(pythonWidgetList): for widget in pythonWidgetList: - res = None + res = 1.0 # Default resolution + prec = 3 # Default precision valueList = [] # unpack the tuple @@ -179,22 +180,17 @@ def buildWidgetList(pythonWidgetList): name,defaultValue,entType,valueList = widget if len(widget) == 5: name,defaultValue,entType,valueList,res = widget - + if len(widget) == 6: + name,defaultValue,entType,valueList,res,prec = widget # Handle possibility of (label, variable) tuple if type(name) is types.TupleType: desc = name[0] else: desc = name - w = FieldDefinition() - w.setName(JUtil.pyValToJavaObj(name)) - w.setDescription(desc) - w.setType(FieldType.convertPythonType(entType)) - w.setDefaultValue(JUtil.pyValToJavaObj(defaultValue)) - w.setValueList(JUtil.pyValToJavaObj(valueList)) - if res is not None: - w.setResolution(float(res)) - + w = FieldDefinition(JUtil.pyValToJavaObj(name),desc,FieldType.convertPythonType(entType), + JUtil.pyValToJavaObj(defaultValue),JUtil.pyValToJavaObj(valueList), + float(res),int(prec)) widgetList.add(w) diff --git a/cave/build/static/common/cave/etc/gfe/utility/PngWriter.py b/cave/build/static/common/cave/etc/gfe/utility/PngWriter.py index 38b599642b..4a3644a713 100644 --- a/cave/build/static/common/cave/etc/gfe/utility/PngWriter.py +++ b/cave/build/static/common/cave/etc/gfe/utility/PngWriter.py @@ -24,6 +24,7 @@ import loadConfig from operator import attrgetter from com.raytheon.uf.common.time import DataTime from com.raytheon.uf.viz.core import RGBColors +from com.raytheon.viz.gfe.core.parm import ParmDisplayAttributes_VisMode as VisMode class PngWriter: def __init__(self, conf="testIFPImage", userName="", baseTime=None, @@ -47,6 +48,7 @@ class PngWriter: self.pgons = None self.imgParm = None self.ipn = self.getConfig('Png_image', '') + print "ipn:",self.ipn # user named time range specified? if usrTimeRange is not None: @@ -79,51 +81,11 @@ class PngWriter: rval.append(tparm) return rval - def getVisuals(self, parms, time): - rval = [] - for p in parms: - image = AFPS.ParmDspAttr.GRAPHIC - if p.parmID().compositeNameUI() == self.ipn: - image = AFPS.ParmDspAttr.IMAGE - self.imgParm = p - for vt in p.dspAttr().visualizationType( - AFPS.ParmDspAttr.SPATIAL, image): - v = self._createVisual(vt, p, time) - if v is not None: - rval.append(v) - - return rval - - def adjustAspect(self, width, height, wd): - # Calculate the correct aspect ratio and adjust the width - # and height to fit. - if width is None and height is None: - width = 400 # The default - - if width is not None: - height = int((float(width) * wd.extent().y) / wd.extent().x) - else: - width = int((float(height) * wd.extent().x) / wd.extent().y) - return width, height - def getBG(self): bgColor = self.getConfig('bgColor', "black") trans = self.getConfig('Png_transBG', 0, int) return bgColor, trans - def paintBorder(self, i1): - width, height = i1.size() - # paint a border - self.white = i1.colorAllocate((255, 255, 255)) - black = i1.colorAllocate((70, 70, 70)) - white = i1.colorAllocate((220, 220, 220)) - i1.rectangle((0, 0), (width - 1, height - 1), black) - i1.rectangle((1, 1), (width - 2, height - 2), black) - i1.line((0, 0), (width - 1, 0), white) - i1.line((1, 1), (width - 2, 1), white) - i1.line((0, 0), (0, height - 1), white) - i1.line((1, 1), (1, height - 2), white) - def getFileName(self, dir, setime): # calculate output filename, baseTime is AbsTime baseTimeFormat = self.getConfig('Png_baseTimeFormat', "%Y%m%d_%H%M") @@ -137,97 +99,10 @@ class PngWriter: fname = dir + "/" + prefix + timeString return fname - def writePng(self, dir, setime, visualInfo, i1): - fname = self.getFileName(dir, setime) + '.png' - if len(visualInfo) > 0: - i1.writePng(fname) - cbv = None - def getFileType(self): ext = self.getConfig('Png_fileType', 'png') return ext - def paintVisuals(self, visuals, setime, dir, wd, maskBasedOnHistory, - width=None, height=None): - fexten, ftype = self.getFileType() - omitColorBar = self.getConfig('Png_omitColorBar', 0, int) - width, height = self.adjustAspect(width, height, wd) - if self.imgParm is not None and not omitColorBar: - height += 25 # for colorbar - sd = AFPS.CD2Dint(AFPS.CC2Dint(0, 0), AFPS.CC2Dint(width, height)) - cbv = Graphics.SEColorBarVisual(self.dbss.msgHandler(), - AFPS.GridID_default(), 0) - mapping = Graphics.Mapping_spatial(sd, wd) - bgColor, trans = self.getBG() - fname = self.getFileName(dir, setime) + '.' + fexten - LogStream.logEvent("painting:", setime, "fname:", fname) - canvas = Graphics.FileCanvas_newCanvas(mapping, fname, - ftype, bgColor, trans) - canvas.reg(visuals) - - refMgr = self.dbss.dataManager().referenceSetMgr() - visualInfo = [] - for v in visuals: - if hasattr(v, "parm"): - parm = v.parm() - - gridid = AFPS.GridID(parm, setime) - griddata = gridid.grid() - if griddata is None: - continue - - # set up attributes for painting - AFPS.SETimeChangedMsg_send_mh(self.dbss.msgHandler(), setime) - AFPS.GridVisibilityChangedMsg_send_mh(self.dbss.msgHandler(), - gridid, 1, 0) - if self.imgParm is not None and self.imgParm == v.parm(): - AFPS.DisplayTypeChangedMsg_send_mh(self.dbss.msgHandler(), - AFPS.ParmDspAttr.SPATIAL, gridid, - AFPS.ParmDspAttr.IMAGE) - if v.visualType().type() == AFPS.VisualType.IMAGE: - info = (parm.parmID(), griddata.gridTime().startTime(), - griddata.gridTime().endTime(), - 'NoColor', 1) - else: - info = (parm.parmID(), griddata.gridTime().startTime(), - griddata.gridTime().endTime(), - parm.dspAttr().baseColor(), 0) - - # fit to data special cases - if v.visualType().type() == AFPS.VisualType.IMAGE: - alg = self.getConfig(parm.parmID().compositeNameUI() - + '_fitToDataColorTable', None) - if alg is not None: - if alg == 'Single Grid over Area': - ct = parm.dspAttr().colorTable() - refarea = refMgr.activeRefSet() - ct.fitToData_gridarea(gridid, refarea) - elif alg == 'Single Grid': - ct = parm.dspAttr().colorTable() - ct.fitToData_grid(gridid) - - visualInfo.append(info) - - - # special masking based on Grid Data History - if maskBasedOnHistory: - parm = v.parm() - bits = refMgr.siteGridpoints(griddata.historySites(), 1) - parm.dspAttr().setDisplayMask_grid2dbit(bits) - - canvas.paint(mapping.domain(), 1) - canvas.unreg(visuals) - self.writeInfo(dir, setime, visualInfo) - if ftype != Graphics.FileCanvas.PNG: - canvas.close() - else: - i1 = canvas.getImage() - if not omitColorBar: - self.paintColorBar(width, bgColor, trans, setime, cbv, i1) - newI = self.paintLogo(i1) - self.paintBorder(newI) - self.writePng(dir, setime, visualInfo, newI) - def writeInfo(self, dir, setime, visualInfo): if len(visualInfo) > 0: fname = self.getFileName(dir, setime) + ".info" @@ -339,8 +214,8 @@ class PngWriter: #mmgr = self.dm.mapMgr() mv = [] mids = [] - height = self.getConfig('Png_height', 400.0, float) - width = self.getConfig('Png_width', 400.0, float) + height = self.getConfig('Png_height', None, int) + width = self.getConfig('Png_width', None, int) localFlag = self.getConfig('Png_localTime', 0, int) snapshotTime = self.getConfig('Png_snapshotTime', 0, int) useLegend = self.getConfig('Png_legend', 1, int) @@ -419,13 +294,18 @@ class PngWriter: overrideColors = {} for p in prms: pname = p.getParmID().compositeNameUI() + if pname == self.ipn: + overrideColors[pname] = "White" + color = self.getConfig(pname + "_Legend_color", None) if color: overrideColors[pname] = color lang = self.getConfig('Png_legendLanguage', ''); viz.setupLegend(localTime, snapshotTime, snapshotFmt, descName, durFmt, startFmt, endFmt, overrideColors, lang) - bgColor = self.getConfig('bgColor', None) + #TODO handle transparent background + bgColor, trans = self.getBG() + if not omitColorbar: viz.enableColorbar() @@ -444,29 +324,31 @@ class PngWriter: fitToDataAlg = None for p in prms: pname = p.getParmID().compositeNameUI() - if pname == self.ipn: - colormap = self.getConfig(pname + '_defaultColorTable', None) - colorMax = self.getConfig(pname + '_maxColorTableValue', None, float) - colorMin = self.getConfig(pname + '_minColorTableValue', None, float) - viz.addImageResource(pname, colormap=colormap, colorMin=colorMin, colorMax=colorMax, smooth=smooth) - fitToDataAlg = self.getConfig(pname + '_fitToDataColorTable', None) - if fitToDataAlg is not None: - from com.raytheon.viz.gfe.rsc.colorbar import FitToData - fit = FitToData(self.dm, p) - if fitToDataAlg == 'All Grids': - fit.fitToData() - fitToDataAlg = None - elif fitToDataAlg == 'All Grids over Area': - fit.fitToData(self.dm.getRefManager().getActiveRefSet()) - fitToDataAlg = None + colormap = self.getConfig(pname + '_defaultColorTable', None) + colorMax = self.getConfig(pname + '_maxColorTableValue', None, float) + colorMin = self.getConfig(pname + '_minColorTableValue', None, float) + color = self.getConfig(pname + '_graphicColor', None) + lineWidth = self.getConfig(pname + '_lineWidth', None, int) + viz.addGfeResource(pname, colormap=colormap, colorMin=colorMin, colorMax=colorMax, \ + smooth=smooth, color=color, lineWidth=lineWidth) + fitToDataAlg = self.getConfig(pname + '_fitToDataColorTable', None) + if fitToDataAlg is not None: + from com.raytheon.viz.gfe.rsc.colorbar import FitToData + fit = FitToData(self.dm, p) + if fitToDataAlg == 'All Grids': + fit.fitToData() + fitToDataAlg = None + elif fitToDataAlg == 'All Grids over Area': + fit.fitToData(self.dm.getRefManager().getActiveRefSet()) + fitToDataAlg = None + if pname == self.ipn: + print "setting",pname,"to IMAGE" + p.getDisplayAttributes().setVisMode(VisMode.IMAGE) else: - graphicParms.append(pname) - for gp in graphicParms: - color = self.getConfig(gp + '_graphicColor', None) - lineWidth = self.getConfig(gp + '_lineWidth', None, int) - viz.addGraphicResource(gp, color=color, lineWidth=lineWidth) - + print "setting",pname,"to GRAPHIC" + p.getDisplayAttributes().setVisMode(VisMode.GRAPHIC) + self.initSamples() # paint once to get map retrieval started @@ -475,26 +357,35 @@ class PngWriter: for t in times: paintTime = t - if paintTime and self.overlapsWithGrids(prms, paintTime): + if paintTime and self.overlapsWithGrids(prms, paintTime): self.dm.getSpatialDisplayManager().setSpatialEditorTime(paintTime.javaDate()) - if fitToDataAlg: - from com.raytheon.viz.gfe.edittool import GridID - gridid = GridID(self.dm.getSpatialDisplayManager().getActivatedParm(), ) - if fitToDataAlg == 'Single Grid': - fit.fitToData(gridid) - elif fitToDataAlg == 'Single Grid over Area': - fit.fitToData(gridid, self.dm.getRefManager().getActiveRefSet()) - viz.paint(paintTime, backgroundColor=bgColor) - fname = self.getFileName(dir, t) + '.' + fexten - viz.outputFiles(fname, showLogo, logoString) visualInfo = [] for p in prms: griddata = p.overlappingGrid(paintTime.javaDate()) - if griddata is not None: - info = (p.getParmID().toString(), AbsTime.AbsTime(griddata.getGridTime().getStart()), - AbsTime.AbsTime(griddata.getGridTime().getEnd()), - RGBColors.getColorName(p.getDisplayAttributes().getBaseColor()), p.getDisplayAttributes().getVisMode().toString() == 'Image') - visualInfo.append(info) + if griddata is None: + continue + + # fit to data special cases + if p.getDisplayAttributes().getVisMode().toString() == 'Image': + fitToDataAlg = self.getConfig(p.getParmID().compositeNameUI() + '_fitToDataColorTable', None) + if fitToDataAlg: + from com.raytheon.viz.gfe.rsc.colorbar import FitToData + fit = FitToData(self.dm, p) + from com.raytheon.viz.gfe.edittool import GridID + gridid = GridID(p, paintTime.javaDate()) + if fitToDataAlg == 'Single Grid': + fit.fitToData(gridid) + elif fitToDataAlg == 'Single Grid over Area': + fit.fitToData(gridid, self.dm.getRefManager().getActiveRefSet()) + + info = (p.getParmID().toString(), AbsTime.AbsTime(griddata.getGridTime().getStart()), + AbsTime.AbsTime(griddata.getGridTime().getEnd()), + RGBColors.getColorName(p.getDisplayAttributes().getBaseColor()), p.getDisplayAttributes().getVisMode().toString() == 'Image') + visualInfo.append(info) + + viz.paint(paintTime, backgroundColor=bgColor) + fname = self.getFileName(dir, t) + '.' + fexten + viz.outputFiles(fname, showLogo, logoString) self.writeInfo(dir, paintTime, visualInfo) else: LogStream.logEvent("No grids to generate for ", `t`) @@ -521,43 +412,6 @@ class PngWriter: else: return 0 - - def toscreen(self, point, wd, sd): - x = int(((float(point.x) - wd.origin().x) * float(sd[0])) \ - / wd.extent().x) - y = int(((float(point.y) - wd.origin().y) * float(sd[1])) \ - / float(wd.extent().y)) - return (x, sd[1] - y) - - def toworld(self, point, wd, sd): - x = (float(point[0]) * wd.extent().x) / float(sd[0]) - y = (float(point[1]) * wd.extent().y) / float(sd[1]) - return (wd.origin().x + x, wd.origin().y + y) - - def _createVisual(self, vt, parm, gridTime): - visType = vt.type() - if visType == AFPS.VisualType.IMAGE: - return Graphics.ImageVisual(parm, gridTime) - elif visType == AFPS.VisualType.CONTOUR: - return Graphics.ContourVisual(parm, gridTime) - elif visType == AFPS.VisualType.WIND_BARB: - size = self.getConfig('WindBarbDefaultSize', 60, int) - size = self.getConfig(parm.parmID().compositeNameUI() - + '_windBarbDefaultSize', size, int) - return Graphics.WindBarbGridVisual(parm, gridTime, size) - elif visType == AFPS.VisualType.WIND_ARROW: - size = self.getConfig('WindArrowDefaultSize', 60, int) - size = self.getConfig(parm.parmID().compositeNameUI() - + '_windArrowDefaultSize', size, int) - return Graphics.WindArrowGridVisual(parm, gridTime, size) - elif visType == AFPS.VisualType.BOUNDED_AREA: - return Graphics.BoundedAreaVisual(parm, gridTime) - else: - LogStream.logBug("PngWriter._createVisual() : ", - "Unknown visual type : ", vt) - return None - - def usage(): msg = """ usage: ifpIMAGE [-c config] [-u username] [-h host] [-p port] -o directory diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/EnsembleFcstGridContours/500mb_avg_hght.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/EnsembleFcstGridContours/500mb_avg_hght.attr index fdd9b5a37f..d9c7da093e 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/EnsembleFcstGridContours/500mb_avg_hght.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/EnsembleFcstGridContours/500mb_avg_hght.attr @@ -1,6 +1,8 @@ -ENS_COMPONENT_WEIGHTS={NAM} +ENS_COMPONENT_WEIGHTS={gfs} GLEVEL=500 GVCORD=pres +SKIP= +FILTER=y SCALE=-1 GDPFUN=ens_savg(hght) TYPE=c diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/EnsembleFcstGridContours/500mb_avg_tmpc.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/EnsembleFcstGridContours/500mb_avg_tmpc.attr index 6296af3584..70b1b5ef1d 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/EnsembleFcstGridContours/500mb_avg_tmpc.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/EnsembleFcstGridContours/500mb_avg_tmpc.attr @@ -1,6 +1,8 @@ -ENS_COMPONENT_WEIGHTS={NAM} +ENS_COMPONENT_WEIGHTS={gfs} GLEVEL=500 GVCORD=pres +SKIP= +FILTER=y SCALE=0 GDPFUN=ens_savg(tmpc) TYPE=c diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/BREF1_1.00.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/BREF1_1.00.attr index 85a7e0f684..dca30de7f5 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/BREF1_1.00.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/BREF1_1.00.attr @@ -1,4 +1,7 @@ colorMapName=osf_ref16 colorBar=@dfltRadarColorBar.xml productCode=19 -elevationNumber=1 \ No newline at end of file +elevationNumber=1 +alpha=1.0 +brightness=1.0 +contrast=1.0 \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/BREF1_2.00.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/BREF1_2.00.attr index e0d4829949..e96767d498 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/BREF1_2.00.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/BREF1_2.00.attr @@ -1,4 +1,7 @@ colorMapName=osf_ref16 colorBar=@dfltRadarColorBar.xml productCode=20 -elevationNumber=1 \ No newline at end of file +elevationNumber=1 +alpha=1.0 +brightness=1.0 +contrast=1.0 \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/BREF2_1.00.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/BREF2_1.00.attr index b6aefb40af..20bac10462 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/BREF2_1.00.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/BREF2_1.00.attr @@ -1,4 +1,7 @@ colorMapName=osf_ref16 colorBar=@dfltRadarColorBar.xml productCode=19 -elevationNumber=2 \ No newline at end of file +elevationNumber=2 +alpha=1.0 +brightness=1.0 +contrast=1.0 \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/BREF2_2.00.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/BREF2_2.00.attr index cf0ed4b14b..29cf480440 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/BREF2_2.00.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/BREF2_2.00.attr @@ -1,4 +1,7 @@ colorMapName=osf_ref16 colorBar=@dfltRadarColorBar.xml productCode=20 -elevationNumber=2 \ No newline at end of file +elevationNumber=2 +alpha=1.0 +brightness=1.0 +contrast=1.0 \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/BREF3_1.00.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/BREF3_1.00.attr index 4e2eaf6d14..0f4c1ac1c0 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/BREF3_1.00.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/BREF3_1.00.attr @@ -1,4 +1,7 @@ colorMapName=osf_ref16 colorBar=@dfltRadarColorBar.xml productCode=19 -elevationNumber=3 \ No newline at end of file +elevationNumber=3 +alpha=1.0 +brightness=1.0 +contrast=1.0 \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/BREF3_2.00.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/BREF3_2.00.attr index 7e7709b7cf..7010ec15b5 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/BREF3_2.00.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/BREF3_2.00.attr @@ -1,4 +1,7 @@ colorMapName=osf_ref16 colorBar=@dfltRadarColorBar.xml productCode=20 -elevationNumber=3 \ No newline at end of file +elevationNumber=3 +alpha=1.0 +brightness=1.0 +contrast=1.0 \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/BREF4_1.00.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/BREF4_1.00.attr index 1570cbd58e..be81b932d1 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/BREF4_1.00.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/BREF4_1.00.attr @@ -1,4 +1,7 @@ colorMapName=osf_ref16 colorBar=@dfltRadarColorBar.xml productCode=19 -elevationNumber=4 \ No newline at end of file +elevationNumber=4 +alpha=1.0 +brightness=1.0 +contrast=1.0 \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/BREF4_2.00.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/BREF4_2.00.attr index 3e2831064e..6763c799fc 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/BREF4_2.00.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/BREF4_2.00.attr @@ -1,4 +1,7 @@ colorMapName=osf_ref16 colorBar=@dfltRadarColorBar.xml productCode=20 -elevationNumber=4 \ No newline at end of file +elevationNumber=4 +alpha=1.0 +brightness=1.0 +contrast=1.0 \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/BREF5_1.00.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/BREF5_1.00.attr index 99567efcfc..5beb9ec424 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/BREF5_1.00.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/BREF5_1.00.attr @@ -1,4 +1,7 @@ colorMapName=osf_ref16 colorBar=@dfltRadarColorBar.xml productCode=19 -elevationNumber=5 \ No newline at end of file +elevationNumber=5 +alpha=1.0 +brightness=1.0 +contrast=1.0 \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/BREF6_1.00.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/BREF6_1.00.attr index 7f59cebdcf..a244602f2e 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/BREF6_1.00.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/BREF6_1.00.attr @@ -1,4 +1,7 @@ colorMapName=osf_ref16 colorBar=@dfltRadarColorBar.xml productCode=19 -elevationNumber=6 \ No newline at end of file +elevationNumber=6 +alpha=1.0 +brightness=1.0 +contrast=1.0 \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/CREFP_4.00.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/CREFP_4.00.attr index ae736abdf0..21b83b9183 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/CREFP_4.00.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/CREFP_4.00.attr @@ -3,4 +3,7 @@ colorBar=@dfltRadarColorBar.xml ! 4km CREF productCode=38 ! check elevation -elevationNumber=0 \ No newline at end of file +elevationNumber=0 +alpha=1.0 +brightness=1.0 +contrast=1.0 \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/CREF_1.00.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/CREF_1.00.attr index 5cef852015..a2c3ac9506 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/CREF_1.00.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/CREF_1.00.attr @@ -3,4 +3,7 @@ colorBar=@dfltRadarColorBar.xml ! 1km COMP REFL productCode=37 ! check elevation -elevationNumber=0 \ No newline at end of file +elevationNumber=0 +alpha=1.0 +brightness=1.0 +contrast=1.0 \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/CREF_4.00.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/CREF_4.00.attr index 3087820654..89a985cfbb 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/CREF_4.00.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/CREF_4.00.attr @@ -3,4 +3,7 @@ colorBar=@dfltRadarColorBar.xml ! 4km COMP REFL productCode=36 ! check elevation -elevationNumber=0 \ No newline at end of file +elevationNumber=0 +alpha=1.0 +brightness=1.0 +contrast=1.0 \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/DIGSCAN_1.00.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/DIGSCAN_1.00.attr index eef5c0316d..49c2753f29 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/DIGSCAN_1.00.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/DIGSCAN_1.00.attr @@ -3,4 +3,7 @@ colorMapName=lingray colorBar=@dfltRadarColorBar.xml ! 1km Digital Hybrid Scan Refl. productCode=32 -elevationNumber=0 \ No newline at end of file +elevationNumber=0 +alpha=1.0 +brightness=1.0 +contrast=1.0 \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/EETOPS_1.00.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/EETOPS_1.00.attr index cf85ab8aec..311f704adf 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/EETOPS_1.00.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/EETOPS_1.00.attr @@ -3,3 +3,6 @@ colorBar=@dfltRadarColorBar.xml ! 1km Enhanced Echo Tops productCode=135 elevationNumber=0 +alpha=1.0 +brightness=1.0 +contrast=1.0 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/PRCP1_2.00.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/PRCP1_2.00.attr index 1dd7a96ed2..030c6d5c13 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/PRCP1_2.00.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/PRCP1_2.00.attr @@ -2,4 +2,7 @@ colorMapName=nids_pre colorBar=@dfltRadarColorBar.xml ! 2km 1 hr precip productCode=78 -elevationNumber=0 \ No newline at end of file +elevationNumber=0 +alpha=1.0 +brightness=1.0 +contrast=1.0 \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/PRCP3_2.00.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/PRCP3_2.00.attr index 11fb5f165f..60bf79130d 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/PRCP3_2.00.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/PRCP3_2.00.attr @@ -2,4 +2,7 @@ colorMapName=nids_pre colorBar=@dfltRadarColorBar.xml ! 2km total precip productCode=80 -elevationNumber=0 \ No newline at end of file +elevationNumber=0 +alpha=1.0 +brightness=1.0 +contrast=1.0 \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/PRCPC_2.00.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/PRCPC_2.00.attr index 6764756d73..1aa015fc4c 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/PRCPC_2.00.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/PRCPC_2.00.attr @@ -3,3 +3,6 @@ colorBar=@dfltRadarColorBar.xml productCode=101 prodName=PRCPC elevationNumber=0 +alpha=1.0 +brightness=1.0 +contrast=1.0 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/RCM_0.00.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/RCM_0.00.attr index 8b7444ee98..8430b3728a 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/RCM_0.00.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/RCM_0.00.attr @@ -2,4 +2,7 @@ colorMapName=osf_ref16 colorBar=@dfltRadarColorBar.xml ! Radar Coded Message productCode=74 -elevationNumber=0 \ No newline at end of file +elevationNumber=0 +alpha=1.0 +brightness=1.0 +contrast=1.0 \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/SRVEL1_1.00.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/SRVEL1_1.00.attr index c4be8a8995..f5073a5d38 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/SRVEL1_1.00.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/SRVEL1_1.00.attr @@ -2,4 +2,7 @@ colorMapName=rad_srmvel colorBar=@dfltRadarColorBar.xml ! 1km Storm Relative Motion productCode=56 -elevationNumber=1 \ No newline at end of file +elevationNumber=1 +alpha=1.0 +brightness=1.0 +contrast=1.0 \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/SRVEL2_1.00.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/SRVEL2_1.00.attr index aff5978054..496ec88eaa 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/SRVEL2_1.00.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/SRVEL2_1.00.attr @@ -2,4 +2,7 @@ colorMapName=rad_srmvel colorBar=@dfltRadarColorBar.xml ! 1km Storm Relative Motion productCode=56 -elevationNumber=2 \ No newline at end of file +elevationNumber=2 +alpha=1.0 +brightness=1.0 +contrast=1.0 \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/SRVEL3_1.00.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/SRVEL3_1.00.attr index 70d4496515..3a38b7ac4a 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/SRVEL3_1.00.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/SRVEL3_1.00.attr @@ -2,4 +2,7 @@ colorMapName=rad_srmvel colorBar=@dfltRadarColorBar.xml ! 1km Storm Relative Motion productCode=56 -elevationNumber=3 \ No newline at end of file +elevationNumber=3 +alpha=1.0 +brightness=1.0 +contrast=1.0 \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/SRVEL4_1.00.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/SRVEL4_1.00.attr index 1ad2861e45..28ac06697b 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/SRVEL4_1.00.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/SRVEL4_1.00.attr @@ -2,4 +2,7 @@ colorMapName=rad_srmvel colorBar=@dfltRadarColorBar.xml ! 1km Storm Relative Motion productCode=56 -elevationNumber=4 \ No newline at end of file +elevationNumber=4 +alpha=1.0 +brightness=1.0 +contrast=1.0 \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/SRVEL5_1.00.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/SRVEL5_1.00.attr index 13519c9b0e..8d38b6e952 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/SRVEL5_1.00.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/SRVEL5_1.00.attr @@ -2,4 +2,7 @@ colorMapName=rad_srmvel colorBar=@dfltRadarColorBar.xml ! 1km Storm Relative Motion productCode=56 -elevationNumber=5 \ No newline at end of file +elevationNumber=5 +alpha=1.0 +brightness=1.0 +contrast=1.0 \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/SRVEL6_1.00.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/SRVEL6_1.00.attr index 7b33b046bf..2adc70222e 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/SRVEL6_1.00.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/SRVEL6_1.00.attr @@ -2,4 +2,7 @@ colorMapName=rad_srmvel colorBar=@dfltRadarColorBar.xml ! 1km Storm Relative Motion productCode=56 -elevationNumber=6 \ No newline at end of file +elevationNumber=6 +alpha=1.0 +brightness=1.0 +contrast=1.0 \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/STRAC_1.00.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/STRAC_1.00.attr index 5d97ffacdd..fd9f0aa795 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/STRAC_1.00.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/STRAC_1.00.attr @@ -3,3 +3,6 @@ colorBar=@dfltRadarColorBar.xml ! Storm Track Information (Graphic) productCode=58 elevationNumber=0 +alpha=1.0 +brightness=1.0 +contrast=1.0 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/TOPS_1.00.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/TOPS_1.00.attr index 26118d9b9a..aca3a0e387 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/TOPS_1.00.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/TOPS_1.00.attr @@ -3,4 +3,7 @@ colorBar=@dfltRadarColorBar.xml ! 1km Echo Tops productCode=41 ! check elevation -elevationNumber=0 \ No newline at end of file +elevationNumber=0 +alpha=1.0 +brightness=1.0 +contrast=1.0 \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/VEL1_.25.00.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/VEL1_.25.00.attr index c1c2368a8a..d235c2a7e3 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/VEL1_.25.00.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/VEL1_.25.00.attr @@ -2,4 +2,7 @@ colorMapName=nids_vel16 colorBar=@dfltRadarColorBar.xml ! .25km Radial Velocity productCode=99 -elevationNumber=1 \ No newline at end of file +elevationNumber=1 +alpha=1.0 +brightness=1.0 +contrast=1.0 \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/VEL1_1.00.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/VEL1_1.00.attr index c45168c51e..ec7b36cbc2 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/VEL1_1.00.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/VEL1_1.00.attr @@ -1,4 +1,7 @@ colorMapName=nids_vel16 colorBar=@dfltRadarColorBar.xml productCode=27 -elevationNumber=1 \ No newline at end of file +elevationNumber=1 +alpha=1.0 +brightness=1.0 +contrast=1.0 \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/VEL2_.25.00.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/VEL2_.25.00.attr index b334e8e42a..2700a42667 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/VEL2_.25.00.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/VEL2_.25.00.attr @@ -2,4 +2,7 @@ colorMapName=nids_vel16 colorBar=@dfltRadarColorBar.xml ! .25km Radial Velocity productCode=99 -elevationNumber=2 \ No newline at end of file +elevationNumber=2 +alpha=1.0 +brightness=1.0 +contrast=1.0 \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/VEL2_1.00.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/VEL2_1.00.attr index 75ae351431..e071e64cca 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/VEL2_1.00.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/VEL2_1.00.attr @@ -1,4 +1,7 @@ colorMapName=nids_vel16 colorBar=@dfltRadarColorBar.xml productCode=27 -elevationNumber=2 \ No newline at end of file +elevationNumber=2 +alpha=1.0 +brightness=1.0 +contrast=1.0 \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/VEL3_.25.00.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/VEL3_.25.00.attr index 9eb1db77e1..6706e27dcf 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/VEL3_.25.00.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/VEL3_.25.00.attr @@ -2,4 +2,7 @@ colorMapName=nids_vel16 colorBar=@dfltRadarColorBar.xml ! .25km Radial Velocity productCode=99 -elevationNumber=3 \ No newline at end of file +elevationNumber=3 +alpha=1.0 +brightness=1.0 +contrast=1.0 \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/VEL3_1.00.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/VEL3_1.00.attr index 6da48e8151..dde2fd0143 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/VEL3_1.00.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/VEL3_1.00.attr @@ -1,4 +1,7 @@ colorMapName=nids_vel16 colorBar=@dfltRadarColorBar.xml productCode=27 -elevationNumber=3 \ No newline at end of file +elevationNumber=3 +alpha=1.0 +brightness=1.0 +contrast=1.0 \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/VEL4_.25.00.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/VEL4_.25.00.attr index 813d85b68f..b229976ad2 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/VEL4_.25.00.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/VEL4_.25.00.attr @@ -2,4 +2,7 @@ colorMapName=nids_vel16 colorBar=@dfltRadarColorBar.xml ! .25km Radial Velocity productCode=99 -elevationNumber=4 \ No newline at end of file +elevationNumber=4 +alpha=1.0 +brightness=1.0 +contrast=1.0 \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/VEL4_1.00.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/VEL4_1.00.attr index a5651055ff..21e15bc1c4 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/VEL4_1.00.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/VEL4_1.00.attr @@ -1,4 +1,7 @@ colorMapName=nids_vel16 colorBar=@dfltRadarColorBar.xml productCode=27 -elevationNumber=4 \ No newline at end of file +elevationNumber=4 +alpha=1.0 +brightness=1.0 +contrast=1.0 \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/VEL5_1.00.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/VEL5_1.00.attr index d23598e19d..62d1f79adf 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/VEL5_1.00.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/VEL5_1.00.attr @@ -1,4 +1,7 @@ colorMapName=nids_vel16 colorBar=@dfltRadarColorBar.xml productCode=27 -elevationNumber=5 \ No newline at end of file +elevationNumber=5 +alpha=1.0 +brightness=1.0 +contrast=1.0 \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/VEL6_1.00.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/VEL6_1.00.attr index 4847262902..07a2fd6f26 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/VEL6_1.00.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/VEL6_1.00.attr @@ -1,4 +1,7 @@ colorMapName=nids_vel16 colorBar=@dfltRadarColorBar.xml productCode=27 -elevationNumber=6 \ No newline at end of file +elevationNumber=6 +alpha=1.0 +brightness=1.0 +contrast=1.0 \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/VIL_1.00.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/VIL_1.00.attr index 56bb6713ea..ba76a86679 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/VIL_1.00.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/VIL_1.00.attr @@ -3,3 +3,6 @@ colorBar=@dfltRadarColorBar.xml ! 1km DIGITAL VIL productCode=134 elevationNumber=0 +alpha=1.0 +brightness=1.0 +contrast=1.0 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/VIL_4.00.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/VIL_4.00.attr index c988ac6478..643847d81a 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/VIL_4.00.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/LocalRadar/VIL_4.00.attr @@ -1,4 +1,7 @@ colorMapName=osf_ref16 colorBar=@dfltRadarColorBar.xml productCode=57 -elevationNumber=0 \ No newline at end of file +elevationNumber=0 +alpha=1.0 +brightness=1.0 +contrast=1.0 \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/1000-470mb_rh_rs_t_700_vv.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/1000-470mb_rh_rs_t_700_vv.attr index 7fc541a3bc..2b93a55f6a 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/1000-470mb_rh_rs_t_700_vv.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/1000-470mb_rh_rs_t_700_vv.attr @@ -11,6 +11,8 @@ ! GLEVEL=4700:10000!700 !700 !850 !30:0 GVCORD=SGMA !PRES !PRES !PRES!pdly +SKIP= +FILTER=y SCALE=0 !3 !3 !0 GDPFUN=relh !sm9s(omeg)!sm9s(omeg) !tmpc !tmpc TYPE=f !c diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/1000-470mb_rh_rs_t_700mb_vv.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/1000-470mb_rh_rs_t_700mb_vv.attr index 2c61a1426c..0c7c4a73bf 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/1000-470mb_rh_rs_t_700mb_vv.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/1000-470mb_rh_rs_t_700mb_vv.attr @@ -9,6 +9,8 @@ ! GLEVEL=4400:10000!700 !700 !850 !9950 GVCORD=SGMA !PRES !PRES!PRES!SGMA +SKIP= +FILTER=y SCALE=0 !3 !3 !0 GDPFUN=relh !omeg !omeg!tmpc!tmpc TYPE=f !c diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/1000-500_THKN.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/1000-500_THKN.attr index 917fbea339..3889ccf8a1 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/1000-500_THKN.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/1000-500_THKN.attr @@ -1,5 +1,7 @@ GLEVEL=500:1000 GVCORD=pres +SKIP= +FILTER=y SCALE=-1 GDPFUN=sm5s(ldf(hght)) TYPE=c diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/1000-500_thkn.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/1000-500_thkn.attr index 13ab26a1fc..8df6f36f97 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/1000-500_thkn.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/1000-500_thkn.attr @@ -6,6 +6,8 @@ ! GLEVEL=500:1000!500:1000 GVCORD=pres!pres +SKIP= +FILTER=y SCALE=-1 ! -1 GDPFUN=ldf(hght)!ldf(hght) TYPE=c diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/1000-500mb_rh.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/1000-500mb_rh.attr index df20af49e0..d869b7d9fc 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/1000-500mb_rh.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/1000-500mb_rh.attr @@ -7,6 +7,8 @@ ! GLEVEL=4400:10000 GVCORD=sgma +SKIP= +FILTER=y SCALE=0 GDPFUN=relh ! relh TYPE=c/f!c diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/1000-850_thkn.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/1000-850_thkn.attr index 8de3350888..7aa9b880e9 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/1000-850_thkn.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/1000-850_thkn.attr @@ -6,6 +6,8 @@ ! GLEVEL=850:1000 GVCORD=pres +SKIP= +FILTER=y SCALE=-1 GDPFUN=sm9s(sub(hght@850,hght@1000)) TYPE=c diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/1000-850thk_only.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/1000-850thk_only.attr index ab96929261..2642642881 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/1000-850thk_only.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/1000-850thk_only.attr @@ -6,6 +6,8 @@ ! GLEVEL=850:1000 GVCORD=pres +SKIP= +FILTER=y SCALE=-1 GDPFUN=(sub(hght@850,hght@1000)) TYPE=c diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/1000mb_hght_absv.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/1000mb_hght_absv.attr index b59bc39a1b..0561361cff 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/1000mb_hght_absv.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/1000mb_hght_absv.attr @@ -6,6 +6,8 @@ ! GLEVEL=1000 GVCORD=pres +SKIP= +FILTER=y SCALE=5 !5 !-1 !0 GDPFUN=(avor(wnd))//v!v !sm9s(hght) !kntv(wnd) TYPE=c/f !c !c !b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/1000mb_hght_tmp_wind.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/1000mb_hght_tmp_wind.attr index a3fc0e7581..a159d47133 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/1000mb_hght_tmp_wind.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/1000mb_hght_tmp_wind.attr @@ -7,6 +7,8 @@ ! GLEVEL=1000 GVCORD=pres +SKIP= +FILTER=y SCALE=0 !0 !0 !-1 GDPFUN=tmpc !tmpc !tmpc !hght !kntv(wnd) TYPE=c/f !c !c !c !b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/1000mb_streamlines.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/1000mb_streamlines.attr index 68b1f9c73c..4d9b2f663c 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/1000mb_streamlines.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/1000mb_streamlines.attr @@ -6,6 +6,8 @@ ! GLEVEL=1000 GVCORD=pres +SKIP= +FILTER=y SCALE=0!0 GDPFUN=mag(kntv(wnd))!kntv(wnd) TYPE=c/f!s diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/100mb_hght_wind.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/100mb_hght_wind.attr index 891c85e656..18b4db77c8 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/100mb_hght_wind.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/100mb_hght_wind.attr @@ -6,6 +6,8 @@ ! GLEVEL=100 GVCORD=pres +SKIP= +FILTER=y SCALE=0 !-1 GDPFUN=knts((mag(wnd))) !sm9s(hght)!kntv(wnd) TYPE=c/f !c !b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/150mb_hght_wind.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/150mb_hght_wind.attr index 536acb50ac..f9ad7a8419 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/150mb_hght_wind.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/150mb_hght_wind.attr @@ -6,7 +6,9 @@ ! GLEVEL=150 GVCORD=pres -SCALE=0 !-1 +SKIP= +FILTER=y +SCALE=3 !-1 GDPFUN=knts((mag(wnd))) !sm9s(hght)!kntv(wnd) TYPE=c/f !c !b CINT=30;50;70;90;110;130;150 !12 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/200mb_absv_wind.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/200mb_absv_wind.attr index 55952d3cb8..343d9c0ba1 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/200mb_absv_wind.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/200mb_absv_wind.attr @@ -6,6 +6,8 @@ ! GLEVEL=200 GVCORD=pres +SKIP= +FILTER= SCALE=5 !5 !-1 GDPFUN=abs(avor(wnd)) !abs(avor(wnd)) !kntv(wnd) TYPE=c/f !c !b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/200mb_div_isotachs.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/200mb_div_isotachs.attr index c507b20d9f..0cbd74aa1d 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/200mb_div_isotachs.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/200mb_div_isotachs.attr @@ -6,6 +6,8 @@ ! GLEVEL=200 GVCORD=PRES +SKIP= +FILTER=y SCALE=0!0!5!5!-1 GDPFUN=mag(kntv(wnd))!mag(kntv(wnd))!div(wnd)!div(wnd)!sm5s(hght) TYPE=c!c/f!c/f!c!c diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/200mb_hght_wind.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/200mb_hght_wind.attr index 941fce45e1..0b9fa73c94 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/200mb_hght_wind.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/200mb_hght_wind.attr @@ -9,6 +9,8 @@ ! GLEVEL=200 GVCORD=pres +SKIP=2/2 +FILTER=1.0 SCALE=0 !-1 GDPFUN=knts((mag(wnd))) !sm5s(hght)!kntv(wnd) TYPE=c/f !c !b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/200mb_hght_wind_al.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/200mb_hght_wind_al.attr index 5344de104d..09032b6b32 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/200mb_hght_wind_al.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/200mb_hght_wind_al.attr @@ -7,6 +7,8 @@ ! GLEVEL=200 GVCORD=pres +SKIP= +FILTER=y SCALE=0 ! -1 GDPFUN=knts((mag(wnd))) !(hght) ! kntv(wnd) TYPE=c/f !c !b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/200mb_vorticity_pw.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/200mb_vorticity_pw.attr index 695a102fca..025fa74bcd 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/200mb_vorticity_pw.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/200mb_vorticity_pw.attr @@ -7,6 +7,8 @@ ! GLEVEL=0 !0 !200 !200 !200 !0 GVCORD=none !none !PRES!pres!pres!none +SKIP= +FILTER=y SCALE=0 !0 !5 !5 !-1 GDPFUN=quo(pwtr;25.4)//pw!pw !avor(obs)!avor(obs)!sm5s(hght)!kntv(wnd@850%PRES) TYPE=c !c/f !c !c ! c !b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/200mb_wind.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/200mb_wind.attr index d25b27d33d..51e51b905e 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/200mb_wind.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/200mb_wind.attr @@ -7,6 +7,8 @@ ! GLEVEL=200 GVCORD=pres +SKIP= +FILTER=y SCALE=0 ! -1 GDPFUN=knts((mag(wnd))) ! kntv(wnd) TYPE=c/f ! b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/200mb_wind_div_isotachs.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/200mb_wind_div_isotachs.attr index 80986526d8..59513082c2 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/200mb_wind_div_isotachs.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/200mb_wind_div_isotachs.attr @@ -8,6 +8,8 @@ ! GLEVEL=200 GVCORD=pres +SKIP= +FILTER=y SCALE=0!0!5!5 GDPFUN=mag(kntv(wnd))!mag(kntv(wnd))!div(wnd)!div(wnd) ! obs TYPE=c!c/f!c/f!c ! b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/200mb_wnd.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/200mb_wnd.attr index f26ea50dff..b0956266cc 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/200mb_wnd.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/200mb_wnd.attr @@ -7,6 +7,8 @@ ! GLEVEL=200 GVCORD=PRES +SKIP= +FILTER=y SCALE=0 !0 GDPFUN=knts(mag(wnd)) !kntv(wnd) TYPE=c/f !b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/250mb_ageo_div_isotachs.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/250mb_ageo_div_isotachs.attr index 0e59c4a680..95f6bdcd60 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/250mb_ageo_div_isotachs.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/250mb_ageo_div_isotachs.attr @@ -7,6 +7,8 @@ ! GLEVEL=250 GVCORD=PRES +SKIP= +FILTER=y SCALE=0!0!5/0!5/0!-1 ! 0 GDPFUN=mag(kntv(wnd))//jet!jet!div(wnd)//dvg!dvg!sm5s(hght) ! age(hght) TYPE=c!c/f!c/f!c!c ! a diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/250mb_ageo_div_isotachs_al.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/250mb_ageo_div_isotachs_al.attr index e5f450276c..ba056e5ed2 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/250mb_ageo_div_isotachs_al.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/250mb_ageo_div_isotachs_al.attr @@ -7,6 +7,8 @@ ! GLEVEL=250 GVCORD=PRES +SKIP= +FILTER=y SCALE=0!0!5/0!5/0!-1 ! 0 GDPFUN=mag(kntv(wnd))!mag(kntv(wnd))!div(wnd)!div(wnd)!sm5s(hght) ! age(hght) TYPE=c!c/f!c/f!c!c ! a diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/250mb_hght_absv.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/250mb_hght_absv.attr index 1a0cf12c9e..703a74fd4d 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/250mb_hght_absv.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/250mb_hght_absv.attr @@ -7,6 +7,8 @@ ! GLEVEL=250 GVCORD=pres +SKIP= +FILTER=y SCALE=5 !5 !-1 GDPFUN=abs(avor(wnd)) !abs(avor(wnd)) !hght TYPE=c/f !c !c diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/250mb_hght_wind.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/250mb_hght_wind.attr index b6f72f7a53..77f60bdd77 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/250mb_hght_wind.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/250mb_hght_wind.attr @@ -9,6 +9,8 @@ ! GLEVEL=250 GVCORD=pres +SKIP=2/2 +FILTER=1.0 SCALE=0 !-1 GDPFUN=knts((mag(wnd))) !sm5s(hght) !kntv(wnd) TYPE=c/f !c !b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/250mb_hght_wind_ncf.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/250mb_hght_wind_ncf.attr index 1dfeb47848..65d76a8d29 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/250mb_hght_wind_ncf.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/250mb_hght_wind_ncf.attr @@ -6,6 +6,8 @@ ! GLEVEL=250 GVCORD=pres +SKIP= +FILTER=y SCALE=0 ! -1 GDPFUN=knts((mag(wnd))) !(hght) ! kntv(wnd) TYPE=c !c !b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/250mb_streamlines.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/250mb_streamlines.attr index b20ff9e0ad..5a9bf5a527 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/250mb_streamlines.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/250mb_streamlines.attr @@ -6,6 +6,8 @@ ! GLEVEL=250 GVCORD=pres +SKIP= +FILTER=y SCALE=0!0 GDPFUN=mag(kntv(wnd))!kntv(wnd) TYPE=c/f!s diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/250mb_vorticity_pw.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/250mb_vorticity_pw.attr index fdd15fb770..7ba5f55539 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/250mb_vorticity_pw.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/250mb_vorticity_pw.attr @@ -7,6 +7,8 @@ ! GLEVEL=0 !0 !250 !250 !250 !0 GVCORD=none !none !PRES!pres!pres!none +SKIP= +FILTER=y SCALE=0 !0 !5 !5 !-1 GDPFUN=quo(pwtr;25.4)//pw!pw !avor(obs)!avor(obs)!sm5s(hght)!kntv(wnd@850%PRES) TYPE=c !c/f !c !c ! c !b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/250mb_wind_and_rel_vort.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/250mb_wind_and_rel_vort.attr index f5644e6e9a..53eb026b35 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/250mb_wind_and_rel_vort.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/250mb_wind_and_rel_vort.attr @@ -6,6 +6,8 @@ ! J. Carr/HPC 2/99 Changed obs to kntv(wnd) GLEVEL=250 GVCORD=pres +SKIP= +FILTER=y SCALE=5 GDPFUN=(vor(wnd)) !(vor(wnd)) !kntv(wnd) TYPE=c/f ! c ! b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/296thta_pres_wnd_pres_adv.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/296thta_pres_wnd_pres_adv.attr index 4bf194ecae..9c073c0f88 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/296thta_pres_wnd_pres_adv.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/296thta_pres_wnd_pres_adv.attr @@ -7,6 +7,8 @@ ! GLEVEL=296 GVCORD=thta +SKIP= +FILTER=y SCALE=3!3!0 GDPFUN=ADV(pres,obs)!ADV(pres,obs)!sm5s(pres)!obs TYPE=c/f !c !c !b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/300-200mb_pv.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/300-200mb_pv.attr index 3c3b7fcb05..1e8431c169 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/300-200mb_pv.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/300-200mb_pv.attr @@ -8,6 +8,8 @@ ! GLEVEL=9950!300:200!300:200!0:9950!0:9950!0:9950!0 !300:200 GVCORD=SGMA!pres !pres !none !none !none !none!pres +SKIP= +FILTER=y SCALE=0!6!6!0 GDPFUN=thte(pres@0%none;tmpc;dwpc)//te!pvor(thta,wnd)//pv!pv!te!te!te!sm5s(pmsl)!kntv(wnd@300%pres) TYPE=c/f!c/f!c ! c ! c ! c ! c ! b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/300-700_q-vctrs_thkn.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/300-700_q-vctrs_thkn.attr index 3cef6faf4c..6a8db83362 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/300-700_q-vctrs_thkn.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/300-700_q-vctrs_thkn.attr @@ -7,6 +7,8 @@ ! GLEVEL=300:700 GVCORD=pres +SKIP= +FILTER=y SCALE=-1/0 GDPFUN=sm5s(ldf(hght))//ldfh!smul(4e9,qvec(ldfh,sm5v(vlav(geo)))) TYPE=c ! a diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/300-700_qn-vectrs.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/300-700_qn-vectrs.attr index 932d59cc4c..75dcd019d6 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/300-700_qn-vectrs.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/300-700_qn-vectrs.attr @@ -7,6 +7,8 @@ ! GLEVEL=300!300!300:700 GVCORD=pres +SKIP= +FILTER=y SCALE=0!0!-1/0 GDPFUN=mag(kntv(wnd))//jet!jet!ldf(hght)//ldfh!smul(4e9,vasv(qvec(ldfh,sm5v(vlav(geo))),kcrs(thrm(hght))) TYPE=c!c/f!c ! a diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/300mb_Divergence.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/300mb_Divergence.attr index b98e85b582..56ae4d0772 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/300mb_Divergence.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/300mb_Divergence.attr @@ -1,5 +1,7 @@ GLEVEL=300 GVCORD=pres +SKIP= +FILTER=y SCALE=5 GDPFUN=div(obs) TYPE=c diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/300mb_ageo_div_isotachs.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/300mb_ageo_div_isotachs.attr index 118bf50f86..080b9e0126 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/300mb_ageo_div_isotachs.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/300mb_ageo_div_isotachs.attr @@ -7,6 +7,8 @@ ! GLEVEL=300 GVCORD=PRES +SKIP= +FILTER=y SCALE=0!0!5/0!5/0!-1 ! 0 GDPFUN=mag(kntv(wnd))!mag(kntv(wnd))!div(wnd)!div(wnd)!sm5s(hght) ! age(hght) TYPE=c!c/f!c/f!c!c ! a diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/300mb_div_isotachs.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/300mb_div_isotachs.attr index 49f1e598f2..6cc4909220 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/300mb_div_isotachs.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/300mb_div_isotachs.attr @@ -7,6 +7,8 @@ ! GLEVEL=300 GVCORD=PRES +SKIP= +FILTER=y SCALE=0!0!5!5!-1 GDPFUN=mag(kntv(wnd))!mag(kntv(wnd))!div(wnd)!div(wnd)!sm5s(hght) TYPE=c!c/f!c/f!c!c diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/300mb_hght_absv.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/300mb_hght_absv.attr index 352964a899..99dbf5971d 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/300mb_hght_absv.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/300mb_hght_absv.attr @@ -9,6 +9,8 @@ ! GLEVEL=300 GVCORD=pres +SKIP= +FILTER=y SCALE=5 !5 !-1 GDPFUN=abs(avor(wnd)) !abs(avor(wnd)) !sm5s(hght) TYPE=c/f !c !c diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/300mb_hght_absv_adv.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/300mb_hght_absv_adv.attr index 46aab4d7b4..44e8d35d4a 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/300mb_hght_absv_adv.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/300mb_hght_absv_adv.attr @@ -7,6 +7,8 @@ ! GLEVEL=300 GVCORD=pres +SKIP= +FILTER=y SCALE=9 !5 !-1 GDPFUN=sm5s(sm5s(adv(avor(wnd),wnd))) !(abs(avor(wnd))) !sm5s(hght) TYPE=c/f !c !c diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/300mb_hght_absv_al.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/300mb_hght_absv_al.attr index c1471798c1..a4cfdf28f2 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/300mb_hght_absv_al.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/300mb_hght_absv_al.attr @@ -7,6 +7,8 @@ ! GLEVEL=300 GVCORD=pres +SKIP= +FILTER=y SCALE=5 !5 !-1 GDPFUN=abs(avor(wnd)) !abs(avor(wnd)) !hght TYPE=c/f !c !c diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/300mb_hght_tmp_wind.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/300mb_hght_tmp_wind.attr index 564155faba..50aa3c01fe 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/300mb_hght_tmp_wind.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/300mb_hght_tmp_wind.attr @@ -7,6 +7,8 @@ ! GLEVEL=300 GVCORD=pres +SKIP= +FILTER=y SCALE=0 !0 !0 !-1 GDPFUN=tmpc !tmpc !tmpc !hght !kntv(wnd) TYPE=c/f !c !c !c !b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/300mb_hght_wind.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/300mb_hght_wind.attr index b1ed5686b1..e30369addf 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/300mb_hght_wind.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/300mb_hght_wind.attr @@ -8,6 +8,8 @@ ! Changed skip to a 0. GLEVEL=300 GVCORD=pres +SKIP= +FILTER=y SCALE=0 !-1 GDPFUN=knts((mag(wnd))) !sm5s(hght)!kntv(wnd) TYPE=c/f !c !b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/300mb_hght_wind_al.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/300mb_hght_wind_al.attr index e69109ed96..16b67906e1 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/300mb_hght_wind_al.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/300mb_hght_wind_al.attr @@ -7,6 +7,8 @@ ! GLEVEL=300 GVCORD=pres +SKIP= +FILTER=y SCALE=0 ! -1 GDPFUN=knts((mag(wnd))) !(hght) ! kntv(wnd) TYPE=c/f !c !b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/300mb_vorticity_pw.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/300mb_vorticity_pw.attr index acce1b1454..e3333c50d0 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/300mb_vorticity_pw.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/300mb_vorticity_pw.attr @@ -8,6 +8,8 @@ ! GLEVEL=0!0!300 !300 GVCORD=none !none !PRES!PRES +SKIP= +FILTER=y SCALE=0 !0 !5 !5 !-1 !-1 GDPFUN=quo(pwtr;25.4)//pw!pw !avor(obs)!avor(obs)!sm5s(hght)!kntv(wnd@850%PRES) TYPE=c !c/f!c !c !c !b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/300thta_pres_wnd_pres_adv.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/300thta_pres_wnd_pres_adv.attr index 91053ef17e..9af22675b3 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/300thta_pres_wnd_pres_adv.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/300thta_pres_wnd_pres_adv.attr @@ -7,6 +7,8 @@ ! GLEVEL=300 GVCORD=THTA +SKIP= +FILTER=y SCALE=3!3!0 GDPFUN=ADV(pres,obs)!ADV(pres,obs)!sm5s(pres)!obs TYPE=c/f !c !c !b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/300thta_pres_wnd_pres_adv_al.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/300thta_pres_wnd_pres_adv_al.attr index a02828f655..c77b0b6689 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/300thta_pres_wnd_pres_adv_al.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/300thta_pres_wnd_pres_adv_al.attr @@ -1,5 +1,7 @@ GLEVEL=300 GVCORD=thta +SKIP= +FILTER=y SCALE=3!3!0 GDPFUN=ADV(pres,obs)!ADV(pres,obs)!sm5s(pres)!obs TYPE=c/f !c !c !b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/304thta_pres_wnd_pres_adv.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/304thta_pres_wnd_pres_adv.attr index 3d4450059c..65ef9a0659 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/304thta_pres_wnd_pres_adv.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/304thta_pres_wnd_pres_adv.attr @@ -7,6 +7,8 @@ ! GLEVEL=304 GVCORD=thta +SKIP= +FILTER=y SCALE=3!3!0 GDPFUN=ADV(pres,obs)!ADV(pres,obs)!sm5s(pres)!obs TYPE=c/f !c !c !b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/308thta_pres_wnd_pres_adv.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/308thta_pres_wnd_pres_adv.attr index efa00f9de0..2670169009 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/308thta_pres_wnd_pres_adv.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/308thta_pres_wnd_pres_adv.attr @@ -7,6 +7,8 @@ ! GLEVEL=308 GVCORD=thta +SKIP= +FILTER=y SCALE=3!3!0 GDPFUN=ADV(pres,obs)!ADV(pres,obs)!sm5s(pres)!obs TYPE=c/f !c !c !b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/312thta_pres_wnd_pres_adv.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/312thta_pres_wnd_pres_adv.attr index e15d47f4c4..4a66f1d347 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/312thta_pres_wnd_pres_adv.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/312thta_pres_wnd_pres_adv.attr @@ -7,6 +7,8 @@ ! GLEVEL=312 GVCORD=thta +SKIP= +FILTER=y SCALE=3!3!0 GDPFUN=ADV(pres,obs)!ADV(pres,obs)!sm5s(pres)!obs TYPE=c/f !c !c !b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/316thta_pres_wnd_pres_adv.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/316thta_pres_wnd_pres_adv.attr index 053912b4fb..7f28c76839 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/316thta_pres_wnd_pres_adv.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/316thta_pres_wnd_pres_adv.attr @@ -7,6 +7,8 @@ ! GLEVEL=316 GVCORD=thta +SKIP= +FILTER=y SCALE=3!3!0 GDPFUN=ADV(pres,obs)!ADV(pres,obs)!sm5s(pres)!obs TYPE=c/f !c !c !b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/400-200mb_pv.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/400-200mb_pv.attr index 86ad7883b7..e43190b79d 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/400-200mb_pv.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/400-200mb_pv.attr @@ -8,6 +8,8 @@ ! GLEVEL=9950!400:200!400:200!0:9950!0:9950!0:9950!0 !400:200 GVCORD=SGMA!pres !pres !none !none !none !none!pres +SKIP= +FILTER=y SCALE=0!6!6!0 GDPFUN=thte(pres@0%none;tmpc;dwpc)//te!pvor(thta,wnd)//pv!pv!te!te!te!sm5s(pmsl)!kntv(wnd@300%pres) TYPE=c/f!c/f!c ! c ! c ! c ! c ! b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/400-250mb_pv.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/400-250mb_pv.attr index df8a0e702a..bdf52a731f 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/400-250mb_pv.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/400-250mb_pv.attr @@ -9,6 +9,8 @@ ! GLEVEL=9823!400:250!400:250!9823!9823!9823!0!400:250 GVCORD=SGMA!pres!pres!SGMA!SGMA!SGMA!none!pres +SKIP= +FILTER=y SCALE=0!6!6!0 GDPFUN=(thte(pres;tmpc;dwpc))//te!pvor(thta,wnd)//pv!pv!te!te!te!sm5s(pmsl)!kntv(wnd@300%pres) TYPE=c/f!c/f!c ! c ! c ! c ! c ! b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/400mb_avg_rh_ncf.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/400mb_avg_rh_ncf.attr index af916433c1..662dc6e789 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/400mb_avg_rh_ncf.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/400mb_avg_rh_ncf.attr @@ -6,6 +6,8 @@ ! GLEVEL=500:300 ! 500:300 !500:300 GVCORD=pres ! pres !pres +SKIP= +FILTER=y SCALE=0 GDPFUN=lav(relh) ! lav(relh) !lav(relh) TYPE=c ! c ! c diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500-250mb_pv.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500-250mb_pv.attr index f95427b184..7fef55a02c 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500-250mb_pv.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500-250mb_pv.attr @@ -8,6 +8,8 @@ ! GLEVEL=9950!500:250!500:250!0:9950!0:9950!0:9950!0 !500:250 GVCORD=SGMA!pres !pres !none !none !none !none!pres +SKIP= +FILTER=y SCALE=0!6!6!0 GDPFUN=thte(pres@0%none;tmpc;dwpc)//te!pvor(thta,wnd)//pv!pv!te!te!te!sm5s(pmsl)!kntv(wnd@300%pres) TYPE=c/f!c/f!c ! c ! c ! c ! c ! b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500-300mb_pv.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500-300mb_pv.attr index df5f4eb0a8..f2166fa249 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500-300mb_pv.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500-300mb_pv.attr @@ -8,6 +8,8 @@ ! GLEVEL=9950!500:300!500:300!0:9950!0:9950!0:9950!0 !500:300 GVCORD=SGMA!pres !pres !none !none !none !none!pres +SKIP= +FILTER=y SCALE=0!6!6!0 GDPFUN=thte(pres@0%none;tmpc;dwpc)//te!pvor(thta,wnd)//pv!pv!te!te!te!sm5s(pmsl)!kntv(wnd@400%pres) TYPE=c/f!c/f!c ! c ! c ! c ! c ! b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500_vort_only.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500_vort_only.attr index 10e4e16d29..78b6bab933 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500_vort_only.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500_vort_only.attr @@ -6,6 +6,8 @@ ! GLEVEL=500 GVCORD=pres +SKIP= +FILTER=y SCALE=5 !5 GDPFUN=abs(avor(wnd)) !abs(avor(wnd)) TYPE=c/f !c diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_absv_ncf.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_absv_ncf.attr index 2cf33e3361..f8ddd2b247 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_absv_ncf.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_absv_ncf.attr @@ -7,6 +7,8 @@ ! GLEVEL=500 GVCORD=pres +SKIP= +FILTER=y SCALE=5 !5 GDPFUN=abs(avor(wnd)) !abs(avor(wnd)) TYPE=c !c diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_absv_wind.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_absv_wind.attr index 19a30e20ed..11ac1d1006 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_absv_wind.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_absv_wind.attr @@ -6,6 +6,8 @@ ! GLEVEL=500 GVCORD=pres +SKIP= +FILTER=y SCALE=5 !5 !-1 GDPFUN=abs(avor(wnd)) !abs(avor(wnd)) !kntv(wnd) TYPE=c/f !c !b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_hght.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_hght.attr index 16bb612949..97b53b3dee 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_hght.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_hght.attr @@ -6,6 +6,8 @@ ! GLEVEL=500 GVCORD=pres +SKIP= +FILTER=y SCALE=-1 GDPFUN=sm9s(hght) TYPE=c diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_hght_absv.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_hght_absv.attr index 5b59cbd63d..bd2eda0a67 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_hght_absv.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_hght_absv.attr @@ -9,6 +9,8 @@ ! GLEVEL=500 GVCORD=pres +SKIP= +FILTER=y SCALE=5 !5 !-1 GDPFUN=abs(avor(wnd)) !abs(avor(wnd)) !sm5s(hght) TYPE=c/f !c !c @@ -18,6 +20,7 @@ FINT=16;20;24;28;32;36;40;44 FLINE=0;23;22;21;20;19;18;17;16 HILO=2;6/X;N/10-99;10-99!0 HLSYM= +SKIP=2 WIND=18/1/1 TITLE=5/-1/~ @ HEIGHT AND ABS VORTICITY!0 COLORS=2 diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_hght_absv_adv.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_hght_absv_adv.attr index dbda907239..c53cd73012 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_hght_absv_adv.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_hght_absv_adv.attr @@ -7,6 +7,8 @@ ! GLEVEL=500 GVCORD=pres +SKIP= +FILTER=y SCALE=9 !5 !-1 GDPFUN=sm5s(sm5s(adv(avor(wnd),wnd))) !(abs(avor(wnd))) !sm5s(hght) TYPE=c/f !c !c diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_hght_absv_al.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_hght_absv_al.attr index 9522d630c7..2bf83490c6 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_hght_absv_al.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_hght_absv_al.attr @@ -7,6 +7,8 @@ ! GLEVEL=500 GVCORD=pres +SKIP= +FILTER=y SCALE=5 !5 !-1 GDPFUN=abs(avor(wnd)) !abs(avor(wnd)) !hght TYPE=c/f !c !c diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_hght_absv_ncf.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_hght_absv_ncf.attr index d24e5276d0..ef32059d8d 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_hght_absv_ncf.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_hght_absv_ncf.attr @@ -9,6 +9,8 @@ ! GLEVEL=500 GVCORD=pres +SKIP= +FILTER=y SCALE=5 !5 !-1 GDPFUN=abs(avor(wnd)) !abs(avor(wnd)) !sm5s(hght) TYPE=c !c !c diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_hght_absv_wnd.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_hght_absv_wnd.attr index 984b09150c..a112190f9f 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_hght_absv_wnd.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_hght_absv_wnd.attr @@ -6,6 +6,8 @@ ! GLEVEL=500 GVCORD=pres +SKIP= +FILTER=y SCALE=5 !5 !-1 GDPFUN=abs(avor(wnd)) !abs(avor(wnd)) !hght!kntv(wnd) TYPE=c/f !c !c !b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_hght_avg.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_hght_avg.attr index e0b4344e22..2aa6b546d3 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_hght_avg.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_hght_avg.attr @@ -6,6 +6,8 @@ ! GLEVEL=500 GVCORD=pres +SKIP= +FILTER=y SCALE=-1 GDPFUN=ENS_SAVG(hght) TYPE=c diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_hght_color.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_hght_color.attr index 3d21a614d7..6f09612567 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_hght_color.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_hght_color.attr @@ -8,6 +8,8 @@ ! GLEVEL=500 GVCORD=pres +SKIP= +FILTER=y SCALE=-1 GDPFUN=sm5s(hght) TYPE=c/f diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_hght_geoabsv.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_hght_geoabsv.attr index 1a8673bbdf..750e33c89c 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_hght_geoabsv.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_hght_geoabsv.attr @@ -9,6 +9,8 @@ ! GLEVEL=500 GVCORD=pres +SKIP= +FILTER=y SCALE=5 !5 !-1 GDPFUN=abs(avor(geo)) !abs(avor(geo)) !sm5s(hght) TYPE=c/f !c !c diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_hght_rh_omega.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_hght_rh_omega.attr index 9fc06053ac..bcdb664136 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_hght_rh_omega.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_hght_rh_omega.attr @@ -7,6 +7,8 @@ ! T. Lee/GSC 6/99 Increased omega contours GLEVEL=500 GVCORD=pres +SKIP= +FILTER=y SCALE=0 !0 !-1 ! 3 ! 3 GDPFUN=relh !(relh) !(hght) !(omeg) !(omeg) TYPE=c !c/f ! c diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_hght_tmp_wind.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_hght_tmp_wind.attr index 66a4f5c41d..7a8cc8e365 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_hght_tmp_wind.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_hght_tmp_wind.attr @@ -7,6 +7,8 @@ ! GLEVEL=500 GVCORD=pres +SKIP= +FILTER=y SCALE=0 !0 !0 !-1 GDPFUN=tmpc !tmpc !tmpc !hght !kntv(wnd) TYPE=c/f !c !c !c !b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_hght_tmpc_wind.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_hght_tmpc_wind.attr index dd5854f961..32c42faf25 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_hght_tmpc_wind.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_hght_tmpc_wind.attr @@ -1,5 +1,7 @@ GLEVEL=500 GVCORD=pres +SKIP= +FILTER=y SCALE=0 ! -1 ! 0 GDPFUN=tmpc ! hght ! wnd TYPE=c/f ! c ! b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_hght_wind.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_hght_wind.attr index ccf11c9788..3ce326ecb5 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_hght_wind.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_hght_wind.attr @@ -6,6 +6,8 @@ ! GLEVEL=500 GVCORD=pres +SKIP= +FILTER=y SCALE=0 !-1 GDPFUN=knts((mag(wnd))) !sm5s(hght)!kntv(wnd) TYPE=c/f !c !b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_streamlines.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_streamlines.attr index 65974ad224..aa9687fd72 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_streamlines.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_streamlines.attr @@ -6,6 +6,8 @@ ! GLEVEL=500 GVCORD=pres +SKIP= +FILTER=y SCALE=0!0 GDPFUN=mag(kntv(wnd))!kntv(wnd) TYPE=c/f!s diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_tmpc.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_tmpc.attr index 4fa5cb4bf3..c97ae10d90 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_tmpc.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_tmpc.attr @@ -1,5 +1,7 @@ GLEVEL=500 GVCORD=pres +SKIP= +FILTER=y SCALE=0 GDPFUN=tmpc TYPE=c diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_windBarb.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_windBarb.attr index cab066a746..234d01e3ed 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_windBarb.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_windBarb.attr @@ -1,5 +1,7 @@ GLEVEL=500 GVCORD=pres +SKIP= +FILTER=y SCALE=0 GDPFUN=wnd TYPE=b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_wind_and_rel_vort.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_wind_and_rel_vort.attr index 27fca344b3..306010884c 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_wind_and_rel_vort.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mb_wind_and_rel_vort.attr @@ -7,6 +7,8 @@ ! GLEVEL=500 GVCORD=pres +SKIP= +FILTER=y SCALE=5 GDPFUN=(vor(wnd)) !(vor(wnd)) ! kntv(wnd) TYPE=c/f ! c ! b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mbcomponly.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mbcomponly.attr index 97787673d9..3f8a55de7e 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mbcomponly.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/500mbcomponly.attr @@ -7,6 +7,8 @@ ! GLEVEL=500 GVCORD=pres +SKIP= +FILTER=y SCALE=-1 GDPFUN=sm5s(hght) TYPE=c diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/50mb_hght_wind.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/50mb_hght_wind.attr index 432b58e7f1..258e597c80 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/50mb_hght_wind.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/50mb_hght_wind.attr @@ -6,6 +6,8 @@ ! GLEVEL=50 GVCORD=pres +SKIP= +FILTER=y SCALE=0 !-1 GDPFUN=knts((mag(wnd))) !sm9s(hght)! kntv(wnd) TYPE=c/f !c !b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/550mb_hght_absv.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/550mb_hght_absv.attr index a1c6961318..75a214b576 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/550mb_hght_absv.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/550mb_hght_absv.attr @@ -1,5 +1,7 @@ GLEVEL=550 GVCORD=pres +SKIP= +FILTER=y SCALE=5 ! 5 ! -1 GDPFUN=abs(avor(wnd))! abs(avor(wnd)) !sm5s(hght) TYPE=c ! c ! c diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/600mb_hght_rh_omega.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/600mb_hght_rh_omega.attr index 3cd94cdaf1..2c4a2c7876 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/600mb_hght_rh_omega.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/600mb_hght_rh_omega.attr @@ -6,6 +6,8 @@ ! GLEVEL=600 GVCORD=pres +SKIP= +FILTER=y SCALE=0 !0 !-1 !3 !3 GDPFUN=sm5s(relh) !sm5s(relh) !sm5s(hght)!sm5s(omeg) !sm5s(omeg) TYPE=c !c/f !c diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/700mb_absv_wind.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/700mb_absv_wind.attr index 79e4b80931..fa12ac9ef0 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/700mb_absv_wind.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/700mb_absv_wind.attr @@ -6,6 +6,8 @@ ! GLEVEL=700 GVCORD=pres +SKIP= +FILTER=y SCALE=5 !5 !-1 GDPFUN=abs(avor(wnd)) !abs(avor(wnd)) !kntv(wnd) TYPE=c/f !c !b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/700mb_hght_avg.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/700mb_hght_avg.attr index b7459d6db9..929e4c40ba 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/700mb_hght_avg.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/700mb_hght_avg.attr @@ -6,6 +6,8 @@ ! GLEVEL=700 GVCORD=pres +SKIP= +FILTER=y SCALE=-1 GDPFUN=ENS_SAVG(hght) TYPE=c diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/700mb_hght_rh_al.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/700mb_hght_rh_al.attr index 05d5da04a4..45f951a17b 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/700mb_hght_rh_al.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/700mb_hght_rh_al.attr @@ -7,6 +7,8 @@ ! GLEVEL=700 GVCORD=pres +SKIP= +FILTER=y SCALE=0 !0 !-1 GDPFUN=relh !(relh) !(hght) TYPE=c !c/f ! c diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/700mb_hght_rh_omega.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/700mb_hght_rh_omega.attr index 68b50ffe6b..8154406e2f 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/700mb_hght_rh_omega.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/700mb_hght_rh_omega.attr @@ -9,6 +9,8 @@ ! GLEVEL=700 GVCORD=pres +SKIP= +FILTER=y SCALE=0 !0 !-1 !3 !3 GDPFUN=sm5s(relh) !sm5s(relh) !sm5s(hght)!sm5s(omeg) !sm5s(omeg) TYPE=c !c/f !c diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/700mb_hght_rh_omega_ncf.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/700mb_hght_rh_omega_ncf.attr index 8d2360b2cf..f19a44133b 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/700mb_hght_rh_omega_ncf.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/700mb_hght_rh_omega_ncf.attr @@ -8,6 +8,8 @@ ! GLEVEL=700 GVCORD=pres +SKIP= +FILTER=y SCALE=0 !0 !0 !-1 !3 !3 GDPFUN=sm5s(relh)!sm5s(relh)!sm5s(relh)!sm5s(hght)!sm5s(omeg)!sm5s(omeg) TYPE=c diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/700mb_hght_tmp_wind.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/700mb_hght_tmp_wind.attr index ed6b06ed5f..40a14f56fc 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/700mb_hght_tmp_wind.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/700mb_hght_tmp_wind.attr @@ -7,6 +7,8 @@ ! GLEVEL=700 GVCORD=pres +SKIP= +FILTER=y SCALE=0 !0 !0 !-1 GDPFUN=tmpc !tmpc !tmpc !hght !kntv(wnd) TYPE=c/f !c !c !c !b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/700mb_hght_wind_dwpt.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/700mb_hght_wind_dwpt.attr index 3533ec1be2..40908152c9 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/700mb_hght_wind_dwpt.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/700mb_hght_wind_dwpt.attr @@ -8,6 +8,8 @@ ! GLEVEL=700 GVCORD=PRES +SKIP= +FILTER=y SCALE=0!0!-1 GDPFUN=dwpc!dwpc!sm5s(hght) ! kntv(wnd) TYPE=c/f!c!c ! b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/700mb_rh_rs_temp.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/700mb_rh_rs_temp.attr index 79f25392ba..d891f1649c 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/700mb_rh_rs_temp.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/700mb_rh_rs_temp.attr @@ -8,6 +8,8 @@ ! GLEVEL=700!700!700!850!850!30:0!30:0 GVCORD=PRES!PRES!PRES!PRES!PRES!pdly!pdly +SKIP= +FILTER=y SCALE=0 GDPFUN=relh !tmpc !tmpc !tmpc !tmpc !tmpc !tmpc TYPE=c/f ! c diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/700mb_rh_rs_temp_al.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/700mb_rh_rs_temp_al.attr index cfd1f0c23c..8ad525e74a 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/700mb_rh_rs_temp_al.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/700mb_rh_rs_temp_al.attr @@ -7,6 +7,8 @@ ! GLEVEL=700!700!700!850!850!10000!10000 GVCORD=PRES!PRES!PRES!PRES!PRES!SGMA!SGMA +SKIP= +FILTER=y SCALE=0 GDPFUN=(relh) !tmpc !tmpc !tmpc !tmpc !tmpc !tmpc TYPE=c/f ! c diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/700mb_streamlines.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/700mb_streamlines.attr index 9b4a4ea9ad..1486df5c9f 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/700mb_streamlines.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/700mb_streamlines.attr @@ -6,6 +6,8 @@ ! GLEVEL=700 GVCORD=pres +SKIP= +FILTER=y SCALE=0!0 GDPFUN=mag(kntv(wnd))!kntv(wnd) TYPE=c/f!s diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/700mb_wind_and_rel_vort.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/700mb_wind_and_rel_vort.attr index cd765ac907..285b401e97 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/700mb_wind_and_rel_vort.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/700mb_wind_and_rel_vort.attr @@ -8,6 +8,8 @@ ! GLEVEL=700 GVCORD=pres +SKIP= +FILTER=y SCALE=5 GDPFUN=(vor(wnd)) !(vor(wnd)) ! obs TYPE=c/f ! c ! b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/70mb_hght_wind.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/70mb_hght_wind.attr index 2ead7e973f..a363ed3398 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/70mb_hght_wind.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/70mb_hght_wind.attr @@ -6,6 +6,8 @@ ! GLEVEL=70 GVCORD=pres +SKIP= +FILTER=y SCALE=0 !-1 GDPFUN=knts((mag(wnd))) !sm9s(hght)! kntv(wnd) TYPE=c/f !c !b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850-300mb_wind_shear.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850-300mb_wind_shear.attr index 58f5419247..ad6e688699 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850-300mb_wind_shear.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850-300mb_wind_shear.attr @@ -10,6 +10,8 @@ ! GLEVEL=300:850!850!300 GVCORD=pres +SKIP= +FILTER=y SCALE=0 GDPFUN=mag(vldf(obs))!(wnd)!(wnd) TYPE=c/f ! a ! a diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850-700_thkn.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850-700_thkn.attr index b5cc0efb0f..a4b65791af 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850-700_thkn.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850-700_thkn.attr @@ -6,6 +6,8 @@ ! GLEVEL=700:850 GVCORD=pres +SKIP= +FILTER=y SCALE=-1 GDPFUN=sm9s(sub(hght@700,hght@850)) TYPE=c diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_absv_wind.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_absv_wind.attr index 4c0acee9fc..65ee0affc9 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_absv_wind.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_absv_wind.attr @@ -6,6 +6,8 @@ ! GLEVEL=850 GVCORD=pres +SKIP= +FILTER=y SCALE=5 !5 !-1 GDPFUN=abs(avor(wnd)) !abs(avor(wnd)) !kntv(wnd) TYPE=c/f !c !b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_h2o_transport.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_h2o_transport.attr index 45b0204c63..f77b5613d7 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_h2o_transport.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_h2o_transport.attr @@ -12,6 +12,8 @@ ! GLEVEL=850 !850 !30:0 !850 GVCORD=pres !pres !pdly !pres +SKIP= +FILTER=y SCALE=2 !-1/2 !0 !2 GDPFUN=mag(smul(mixr;wnd))!hght !thte(pres;tmpc;dwpc) !smul(mixr;wnd) TYPE=c/f !c !c !a diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_h2o_transport_al.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_h2o_transport_al.attr index 950b765401..bb3115423e 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_h2o_transport_al.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_h2o_transport_al.attr @@ -7,6 +7,8 @@ ! GLEVEL=850 GVCORD=pres +SKIP= +FILTER=y SCALE=2!-1/2!0!2 GDPFUN=mag(smul(mixr;wnd))!hght!thte(pres;tmpc;dwpc) ! smul(mixr;wnd) TYPE=c/f!c!c ! a diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_hght_absv.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_hght_absv.attr index 5920daf9ae..7b93062247 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_hght_absv.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_hght_absv.attr @@ -6,6 +6,8 @@ ! GLEVEL=850 GVCORD=pres +SKIP= +FILTER=y SCALE=5 !5 !-1 !0 GDPFUN=(avor(wnd))//v!v !sm9s(hght) !kntv(wnd) TYPE=c/f !c !c !b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_hght_avg.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_hght_avg.attr index b0c7dc23cf..6d754ed3d7 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_hght_avg.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_hght_avg.attr @@ -6,6 +6,8 @@ ! GLEVEL=850 GVCORD=pres +SKIP= +FILTER=y SCALE=-1 GDPFUN=ENS_SAVG(hght) TYPE=c diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_hght_rh_omega.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_hght_rh_omega.attr index c9360370fe..8256f5a7ca 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_hght_rh_omega.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_hght_rh_omega.attr @@ -8,6 +8,8 @@ ! GLEVEL=850 GVCORD=pres +SKIP= +FILTER=y SCALE=0 !0 !-1 ! 3 !3 GDPFUN=relh !(relh) !sm9s(hght)!sm9s(omeg)!sm9s(omeg) TYPE=c !c/f !c diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_hght_tmp_wind.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_hght_tmp_wind.attr index 96867b3ead..6d5f0e5f40 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_hght_tmp_wind.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_hght_tmp_wind.attr @@ -7,6 +7,8 @@ ! GLEVEL=850 GVCORD=pres +SKIP= +FILTER=y SCALE=0 !0 !0 !-1 GDPFUN=sm9s(tmpc)!sm9s(tmpc)!sm9s(tmpc)!sm9s(hght)!kntv(wnd) TYPE=c/f !c !c !c !b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_hght_tmp_wind_al.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_hght_tmp_wind_al.attr index 3363882d27..633e4e1dbb 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_hght_tmp_wind_al.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_hght_tmp_wind_al.attr @@ -7,6 +7,8 @@ ! GLEVEL=850 GVCORD=pres +SKIP= +FILTER=y SCALE=0 !0 !0 !-1 GDPFUN=tmpc !tmpc !tmpc !hght !kntv(wnd) TYPE=c/f !c !c !c !b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_hght_tmp_wind_ncf.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_hght_tmp_wind_ncf.attr index caeed1f763..14c17902b6 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_hght_tmp_wind_ncf.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_hght_tmp_wind_ncf.attr @@ -6,6 +6,8 @@ ! GLEVEL=850 GVCORD=pres +SKIP= +FILTER=y SCALE=0 !0 !0 !-1 GDPFUN=sm5s(tmpc)!sm5s(tmpc)!sm5s(tmpc)!sm5s(hght)!kntv(wnd) TYPE=c !c !c !c !b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_hght_wind_dwpt.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_hght_wind_dwpt.attr index 048ccec2bc..a403a624a3 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_hght_wind_dwpt.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_hght_wind_dwpt.attr @@ -8,6 +8,8 @@ ! GLEVEL=850 GVCORD=pres +SKIP= +FILTER=y SCALE=0!0!-1 GDPFUN=dwpc!dwpc!sm5s(hght) ! kntv(wnd) TYPE=c/f!c!c ! b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_hght_wind_dwpt_al.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_hght_wind_dwpt_al.attr index 89a2b28446..dbb8672f4e 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_hght_wind_dwpt_al.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_hght_wind_dwpt_al.attr @@ -7,6 +7,8 @@ ! GLEVEL=850 GVCORD=pres +SKIP= +FILTER=y SCALE=0!0!-1 GDPFUN=dwpc!dwpc!sm5s(hght) ! kntv(wnd) TYPE=c/f!c!c ! b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_streamlines.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_streamlines.attr index ecb28b0c50..72600950e3 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_streamlines.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_streamlines.attr @@ -6,6 +6,8 @@ ! GLEVEL=850 GVCORD=pres +SKIP= +FILTER=y SCALE=0!0 GDPFUN=mag(kntv(wnd))!kntv(wnd) TYPE=c/f!s diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_thtae_advection.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_thtae_advection.attr index 84be9a6c0e..a48411c0c3 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_thtae_advection.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_thtae_advection.attr @@ -9,6 +9,8 @@ ! GLEVEL=850 GVCORD=PRES +SKIP= +FILTER=y SCALE=4 !-1 !0 !0 !0 !0 GDPFUN=adv(thte,wind)!sm5s(hght)!thte!thte!thte!kntv(wnd) TYPE=c/f !c !c !c !c !b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_thtae_ncf.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_thtae_ncf.attr index c67ac025b6..dc76def2b6 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_thtae_ncf.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_thtae_ncf.attr @@ -6,6 +6,8 @@ ! GLEVEL=850 GVCORD=PRES +SKIP= +FILTER=y SCALE=0!0!0!-1 GDPFUN=sm9s(thte)!sm9s(thte)!sm9s(thte) TYPE=c diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_tmp.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_tmp.attr index b6780c5616..de1247d8cb 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_tmp.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_tmp.attr @@ -6,6 +6,8 @@ ! GLEVEL=850 GVCORD=pres +SKIP= +FILTER=y SCALE=0 !0 !0 GDPFUN=sm9s(tmpc)!sm9s(tmpc)!sm9s(tmpc) TYPE=c/f !c !c diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_tmpc.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_tmpc.attr index c0e0db7779..80dcc501a8 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_tmpc.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_tmpc.attr @@ -1,5 +1,7 @@ GLEVEL=850 GVCORD=pres +SKIP= +FILTER=y SCALE=0 GDPFUN=tmpc TYPE=c diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_wind.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_wind.attr index cacdddb37f..0f71d74aac 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_wind.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_wind.attr @@ -7,6 +7,8 @@ ! GLEVEL=850 GVCORD=pres +SKIP= +FILTER=y SCALE=0 ! -1 GDPFUN=knts((mag(wnd))) ! kntv(wnd) TYPE=c/f ! b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_wind_and_rel_vort.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_wind_and_rel_vort.attr index 7520f68567..1b949c5172 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_wind_and_rel_vort.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_wind_and_rel_vort.attr @@ -8,6 +8,8 @@ ! GLEVEL=850 GVCORD=pres +SKIP= +FILTER=y SCALE=5 GDPFUN=(vor(wnd)) !(vor(wnd)) ! obs TYPE=c/f ! c ! b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_wind_pw.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_wind_pw.attr index a03ae5aa8e..e530a05ce5 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_wind_pw.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_wind_pw.attr @@ -8,6 +8,8 @@ ! GLEVEL=0 GVCORD=none +SKIP= +FILTER=y SCALE=0!0 GDPFUN=quo(pwtr;25.4)!quo(pwtr;25.4) ! kntv(wnd@850%PRES) TYPE=c!c/f ! b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_wind_pw_mm.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_wind_pw_mm.attr index 73bf4d2327..6545d312bb 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_wind_pw_mm.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_wind_pw_mm.attr @@ -7,6 +7,8 @@ ! GLEVEL=0 GVCORD=none +SKIP= +FILTER=y SCALE=0 !0 GDPFUN=sm9s(pwtr) !sm9s(pwtr) !kntv(wnd@850%PRES) TYPE=c !c/f !b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_wind_pw_mm_ncf.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_wind_pw_mm_ncf.attr index 1af7825537..7377a0cc8b 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_wind_pw_mm_ncf.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_wind_pw_mm_ncf.attr @@ -7,6 +7,8 @@ ! GLEVEL=0 GVCORD=none +SKIP= +FILTER=y SCALE=0!0!0 GDPFUN=sm9s(pwtr) !sm9s(pwtr)!sm9s(pwtr) !kntv(wnd@850%PRES) TYPE=c !c !c !b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_wind_pw_ncf.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_wind_pw_ncf.attr index fde9e63454..4e719d3a12 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_wind_pw_ncf.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_wind_pw_ncf.attr @@ -8,6 +8,8 @@ ! GLEVEL=0 GVCORD=none +SKIP= +FILTER=y SCALE=0!0!0 GDPFUN=quo(pwtr;25.4)//pw!pw !pw! kntv(wnd@850%PRES) TYPE=c!c !c! b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_wnd.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_wnd.attr index f83f2547f4..ca5a941615 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_wnd.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/850mb_wnd.attr @@ -6,6 +6,8 @@ ! GLEVEL=850 GVCORD=pres +SKIP= +FILTER=y SCALE=0 GDPFUN=kntv(wnd) TYPE=b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/900mb_hght_rh_omega.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/900mb_hght_rh_omega.attr index 2b4679fe38..8e2d3d7f30 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/900mb_hght_rh_omega.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/900mb_hght_rh_omega.attr @@ -8,6 +8,8 @@ ! GLEVEL=900 GVCORD=pres +SKIP= +FILTER=y SCALE=0 !0 !-1 ! 3 ! 3 GDPFUN=relh !sm9s(relh) !sm9s(hght)!sm9s(omeg) !(omeg) TYPE=c !c/f ! c diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/925mb_hght_rh_omega.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/925mb_hght_rh_omega.attr index 50d1cc2047..bad8168ea2 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/925mb_hght_rh_omega.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/925mb_hght_rh_omega.attr @@ -8,6 +8,8 @@ ! GLEVEL=925 GVCORD=pres +SKIP= +FILTER=y SCALE=0 !0 !-1 ! 3 ! 3 GDPFUN=relh !sm9s(relh) !sm9s(hght)!sm9s(omeg) !(omeg) TYPE=c !c/f ! c diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/925mb_hght_tmp_wind.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/925mb_hght_tmp_wind.attr index ac31d46eb6..5111329272 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/925mb_hght_tmp_wind.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/925mb_hght_tmp_wind.attr @@ -7,6 +7,8 @@ ! GLEVEL=925 GVCORD=pres +SKIP= +FILTER=y SCALE=0 !0 !0 !-1 GDPFUN=tmpc !tmpc !tmpc !hght !kntv(wnd) TYPE=c/f !c !c !c !b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/925mb_streamlines.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/925mb_streamlines.attr index 1f74f21936..ce6d444ebd 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/925mb_streamlines.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/925mb_streamlines.attr @@ -6,6 +6,8 @@ ! GLEVEL=925 GVCORD=pres +SKIP= +FILTER=y SCALE=0!0 GDPFUN=mag(kntv(wnd))!kntv(wnd) TYPE=c/f!s diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/best_li.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/best_li.attr index 31d35bb96d..b14f80585d 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/best_li.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/best_li.attr @@ -6,6 +6,8 @@ ! GLEVEL=0 !0 !0 !30:0 GVCORD=none!none!none!pdly +SKIP= +FILTER=y SCALE=0 GDPFUN=sm9s(lft4)!sm9s(lft4) !sm9s(lft4) TYPE=c diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bestcape_cin.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bestcape_cin.attr index 2ac1d50163..c2a6ab54bb 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bestcape_cin.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bestcape_cin.attr @@ -9,6 +9,8 @@ ! GLEVEL=180:0 GVCORD=pdly +SKIP= +FILTER=y SCALE=0 GDPFUN=sm5s(cape)//cp!cp!sm5s(cins)//cn!cn!cn TYPE=c/f!c!c diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bestcape_cin_ncf.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bestcape_cin_ncf.attr index ce9b569e12..112aa39851 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bestcape_cin_ncf.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bestcape_cin_ncf.attr @@ -9,6 +9,8 @@ ! GLEVEL=180:0 GVCORD=pdly +SKIP= +FILTER=y SCALE=0 GDPFUN=sm5s(cape)//cp!cp !cp !sm5s(cins)//cn!cn !cn TYPE=c !c !c !c diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl1_rh.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl1_rh.attr index 4357deb68e..51b010bec2 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl1_rh.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl1_rh.attr @@ -9,6 +9,8 @@ ! GLEVEL=30:0!30:0!90:60!30:0 GVCORD=pdly +SKIP= +FILTER=y SCALE=0!0!3!0 GDPFUN=relh!relh!omeg!kntv(wnd) TYPE=c/f!c!c ! b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl2-5_rh.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl2-5_rh.attr index ab0c39b4ef..00c3d50d02 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl2-5_rh.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl2-5_rh.attr @@ -10,6 +10,8 @@ ! GLEVEL=8400:9800!8400:9800!90:60 GVCORD=sgma!sgma!pdly +SKIP= +FILTER=y SCALE=0!0!3!0 GDPFUN=relh!relh!omeg!kntv(wnd@30:0%pdly) TYPE=c/f!c!c ! b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_1000mb_temp.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_1000mb_temp.attr index 77897ce66b..0f2dbd86ba 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_1000mb_temp.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_1000mb_temp.attr @@ -6,6 +6,8 @@ ! GLEVEL=1000!1000!1000 GVCORD=pres!pres!pres +SKIP= +FILTER=y SCALE=0 GDPFUN=sm9s(tmpf)!sm9s(tmpf) TYPE=c diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_2-meter_12hrmax_temp.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_2-meter_12hrmax_temp.attr index b22573ebdf..b32b6a0aa7 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_2-meter_12hrmax_temp.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_2-meter_12hrmax_temp.attr @@ -8,6 +8,8 @@ ! GLEVEL=2!2!2 GVCORD=hght!hght!hght +SKIP= +FILTER=y SCALE=0 GDPFUN=sm9s(add(mul((sub(tmxk12,273),1.8)32)!sm9s(add(mul((sub(tmxk12,273),1.8)32) TYPE=c diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_2-meter_12hrmax_temp_c.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_2-meter_12hrmax_temp_c.attr index 39e7462ab2..7305ef395d 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_2-meter_12hrmax_temp_c.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_2-meter_12hrmax_temp_c.attr @@ -6,6 +6,8 @@ ! GLEVEL=2!2!2 GVCORD=hght!hght!hght +SKIP= +FILTER=y SCALE=0 GDPFUN=sm9s(sub(tmxk12,273)!sm9s(sub(tmxk12,273) TYPE=c diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_2-meter_12hrmin_temp.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_2-meter_12hrmin_temp.attr index f48b5f60fa..3b368f17a2 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_2-meter_12hrmin_temp.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_2-meter_12hrmin_temp.attr @@ -8,6 +8,8 @@ ! GLEVEL=2!2!2 GVCORD=hght!hght!hght +SKIP= +FILTER=y SCALE=0 GDPFUN=sm9s(add(mul((sub(tmnk12,273),1.8)32)!sm9s(add(mul((sub(tmnk12,273),1.8)32) TYPE=c diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_2-meter_12hrmin_temp_c.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_2-meter_12hrmin_temp_c.attr index 63f5fcf2e8..6222a8a0a6 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_2-meter_12hrmin_temp_c.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_2-meter_12hrmin_temp_c.attr @@ -6,6 +6,8 @@ ! GLEVEL=2!2!2 GVCORD=hght!hght!hght +SKIP= +FILTER=y SCALE=0 GDPFUN=sm9s(sub(tmnk12,273)!sm9s(sub(tmnk12,273) TYPE=c diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_2-meter_temp.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_2-meter_temp.attr index 00d8489dd9..31c6bc5de4 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_2-meter_temp.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_2-meter_temp.attr @@ -6,6 +6,8 @@ ! GLEVEL=2!2!2 GVCORD=hght!hght!hght +SKIP= +FILTER=y SCALE=0 GDPFUN=sm9s(tmpf)!sm9s(tmpf) TYPE=c diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_2-meter_temp_c.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_2-meter_temp_c.attr index 0203113b83..fe19780473 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_2-meter_temp_c.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_2-meter_temp_c.attr @@ -6,6 +6,8 @@ ! GLEVEL=2!2!2 GVCORD=hght!hght!hght +SKIP= +FILTER=y SCALE=0 GDPFUN=sm9s(tmpc)!sm9s(tmpc) TYPE=c diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_dwpt_c.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_dwpt_c.attr index a9f553e9f5..39a69b90b4 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_dwpt_c.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_dwpt_c.attr @@ -6,6 +6,8 @@ ! GLEVEL=9950 GVCORD=SGMA +SKIP= +FILTER=y SCALE=0 GDPFUN=dwpc !dwpc !dwpc !kntv(wnd@9950%SGMA) TYPE=c !c !c !b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_h2o_conv.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_h2o_conv.attr index f15d0a5bcc..1ccae467f3 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_h2o_conv.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_h2o_conv.attr @@ -10,6 +10,8 @@ ! GLEVEL=9823!9823!9823:0!9823:0!0 GVCORD=sgma!sgma!sgma!sgma!none +SKIP= +FILTER=y SCALE=7!0 GDPFUN=sdiv(mixr,obs)!thte(mul(.9823;pres@0%none),tmpc,dwpc)//te!te!te!pmsl!kntv(wnd%sgma@9823) TYPE=c/f!c!c!c!c ! b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_h2o_conv_ncf.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_h2o_conv_ncf.attr index b97078cf57..512103a772 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_h2o_conv_ncf.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_h2o_conv_ncf.attr @@ -9,6 +9,8 @@ ! GLEVEL=9823!9823!9823:0!9823:0!9823 GVCORD=sgma!sgma!sgma!sgma!sgma +SKIP= +FILTER=y SCALE=7!0 GDPFUN=sdiv(mixr,obs)!thte(mul(.9823;pres@0%none),tmpc,dwpc)//te!te!te!kntv(wnd) TYPE=c !c !c !c !b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_h2o_trnsp_omgq.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_h2o_trnsp_omgq.attr index d3843533a7..eec0e6ae53 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_h2o_trnsp_omgq.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_h2o_trnsp_omgq.attr @@ -7,6 +7,8 @@ ! GLEVEL=9823!9823!0 !9823 GVCORD=SGMA!SGMA!none!SGMA +SKIP= +FILTER=y SCALE=5/2!5/2!0 ! 5/2 GDPFUN=mul(mixr,(ADV(pres@0%none,wnd)))!mul(mixr,(ADV(pres@0%none,wnd)))!hght!smul(mixr;wnd) TYPE=c/f ! c !c !a diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_moist_conv.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_moist_conv.attr index 4847c157cd..4af04fe00b 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_moist_conv.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_moist_conv.attr @@ -6,6 +6,8 @@ ! GLEVEL=1000!30:0 GVCORD=pres!pdly +SKIP= +FILTER=y SCALE=7!0!0 GDPFUN=sdiv(mixr;wnd)!sm9s(dwpf)!sm9s(dwpf)!sm9s(dwpf)!kntv(wnd) TYPE=c/f!c!c!c!b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_moistconv_wind_dwpt.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_moistconv_wind_dwpt.attr index d41e8bdc01..c27155e0eb 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_moistconv_wind_dwpt.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_moistconv_wind_dwpt.attr @@ -9,6 +9,8 @@ ! GLEVEL=9823 GVCORD=SGMA +SKIP= +FILTER=y SCALE=7!0!0 GDPFUN=sdiv(mixr;wnd)!dwpf!dwpf!dwpf ! kntv(wnd) TYPE=c/f !c !c !c ! b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_moisture_conv.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_moisture_conv.attr index d8bc0f0be4..246f66be54 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_moisture_conv.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_moisture_conv.attr @@ -7,6 +7,8 @@ ! GLEVEL=0 GVCORD=none +SKIP= +FILTER=y SCALE=7 ! 0 GDPFUN=sdiv(mixr;wnd%SGMA@9950)! kntv(wnd%sgma@9950) TYPE=c/f ! b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_moisture_conv_thtae.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_moisture_conv_thtae.attr index 0841cd0a5e..db33b155cb 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_moisture_conv_thtae.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_moisture_conv_thtae.attr @@ -8,6 +8,8 @@ ! GLEVEL=9950!9950!0:9950!0:9950!0 GVCORD=sgma!sgma!none!none!none +SKIP= +FILTER=y SCALE=7!0 GDPFUN=sdiv(mixr(dwpc;pres@0%none),obs!thte(pres@0%none,tmpc,dwpc)//e!e!e!pmsl!kntv(wnd%sgma@9950) TYPE=c/f!c!c!c!c ! b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_rh.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_rh.attr index e1a8493108..cd3252c91a 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_rh.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_rh.attr @@ -8,6 +8,8 @@ ! GLEVEL=30:0 GVCORD=pdly +SKIP= +FILTER=y SCALE=0 GDPFUN=sm9s(relh)!sm9s(relh)!kntv(wnd) TYPE=c/f !c !b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_rh_lake.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_rh_lake.attr index 9dfa381cdc..e4a677bfae 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_rh_lake.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_rh_lake.attr @@ -8,6 +8,8 @@ ! GLEVEL=9100:9400!9100:8200!850 !850 !8200:8500!9100:9400 GVCORD=sgma !sgma !pres!pres!sgma !sgma +SKIP= +FILTER=y SCALE=0!0!0!0!3!0 GDPFUN=avg(relh,relh@8200:8500)//rh!rh!sub(tmpc@2%hght,tmpc)!sm9s(tmpc)!omeg!kntv(wnd@9700:10000%SGMA) TYPE=c/f !c !c !c !c !b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_sgma_9950_temp.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_sgma_9950_temp.attr index c3de8eea82..0950f7d397 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_sgma_9950_temp.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_sgma_9950_temp.attr @@ -6,6 +6,8 @@ ! GLEVEL=9950!9950!9950 GVCORD=sgma!sgma!sgma +SKIP= +FILTER=y SCALE=0 GDPFUN=sm9s(tmpf)!sm9s(tmpf) TYPE=c diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_thte_ncf.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_thte_ncf.attr index 65c1f85d09..6284525648 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_thte_ncf.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_thte_ncf.attr @@ -6,6 +6,8 @@ ! GLEVEL=9823!9823:0!9823:0 GVCORD=sgma!sgma!sgma +SKIP= +FILTER=y SCALE=0 GDPFUN=thte(mul(.9823;pres@0%none),tmpc,dwpc)//te!te!te TYPE=c diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_thte_wind.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_thte_wind.attr index 3142b532e8..ff1b33231f 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_thte_wind.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_thte_wind.attr @@ -9,6 +9,8 @@ ! GLEVEL=30:0 GVCORD=pdly +SKIP= +FILTER=y SCALE=0 GDPFUN=thte(pres;tmpc;dwpc)//the!the !the !kntv(wnd) TYPE=c/f !c !c !b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_thte_wind_mono.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_thte_wind_mono.attr index cb9f10f893..c12f450cd3 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_thte_wind_mono.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_thte_wind_mono.attr @@ -6,6 +6,8 @@ ! GLEVEL=9823 GVCORD=sgma +SKIP= +FILTER=y SCALE=0 GDPFUN=thte(pres;tmpc;dwpc)//the!the !the !kntv(wnd) TYPE=c !c !c !b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_wind.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_wind.attr index 4d0c69b8f6..c66125d7f5 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_wind.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_wind.attr @@ -10,6 +10,8 @@ ! GLEVEL=30:0!0 GVCORD=pdly!none +SKIP= +FILTER=y SCALE=0 GDPFUN=mag(kntv(wnd))!sm5s(emsl) ! kntv(wnd@30:0%pdly) TYPE=c/f!c ! b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_winds_only.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_winds_only.attr index 4897c88c79..542d190b4b 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_winds_only.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/bl_winds_only.attr @@ -6,6 +6,8 @@ ! GLEVEL=0 GVCORD=none +SKIP= +FILTER=y SCALE=0 GDPFUN=kntv(wnd@30:0%pdly) TYPE=b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/ct_index.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/ct_index.attr index 71c1a5720c..581d18adff 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/ct_index.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/ct_index.attr @@ -6,6 +6,8 @@ ! GLEVEL=0!700!30:0!0 GVCORD=none!pres!pdly!none +SKIP= +FILTER=y SCALE=0 GDPFUN=sm9s(ctot)!sm9s(tmpc)!sm9s(dwpf)!sm9s(pmsl) TYPE=f!c diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/emsl_and_10m_wind.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/emsl_and_10m_wind.attr index 899b8ea674..7319819b66 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/emsl_and_10m_wind.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/emsl_and_10m_wind.attr @@ -8,6 +8,8 @@ ! GLEVEL=10!0 GVCORD=hght!none +SKIP= +FILTER=y SCALE=0 GDPFUN=mag(kntv(wnd))!sm5s(pmsl) ! kntv(wnd@10%hght) TYPE=c/f!c ! b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/emsl_and_bl_wind.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/emsl_and_bl_wind.attr index f35a27cffd..0fa74430dc 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/emsl_and_bl_wind.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/emsl_and_bl_wind.attr @@ -8,6 +8,8 @@ ! GLEVEL=30:0!0 GVCORD=pdly!none +SKIP= +FILTER=y SCALE=0 GDPFUN=mag(kntv(wnd))!sm5s(emsl) ! kntv(wnd@30:0%pdly) TYPE=c/f!c ! b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/emsl_and_ll_wind.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/emsl_and_ll_wind.attr index 9c51b93303..8702b61bbe 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/emsl_and_ll_wind.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/emsl_and_ll_wind.attr @@ -8,6 +8,8 @@ ! GLEVEL=60:30!0 GVCORD=pdly!none +SKIP= +FILTER=y SCALE=0 GDPFUN=mag(kntv(wnd))!sm5s(emsl) ! kntv(wnd@60:30%pdly) TYPE=c/f!c ! b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/emsl_bl1_wind_850mb_tad.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/emsl_bl1_wind_850mb_tad.attr index 0435b307b1..666a19bf66 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/emsl_bl1_wind_850mb_tad.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/emsl_bl1_wind_850mb_tad.attr @@ -9,6 +9,8 @@ ! GLEVEL=850!30:0!0 GVCORD=pres!pdly!none +SKIP= +FILTER=y SCALE=4!0 GDPFUN=adv(tmpc,wnd)!mag(kntv(wnd))!sm5s(emsl) ! kntv(wnd@30:0%pdly) TYPE=c/f !c !c ! b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/emsl_bl_tempc_wind.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/emsl_bl_tempc_wind.attr index 93ca5d3e4a..f0f5684334 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/emsl_bl_tempc_wind.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/emsl_bl_tempc_wind.attr @@ -9,6 +9,8 @@ ! GLEVEL=30:0!30:0!30:0!0 !30:0 GVCORD=pdly!pdly!pdly!none!pdly +SKIP= +FILTER=y SCALE=0 GDPFUN=tmpc!tmpc!tmpc!sm5s(emsl) ! kntv(wnd) TYPE=c/f !c !c !c ! b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/emsl_bl_tempf_wind.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/emsl_bl_tempf_wind.attr index f85a647381..084419a609 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/emsl_bl_tempf_wind.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/emsl_bl_tempf_wind.attr @@ -6,6 +6,8 @@ ! GLEVEL=30:0!30:0!30:0!0 !30:0 GVCORD=pdly!pdly!pdly!none!pdly +SKIP= +FILTER=y SCALE=0 GDPFUN=tmpf!tmpf!tmpf!sm5s(emsl) ! kntv(wnd) TYPE=c/f !c !c !c ! b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/emsl_thkn.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/emsl_thkn.attr index 5b0ffacdc8..f14c2bbec0 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/emsl_thkn.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/emsl_thkn.attr @@ -7,6 +7,8 @@ ! GLEVEL=500:1000!500:1000!0 GVCORD=pres!pres!none +SKIP= +FILTER=y SCALE=-1!-1!0 GDPFUN=ldf(hght) ! ldf(hght) !sm5s(emsl) TYPE=c diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/emsl_thkn_wind.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/emsl_thkn_wind.attr index 969fc5c012..50865c9c33 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/emsl_thkn_wind.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/emsl_thkn_wind.attr @@ -7,6 +7,8 @@ ! GLEVEL=500:1000!500:1000!0!30:0 GVCORD=pres!pres!none!pdly +SKIP= +FILTER=y SCALE=-1!-1!0 GDPFUN=ldf(hght) ! ldf(hght) !sm9s(emsl)! kntv(wnd) TYPE=c!c!c!b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/ethkn.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/ethkn.attr index 5eb82960f1..ab3b2baa6c 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/ethkn.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/ethkn.attr @@ -7,6 +7,8 @@ ! GLEVEL=500 !500 GVCORD=pres !pres +SKIP= +FILTER=y SCALE=-1 !-1 GDPFUN=sm9s(sub(hght,mul(8.0,sub(pmsl@0%none,1000)))!sm9s(sub(hght,mul(8.0,sub(pmsl@0%none,1000))) TYPE=c diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/frzg_lvl_hght.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/frzg_lvl_hght.attr index 4db0ab558e..68525ad6bb 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/frzg_lvl_hght.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/frzg_lvl_hght.attr @@ -9,6 +9,8 @@ ! GLEVEL=0 !30:0 GVCORD=FRZL !pdly +SKIP= +FILTER=y SCALE=-2 !0 GDPFUN=sm5s(mul(3.28,hght))!sm5s(tmpc) TYPE=c/f !c diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/frzg_lvl_hght_and_rh.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/frzg_lvl_hght_and_rh.attr index d405060d4b..b1fdecbdfb 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/frzg_lvl_hght_and_rh.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/frzg_lvl_hght_and_rh.attr @@ -8,6 +8,8 @@ ! GLEVEL=0 !0 !0 !0 !30:0 GVCORD=FRZL!FRZL!FRZL!FRZL!pdly +SKIP= +FILTER=y SCALE=0!-3!-2!0!0 GDPFUN=(relh) !mul(3.28,hght) !mul(3.28,hght) !sub(hght,hght@0%none) !tmpc TYPE=c/f ! c !c !c/f !c diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/frzg_lvl_hght_ncf.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/frzg_lvl_hght_ncf.attr index 9ef40f48e0..f4986d2784 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/frzg_lvl_hght_ncf.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/frzg_lvl_hght_ncf.attr @@ -6,6 +6,8 @@ ! GLEVEL=0 !30:0 GVCORD=FRZL !pdly +SKIP= +FILTER=y SCALE=-2 !0 GDPFUN=sm5s(mul(3.28,hght))!sm5s(tmpc) TYPE=c !c diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/great_lakes_snow.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/great_lakes_snow.attr index ba759ec76e..90d8bd3d12 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/great_lakes_snow.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/great_lakes_snow.attr @@ -10,6 +10,8 @@ ! GLEVEL=90:60 !850 !850 !180:150 !30:0 GVCORD=pdly !pres !pres !pdly !pdly +SKIP= +FILTER=y SCALE=0 !0 !0 !3 !0 GDPFUN=avg(relh,relh@180:150)!sub(tmpc@2%hght,tmpc)!sm9s(tmpc)!sm5s(omeg)!kntv(wnd) TYPE=c/f !c !c !c !b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/great_lakes_snow2.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/great_lakes_snow2.attr index 929fdffe45..951df5b655 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/great_lakes_snow2.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/great_lakes_snow2.attr @@ -6,6 +6,8 @@ ! GLEVEL=90:60 !850 !850 !180:150 !30:0 GVCORD=pdly !pres !pres !pdly !pdly +SKIP= +FILTER=y SCALE=0 !0 !0 !3 !0 GDPFUN=avg(relh,relh@180:150)!sub(tmpc@2%hght,tmpc)!sm9s(tmpc)!sm5s(omeg)!kntv(wnd) TYPE=c/f !c !c !c !s diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/icprb_6400.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/icprb_6400.attr index 120bcf51f0..928669d1cb 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/icprb_6400.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/icprb_6400.attr @@ -5,6 +5,8 @@ ! GLEVEL=6400 GVCORD=HGHT +SKIP= +FILTER=y SCALE=0 GDPFUN=icprb TYPE=c diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/icsev_6400.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/icsev_6400.attr index bc2e5ade7b..3b0885b60b 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/icsev_6400.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/icsev_6400.attr @@ -5,6 +5,8 @@ ! GLEVEL=6400 GVCORD=HGHT +SKIP= +FILTER=y SCALE=2 GDPFUN=icsev TYPE=c/f diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/kindex_700mbtemp_bldwpt_mslp.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/kindex_700mbtemp_bldwpt_mslp.attr index 2b42659cb7..814fef2ab1 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/kindex_700mbtemp_bldwpt_mslp.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/kindex_700mbtemp_bldwpt_mslp.attr @@ -9,6 +9,8 @@ ! GLEVEL=700!700!30:0!0 GVCORD=pres!pres!pdly!none +SKIP= +FILTER=y SCALE=0 GDPFUN=sub(add(add(dwpc@850,dwpc),sub(tmpc@850,tmpc@500)),tmpc)!tmpc!dwpf!emsl TYPE=c/f!c diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/lifted_index.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/lifted_index.attr index ed641b2e7b..bb8591be23 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/lifted_index.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/lifted_index.attr @@ -8,6 +8,8 @@ ! GLEVEL=180:0 GVCORD=pdly +SKIP= +FILTER=y SCALE=0 GDPFUN=sm5s(lft4)//li!li!li ! kntv(wnd@30:0) TYPE=c/f!c!c ! b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/lifted_index_ncf.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/lifted_index_ncf.attr index 0d3a32d041..1ad08dcc52 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/lifted_index_ncf.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/lifted_index_ncf.attr @@ -8,6 +8,8 @@ ! GLEVEL=180:0 GVCORD=pdly +SKIP= +FILTER=y SCALE=0 GDPFUN=sm5s(lft4) !sm5s(lft4) !sm5s(lft4) !kntv(wnd@30:0%pdly) TYPE=c !c !c !b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/ll_turb.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/ll_turb.attr index 7c0b4681f3..796d37da71 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/ll_turb.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/ll_turb.attr @@ -8,6 +8,8 @@ ! GLEVEL=850!9700:10000!0 GVCORD=pres!SGMA!none +SKIP= +FILTER=y SCALE=4!0 GDPFUN=adv(tmpc,wnd)!mag(kntv(wnd))!sm5s(emsl) ! kntv(wnd@9700:10000%SGMA) TYPE=c/f !c !c ! b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/marine_fronts.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/marine_fronts.attr index 2d99fa935c..8229da3aa5 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/marine_fronts.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/marine_fronts.attr @@ -6,6 +6,8 @@ ! GLEVEL=9823 ! 850:1000 GVCORD=sgma ! pres +SKIP= +FILTER=y SCALE=7 ! -1 GDPFUN=sdiv(mixr(dwpc;pres@0%none),obs ! (sub(hght@850,hght@1000) ! kntv(wnd@30:0%pdly) TYPE=c/f ! c ! b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/mean_layer_rh.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/mean_layer_rh.attr index f10f1e3c73..7a4cb6116b 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/mean_layer_rh.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/mean_layer_rh.attr @@ -7,6 +7,8 @@ ! GLEVEL=4400:10000 GVCORD=sgma +SKIP= +FILTER=y SCALE=0 GDPFUN=relh ! relh TYPE=c/f ! c diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/minpres_1000mb_wind.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/minpres_1000mb_wind.attr index da778482a0..92136a56f7 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/minpres_1000mb_wind.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/minpres_1000mb_wind.attr @@ -6,6 +6,8 @@ ! GLEVEL=1000 !1000 !0 !1000 GVCORD=pres !pres !none !pres +SKIP= +FILTER=y SCALE=0 GDPFUN=mag(kntv(wnd)) !mag(kntv(wnd)) !sm5s(sm5s(pmsl)) !kntv(wnd) TYPE=c/f !c !c !b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/minpres_35m_wind.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/minpres_35m_wind.attr index dfc3d80514..3ed1d7c770 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/minpres_35m_wind.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/minpres_35m_wind.attr @@ -6,6 +6,8 @@ ! GLEVEL=35 !35 !0 !35 GVCORD=hght !hght !none !hght +SKIP= +FILTER=y SCALE=0 GDPFUN=mag(kntv(wnd)) !mag(kntv(wnd)) !sm5s(sm5s(pmsl)) !kntv(wnd) TYPE=c/f !c !c !b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/mlw_pmsl.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/mlw_pmsl.attr index 46c749c5a3..cc0d022d6e 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/mlw_pmsl.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/mlw_pmsl.attr @@ -6,6 +6,8 @@ ! GLEVEL=400:850!0 GVCORD=pres!none +SKIP= +FILTER=y SCALE=0 GDPFUN=squo(2,vadd(vlav(wnd@850:700%pres,vlav(wnd@500:400%pres)!sm9s(pmsl) TYPE=b!c diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/mmsl.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/mmsl.attr index a8e380ffb6..c31f6e3abb 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/mmsl.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/mmsl.attr @@ -7,6 +7,8 @@ ! GLEVEL=0 GVCORD=none +SKIP= +FILTER=y SCALE=0 GDPFUN=sm9s(mmsl) TYPE=c diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/mslp_thkn_850mb_wind.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/mslp_thkn_850mb_wind.attr index c6d0abc519..807878f1d3 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/mslp_thkn_850mb_wind.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/mslp_thkn_850mb_wind.attr @@ -7,6 +7,8 @@ ! GLEVEL=500:1000 !0 ! 850 GVCORD=pres !none ! pres +SKIP= +FILTER=y SCALE=-1 ! 0 GDPFUN=(sub(hght@500,hght@1000)) !sm5s(pmsl) ! kntv(wnd@850%pres) TYPE=c ! c ! b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/ndfd_12hr.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/ndfd_12hr.attr index 2157fdeafb..0a437ae146 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/ndfd_12hr.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/ndfd_12hr.attr @@ -6,6 +6,8 @@ ! GLEVEL=0 GVCORD=none +SKIP= +FILTER=y SCALE=0 GDPFUN=p12i TYPE=f diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/ndfd_24hr.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/ndfd_24hr.attr index b1451c452c..2d8f22c63f 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/ndfd_24hr.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/ndfd_24hr.attr @@ -6,6 +6,8 @@ ! GLEVEL=0 GVCORD=none +SKIP= +FILTER=y SCALE=0 GDPFUN=p24i TYPE=f diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/ndfd_6hr.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/ndfd_6hr.attr index 97749611be..05d277593a 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/ndfd_6hr.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/ndfd_6hr.attr @@ -6,6 +6,8 @@ ! GLEVEL=0 GVCORD=none +SKIP= +FILTER=y SCALE=0 GDPFUN=p06i TYPE=f diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pcpn_potential.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pcpn_potential.attr index 2251102fd5..fb27379b72 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pcpn_potential.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pcpn_potential.attr @@ -8,6 +8,8 @@ ! GLEVEL=0 GVCORD=none +SKIP= +FILTER=y SCALE=0 GDPFUN=sm9s(quo(mul(quo(pwtr;25.4),relh@4700:10000%sgma),100)) TYPE=c/f diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pcpn_potential_ncf.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pcpn_potential_ncf.attr index 28151e0625..f69feea500 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pcpn_potential_ncf.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pcpn_potential_ncf.attr @@ -8,6 +8,8 @@ ! GLEVEL=0!0:4700 GVCORD=none!none +SKIP= +FILTER=y SCALE=0 GDPFUN=sm9s(quo(mul(quo(pwtr;25.4),relh@4700:10000%sgma),100))//pcp!pcp!pcp TYPE=c !c !c diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl.attr index 5f2f5598c6..1c3417eb80 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl.attr @@ -6,6 +6,8 @@ ! GLEVEL=0 GVCORD=none +SKIP= +FILTER=y SCALE=0 GDPFUN=sm5s(pmsl) TYPE=c diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_1000-500thk.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_1000-500thk.attr index 0a3e6cc538..800010c7f0 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_1000-500thk.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_1000-500thk.attr @@ -6,6 +6,8 @@ ! GLEVEL=500:1000 !0 GVCORD=pres !none +SKIP= +FILTER=y SCALE=-1 ! 0 GDPFUN=(sub(hght@500,hght@1000)) !sm9s(pmsl) TYPE=c ! diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_1000-850_thk.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_1000-850_thk.attr index c033aebe50..3c23795aab 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_1000-850_thk.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_1000-850_thk.attr @@ -9,6 +9,8 @@ ! GLEVEL=850:1000 !0 GVCORD=pres !none +SKIP= +FILTER=y SCALE=-1 ! 0 GDPFUN=(sub(hght@850,hght@1000)) !sm9s(pmsl) ! kntv(wnd@30:0%pdly) TYPE=c !c ! b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_1000-850thk.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_1000-850thk.attr index 3e846ec2d9..cf06c722c5 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_1000-850thk.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_1000-850thk.attr @@ -6,6 +6,8 @@ ! GLEVEL=850:1000 !0 GVCORD=pres !none +SKIP= +FILTER=y SCALE=-1 ! 0 GDPFUN=(sub(hght@850,hght@1000)) !sm9s(pmsl) TYPE=c ! diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_1000mb_wind.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_1000mb_wind.attr index 787ced2605..43a15d8f98 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_1000mb_wind.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_1000mb_wind.attr @@ -6,6 +6,8 @@ ! GLEVEL=1000 !1000 !0 !1000 GVCORD=pres !pres !none !pres +SKIP= +FILTER=y SCALE=0 GDPFUN=mag(kntv(wnd)) !mag(kntv(wnd)) !sm5s(sm5s(pmsl)) !kntv(wnd) TYPE=c/f !c !c !b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_and_10m_wind.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_and_10m_wind.attr index c189f86cc4..36bf6943b2 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_and_10m_wind.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_and_10m_wind.attr @@ -7,6 +7,8 @@ ! GLEVEL=10!0 GVCORD=hght!none +SKIP= +FILTER=y SCALE=0 GDPFUN=mag(kntv(wnd))!sm5s(pmsl) ! kntv(wnd@10%hght) TYPE=c/f!c ! b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_and_bl_wind.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_and_bl_wind.attr index 6734e2f049..e76c70ce02 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_and_bl_wind.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_and_bl_wind.attr @@ -8,6 +8,8 @@ ! GLEVEL=30:0!0 GVCORD=pdly!none +SKIP= +FILTER=y SCALE=0 GDPFUN=mag(kntv(wnd))!sm5s(pmsl) ! kntv(wnd@30:0%pdly) TYPE=c/f!c ! b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_and_ll_wind.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_and_ll_wind.attr index 3dadf7c4bd..4d2836ea7b 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_and_ll_wind.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_and_ll_wind.attr @@ -8,6 +8,8 @@ ! GLEVEL=60:30!0 GVCORD=pdly!none +SKIP= +FILTER=y SCALE=0 GDPFUN=mag(kntv(wnd))!sm5s(pmsl) ! kntv(wnd@60:30%pdly) TYPE=c/f!c ! b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_and_sfc_temp.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_and_sfc_temp.attr index 58d5e58824..a362e0a20a 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_and_sfc_temp.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_and_sfc_temp.attr @@ -8,6 +8,8 @@ ! GLEVEL=0 GVCORD=none +SKIP= +FILTER=y SCALE=0 GDPFUN=tmpc!tmpc!tmpc!sm5s(pmsl) ! kntv(wnd) TYPE=c/f!c!c!! b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_bl_temp_wind.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_bl_temp_wind.attr index 21795d6b77..6b26c6a72e 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_bl_temp_wind.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_bl_temp_wind.attr @@ -8,6 +8,8 @@ ! GLEVEL=9950!9950!9950!0 !9950 GVCORD=sgma!sgma!sgma!none!sgma +SKIP= +FILTER=y SCALE=0 GDPFUN=tmpc!tmpc!tmpc!sm5s(pmsl) ! kntv(wnd@9950%sgma) TYPE=c/f !c !c !c ! b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_estthkn.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_estthkn.attr index 0cccbdaa72..aea9f1369d 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_estthkn.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_estthkn.attr @@ -7,6 +7,8 @@ ! GLEVEL=500!500!0 GVCORD=pres!pres!none +SKIP= +FILTER=y SCALE=-1!-1!0 GDPFUN=sub(hght,mul(8.0,sub(pmsl@0%none,1000)))!sub(hght,mul(8.0,sub(pmsl@0%none,1000)))!pmsl TYPE=c diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_ethkn.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_ethkn.attr index 460a606fcb..5c1a239426 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_ethkn.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_ethkn.attr @@ -7,6 +7,8 @@ ! GLEVEL=500 !500 !0 GVCORD=pres !pres !none +SKIP= +FILTER=y SCALE=-1 !-1 !0 GDPFUN=sub(hght,mul(8.0,sub(pmsl@0%none,1000)))!sub(hght,mul(8.0,sub(pmsl@0%none,1000)))!sm9s(pmsl) TYPE=c diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_only.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_only.attr index 1c84c3ba73..72dde0c366 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_only.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_only.attr @@ -1,5 +1,7 @@ GLEVEL=0 GVCORD=none +SKIP= +FILTER=y SCALE=0 GDPFUN=sm5s(pmsl) TYPE=c diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_thkn.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_thkn.attr index dbd3294704..01546668ef 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_thkn.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_thkn.attr @@ -10,6 +10,8 @@ ! GLEVEL=500:1000 !500:1000 !0 GVCORD=pres !pres !none +SKIP= +FILTER=y SCALE=-1 !-1 !0 GDPFUN=sm9s(ldf(hght)!sm9s(ldf(hght)!sm9s(pmsl) TYPE=c diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_thkn_850mb_wind.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_thkn_850mb_wind.attr index b10ee42362..e375221dcb 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_thkn_850mb_wind.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_thkn_850mb_wind.attr @@ -7,6 +7,8 @@ ! GLEVEL=500:1000 !0 ! 850 GVCORD=pres !none ! pres +SKIP= +FILTER=y SCALE=-1 ! 0 GDPFUN=(sub(hght@500,hght@1000)) !sm5s(pmsl) ! kntv(wnd@850%pres) TYPE=c ! c ! b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_thkn_wind.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_thkn_wind.attr index 90ef3d5124..9958c9856b 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_thkn_wind.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_thkn_wind.attr @@ -7,6 +7,8 @@ ! GLEVEL=500:1000!500:1000!0!30:0 GVCORD=pres!pres!none!pdly +SKIP= +FILTER=y SCALE=-1!-1!0 GDPFUN=ldf(hght) !ldf(hght) !sm9s(pmsl)! kntv(wnd) TYPE=c!c!c!b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_thkn_wind_mono.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_thkn_wind_mono.attr index 6f4e37106b..d47195d81e 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_thkn_wind_mono.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmsl_thkn_wind_mono.attr @@ -7,6 +7,8 @@ ! GLEVEL=500:1000!500:1000!0!30:0 GVCORD=pres!pres!none!pdly +SKIP= +FILTER=y SCALE=-1!-1!0 GDPFUN=ldf(hght) !ldf(hght) !sm9s(pmsl)!kntv(wnd) TYPE=c!c!c!b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmslcomponly.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmslcomponly.attr index c6448a0c27..eebfd8c4b6 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmslcomponly.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pmslcomponly.attr @@ -7,6 +7,8 @@ ! GLEVEL=0 GVCORD=none +SKIP= +FILTER=y SCALE=0 GDPFUN=sm5s(pmsl) TYPE=c diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/potvort_400-250mb.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/potvort_400-250mb.attr index cdf792b8a2..73997698d9 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/potvort_400-250mb.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/potvort_400-250mb.attr @@ -9,6 +9,8 @@ ! GLEVEL=9823!400:250!400:250!9823!9823!9823!0!400:250 GVCORD=SGMA!pres!pres!SGMA!SGMA!SGMA!none!pres +SKIP= +FILTER=y SCALE=0!6!6!0 GDPFUN=(thte(pres;tmpc;dwpc))//te!pvor(thta,wnd)//pv!pv!te!te!te!sm5s(pmsl)!kntv(wnd@300%pres) TYPE=c/f!c/f!c ! c ! c ! c ! c ! b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/potvort_400-250mb_al.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/potvort_400-250mb_al.attr index 91bd5e5d9b..015930c37f 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/potvort_400-250mb_al.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/potvort_400-250mb_al.attr @@ -8,6 +8,8 @@ ! GLEVEL=850!400:250!400:250!850!850!1000 GVCORD=pres!pres!pres!pres!pres!pres +SKIP= +FILTER=y SCALE=0!6!6!0!0!0 GDPFUN=thte!pvor(thta,wnd)!pvor(thta,wnd)!thte!thte!sm5s(add(1000;quo(hght;8.0)))!kntv(wnd@300%pres TYPE=c/f!c/f!c ! ! ! ! b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_12hr.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_12hr.attr index ad8f0a47ec..47110cd777 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_12hr.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_12hr.attr @@ -9,6 +9,8 @@ ! GLEVEL=0 GVCORD=none +SKIP= +FILTER=y SCALE=0 GDPFUN=p12i TYPE=f diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_12hr_avg.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_12hr_avg.attr index 2c8600b281..df798081a6 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_12hr_avg.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_12hr_avg.attr @@ -6,6 +6,8 @@ ! GLEVEL=0 GVCORD=none +SKIP= +FILTER=y SCALE=0 GDPFUN=ENS_SAVG(p12i) TYPE=f diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_12hr_mm.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_12hr_mm.attr index 6e2601642f..8227dff88d 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_12hr_mm.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_12hr_mm.attr @@ -9,6 +9,8 @@ ! GLEVEL=0 GVCORD=none +SKIP= +FILTER=y SCALE=0 GDPFUN=p12m TYPE=f diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_24hr.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_24hr.attr index 1bba1226f0..57154fb50c 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_24hr.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_24hr.attr @@ -9,6 +9,8 @@ ! GLEVEL=0 GVCORD=none +SKIP= +FILTER=y SCALE=0 GDPFUN=p24i TYPE=f diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_24hr_avg.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_24hr_avg.attr index 806e4dcdf5..d6f8761652 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_24hr_avg.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_24hr_avg.attr @@ -6,6 +6,8 @@ ! GLEVEL=0 GVCORD=none +SKIP= +FILTER=y SCALE=0 GDPFUN=ENS_SAVG(p24i) TYPE=f diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_24hr_mm.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_24hr_mm.attr index d555e65195..b2d9bec302 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_24hr_mm.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_24hr_mm.attr @@ -9,6 +9,8 @@ ! GLEVEL=0 GVCORD=none +SKIP= +FILTER=y SCALE=0 GDPFUN=p24m TYPE=f diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_3-day.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_3-day.attr index 8b1d92883e..7bed61c623 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_3-day.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_3-day.attr @@ -9,6 +9,8 @@ ! GLEVEL=0 GVCORD=none +SKIP= +FILTER=y SCALE=0 GDPFUN=p72i TYPE=f diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_3hr.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_3hr.attr index ec051b2a6d..fcbf0ea6a1 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_3hr.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_3hr.attr @@ -9,6 +9,8 @@ ! GLEVEL=0 GVCORD=none +SKIP= +FILTER=y SCALE=0 GDPFUN=p03i TYPE=f diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_3hr_emsl.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_3hr_emsl.attr index 5826749661..599055c37c 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_3hr_emsl.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_3hr_emsl.attr @@ -9,6 +9,8 @@ ! GLEVEL=0 GVCORD=none +SKIP= +FILTER=y SCALE=0 GDPFUN=p03i!sm5s(emsl) TYPE=f !c diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_4-day.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_4-day.attr index e0f1bfd4ad..a16263aba0 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_4-day.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_4-day.attr @@ -9,6 +9,8 @@ ! GLEVEL=0 GVCORD=none +SKIP= +FILTER=y SCALE=0 GDPFUN=p96i TYPE=f diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_48hr.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_48hr.attr index 17261666e7..0263e65ecb 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_48hr.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_48hr.attr @@ -9,6 +9,8 @@ ! GLEVEL=0 GVCORD=none +SKIP= +FILTER=y SCALE=0 GDPFUN=p48i TYPE=f diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_5-day.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_5-day.attr index fdb1579d0c..1b1bf105a6 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_5-day.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_5-day.attr @@ -10,6 +10,8 @@ ! GLEVEL=0 GVCORD=none +SKIP= +FILTER=y SCALE=0 GDPFUN=p120i TYPE=f diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_54hr.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_54hr.attr index 1bf21b9173..2fb3732a55 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_54hr.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_54hr.attr @@ -9,6 +9,8 @@ ! GLEVEL=0 GVCORD=none +SKIP= +FILTER=y SCALE=0 GDPFUN=p54i TYPE=f diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_60hr.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_60hr.attr index f3108c8011..38e9fda33b 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_60hr.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_60hr.attr @@ -9,6 +9,8 @@ ! GLEVEL=0 GVCORD=none +SKIP= +FILTER=y SCALE=0 GDPFUN=p60i TYPE=f diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_66hr.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_66hr.attr index 4e5570a41d..ea1401ca63 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_66hr.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_66hr.attr @@ -8,6 +8,8 @@ ! GLEVEL=0 GVCORD=none +SKIP= +FILTER=y SCALE=0 GDPFUN=p66i TYPE=f diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_6hr.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_6hr.attr index 6c20c1b585..29855be132 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_6hr.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_6hr.attr @@ -14,6 +14,8 @@ ! GLEVEL=0 GVCORD=none +SKIP= +FILTER=y SCALE=0 GDPFUN=p06i TYPE=f diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_6hr_1000-500_thkn.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_6hr_1000-500_thkn.attr index 3d1ce85d31..b019453928 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_6hr_1000-500_thkn.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_6hr_1000-500_thkn.attr @@ -10,6 +10,8 @@ ! GLEVEL=0 !500:1000 !500:1000 !0 GVCORD=none!pres !pres !none +SKIP= +FILTER=y SCALE=0 !-1 !-1 !0 GDPFUN=p06i!sm5s(ldf(hght))!sm5s(ldf(hght))!sm5s(pmsl) TYPE=f !c diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_6hr_emsl.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_6hr_emsl.attr index ecfafc1002..239b94c056 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_6hr_emsl.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_6hr_emsl.attr @@ -9,6 +9,8 @@ ! GLEVEL=0 GVCORD=none +SKIP= +FILTER=y SCALE=0 GDPFUN=p06i!sm5s(emsl) TYPE=f !c diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_6hr_mdl_topography.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_6hr_mdl_topography.attr index 511bf373fa..766571844b 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_6hr_mdl_topography.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_6hr_mdl_topography.attr @@ -7,6 +7,8 @@ ! GLEVEL=0 GVCORD=none +SKIP= +FILTER=y SCALE=0 GDPFUN=quo(p06m);25.4)//p06!p06!sm5s(pmsl)!hght TYPE=c/f!c!c!c diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_6hr_mslp.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_6hr_mslp.attr index c068e8477b..3ecf55460f 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_6hr_mslp.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_6hr_mslp.attr @@ -9,6 +9,8 @@ ! GLEVEL=0 GVCORD=none +SKIP= +FILTER=y SCALE=0 GDPFUN=p06i !sm5s(pmsl) TYPE=f !c diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_6hr_mslp_sfchght.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_6hr_mslp_sfchght.attr index 8b918cbfc7..79cc0574c5 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_6hr_mslp_sfchght.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_6hr_mslp_sfchght.attr @@ -9,6 +9,8 @@ ! GLEVEL=0 GVCORD=none +SKIP= +FILTER=y SCALE=0 GDPFUN=p06i!sm5s(pmsl)!sm5s(hght) TYPE=f !c !c diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_6hr_mslphilo.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_6hr_mslphilo.attr index e1a1cd5393..d7786b3201 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_6hr_mslphilo.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_6hr_mslphilo.attr @@ -9,6 +9,8 @@ ! GLEVEL=0 GVCORD=none +SKIP= +FILTER=y SCALE=0 GDPFUN=p06i!sm5s(pmsl) TYPE=f !c diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_72hr.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_72hr.attr index 5a5d0f2693..8bf04684c4 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_72hr.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_72hr.attr @@ -9,6 +9,8 @@ ! GLEVEL=0 GVCORD=none +SKIP= +FILTER=y SCALE=0 GDPFUN=p72i TYPE=f diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_78hr.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_78hr.attr index 7ed6dbece6..0a3235f068 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_78hr.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_78hr.attr @@ -9,6 +9,8 @@ ! GLEVEL=0 GVCORD=none +SKIP= +FILTER=y SCALE=0 GDPFUN=p78i TYPE=f diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_type.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_type.attr index a45b6f17fb..69e9762db9 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_type.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_type.attr @@ -6,6 +6,8 @@ ! GLEVEL=0 !0 !0 !0 GVCORD=none !none !none !none +SKIP= +FILTER=y SCALE=2 !2 !2 !2 GDPFUN=sm5s(WXTr)!sm5s(WXTs)!sm5s(WXTp)!sm5s(WXTz) TYPE=f !f !f !f diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_type_12hr_amounts.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_type_12hr_amounts.attr index 5c15e6edf2..4c68bf3029 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_type_12hr_amounts.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_type_12hr_amounts.attr @@ -8,6 +8,8 @@ ! GLEVEL=0!0!0!0 GVCORD=none!none!none!none +SKIP= +FILTER=y SCALE=0!0!0!0 GDPFUN=mul(WXTs,p12i)!mul(WXTp,p12i)!mul(WXTz,p12i)!mul(WXTr,p12i) TYPE=c/f !c !c !c diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_type_24hr_amounts.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_type_24hr_amounts.attr index b62d0d5ce4..bbac2d91bb 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_type_24hr_amounts.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_type_24hr_amounts.attr @@ -7,6 +7,8 @@ ! GLEVEL=0!0!0!0 GVCORD=none!none!none!none +SKIP= +FILTER=y SCALE=0!0!0!0 GDPFUN=mul(WXTs,p24i)!mul(WXTp,p24i)!mul(WXTz,p24i)!mul(WXTr,p24i) TYPE=c/f !c !c !c diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_type_48hr_amounts.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_type_48hr_amounts.attr index 89a8eb5c32..7afcbcd99c 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_type_48hr_amounts.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_type_48hr_amounts.attr @@ -7,6 +7,8 @@ ! GLEVEL=0!0!0!0 GVCORD=none!none!none!none +SKIP= +FILTER=y SCALE=0!0!0!0 GDPFUN=mul(WXTs,p48i)!mul(WXTp,p48i)!mul(WXTz,p48i)!mul(WXTr,p48i) TYPE=c/f !c !c !c diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_type_6hr_amounts.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_type_6hr_amounts.attr index da26994943..d4e02ffc11 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_type_6hr_amounts.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_type_6hr_amounts.attr @@ -7,6 +7,8 @@ ! GLEVEL=0!0!0!0 GVCORD=none!none!none!none +SKIP= +FILTER=y SCALE=0!0!0!0 GDPFUN=mul(WXTs,p06i)!mul(WXTp,p06i)!mul(WXTz,p06i)!mul(WXTr,p06i) TYPE=c/f !c !c !c diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_type_vv.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_type_vv.attr index b4cb293132..4217642861 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_type_vv.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_type_vv.attr @@ -12,6 +12,8 @@ ! GLEVEL=0 !0 !0 !0 !700:500!4700:10000 GVCORD=none!none!none!none!PRES !sgma +SKIP= +FILTER=y SCALE=2 !2 !2 !2 !3 !0 GDPFUN=sm5s(WXTr)!sm5s(WXTs)!sm5s(WXTp)!sm5s(WXTz)!sm9s(lav(omeg))!sm9s(relh) TYPE=f !f !f !f !c !c diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_type_vv_ncf.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_type_vv_ncf.attr index b6a8c9577a..ea91d565d3 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_type_vv_ncf.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_type_vv_ncf.attr @@ -7,6 +7,8 @@ ! GLEVEL=0!0!0!0!700:500!4700:10000 GVCORD=none!none!none!none!PRES!sgma +SKIP= +FILTER=y SCALE=2!2!2!2!3!0 GDPFUN=sm5s(WXTr)!sm5s(WXTs)!WXTp!WXTz!lav(omeg)!relh TYPE=c!c!c!c!c!c diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_water_mslp.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_water_mslp.attr index 4099d8e204..31702725ac 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_water_mslp.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_water_mslp.attr @@ -7,6 +7,8 @@ ! GLEVEL=0!0!500:1000!500:1000!1000 GVCORD=none!none!PRES!PRES!PRES +SKIP= +FILTER=y SCALE=0!0!-1!-1!0 GDPFUN=quo(pwtr;25.4)!quo(pwtr;25.4)!ldf(hght)!ldf(hght)!sm5s(add(1000;quo(hght;8.0))) TYPE=c/f!c!c diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_water_pmsl.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_water_pmsl.attr index 5c2a714fa8..da543f85fb 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_water_pmsl.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_water_pmsl.attr @@ -9,6 +9,8 @@ ! GLEVEL=0!0!500:1000!500:1000!0 GVCORD=none!none!PRES!PRES!none +SKIP= +FILTER=y SCALE=0!0!-1!-1!0 GDPFUN=quo(pwtr;25.4)//pw!pw!ldf(hght)//tk!tk!sm9s(pmsl) TYPE=c/f!c!c diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_water_pmsl_mm.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_water_pmsl_mm.attr index c6eefd96a0..86abe3f446 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_water_pmsl_mm.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/precip_water_pmsl_mm.attr @@ -7,6 +7,8 @@ ! GLEVEL=0 !0 !500:1000 !500:1000 !0 GVCORD=none !none !PRES !PRES !none +SKIP= +FILTER=y SCALE=0 !0 !-1 !-1 !0 GDPFUN=pwtr !sm9s(pwtr) !ldf(hght) !ldf(hght)!sm5s(pmsl) TYPE=c !c/f !c diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pw_emsl_c-vec.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pw_emsl_c-vec.attr index 9da025ac63..86f1c8a245 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pw_emsl_c-vec.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pw_emsl_c-vec.attr @@ -9,6 +9,8 @@ ! GLEVEL=0 !0 !0 !500:1000!500:1000!850:700 GVCORD=none !none !NONE!PRES !PRES !PRES +SKIP= +FILTER=y SCALE=0!0!0!-1 GDPFUN=quo(pwtr;25.4)//pw!pw !sm5s(emsl)!sm5s(ldf(hght))//tkns!tkns!vsub(squo(2,vadd(vlav(wnd,vlav(wnd@500:300)),wnd@850)) TYPE=c !c/f!c !c ! c ! b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pw_mslp_c-vec.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pw_mslp_c-vec.attr index 07e3225c54..44613d5504 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pw_mslp_c-vec.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/pw_mslp_c-vec.attr @@ -7,6 +7,8 @@ ! GLEVEL=0!0!0!500:1000!500:1000!850:700 GVCORD=none!none!none!PRES!PRES!PRES +SKIP= +FILTER=y SCALE=0!0!0!-1!-1!0 GDPFUN=quo(pwtr;25.4)//pw!pw!pmsl!ldf(hght)//tk!tk! vsub(squo(2,vadd(vlav(wnd,vlav(wnd@500:300)),wnd@850)) TYPE=c!c/f!c!c ! c ! b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/q-vectrs_thkn.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/q-vectrs_thkn.attr index b8ec31e589..1c1df28298 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/q-vectrs_thkn.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/q-vectrs_thkn.attr @@ -8,6 +8,8 @@ ! GLEVEL=300:700 GVCORD=pres +SKIP= +FILTER=y SCALE=-1/0 GDPFUN=sm5s(ldf(hght)) ! smul(4e9,qvec(sm5s(ldf(hght)),vlav(geo))) TYPE=c ! a diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/ransnocsi_500-850.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/ransnocsi_500-850.attr index 4847ff2653..b2d39006df 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/ransnocsi_500-850.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/ransnocsi_500-850.attr @@ -7,6 +7,8 @@ ! GLEVEL=850:700!700!700!850!850!30:0!30:0!850:500 GVCORD=PRES!PRES!PRES!PRES!PRES!pdly!pdly!PRES +SKIP= +FILTER=y SCALE=0!0!0!0!0!0!0!6 GDPFUN=lav(relh)!tmpc!tmpc!tmpc!tmpc!tmpc!tmpc!sm9s(pvor(thte,wnd)) TYPE=f ! c diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/ransnocsi_600-800.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/ransnocsi_600-800.attr index 5b812a4f78..5a52cc72f1 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/ransnocsi_600-800.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/ransnocsi_600-800.attr @@ -7,6 +7,8 @@ ! GLEVEL=850:700!700!700!850!850!30:0!30:0!800:600 GVCORD=PRES!PRES!PRES!PRES!PRES!pdly!pdly!PRES +SKIP= +FILTER=y SCALE=0!0!0!0!0!0!0!6 GDPFUN=lav(relh)!tmpc!tmpc!tmpc!tmpc!tmpc!tmpc!sm9s(pvor(thte,wnd)) TYPE=f ! c diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/ransnocsi_700-850.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/ransnocsi_700-850.attr index a844acd9e4..99d86e3f5b 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/ransnocsi_700-850.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/ransnocsi_700-850.attr @@ -7,6 +7,8 @@ ! GLEVEL=850:700!700!700!850!850!30:0!30:0!850:700 GVCORD=PRES!PRES!PRES!PRES!PRES!pdly!pdly!PRES +SKIP= +FILTER=y SCALE=0!0!0!0!0!0!0!6 GDPFUN=lav(relh)!tmpc!tmpc!tmpc!tmpc!tmpc!tmpc!sm9s(pvor(thte,wnd)) TYPE=f ! c diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/sfclifted_index.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/sfclifted_index.attr index 8860b9433a..cce0fd0b3d 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/sfclifted_index.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/sfclifted_index.attr @@ -7,6 +7,8 @@ ! GLEVEL=500:1000 GVCORD=pres +SKIP= +FILTER=y SCALE=0 GDPFUN=sm5s(sub(lift,273))//li!li!li!kntv(wnd@30:0%pdly) TYPE=c/f!c!c!b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/sipd_6400.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/sipd_6400.attr index 8cdf11e85d..c50914ddf1 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/sipd_6400.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/sipd_6400.attr @@ -5,6 +5,8 @@ ! GLEVEL=6400 GVCORD=HGHT +SKIP= +FILTER=y SCALE=2 GDPFUN=sipd TYPE=p diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/stability_850mb_wnd.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/stability_850mb_wnd.attr index 345b70b076..7849f3786c 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/stability_850mb_wnd.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/stability_850mb_wnd.attr @@ -9,6 +9,8 @@ ! GLEVEL=850!850!850:0!0 GVCORD=pres!pres!pres!none +SKIP= +FILTER=y SCALE=0 GDPFUN=mag(kntv(wnd))!sm9s(sub(thta,thta@0%none))//stb!stb!emsl!kntv(wnd@850%pres) TYPE=c/f!c!c!c ! b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/stability_900mb_wnd.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/stability_900mb_wnd.attr index 2f60eb6195..03b17b886a 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/stability_900mb_wnd.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/stability_900mb_wnd.attr @@ -6,6 +6,8 @@ ! GLEVEL=900!900!900:0!0 GVCORD=pres!pres!pres!none +SKIP= +FILTER=y SCALE=0 GDPFUN=mag(kntv(wnd))!sm9s(sub(thta,thta@0%none))//stb!stb!emsl!kntv(wnd@900%pres) TYPE=c/f!c!c!c ! b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/stability_925mb_wnd.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/stability_925mb_wnd.attr index 094b7ec38f..03ff00f9a7 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/stability_925mb_wnd.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/stability_925mb_wnd.attr @@ -7,6 +7,8 @@ ! GLEVEL=925!925!925:0!0 GVCORD=pres!pres!pres!none +SKIP= +FILTER=y SCALE=0 GDPFUN=mag(kntv(wnd))!sm9s(sub(thta,thta@0%none))//stb!stb!pmsl!kntv(wnd@925%pres) TYPE=c/f!c!c!c ! b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/stability_950mb_wnd.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/stability_950mb_wnd.attr index 74cd84ee4d..b404a8e645 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/stability_950mb_wnd.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/stability_950mb_wnd.attr @@ -6,6 +6,8 @@ ! GLEVEL=950!950!950:0!0 GVCORD=pres!pres!pres!none +SKIP= +FILTER=y SCALE=0 GDPFUN=mag(kntv(wnd))!sm9s(sub(thta,thta@0%none))//stb!stb!emsl!kntv(wnd@950%pres) TYPE=c/f!c!c!c ! b diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/svrwx.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/svrwx.attr index 2cf03ca80d..5c5b5e61bc 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/svrwx.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/svrwx.attr @@ -10,6 +10,8 @@ ! GLEVEL=700 !30:0 !700 !700 !0 !700 GVCORD=pres !pdly !pres !pres !none !pres +SKIP= +FILTER=y SCALE=0 GDPFUN=sm9s(relh) !sm9s(dwpf)!sm9s(relh)!sm9s(tmpc)!emsl!sm9s(relh)!kntv(wnd@30:0%pdly)!kntv(wnd@700%pres) TYPE=c/f !c/f !c !c !c !c !b!a diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/svrwx_intl.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/svrwx_intl.attr index 45bef37ac8..4cfd9decec 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/svrwx_intl.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/svrwx_intl.attr @@ -6,6 +6,8 @@ ! GLEVEL=700 !9950 !700 !700 !0 !700 GVCORD=pres !sgma !pres !pres !none !pres +SKIP= +FILTER=y SCALE=0 GDPFUN=sm9s(relh) !sm9s(dwpc)!sm9s(relh)!sm9s(tmpc)!pmsl!sm9s(relh)!kntv(wnd@9950%sgma)!kntv(wnd@700%pres) TYPE=c/f !c/f !c !c !c !c !b!a diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/turb_6400.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/turb_6400.attr index df009ebef8..2e514c87fc 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/turb_6400.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/ModelFcstGridContours/turb_6400.attr @@ -5,6 +5,8 @@ ! GLEVEL=6400 GVCORD=HGHT +SKIP= +FILTER=y SCALE=2 GDPFUN=turb TYPE=c/f diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/BREF_2.00.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/BREF_2.00.attr index b7e7aea3ca..70357bba8b 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/BREF_2.00.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/BREF_2.00.attr @@ -2,3 +2,6 @@ colorMapName=osf_ref16 colorBar=@dfltMosaicColorBar.xml productCode=140 prodName=BREF_2 +alpha=1.0 +brightness=1.0 +contrast=1.0 \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/BREF_nids_cmref.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/BREF_nids_cmref.attr index 28a5410f9f..d4a6fd8a72 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/BREF_nids_cmref.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/BREF_nids_cmref.attr @@ -2,3 +2,6 @@ colorMapName=nids_cmref colorBar=@dfltMosaicColorBar.xml productCode=140 prodName=BREF +alpha=1.0 +brightness=1.0 +contrast=1.0 \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/CREF_1.00.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/CREF_1.00.attr index 35813baf65..589dbdf535 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/CREF_1.00.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/CREF_1.00.attr @@ -2,3 +2,6 @@ colorMapName=osf_ref16 colorBar=@dfltMosaicColorBar.xml productCode=211 prodName=CREF +alpha=1.0 +brightness=1.0 +contrast=1.0 \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/CREF_30.00.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/CREF_30.00.attr index 6ed1882d2e..155fe07cd8 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/CREF_30.00.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/CREF_30.00.attr @@ -2,3 +2,6 @@ colorMapName=osf_ref16 colorBar=@dfltMosaicColorBar.xml productCode=30 prodName=CREF_30 +alpha=1.0 +brightness=1.0 +contrast=1.0 \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/CREF_4.00.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/CREF_4.00.attr index 6ed1882d2e..155fe07cd8 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/CREF_4.00.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/CREF_4.00.attr @@ -2,3 +2,6 @@ colorMapName=osf_ref16 colorBar=@dfltMosaicColorBar.xml productCode=30 prodName=CREF_30 +alpha=1.0 +brightness=1.0 +contrast=1.0 \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/CREF_nids_cmref.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/CREF_nids_cmref.attr index dc7ceb01bb..15a0166da2 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/CREF_nids_cmref.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/CREF_nids_cmref.attr @@ -2,3 +2,6 @@ colorMapName=nids_cmref colorBar=@dfltMosaicColorBar.xml productCode=30 prodName=CREF +alpha=1.0 +brightness=1.0 +contrast=1.0 \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/PRCP.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/PRCP.attr index 8cdb050835..af79c4c4fb 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/PRCP.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/PRCP.attr @@ -2,3 +2,6 @@ colorMapName=nids_pre colorBar=@dfltMosaicColorBar.xml productCode=101 prodName=PRCP +alpha=1.0 +brightness=1.0 +contrast=1.0 \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/PRCP1_4.00.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/PRCP1_4.00.attr index 6ccfce5ede..b71cf4ebba 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/PRCP1_4.00.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/PRCP1_4.00.attr @@ -2,3 +2,6 @@ colorMapName=nids_pre colorBar=@dfltMosaicColorBar.xml productCode=90 prodName=PRCP1_4 +alpha=1.0 +brightness=1.0 +contrast=1.0 \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/PRCP24_4.00.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/PRCP24_4.00.attr index 951f405798..807fe75fdf 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/PRCP24_4.00.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/PRCP24_4.00.attr @@ -2,3 +2,6 @@ colorMapName=nids_pre colorBar=@dfltMosaicColorBar.xml productCode=102 prodName=PRCP24 +alpha=1.0 +brightness=1.0 +contrast=1.0 \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/PRCPC_4.00.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/PRCPC_4.00.attr index 725b21dfa8..0394a9aaae 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/PRCPC_4.00.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/PRCPC_4.00.attr @@ -2,3 +2,6 @@ colorMapName=nids_pre colorBar=@dfltMosaicColorBar.xml productCode=101 prodName=PRCPC +alpha=1.0 +brightness=1.0 +contrast=1.0 \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/RALA_1.00.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/RALA_1.00.attr index 1187dbbf53..97703e91a4 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/RALA_1.00.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/RALA_1.00.attr @@ -2,3 +2,6 @@ colorMapName=osf_ref16 colorBar=@dfltMosaicColorBar.xml productCode=203 prodName=RALA +alpha=1.0 +brightness=1.0 +contrast=1.0 \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/TOPS18_1.00.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/TOPS18_1.00.attr index d815a446a9..c0f75a1efc 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/TOPS18_1.00.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/TOPS18_1.00.attr @@ -2,3 +2,6 @@ colorMapName=nids_tops colorBar=@dfltMosaicColorBar.xml productCode=210 prodName=TOPS18 +alpha=1.0 +brightness=1.0 +contrast=1.0 \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/TOPS2_4.00.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/TOPS2_4.00.attr index 9ddac80e67..04276a3d6f 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/TOPS2_4.00.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/TOPS2_4.00.attr @@ -2,3 +2,6 @@ colorMapName=nids_tops colorBar=@dfltMosaicColorBar.xml productCode=95 prodName=TOPS2 +alpha=1.0 +brightness=1.0 +contrast=1.0 \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/TOPS30_1.00.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/TOPS30_1.00.attr index e160a25e49..7ee8d141c7 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/TOPS30_1.00.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/TOPS30_1.00.attr @@ -2,3 +2,6 @@ colorMapName=nids_tops colorBar=@dfltMosaicColorBar.xml productCode=212 prodName=TOPS30 +alpha=1.0 +brightness=1.0 +contrast=1.0 \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/TOPS_4.00.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/TOPS_4.00.attr index 98700779ce..05a9876592 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/TOPS_4.00.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/TOPS_4.00.attr @@ -2,3 +2,6 @@ colorMapName=nids_tops colorBar=@dfltMosaicColorBar.xml productCode=95 prodName=TOPS_4 +alpha=1.0 +brightness=1.0 +contrast=1.0 \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/VIL_1.00.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/VIL_1.00.attr index 7f157a3370..cb8cb85e95 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/VIL_1.00.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/VIL_1.00.attr @@ -2,3 +2,6 @@ colorMapName=nids_vil colorBar=@dfltMosaicColorBar.xml productCode=209 prodName=VIL +alpha=1.0 +brightness=1.0 +contrast=1.0 \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/VIL_4.00.attr b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/VIL_4.00.attr index 1afca111a6..d4ad91d380 100644 --- a/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/VIL_4.00.attr +++ b/cave/build/static/common/cave/etc/ncep/AttributeSetGroups/RadarMosaic/VIL_4.00.attr @@ -2,3 +2,6 @@ colorMapName=nids_vil colorBar=@dfltMosaicColorBar.xml productCode=148 prodName=VIL_4 +alpha=1.0 +brightness=1.0 +contrast=1.0 \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/Bundles/GoesSXIImage.xml b/cave/build/static/common/cave/etc/ncep/Bundles/GoesSXIImage.xml new file mode 100644 index 0000000000..d01d4d9462 --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/Bundles/GoesSXIImage.xml @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/Bundles/GoesSXIImageMultipane.xml b/cave/build/static/common/cave/etc/ncep/Bundles/GoesSXIImageMultipane.xml new file mode 100644 index 0000000000..1d106b482f --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/Bundles/GoesSXIImageMultipane.xml @@ -0,0 +1,161 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/Bundles/HalphaImage.xml b/cave/build/static/common/cave/etc/ncep/Bundles/HalphaImage.xml new file mode 100644 index 0000000000..d0ffa5b1b2 --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/Bundles/HalphaImage.xml @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/Bundles/SDO_AIAImage.xml b/cave/build/static/common/cave/etc/ncep/Bundles/SDO_AIAImage.xml new file mode 100644 index 0000000000..5edd004cea --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/Bundles/SDO_AIAImage.xml @@ -0,0 +1,40 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/Bundles/SDO_AIA_MultiImage.xml b/cave/build/static/common/cave/etc/ncep/Bundles/SDO_AIA_MultiImage.xml new file mode 100644 index 0000000000..049d69142c --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/Bundles/SDO_AIA_MultiImage.xml @@ -0,0 +1,100 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/Bundles/SDO_HMIImage.xml b/cave/build/static/common/cave/etc/ncep/Bundles/SDO_HMIImage.xml new file mode 100644 index 0000000000..809ea1e37d --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/Bundles/SDO_HMIImage.xml @@ -0,0 +1,38 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/Bundles/SOHOEitImage.xml b/cave/build/static/common/cave/etc/ncep/Bundles/SOHOEitImage.xml new file mode 100644 index 0000000000..461eccbce3 --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/Bundles/SOHOEitImage.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/Bundles/SOHOLascoImage.xml b/cave/build/static/common/cave/etc/ncep/Bundles/SOHOLascoImage.xml new file mode 100644 index 0000000000..71e31c389f --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/Bundles/SOHOLascoImage.xml @@ -0,0 +1,41 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/Bundles/STEREOImage.xml b/cave/build/static/common/cave/etc/ncep/Bundles/STEREOImage.xml new file mode 100644 index 0000000000..005cb2f958 --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/Bundles/STEREOImage.xml @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/Bundles/TimeSeriesExample.xml b/cave/build/static/common/cave/etc/ncep/Bundles/TimeSeriesExample.xml new file mode 100644 index 0000000000..41d6a5b876 --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/Bundles/TimeSeriesExample.xml @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + time + Universal Time + + + flux + Watts/m2 + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/ColorMaps/lockedColorMaps.tbl b/cave/build/static/common/cave/etc/ncep/ColorMaps/lockedColorMaps.tbl new file mode 100644 index 0000000000..f07ac9dda8 --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/ColorMaps/lockedColorMaps.tbl @@ -0,0 +1,11 @@ +! +! lockedColorMaps.tbl +! +! This table contains the list of color map files that needs to be locked down. +! +! First column -- Colormap file name +! +! Note: DO NOT use space(s). One file name per line ('.cmap' is optional). +! +! FileName +bd.cmap \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/DefaultRBDs/defaultRBD.xml b/cave/build/static/common/cave/etc/ncep/DefaultRBDs/defaultRBD.xml index 0593f7e3df..7c3a638a94 100644 --- a/cave/build/static/common/cave/etc/ncep/DefaultRBDs/defaultRBD.xml +++ b/cave/build/static/common/cave/etc/ncep/DefaultRBDs/defaultRBD.xml @@ -91,7 +91,7 @@ Canada mapdata.canada
the_geom - name + name_en RGB {255, 228, 220} 1 SOLID diff --git a/cave/build/static/common/cave/etc/ncep/PgenXmlOverlayProducts/asccarrfa.xml b/cave/build/static/common/cave/etc/ncep/PgenXmlOverlayProducts/asccarrfa.xml new file mode 100644 index 0000000000..615e147f91 --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/PgenXmlOverlayProducts/asccarrfa.xml @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cave/build/static/common/cave/etc/ncep/PgenXmlOverlayProducts/ascgulffa.xml b/cave/build/static/common/cave/etc/ncep/PgenXmlOverlayProducts/ascgulffa.xml new file mode 100644 index 0000000000..6de16c8245 --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/PgenXmlOverlayProducts/ascgulffa.xml @@ -0,0 +1,23 @@ + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cave/build/static/common/cave/etc/ncep/PgenXmlOverlayProducts/asctropfirs.xml b/cave/build/static/common/cave/etc/ncep/PgenXmlOverlayProducts/asctropfirs.xml new file mode 100644 index 0000000000..37a1dbf27c --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/PgenXmlOverlayProducts/asctropfirs.xml @@ -0,0 +1,755 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cave/build/static/common/cave/etc/ncep/PgenXmlOverlayProducts/awc_ARTCC.xml b/cave/build/static/common/cave/etc/ncep/PgenXmlOverlayProducts/awc_ARTCC.xml new file mode 100644 index 0000000000..e3e923d69a --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/PgenXmlOverlayProducts/awc_ARTCC.xml @@ -0,0 +1,1103 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cave/build/static/common/cave/etc/ncep/PgenXmlOverlayProducts/awc_FIR.xml b/cave/build/static/common/cave/etc/ncep/PgenXmlOverlayProducts/awc_FIR.xml new file mode 100644 index 0000000000..3837a68d63 --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/PgenXmlOverlayProducts/awc_FIR.xml @@ -0,0 +1,315 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cave/build/static/common/cave/etc/ncep/PgenXmlOverlayProducts/awc_WST.xml b/cave/build/static/common/cave/etc/ncep/PgenXmlOverlayProducts/awc_WST.xml new file mode 100644 index 0000000000..5244fac403 --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/PgenXmlOverlayProducts/awc_WST.xml @@ -0,0 +1,280 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/cave/build/static/common/cave/etc/ncep/PlotModels/ConditionalFilters/tempo_flight_condition.xml b/cave/build/static/common/cave/etc/ncep/PlotModels/ConditionalFilters/tempo_flight_condition.xml new file mode 100644 index 0000000000..f7f1b562dd --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/PlotModels/ConditionalFilters/tempo_flight_condition.xml @@ -0,0 +1,4 @@ + + + + diff --git a/cave/build/static/common/cave/etc/ncep/PlotModels/ConditionalFilters/tempo_prob.xml b/cave/build/static/common/cave/etc/ncep/PlotModels/ConditionalFilters/tempo_prob.xml new file mode 100644 index 0000000000..5747d59121 --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/PlotModels/ConditionalFilters/tempo_prob.xml @@ -0,0 +1,4 @@ + + + + diff --git a/cave/build/static/common/cave/etc/ncep/PlotModels/NcWxSymbols.svg b/cave/build/static/common/cave/etc/ncep/PlotModels/NcWxSymbols.svg index 398c489d31..26ab091054 100644 --- a/cave/build/static/common/cave/etc/ncep/PlotModels/NcWxSymbols.svg +++ b/cave/build/static/common/cave/etc/ncep/PlotModels/NcWxSymbols.svg @@ -194,27 +194,27 @@ xmlns:xlink="http://www.w3.org/1999/xlink"> - - - + + + - - - + + + - + - - - - - + + + + + diff --git a/cave/build/static/common/cave/etc/ncep/PlotModels/PlotParameters/cloud_chars.txt b/cave/build/static/common/cave/etc/ncep/PlotModels/PlotParameters/cloud_chars.txt index 33adebf426..71daaf9a13 100644 --- a/cave/build/static/common/cave/etc/ncep/PlotModels/PlotParameters/cloud_chars.txt +++ b/cave/build/static/common/cave/etc/ncep/PlotModels/PlotParameters/cloud_chars.txt @@ -1,11 +1,11 @@ s2s -default : 32 -BLNK : 32 -SKC : 48 -CLR : 48 -FEW : 49 -SCT : 64 -BKN : 50 -OVC : 56 -OBS : 52 -VV : 52 +default : 5 +BLNK : 5 +SKC : 14 +CLR : 14 +FEW : 16 +SCT : 19 +BKN : 1 +OVC : 3 +OBS : 4 +VV : 4 diff --git a/cave/build/static/common/cave/etc/ncep/PlotModels/PlotParameters/icing_type2_trans.txt b/cave/build/static/common/cave/etc/ncep/PlotModels/PlotParameters/icing_type2_trans.txt new file mode 100644 index 0000000000..49888980c9 --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/PlotModels/PlotParameters/icing_type2_trans.txt @@ -0,0 +1,4 @@ +s2s +RIME : R +CLR : CL +MXD : M \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/PlotModels/PlotParameters/icing_type_trans.txt b/cave/build/static/common/cave/etc/ncep/PlotModels/PlotParameters/icing_type_trans.txt index 3026462439..71a1a7db63 100644 --- a/cave/build/static/common/cave/etc/ncep/PlotModels/PlotParameters/icing_type_trans.txt +++ b/cave/build/static/common/cave/etc/ncep/PlotModels/PlotParameters/icing_type_trans.txt @@ -1,4 +1,4 @@ s2s -RIME : 106 -CLR : 105 -MXD : 107 \ No newline at end of file +RIME : 1 +CLR : 2 +MXD : 3 \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/ncep/PlotModels/PlotParameters/plotParameters_bufrmosLAMP.xml b/cave/build/static/common/cave/etc/ncep/PlotModels/PlotParameters/plotParameters_bufrmosLAMP.xml index 6922045ee6..167d7bcbdf 100644 --- a/cave/build/static/common/cave/etc/ncep/PlotModels/PlotParameters/plotParameters_bufrmosLAMP.xml +++ b/cave/build/static/common/cave/etc/ncep/PlotModels/PlotParameters/plotParameters_bufrmosLAMP.xml @@ -104,7 +104,7 @@ diff --git a/cave/build/static/common/cave/etc/ncep/PlotModels/PlotParameters/plotParameters_ncairep.xml b/cave/build/static/common/cave/etc/ncep/PlotModels/PlotParameters/plotParameters_ncairep.xml index 0c938a46f5..1c7355a089 100644 --- a/cave/build/static/common/cave/etc/ncep/PlotModels/PlotParameters/plotParameters_ncairep.xml +++ b/cave/build/static/common/cave/etc/ncep/PlotModels/PlotParameters/plotParameters_ncairep.xml @@ -64,11 +64,14 @@ wtop top of wx in ft plotMode="table" symbolFont="WxSymbolFont" plotLookupTable="icing_intens_trans.txt"/> - - + diff --git a/cave/build/static/common/cave/etc/ncep/PlotModels/PlotParameters/plotParameters_ncpirep.xml b/cave/build/static/common/cave/etc/ncep/PlotModels/PlotParameters/plotParameters_ncpirep.xml index 3803e40fb5..178704d8a0 100644 --- a/cave/build/static/common/cave/etc/ncep/PlotModels/PlotParameters/plotParameters_ncpirep.xml +++ b/cave/build/static/common/cave/etc/ncep/PlotModels/PlotParameters/plotParameters_ncpirep.xml @@ -84,18 +84,18 @@ wtop top of wx in ft dbParamName="horzVisibility" plotUnit="mi" plotFormat="%3d"/> - - - - + + + + @@ -74,7 +74,7 @@ /> diff --git a/cave/build/static/common/cave/etc/ncep/PlotModels/PlotParameters/plotParameters_obs.xml b/cave/build/static/common/cave/etc/ncep/PlotModels/PlotParameters/plotParameters_obs.xml index 68049bf51c..c012a3d3fc 100644 --- a/cave/build/static/common/cave/etc/ncep/PlotModels/PlotParameters/plotParameters_obs.xml +++ b/cave/build/static/common/cave/etc/ncep/PlotModels/PlotParameters/plotParameters_obs.xml @@ -17,7 +17,7 @@ + plotFormat="%4.0f"/> diff --git a/cave/build/static/common/cave/etc/ncep/PlotModels/PlotParameters/plotParameters_sfcobs.xml b/cave/build/static/common/cave/etc/ncep/PlotModels/PlotParameters/plotParameters_sfcobs.xml index 055c243bdd..fbddf94e14 100644 --- a/cave/build/static/common/cave/etc/ncep/PlotModels/PlotParameters/plotParameters_sfcobs.xml +++ b/cave/build/static/common/cave/etc/ncep/PlotModels/PlotParameters/plotParameters_sfcobs.xml @@ -117,7 +117,7 @@ prioritySelectTable="cloud_select.txt" plotLookupTable="cloud_chars.txt" /> --> - + - + diff --git a/cave/build/static/common/cave/etc/ncep/PlotModels/PlotParameters/turb_type_trans.txt b/cave/build/static/common/cave/etc/ncep/PlotModels/PlotParameters/turb_type_trans.txt new file mode 100644 index 0000000000..0fb45ca340 --- /dev/null +++ b/cave/build/static/common/cave/etc/ncep/PlotModels/PlotParameters/turb_type_trans.txt @@ -0,0 +1,3 @@ +s2s +CHOP : CP +CAT : CA diff --git a/cave/build/static/common/cave/etc/ncep/PlotModels/WindSymbols.svg b/cave/build/static/common/cave/etc/ncep/PlotModels/WindSymbols.svg index 57aa92963b..e4e262c498 100644 --- a/cave/build/static/common/cave/etc/ncep/PlotModels/WindSymbols.svg +++ b/cave/build/static/common/cave/etc/ncep/PlotModels/WindSymbols.svg @@ -60,7 +60,7 @@ xmlns:xlink="http://www.w3.org/1999/xlink"> - + diff --git a/cave/build/static/common/cave/etc/ncep/PlotModels/sfcobs/synop_standard.xml b/cave/build/static/common/cave/etc/ncep/PlotModels/sfcobs/synop_standard.xml index b893133750..b915faee1e 100644 --- a/cave/build/static/common/cave/etc/ncep/PlotModels/sfcobs/synop_standard.xml +++ b/cave/build/static/common/cave/etc/ncep/PlotModels/sfcobs/synop_standard.xml @@ -1,5 +1,5 @@ - + UL @@ -12,31 +12,32 @@ LL - SC - WD - - + UR - - MR - - - LR + MR + + LR + + BC + + LC + + diff --git a/cave/build/static/common/cave/etc/ncep/PlotModels/standardPlotModelTemplate.svg b/cave/build/static/common/cave/etc/ncep/PlotModels/standardPlotModelTemplate.svg index 550ee6d90e..4118f96d73 100644 --- a/cave/build/static/common/cave/etc/ncep/PlotModels/standardPlotModelTemplate.svg +++ b/cave/build/static/common/cave/etc/ncep/PlotModels/standardPlotModelTemplate.svg @@ -8,7 +8,7 @@ xmlns:xlink="http://www.w3.org/1999/xlink" style="stroke: rgb(255,255,255);"> + + + + + + - 0 + arrow - 0 + 75 59 018 - 018 diff --git a/cave/build/static/common/cave/etc/pyViz/GFEPainter.py b/cave/build/static/common/cave/etc/pyViz/GFEPainter.py index 33e9b71864..38459b2062 100644 --- a/cave/build/static/common/cave/etc/pyViz/GFEPainter.py +++ b/cave/build/static/common/cave/etc/pyViz/GFEPainter.py @@ -21,7 +21,7 @@ from com.raytheon.uf.viz.core import RGBColors from com.raytheon.uf.viz.core.map import MapDescriptor from com.raytheon.uf.viz.core.rsc.capabilities import ColorableCapability,\ - OutlineCapability, LabelableCapability, MagnificationCapability + OutlineCapability, LabelableCapability, MagnificationCapability, ColorMapCapability from com.raytheon.viz.core import ColorUtil from com.raytheon.viz.gfe.core import DataManager, GFEMapRenderableDisplay from com.raytheon.viz.gfe.ifpimage import GfeImageUtil, ImageLegendResource @@ -32,6 +32,7 @@ from com.raytheon.viz.gfe.core.parm import ParmDisplayAttributes_VisualizationTy from com.raytheon.uf.common.dataplugin.gfe.reference import ReferenceID from java.lang import Double +from java.lang import Integer from javax.imageio import ImageIO from java.util import HashSet @@ -50,13 +51,9 @@ from java.util import HashSet import VizPainter -GRAPHIC = VisMode.valueOf('GRAPHIC') -IMAGE = VisMode.valueOf('IMAGE') -EDITOR = EditorType.valueOf('SPATIAL') - class GFEPainter(VizPainter.VizPainter): - def __init__(self, imageWidth=400.0, imageHeight=400.0, expandLeft=25.0, expandRight=25.0, expandTop=25.0, expandBottom=25.0, mask=None, wholeDomain=0): + def __init__(self, imageWidth=None, imageHeight=None, expandLeft=25.0, expandRight=25.0, expandTop=25.0, expandBottom=25.0, mask=None, wholeDomain=0): self.dataMgr = DataManager.getInstance(None) self.refId = None envelope = None @@ -66,7 +63,11 @@ class GFEPainter(VizPainter.VizPainter): self.refId = ReferenceID(mask) if wholeDomain == 0: envelope = self.dataMgr.getRefManager().loadRefSet(self.refId).overallDomain(CoordinateType.LATLON) - geom = GfeImageUtil.getLocationGeometry(gloc, envelope, float(imageWidth), float(imageHeight), expandLeft / 100.0, expandRight / 100.0, expandTop / 100.0, expandBottom / 100.0) + if imageWidth is not None: + imageWidth = Integer(int(imageWidth)) + if imageHeight is not None: + imageHeight = Integer(int(imageHeight)) + geom = GfeImageUtil.getLocationGeometry(gloc, envelope, imageWidth, imageHeight, expandLeft / 100.0, expandRight / 100.0, expandTop / 100.0, expandBottom / 100.0) display = GFEMapRenderableDisplay(MapDescriptor(geom)) desc = display.getDescriptor() self.dataMgr.getSpatialDisplayManager().setDescriptor(desc) @@ -103,17 +104,25 @@ class GFEPainter(VizPainter.VizPainter): self.addVizResource(colorBar) self.getDescriptor().getResourceList().getProperties(colorBar).setSystemResource(True) - def addImageResource(self, parmName, colormap=None, colorMin=None, colorMax=None, smooth=False): - from com.raytheon.uf.viz.core.rsc.capabilities import ColorMapCapability + def __makeGFEResource(self, parmName): + parm = self.dataMgr.getParmManager().getParmInExpr(parmName, False) + parm.getParmState().setPickUpValue(None) + gfeRsc = GFEResource(parm, self.dataMgr) + self.addVizResource(gfeRsc) + if not parm.getDisplayAttributes().getBaseColor(): + from com.raytheon.viz.core import ColorUtil + parm.getDisplayAttributes().setBaseColor(ColorUtil.getNewColor(self.getDescriptor())) + return gfeRsc, parm + + def addGfeResource(self, parmName, colormap=None, colorMin=None, colorMax=None, smooth=False, color=None, lineWidth=None): gfeRsc, parm = self.__makeGFEResource(parmName) - jvisType = VisualizationType.valueOf('IMAGE') - jset = HashSet() - jset.add(jvisType) - parm.getDisplayAttributes().setVisualizationType(EDITOR, IMAGE, jset) - parm.getDisplayAttributes().setVisMode(IMAGE) +# jvisType = VisualizationType.valueOf('IMAGE') +# jset = HashSet() +# jset.add(jvisType) +# parm.getDisplayAttributes().setVisualizationType(EDITOR, IMAGE, jset) +# parm.getDisplayAttributes().setVisMode(IMAGE) if self.refId is not None: parm.getDisplayAttributes().setDisplayMask(self.refId) - self.dataMgr.getSpatialDisplayManager().activateParm(parm) self.primaryRsc = gfeRsc params = gfeRsc.getCapability(ColorMapCapability).getColorMapParameters() if colormap is not None: @@ -127,24 +136,6 @@ class GFEPainter(VizPainter.VizPainter): if smooth: from com.raytheon.uf.viz.core.rsc.capabilities import ImagingCapability gfeRsc.getCapability(ImagingCapability).setInterpolationState(True) - - def __makeGFEResource(self, parmName): - parm = self.dataMgr.getParmManager().getParmInExpr(parmName, False) - parm.getParmState().setPickUpValue(None) - gfeRsc = GFEResource(parm, self.dataMgr) - self.addVizResource(gfeRsc) - if not parm.getDisplayAttributes().getBaseColor(): - from com.raytheon.viz.core import ColorUtil - parm.getDisplayAttributes().setBaseColor(ColorUtil.getNewColor(self.getDescriptor())) - return gfeRsc, parm - - def addGraphicResource(self, parmName, visType=None, color=None, lineWidth=None): - gfeRsc, parm = self.__makeGFEResource(parmName) - if visType is not None: - jvisType = VisualizationType.valueOf(visType) - jset = HashSet() - jset.add(jvisType) - parm.getDisplayAttributes().setVisualizationType(EDITOR, GRAPHIC, jset) if color is None: color = ColorUtil.getNewColor(self.getDescriptor()) else: @@ -152,7 +143,6 @@ class GFEPainter(VizPainter.VizPainter): gfeRsc.getCapability(ColorableCapability).setColor(color) if lineWidth is not None: gfeRsc.getCapability(OutlineCapability).setOutlineWidth(lineWidth) - def addMapBackground(self, mapName, color=None, lineWidth=None, linePattern=None, xOffset=None, yOffset=None, @@ -201,7 +191,10 @@ class GFEPainter(VizPainter.VizPainter): from com.raytheon.uf.viz.core.font import FontAdapter graphics.setColor(Color.BLACK) graphics.setFont(FontAdapter.getAWTFont(self.getTarget().getDefaultFont())) - graphics.drawString(logoText, (rendered.getWidth() - len(logoText) * 6) / 2, rendered.getHeight() + (noaaImage.getHeight() / 2)) + fm = graphics.getFontMetrics() + textBounds = fm.getStringBounds(logoText, graphics) + graphics.drawString(logoText, int((rendered.getWidth() - textBounds.getWidth()) / 2), \ + int(rendered.getHeight() + (noaaImage.getHeight() / 2) + textBounds.getHeight() / 2)) graphics.drawImage(nwsImage, finalBuf.getWidth() - nwsImage.getWidth(), rendered.getHeight(), None) finalBuf.flush() self.outputImage(finalBuf, filename) diff --git a/cave/build/static/common/cave/etc/vectorTypes/arrowTypes.xml b/cave/build/static/common/cave/etc/vectorTypes/arrowTypes.xml deleted file mode 100644 index 116a5359cd..0000000000 --- a/cave/build/static/common/cave/etc/vectorTypes/arrowTypes.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - Wind - - - MTV - - - Shear - - - TGrd - - - EPTGrd - - - defV - - \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/vectorTypes/streamlineTypes.xml b/cave/build/static/common/cave/etc/vectorTypes/streamlineTypes.xml deleted file mode 100644 index 7e3b62428f..0000000000 --- a/cave/build/static/common/cave/etc/vectorTypes/streamlineTypes.xml +++ /dev/null @@ -1,25 +0,0 @@ - - - - - Wind - - \ No newline at end of file diff --git a/cave/build/static/common/cave/etc/vectorTypes/windTypes.xml b/cave/build/static/common/cave/etc/vectorTypes/windTypes.xml deleted file mode 100644 index d6a6adc933..0000000000 --- a/cave/build/static/common/cave/etc/vectorTypes/windTypes.xml +++ /dev/null @@ -1,28 +0,0 @@ - - - - - Wind - - - Shear - - \ No newline at end of file diff --git a/cave/build/static/linux/cave/caveEnvironment/lib/libgempak.so b/cave/build/static/linux/cave/caveEnvironment/lib/libgempak.so index 76844f1cc0..0f8c017935 100755 Binary files a/cave/build/static/linux/cave/caveEnvironment/lib/libgempak.so and b/cave/build/static/linux/cave/caveEnvironment/lib/libgempak.so differ diff --git a/cave/com.raytheon.uf.viz.alertviz.ui/src/com/raytheon/uf/viz/alertviz/ui/dialogs/AlertVisConfigDlg.java b/cave/com.raytheon.uf.viz.alertviz.ui/src/com/raytheon/uf/viz/alertviz/ui/dialogs/AlertVisConfigDlg.java index e9fa48073d..64c1386ba9 100644 --- a/cave/com.raytheon.uf.viz.alertviz.ui/src/com/raytheon/uf/viz/alertviz/ui/dialogs/AlertVisConfigDlg.java +++ b/cave/com.raytheon.uf.viz.alertviz.ui/src/com/raytheon/uf/viz/alertviz/ui/dialogs/AlertVisConfigDlg.java @@ -1344,13 +1344,16 @@ public class AlertVisConfigDlg extends Dialog implements } private void saveWithConfirmDlg() { - if (ConfigurationManager.isDefaultConfig(configContext)) { - if (!ConfigurationFileDlg.confirmDefaultChange(shell, "save", - configContext.toString())) { - return; + if (ConfigurationFileDlg.validateNotDelivered(shell, + configContext.getName())) { + if (ConfigurationManager.isDefaultConfig(configContext)) { + if (!ConfigurationFileDlg.confirmDefaultChange(shell, "save", + configContext.toString())) { + return; + } } + save(); } - save(); } private void save() { @@ -1445,7 +1448,7 @@ public class AlertVisConfigDlg extends Dialog implements saveNeeded(false); if (fetchLog) { -// System.err.println("Need to fetch log here"); + // System.err.println("Need to fetch log here"); fetchLog = false; alertMsgDlg.resetTabControl(); } diff --git a/cave/com.raytheon.uf.viz.alertviz.ui/src/com/raytheon/uf/viz/alertviz/ui/dialogs/ConfigurationFileDlg.java b/cave/com.raytheon.uf.viz.alertviz.ui/src/com/raytheon/uf/viz/alertviz/ui/dialogs/ConfigurationFileDlg.java index 3f044f9c5a..551cd8796e 100644 --- a/cave/com.raytheon.uf.viz.alertviz.ui/src/com/raytheon/uf/viz/alertviz/ui/dialogs/ConfigurationFileDlg.java +++ b/cave/com.raytheon.uf.viz.alertviz.ui/src/com/raytheon/uf/viz/alertviz/ui/dialogs/ConfigurationFileDlg.java @@ -54,7 +54,7 @@ import com.raytheon.uf.viz.alertviz.ConfigurationManager; * ------------ ---------- ----------- -------------------------- * Apr 14, 2010 mschenke Initial creation * Apr 29, 2011 9069 cjeanbap Config file list selection: Save As - * May 31, 2011 9785 cjeanbap Prevent selection of 0 when list is empty. + * May 31, 2011 9785 cjeanbap Prevent selection of 0 when list is empty. * * * @author mschenke @@ -77,6 +77,11 @@ public class ConfigurationFileDlg extends Dialog { private static final String CHANGING_DEFAULT_TITLE = "AlertViz: Default Config Action "; + private static final String INVALID_FILE_NAME_TITLE = "AlertViz: Invalid File Name "; + + private static final String NO_DELIVERED_IN_NAME_MSG = "You may not Save or Delete a " + + "Configuration file with \"delivered\" in the name. This is a reserved term."; + private static final String CONFIRM_MSG = "Are you sure you want to %1$s the configuration, %2$s?"; private static final String CONFIRM_TITLE = "Confirmation"; @@ -329,15 +334,19 @@ public class ConfigurationFileDlg extends Dialog { .get(configurationList.getSelectionIndex()); if (function == Function.DELETE) { - if (ConfigurationManager.isDefaultConfig(rval)) { - if (!confirmDefaultChange(shell, "delete", - rval.toString())) { - rval = null; + if (validateNotDelivered(shell, rval.getName())) { + if (ConfigurationManager.isDefaultConfig(rval)) { + if (!confirmDefaultChange(shell, "delete", + rval.toString())) { + rval = null; + } + } else { + if (!confirm(shell, "delete", rval.toString())) { + rval = null; + } } } else { - if (!confirm(shell, "delete", rval.toString())) { - rval = null; - } + rval = null; } } else if (function == Function.RETRIEVE_WITH_UNSAVED_CHANGES) { if (!confirmLeaveWithUnsavedChanges(shell, rval.toString())) { @@ -353,27 +362,31 @@ public class ConfigurationFileDlg extends Dialog { case SAVE: { String name = configurationText.getText(); String level = configurationLevel.getText(); - rval = ("".equals(name)) ? null : new ConfigContext(name, - LocalizationLevel.valueOf(level)); - LocalizationLevel enteredLevel = LocalizationLevel.valueOf(level); - boolean isFound = false; - for (ConfigContext config : configurations) { - isFound = config.getName().equals(name) - && enteredLevel.equals(config.getLevel()); - if (isFound) { - break; - } - } - if (rval != null && isFound) { - // we are overwriting a current configuration - if (ConfigurationManager.isDefaultConfig(rval)) { - if (!confirmDefaultChange(shell, "overwrite", - rval.toString())) { - rval = null; + + if (validateNotDelivered(shell, name)) { + rval = ("".equals(name)) ? null : new ConfigContext(name, + LocalizationLevel.valueOf(level)); + LocalizationLevel enteredLevel = LocalizationLevel + .valueOf(level); + boolean isFound = false; + for (ConfigContext config : configurations) { + isFound = config.getName().equals(name) + && enteredLevel.equals(config.getLevel()); + if (isFound) { + break; } - } else { - if (!confirm(shell, "overwrite", rval.toString())) { - rval = null; + } + if (rval != null && isFound) { + // we are overwriting a current configuration + if (ConfigurationManager.isDefaultConfig(rval)) { + if (!confirmDefaultChange(shell, "overwrite", + rval.toString())) { + rval = null; + } + } else { + if (!confirm(shell, "overwrite", rval.toString())) { + rval = null; + } } } } @@ -385,6 +398,16 @@ public class ConfigurationFileDlg extends Dialog { } } + public static boolean validateNotDelivered(Shell shell, String name) { + if (name.contains("delivered")) { + MessageDialog.openInformation(shell, INVALID_FILE_NAME_TITLE, + NO_DELIVERED_IN_NAME_MSG); + return false; + } else { + return true; + } + } + public static boolean confirmDefaultChange(Shell shell, String action, String contextName) { return MessageDialog.openConfirm(shell, CHANGING_DEFAULT_TITLE, diff --git a/cave/com.raytheon.uf.viz.alertviz.ui/src/com/raytheon/uf/viz/alertviz/ui/dialogs/PriorityControls.java b/cave/com.raytheon.uf.viz.alertviz.ui/src/com/raytheon/uf/viz/alertviz/ui/dialogs/PriorityControls.java index d322bcbd0a..7a848ddeb1 100644 --- a/cave/com.raytheon.uf.viz.alertviz.ui/src/com/raytheon/uf/viz/alertviz/ui/dialogs/PriorityControls.java +++ b/cave/com.raytheon.uf.viz.alertviz.ui/src/com/raytheon/uf/viz/alertviz/ui/dialogs/PriorityControls.java @@ -336,10 +336,8 @@ public class PriorityControls { actionChk.addSelectionListener(new SelectionAdapter() { public void widgetSelected(SelectionEvent event) { updateActionChangeButton(); - if (actionChk.getSelection()) { - needsSaveListener.saveNeeded(true); - alertMetadata.setPythonEnabled(actionChk.getSelection()); - } + needsSaveListener.saveNeeded(true); + alertMetadata.setPythonEnabled(actionChk.getSelection()); } }); @@ -493,6 +491,7 @@ public class PriorityControls { * Select the audio file. */ private void selectAudioFile() { + boolean saveNeeded = false; String audioFile = alertMetadata.getAudioFile(); audioDlg = new FileSelectDlg(parentComp.getShell(), @@ -501,16 +500,20 @@ public class PriorityControls { Boolean retVal = (Boolean) audioDlg.open("Audio Selection File", audioFile); - if (retVal == null) { + if (retVal == null && audioFile != null) { audioChk.setSelection(false); changeAudioBtn.setEnabled(false); audioChk.setToolTipText(""); } else if (retVal != null && retVal == true) { File selectedFile = audioDlg.getSelectedFile(); - if (selectedFile != null) { - alertMetadata.setAudioFile(selectedFile.getName()); - audioChk.setToolTipText(selectedFile.getName()); + if (selectedFile == null && audioFile == null) { + // do nothing + } else if (selectedFile != null) { + String selectedFileName = selectedFile.getName(); + saveNeeded = !selectedFileName.equals(audioFile); + alertMetadata.setAudioFile(selectedFileName); + audioChk.setToolTipText(selectedFileName); } else { alertMetadata.setAudioFile(null); alertMetadata.setAudioEnabled(false); @@ -519,6 +522,9 @@ public class PriorityControls { changeAudioBtn.setEnabled(false); } } + if (saveNeeded) { + needsSaveListener.saveNeeded(saveNeeded); + } } /** @@ -734,6 +740,7 @@ public class PriorityControls { * Select the audio file. */ private void selectActionFile() { + boolean saveNeeded = false; String actionFile = alertMetadata.getPythonScript(); Map filteredExtensions = new HashMap(); @@ -748,15 +755,19 @@ public class PriorityControls { Boolean retVal = (Boolean) actionDlg.open("Action Selection File", actionFile); - if (retVal == null) { + if (retVal == null && actionFile != null) { actionChk.setSelection(false); changeActionBtn.setEnabled(false); - } else if (retVal == true) { + } else if (retVal != null && retVal == true) { File selectedFile = actionDlg.getSelectedFile(); - if (selectedFile != null) { - alertMetadata.setPythonScript(selectedFile.getName()); - actionChk.setToolTipText(selectedFile.getName()); + if (selectedFile == null && actionFile == null) { + // do nothing + } else if (selectedFile != null) { + String selectedFileName = selectedFile.getName(); + saveNeeded = !selectedFileName.equals(actionFile); + alertMetadata.setPythonScript(selectedFileName); + actionChk.setToolTipText(selectedFileName); } else { alertMetadata.setAudioFile(null); alertMetadata.setAudioEnabled(false); @@ -765,6 +776,9 @@ public class PriorityControls { changeActionBtn.setEnabled(false); } } + if (saveNeeded) { + needsSaveListener.saveNeeded(saveNeeded); + } } /** diff --git a/cave/com.raytheon.uf.viz.alertviz.ui/src/com/raytheon/uf/viz/alertviz/ui/dialogs/SimpleDetailsComp.java b/cave/com.raytheon.uf.viz.alertviz.ui/src/com/raytheon/uf/viz/alertviz/ui/dialogs/SimpleDetailsComp.java index 167006e2b3..13d2637745 100644 --- a/cave/com.raytheon.uf.viz.alertviz.ui/src/com/raytheon/uf/viz/alertviz/ui/dialogs/SimpleDetailsComp.java +++ b/cave/com.raytheon.uf.viz.alertviz.ui/src/com/raytheon/uf/viz/alertviz/ui/dialogs/SimpleDetailsComp.java @@ -80,7 +80,7 @@ public class SimpleDetailsComp extends Composite { setLayout(new GridLayout(1, false)); setLayoutData(gd); - gd = new GridData(SWT.FILL, SWT.DEFAULT, false, false); + gd = new GridData(SWT.FILL, SWT.DEFAULT, true, false); gd.heightHint = 250; st = new StyledText(this, SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER); st.setEditable(false); diff --git a/cave/com.raytheon.uf.viz.alertviz.ui/src/com/raytheon/uf/viz/alertviz/ui/dialogs/SimpleLogViewer.java b/cave/com.raytheon.uf.viz.alertviz.ui/src/com/raytheon/uf/viz/alertviz/ui/dialogs/SimpleLogViewer.java index 42356453f2..9766252f78 100644 --- a/cave/com.raytheon.uf.viz.alertviz.ui/src/com/raytheon/uf/viz/alertviz/ui/dialogs/SimpleLogViewer.java +++ b/cave/com.raytheon.uf.viz.alertviz.ui/src/com/raytheon/uf/viz/alertviz/ui/dialogs/SimpleLogViewer.java @@ -129,7 +129,7 @@ public class SimpleLogViewer extends Dialog { Shell parent = getParent(); // shell = new Shell(parent, SWT.DIALOG_TRIM | SWT.MIN | SWT.RESIZE); shell = new Shell(parent.getDisplay(), SWT.DIALOG_TRIM | SWT.MIN - | SWT.TITLE); + | SWT.TITLE | SWT.RESIZE); shell.setText(getText()); /* TODO: Max Code: */ @@ -138,7 +138,7 @@ public class SimpleLogViewer extends Dialog { mainLayout.marginWidth = 0; mainLayout.verticalSpacing = 0; shell.setLayout(mainLayout); - GridData gd = new GridData(SWT.FILL, SWT.DEFAULT, true, false); + GridData gd = new GridData(SWT.FILL, SWT.DEFAULT, true, true); shell.setLayoutData(gd); // shell.setLayout(new GridLayout(1, false)); @@ -161,7 +161,7 @@ public class SimpleLogViewer extends Dialog { // | GridData.GRAB_HORIZONTAL | GridData.GRAB_VERTICAL // | GridData.VERTICAL_ALIGN_FILL)); - gd = new GridData(SWT.FILL, SWT.DEFAULT, true, false); + gd = new GridData(SWT.FILL, SWT.FILL, true, true); gd.widthHint = 800; gd.heightHint = 400; table.setLayoutData(gd); diff --git a/cave/com.raytheon.uf.viz.alertviz.ui/src/com/raytheon/uf/viz/alertviz/ui/dialogs/TabControlDlg.java b/cave/com.raytheon.uf.viz.alertviz.ui/src/com/raytheon/uf/viz/alertviz/ui/dialogs/TabControlDlg.java index 4977c9684e..b7279c91b0 100644 --- a/cave/com.raytheon.uf.viz.alertviz.ui/src/com/raytheon/uf/viz/alertviz/ui/dialogs/TabControlDlg.java +++ b/cave/com.raytheon.uf.viz.alertviz.ui/src/com/raytheon/uf/viz/alertviz/ui/dialogs/TabControlDlg.java @@ -24,6 +24,7 @@ import java.util.List; import java.util.Set; import org.eclipse.swt.SWT; +import org.eclipse.swt.custom.SashForm; import org.eclipse.swt.custom.StyledText; import org.eclipse.swt.events.DisposeEvent; import org.eclipse.swt.events.DisposeListener; @@ -80,7 +81,7 @@ public class TabControlDlg extends Dialog { /** * The composite that holds the tabFolder and detailsText */ - private Composite topComp; + private SashForm topComp; /** * The TabFolder that is in the composite @@ -107,6 +108,12 @@ public class TabControlDlg extends Dialog { */ private StyledText detailsText; + private static Rectangle bounds; + + private static int[] weights = { 50, 50 }; + + private static boolean visible = false; + /** * Get the instance of the TabControl dialog * @@ -143,8 +150,12 @@ public class TabControlDlg extends Dialog { private void initShell() { Shell parent = getParent(); - shell = new Shell(parent, SWT.TITLE); + shell = new Shell(parent, SWT.TITLE | SWT.RESIZE); + if (bounds != null) { + shell.setBounds(bounds); + shell.setFocus(); + } GridLayout mainLayout = new GridLayout(1, false); shell.setLayout(mainLayout); @@ -158,19 +169,38 @@ public class TabControlDlg extends Dialog { mainComp = new Composite(shell, SWT.NONE); mainComp.setLayout(new GridLayout(1, false)); - GridData gd = new GridData(SWT.FILL, SWT.DEFAULT, true, false); - gd.widthHint = 800; + shell.addDisposeListener(new DisposeListener() { + + @Override + public void widgetDisposed(DisposeEvent e) { + cacheDimensions(); + } + }); + + GridData gd = new GridData(SWT.FILL, SWT.FILL, true, true); + if (bounds == null) { + gd.widthHint = 800; + gd.heightHint = 285; + } else { + gd.widthHint = bounds.width; + gd.heightHint = bounds.height; + } mainComp.setLayoutData(gd); - topComp = new Composite(mainComp, SWT.NONE); + topComp = new SashForm(mainComp, SWT.HORIZONTAL); topComp.setLayout(new GridLayout(2, false)); - gd = new GridData(SWT.FILL, SWT.DEFAULT, true, false); + gd = new GridData(SWT.FILL, SWT.FILL, true, true); + if (bounds == null) { + gd.widthHint = 400; + gd.heightHint = 285; + } else { + gd.widthHint = bounds.width; + gd.heightHint = bounds.height; + } topComp.setLayoutData(gd); tabFolder = new TabFolder(topComp, SWT.BORDER); - gd = new GridData(SWT.FILL, SWT.DEFAULT, true, false); - gd.widthHint = 400; - gd.heightHint = 285; + gd = new GridData(SWT.FILL, SWT.FILL, true, true); tabFolder.setLayoutData(gd); tabFolder.addDisposeListener(new DisposeListener() { @@ -189,21 +219,26 @@ public class TabControlDlg extends Dialog { shell.setText("Log list for: " + log.getFullText()); populateClearOptionsCombo(log); detailsText.setText(log.getLogText()); - clearOptionCbo.select(logs.get(index).getClearOptionCboSelectedIndex()); + clearOptionCbo.select(logs.get(index) + .getClearOptionCboSelectedIndex()); } }); detailsText = new StyledText(topComp, SWT.V_SCROLL | SWT.H_SCROLL | SWT.BORDER); - gd = new GridData(SWT.FILL, SWT.FILL, true, false); + gd = new GridData(SWT.FILL, SWT.FILL, true, true); gd.widthHint = 400; gd.heightHint = 285; detailsText.setLayoutData(gd); detailsText.setEditable(false); - detailsText.setVisible(false); + detailsText.setVisible(visible); ((GridData) detailsText.getLayoutData()).exclude = true; + if (visible) { + topComp.setWeights(weights); + } + createBottomButtons(); } @@ -223,20 +258,20 @@ public class TabControlDlg extends Dialog { @Override public void widgetSelected(SelectionEvent e) { - int index = tabFolder.getSelectionIndex(); - if (index < 0) { - return; - } - if (clearOptionCbo.getItemCount() >= 2) { - int position = clearOptionCbo.getSelectionIndex(); - String category = clearOptionCbo.getItem(position); - logs.get(index).displayCategoryMessages(category); - if (index == 0) { - logs.get(index).populateClearOptionsCombo(); - clearOptionCbo.select(position); - } - logs.get(index).setClearOptionCboSelectedIndex(position); - } + int index = tabFolder.getSelectionIndex(); + if (index < 0) { + return; + } + if (clearOptionCbo.getItemCount() >= 2) { + int position = clearOptionCbo.getSelectionIndex(); + String category = clearOptionCbo.getItem(position); + logs.get(index).displayCategoryMessages(category); + if (index == 0) { + logs.get(index).populateClearOptionsCombo(); + clearOptionCbo.select(position); + } + logs.get(index).setClearOptionCboSelectedIndex(position); + } } @Override @@ -277,24 +312,37 @@ public class TabControlDlg extends Dialog { showHide.setLayoutData(gd); // TODO: Make this work, right now not working showHide.addSelectionListener(new SelectionAdapter() { - boolean visible = false; @Override public void widgetSelected(SelectionEvent e) { + // if now visible then use cache weights + // if NOT visible, save weights, set to hidden visible = !visible; + detailsText.setVisible(visible); + SashForm sf = (SashForm) topComp; if (visible == true) { showHide.setText("Hide Details..."); + sf.setWeights(weights); } else { showHide.setText("Show Details"); + cacheDimensions(); + sf.setWeights(new int[] { 100, 0 }); } - detailsText.setVisible(visible); - ((GridData) detailsText.getLayoutData()).exclude = !visible; topComp.layout(); mainComp.layout(); } }); } + private void cacheDimensions() { + int[] currentWeights = topComp.getWeights(); + weights[0] = currentWeights[0]; + weights[1] = currentWeights[1]; + bounds = topComp.getParent().getBounds(); + bounds.x = shell.getParent().getBounds().x; + bounds.y = shell.getParent().getBounds().y; + } + /** * Populates the clear options combo box with values of current LogDlg tab * being displayed, called when tabitem has changed diff --git a/cave/com.raytheon.uf.viz.alertviz/src/com/raytheon/uf/viz/alertviz/AlertVizClient.java b/cave/com.raytheon.uf.viz.alertviz/src/com/raytheon/uf/viz/alertviz/AlertVizClient.java index a9f82c5706..4da25ea3ae 100644 --- a/cave/com.raytheon.uf.viz.alertviz/src/com/raytheon/uf/viz/alertviz/AlertVizClient.java +++ b/cave/com.raytheon.uf.viz.alertviz/src/com/raytheon/uf/viz/alertviz/AlertVizClient.java @@ -21,6 +21,7 @@ package com.raytheon.uf.viz.alertviz; import java.io.PrintStream; import java.io.StringWriter; +import java.util.concurrent.ConcurrentLinkedQueue; import java.util.concurrent.CopyOnWriteArrayList; import javax.jms.ExceptionListener; @@ -33,6 +34,7 @@ import javax.jms.Queue; import javax.jms.Session; import javax.jms.TextMessage; import javax.xml.bind.JAXBContext; +import javax.xml.bind.JAXBException; import javax.xml.bind.Marshaller; import org.apache.activemq.command.ActiveMQTextMessage; @@ -87,6 +89,12 @@ public class AlertVizClient implements MessageListener { private CopyOnWriteArrayList listeners; + private static int POOL_SIZE = 5; + + private java.util.Queue marshallers = new ConcurrentLinkedQueue(); + + private JAXBContext jaxbContext; + private static AlertVizClient instance; public AlertVizClient(String host, boolean retry) { @@ -131,9 +139,13 @@ public class AlertVizClient implements MessageListener { this.consumer.setMessageListener(this); reconnect = false; lastReconnectTime = System.currentTimeMillis(); + jaxbContext = JAXBContext.newInstance(StatusMessage.class); } catch (JMSException e) { reconnect = true; throw new AlertvizException("Unable to connect to notification", e); + } catch (JAXBException e) { + reconnect = true; + throw new AlertvizException("Unable to connect to notification", e); } } @@ -150,12 +162,11 @@ public class AlertVizClient implements MessageListener { if (retryOnExceptions == false && reconnect == true) { printToConsole(statusMessage); } else { - try { - JAXBContext context = JAXBContext - .newInstance(StatusMessage.class); - Marshaller marshaller = context.createMarshaller(); + Marshaller marshaller = null; + try { StringWriter sw = new StringWriter(); + marshaller = getMarshaller(); marshaller.marshal(statusMessage, sw); ActiveMQTextMessage message = new ActiveMQTextMessage(); message.setText(sw.toString()); @@ -174,9 +185,21 @@ public class AlertVizClient implements MessageListener { } catch (Exception e) { throw new AlertvizException("Error sending message", e); } + + if (marshaller != null && marshallers.size() < POOL_SIZE) { + marshallers.add(marshaller); + } } } + private Marshaller getMarshaller() throws JAXBException { + Marshaller m = marshallers.poll(); + if (m == null) { + m = jaxbContext.createMarshaller(); + } + return m; + } + /** * @param statusMessage */ diff --git a/cave/com.raytheon.uf.viz.alertviz/src/com/raytheon/uf/viz/alertviz/Container.java b/cave/com.raytheon.uf.viz.alertviz/src/com/raytheon/uf/viz/alertviz/Container.java index 0b3380650a..7062fd2a67 100644 --- a/cave/com.raytheon.uf.viz.alertviz/src/com/raytheon/uf/viz/alertviz/Container.java +++ b/cave/com.raytheon.uf.viz.alertviz/src/com/raytheon/uf/viz/alertviz/Container.java @@ -80,10 +80,16 @@ public class Container implements IConfigurationChangedListener { private static final int UI_FLOOD_THRESHOLD = 50; + private static final int SHOTGUN_MESSAGE_MILLISECOND_THRESHOLD = 1000; + private String lastErrorDialogMessage; private long lastErrorDialogTime; + private int shotgunMessageCount; + + private long shotgunMessageStartTime; + public Container(Set callbacks) { configurationChanged(); forcedConfiguration = ConfigurationManager.getInstance() @@ -179,16 +185,44 @@ public class Container implements IConfigurationChangedListener { * @param message * @return */ - public boolean isShotGun(StatusMessage message) { + private boolean isShotGun(StatusMessage message) { boolean retVal = false; if (lastMessage != null) { + final long shotgunMessageCheckTime = this.shotgunMessageStartTime == 0 ? this.lastMessage + .getEventTime().getTime() : this.shotgunMessageStartTime; + if (this.lastMessage.getCategory().equals(message.getCategory()) && this.lastMessage.getPriority() == message.getPriority() && this.lastMessage.getMessage().equals( message.getMessage()) - && Math.abs(this.lastMessage.getEventTime().getTime() - - message.getEventTime().getTime()) < 1000) { + && (Math.abs(message.getEventTime().getTime() + - shotgunMessageCheckTime) < SHOTGUN_MESSAGE_MILLISECOND_THRESHOLD)) { retVal = true; + ++this.shotgunMessageCount; + if (this.shotgunMessageStartTime == 0) { + this.shotgunMessageStartTime = lastMessage.getEventTime() + .getTime(); + } + } else { + if (this.shotgunMessageCount > 1) { + StringBuilder sb = new StringBuilder("Received ") + .append(this.shotgunMessageCount) + .append(" duplicate messages in ") + .append(this.lastMessage.getEventTime().getTime() + - this.shotgunMessageStartTime) + .append(" milliseconds. For message: ") + .append(this.lastMessage.getCategory()).append(":") + .append(this.lastMessage.getSourceKey()) + .append(" ").append(this.lastMessage.getMessage()); + StatusMessage sm = new StatusMessage( + this.lastMessage.getSourceKey(), "GDN_ADMIN", + this.lastMessage.getPriority(), + this.lastMessage.getPlugin(), sb.toString(), null); + sm.setEventTime(SimulatedTime.getSystemTime().getTime()); + logInternal(sm); + } + this.shotgunMessageStartTime = 0; + this.shotgunMessageCount = 1; } } diff --git a/cave/com.raytheon.uf.viz.alertviz/src/com/raytheon/uf/viz/alertviz/config/Configuration.java b/cave/com.raytheon.uf.viz.alertviz/src/com/raytheon/uf/viz/alertviz/config/Configuration.java index 3f799ec507..731121cff1 100644 --- a/cave/com.raytheon.uf.viz.alertviz/src/com/raytheon/uf/viz/alertviz/config/Configuration.java +++ b/cave/com.raytheon.uf.viz.alertviz/src/com/raytheon/uf/viz/alertviz/config/Configuration.java @@ -47,6 +47,9 @@ import com.raytheon.uf.viz.alertviz.config.TrayConfiguration.TrayMode; * ------------ ---------- ----------- -------------------------- * Sep 9, 2008 1433 chammack Initial creation * May 3, 2011 9067 cjeanbap Add isMonitorLayoutChanged() method. + * Apr 27 2012 13744 Xiaochuan Update isMonitorLayoutChanged() to compare + * source size in Previous and current. + * * * * @author chammack @@ -409,57 +412,70 @@ public class Configuration implements ISerializableObject { * @param configData the current save Configuration Data. * @return boolean, true if either Monitor and/or Layout was changed otherwise false. */ - public boolean isMonitorLayoutChanged(Configuration configData) { - boolean modified = false; - - TrayMode prevLayoutMode = configData.getGlobalConfiguration().getMode(); - if (!prevLayoutMode.equals(this.getGlobalConfiguration().getMode())) { - modified = true; - } - - Map prevCategoryMap = configData.getCategories(); - for (Iterator categories = this.getCategories().keySet().iterator(); categories.hasNext() && !modified;) { - String categoryName = categories.next(); - Category prevCategory = prevCategoryMap.get(categoryName); - Category newCategory = this.getCategories().get(categoryName); - if (prevCategory != null && newCategory == null) { - modified = true; - } else if (prevCategory == null && newCategory != null) { - modified = true; - } else if (prevCategory != null && newCategory != null) { - if (prevCategory.getTextBox() != newCategory.getTextBox()) { - modified = true; - } - } - } - - Map prevSources = configData.getSources(); - for (Iterator sources = this.getSources().keySet().iterator(); sources.hasNext() && !modified; ) { - String sourceName = sources.next(); - Source prevSource = prevSources.get(sourceName); - Source newSource = this.getSources().get(sourceName); - if (prevSource != null && newSource == null) { - modified = true; - } - - if (prevSource != null && newSource != null) { - MonitorMetadata newMonitorMetadata = newSource.getConfigurationMonitor().getMonitorMetadata(); - MonitorMetadata prevMonitorMetadata = prevSource.getConfigurationMonitor().getMonitorMetadata(); - - if (newMonitorMetadata != null && prevMonitorMetadata == null) { - modified = true; - } else if ((newMonitorMetadata.getOmit()) && (prevMonitorMetadata.getOmit() == false)) { - modified = true; - } if ((newMonitorMetadata.getOmit() == false) && (prevMonitorMetadata.getOmit() == true)) { - modified = true; - } else if (newMonitorMetadata.getImageFile() != null && prevMonitorMetadata.getImageFile() == null) { - modified = true; - } else if (newMonitorMetadata.getImageFile() == null && prevMonitorMetadata.getImageFile() != null) { - modified = true; - } - } - } - - return modified; - } + public boolean isMonitorLayoutChanged(Configuration configData) { + boolean modified = false; + + TrayMode prevLayoutMode = configData.getGlobalConfiguration().getMode(); + if (!prevLayoutMode.equals(this.getGlobalConfiguration().getMode())) { + modified = true; + } + + Map prevCategoryMap = configData.getCategories(); + for (Iterator categories = this.getCategories().keySet() + .iterator(); categories.hasNext() && !modified;) { + String categoryName = categories.next(); + Category prevCategory = prevCategoryMap.get(categoryName); + Category newCategory = this.getCategories().get(categoryName); + if (prevCategory != null && newCategory == null) { + modified = true; + } else if (prevCategory == null && newCategory != null) { + modified = true; + } else if (prevCategory != null && newCategory != null) { + if (prevCategory.getTextBox() != newCategory.getTextBox()) { + modified = true; + } + } + } + + Map prevSources = configData.getSources(); + + if (prevSources.size() != this.getSources().size()) { + modified = true; + } else { + for (Iterator sources = this.getSources().keySet() + .iterator(); sources.hasNext() && !modified;) { + String sourceName = sources.next(); + Source prevSource = prevSources.get(sourceName); + Source newSource = this.getSources().get(sourceName); + if (prevSource == null) { + modified = true; + } else if (prevSource != null && newSource != null) { + MonitorMetadata newMonitorMetadata = newSource + .getConfigurationMonitor().getMonitorMetadata(); + MonitorMetadata prevMonitorMetadata = prevSource + .getConfigurationMonitor().getMonitorMetadata(); + + if (newMonitorMetadata != null + && prevMonitorMetadata == null) { + modified = true; + } else if ((newMonitorMetadata.getOmit()) + && (prevMonitorMetadata.getOmit() == false)) { + modified = true; + } + if ((newMonitorMetadata.getOmit() == false) + && (prevMonitorMetadata.getOmit() == true)) { + modified = true; + } else if (newMonitorMetadata.getImageFile() != null + && prevMonitorMetadata.getImageFile() == null) { + modified = true; + } else if (newMonitorMetadata.getImageFile() == null + && prevMonitorMetadata.getImageFile() != null) { + modified = true; + } + } + } + } + + return modified; + } } diff --git a/cave/com.raytheon.uf.viz.core.maps/src/com/raytheon/uf/viz/core/maps/rsc/DbPointMapResource.java b/cave/com.raytheon.uf.viz.core.maps/src/com/raytheon/uf/viz/core/maps/rsc/DbPointMapResource.java index 3b4157b589..9c8344e807 100644 --- a/cave/com.raytheon.uf.viz.core.maps/src/com/raytheon/uf/viz/core/maps/rsc/DbPointMapResource.java +++ b/cave/com.raytheon.uf.viz.core.maps/src/com/raytheon/uf/viz/core/maps/rsc/DbPointMapResource.java @@ -465,6 +465,7 @@ public class DbPointMapResource extends font = aTarget.initializeFont(aTarget.getDefaultFont() .getFontName(), (float) (10 * magnification), null); font.setSmoothing(false); + font.setScaleFont(false); } Rectangle2D charSize = aTarget.getStringBounds(font, "N"); diff --git a/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/IDisplayPane.java b/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/IDisplayPane.java index 20422f0c67..da4d884459 100644 --- a/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/IDisplayPane.java +++ b/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/IDisplayPane.java @@ -23,7 +23,6 @@ import org.eclipse.swt.graphics.Rectangle; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Listener; -import com.raytheon.uf.viz.core.IView.POVShiftType; import com.raytheon.uf.viz.core.drawables.IDescriptor; import com.raytheon.uf.viz.core.drawables.IRenderableDisplay; @@ -59,27 +58,6 @@ public interface IDisplayPane { */ public abstract void shiftExtent(double[] startScreen, double[] endScreen); - /** - * Rotate the view between start to end - * - * @param startScreen - * initial mouse position in screen coordinates - * @param endScreen - * final mouse position in screen coordinates - * @param type - * type of shift - */ - public abstract void shiftPOV(double[] startScreen, double[] endScreen, - POVShiftType shiftType); - - /** - * Set the point on the globe user wants to look at - * - * @param point - * - - */ - public abstract void setLookAt(double[] point); - /** * Set the renderable display object * diff --git a/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/IGraphicsTarget.java b/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/IGraphicsTarget.java index 7a844a3864..b343e4742b 100644 --- a/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/IGraphicsTarget.java +++ b/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/IGraphicsTarget.java @@ -753,6 +753,13 @@ public interface IGraphicsTarget extends IImagingExtension { public void drawPoint(double x, double y, double z, RGB color, PointStyle pointStyle, float magnification) throws VizException; + /** + * Gets the targets current view + * + * @return + */ + public IView getView(); + /** * Notify the Graphics Target that there are updated extents that need to be * set. diff --git a/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/IView.java b/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/IView.java index 1ce3892f74..3ee56693fa 100644 --- a/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/IView.java +++ b/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/IView.java @@ -19,13 +19,8 @@ **/ package com.raytheon.uf.viz.core; -import javax.vecmath.Vector3d; - import org.eclipse.swt.graphics.Rectangle; -import com.raytheon.uf.viz.core.exception.VizException; -import com.raytheon.uf.viz.core.geom.Plane; - /** * Interface that defines a view area. Methods include determining what is in * view and interacting the view. @@ -44,17 +39,11 @@ import com.raytheon.uf.viz.core.geom.Plane; public interface IView { - public static enum POVShiftType { - EYE, FOCUS, BOTH - } - /** * @param GLTarget */ public abstract void setupView(IGraphicsTarget target); - public abstract String getDisplayType(); - /** * Get Zoom * @@ -64,20 +53,6 @@ public interface IView { public double recalcZoomLevel(int[] dimensions); - /** - * Set elevation exaggeration factor - * - * @param factor - */ - public abstract void setElevationExaggeration(double factor); - - /** - * Get the elevation exaggeration - * - * @return - */ - public abstract double getElevationExaggeration(); - /** * Zoom the display to the desired level * @@ -126,13 +101,6 @@ public interface IView { */ public abstract void setExtent(IExtent pe); - /** - * Set the center of the view area - * - * @param point - */ - public abstract void setCenter(Vector3d point); - /** * Get the display grid coordinates under the screen point * @@ -143,64 +111,6 @@ public interface IView { public abstract double[] getDisplayCoords(double[] screenCoordinate, IGraphicsTarget target); - /** - * Change the point of view based on mouse position change - * - * @param shiftType - * - * @param last - * @param current - */ - public abstract boolean shiftPOV(double[] lastMouse, double[] currentMouse, - POVShiftType shiftType, IGraphicsTarget target); - - public abstract void setTilt(double delta); - - public abstract double getTilt(); - - /** - * Set the focus point on the map from the mouse position - * - * @param currentMouse - * @return - */ - public abstract boolean setFocalPoint(double[] currentMouse, - IGraphicsTarget target); - - /** - * Get the clipping planes - * - * @return - */ - abstract public Plane[] getClippingPlanes(); - - /** - * - * @param center - * @return distance from the eye to the point - */ - abstract public double getEyeDistance(Vector3d point); - - /** - * Get eye in grid space - * - * @return - */ - abstract public double[] getEye(); - - /** - * Set eye in grid space - * - * @param eye - */ - abstract public void setEye(double[] eye); - - /** - * - * @return - */ - abstract public double[] getFocalPoint(); - /** * Create a specific extent for this type of view * @@ -209,14 +119,6 @@ public interface IView { */ abstract public IExtent createExtent(PixelCoverage pc); - /** - * Set up clipping planes to remove objects outside the view area. - * - * @throws VizException - * TODO - */ - abstract public void setClippingPlanes() throws VizException; - /** * Shift the extent by the delta * diff --git a/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/VizApp.java b/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/VizApp.java index f71db19487..b5dae705bf 100644 --- a/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/VizApp.java +++ b/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/VizApp.java @@ -94,7 +94,7 @@ public class VizApp { userName); } - wsId = new WsId(null, null, Platform.getProduct().getName(), 0); + wsId = new WsId(null, null, Platform.getProduct().getName()); } return wsId; diff --git a/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/drawables/AbstractDescriptor.java b/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/drawables/AbstractDescriptor.java index 3e73a920a4..dd88f71a0f 100644 --- a/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/drawables/AbstractDescriptor.java +++ b/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/drawables/AbstractDescriptor.java @@ -127,9 +127,9 @@ public abstract class AbstractDescriptor extends ResourceGroup implements /** The frame coordination object */ protected IFrameCoordinator frameCoordinator; - private MathTransform worldToPixel; + protected MathTransform worldToPixel; - private MathTransform pixelToWorld; + protected MathTransform pixelToWorld; /** The spatial grid for the descriptor */ private GeneralGridGeometry gridGeometry; @@ -685,20 +685,46 @@ public abstract class AbstractDescriptor extends ResourceGroup implements } private void init() { + try { + setupTransforms(); + + // reproject all resources contained in this descriptor + ArrayList unProjectable = new ArrayList(); + for (ResourcePair rp : this.resourceList) { + AbstractVizResource rsc = rp.getResource(); + if (rsc == null) { + continue; + } + try { + rsc.project(gridGeometry.getCoordinateReferenceSystem()); + } catch (VizException e) { + // TODO: what to do here? + unProjectable.add(rp); + statusHandler.handle(Priority.PROBLEM, + "Error projecting resource :: " + rsc.getName(), e); + } + } + this.resourceList.removeAll(unProjectable); + } catch (Exception e) { + statusHandler.handle(Priority.PROBLEM, + "Error setting up Math Transforms," + + " this descriptor may not work properly", e); + } + } + + protected void setupTransforms() throws Exception { GeneralGridGeometry gridGeometry = getGridGeometry(); MathTransform worldToCRS = getWorldToCRSTransform(gridGeometry); if (worldToCRS != null) { - try { - MathTransform crsToPixel = gridGeometry.getGridToCRS( - PixelInCell.CELL_CENTER).inverse(); - worldToPixel = new DefaultMathTransformFactory() - .createConcatenatedTransform(worldToCRS, crsToPixel); - pixelToWorld = worldToPixel.inverse(); - } catch (Exception e) { - statusHandler.handle(Priority.PROBLEM, - "Error setting up Math Transforms," - + " this descriptor may not work properly", e); - } + MathTransform crsToPixel = gridGeometry.getGridToCRS( + PixelInCell.CELL_CENTER).inverse(); + worldToPixel = new DefaultMathTransformFactory() + .createConcatenatedTransform(worldToCRS, crsToPixel); + pixelToWorld = worldToPixel.inverse(); + + } else { + pixelToWorld = null; + worldToPixel = null; } } diff --git a/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/drawables/AbstractRenderableDisplay.java b/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/drawables/AbstractRenderableDisplay.java index 5a285c67ea..cce50db11c 100644 --- a/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/drawables/AbstractRenderableDisplay.java +++ b/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/drawables/AbstractRenderableDisplay.java @@ -23,7 +23,6 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; -import java.util.UUID; import javax.xml.bind.JAXBException; import javax.xml.bind.annotation.XmlAccessType; @@ -44,7 +43,6 @@ import com.raytheon.uf.viz.core.IDisplayPaneContainer; import com.raytheon.uf.viz.core.IExtent; import com.raytheon.uf.viz.core.IGraphicsTarget; import com.raytheon.uf.viz.core.IView; -import com.raytheon.uf.viz.core.IView.POVShiftType; import com.raytheon.uf.viz.core.VizConstants; import com.raytheon.uf.viz.core.exception.VizException; import com.raytheon.uf.viz.core.preferences.ColorFactory; @@ -396,18 +394,6 @@ public abstract class AbstractRenderableDisplay implements IRenderableDisplay { this.view.setExtent(pe); } - /* - * (non-Javadoc) - * - * @see - * com.raytheon.uf.viz.core.drawables.IRenderableDisplay#setFocalPoint(double - * []) - */ - @Override - public boolean setFocalPoint(double[] currentMouse, IGraphicsTarget target) { - return this.view.setFocalPoint(currentMouse, target); - } - /* * (non-Javadoc) * @@ -421,20 +407,6 @@ public abstract class AbstractRenderableDisplay implements IRenderableDisplay { this.view.shiftExtent(startScreen, endScreen, target); } - /* - * (non-Javadoc) - * - * @see - * com.raytheon.uf.viz.core.drawables.IRenderableDisplay#shiftPOV(double[], - * double[], com.raytheon.uf.viz.core.IView.POVShiftType) - */ - @Override - public boolean shiftPOV(double[] lastMouse, double[] currentMouse, - POVShiftType shiftType, IGraphicsTarget target) { - return this.view.shiftPOV(lastMouse, currentMouse, - IView.POVShiftType.valueOf(shiftType.toString()), target); - } - /** * Get Zoom * @@ -454,8 +426,6 @@ public abstract class AbstractRenderableDisplay implements IRenderableDisplay { this.view.zoom(zoomLevel); } - private final String uuid = UUID.randomUUID().toString(); - /* * (non-Javadoc) * diff --git a/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/drawables/ColorMapLoader.java b/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/drawables/ColorMapLoader.java index 2de903912e..a8cf4acafd 100644 --- a/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/drawables/ColorMapLoader.java +++ b/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/drawables/ColorMapLoader.java @@ -35,6 +35,7 @@ import com.raytheon.uf.common.localization.LocalizationContext; import com.raytheon.uf.common.localization.LocalizationContext.LocalizationLevel; import com.raytheon.uf.common.localization.LocalizationContext.LocalizationType; import com.raytheon.uf.common.localization.LocalizationFile; +import com.raytheon.uf.common.localization.PathManager; import com.raytheon.uf.common.localization.PathManagerFactory; import com.raytheon.uf.common.serialization.SerializationException; import com.raytheon.uf.common.serialization.SerializationUtil; @@ -133,6 +134,27 @@ public class ColorMapLoader { .getStaticLocalizationFile( "colormaps" + IPathManager.SEPARATOR + name + ".cmap"); + if (f == null || !f.exists()) { + // If the file was not found check to see if the + // localization context is encoded as part of the path. + String[] split = name.split(IPathManager.SEPARATOR, 3); + for (LocalizationLevel level : LocalizationLevel.values()) { + if (level.name().equals(split[0])) { + LocalizationContext context = new LocalizationContext( + LocalizationType.CAVE_STATIC, level, + split[1]); + f = PathManagerFactory.getPathManager() + .getLocalizationFile( + context, + "colormaps" + + IPathManager.SEPARATOR + + split[2] + ".cmap"); + if (f == null) { + return loadColorMap(split[2]); + } + } + } + } cm = loadColorMap(name, f); if (cm != null) { cmo = new IColorMapObserver(name, cm, f); @@ -179,8 +201,17 @@ public class ColorMapLoader { } public static String shortenName(LocalizationFile file) { - return file.getName().replace("colormaps" + IPathManager.SEPARATOR, "") + String name = file.getName() + .replace("colormaps" + IPathManager.SEPARATOR, "") .replace(".cmap", ""); + if (!file.getContext().getLocalizationLevel() + .equals(LocalizationLevel.BASE)) { + String level = file.getContext().getLocalizationLevel().name(); + String context = file.getContext().getContextName(); + name = level + PathManager.SEPARATOR + context + + PathManager.SEPARATOR + name; + } + return name; } /** diff --git a/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/drawables/IRenderableDisplay.java b/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/drawables/IRenderableDisplay.java index 630d42e79e..8b3d952266 100644 --- a/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/drawables/IRenderableDisplay.java +++ b/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/drawables/IRenderableDisplay.java @@ -29,7 +29,6 @@ import com.raytheon.uf.viz.core.IDisplayPaneContainer; import com.raytheon.uf.viz.core.IExtent; import com.raytheon.uf.viz.core.IGraphicsTarget; import com.raytheon.uf.viz.core.IView; -import com.raytheon.uf.viz.core.IView.POVShiftType; /** * This interface defines the combination of a renderable object and the area @@ -224,26 +223,6 @@ public interface IRenderableDisplay extends IRenderable { abstract public void shiftExtent(double[] startScreen, double[] endScreen, IGraphicsTarget target); - /** - * Change the point of view based on mouse position change - * - * @param shiftType - * - * @param last - * @param current - */ - public abstract boolean shiftPOV(double[] lastMouse, double[] currentMouse, - POVShiftType shiftType, IGraphicsTarget target); - - /** - * Set the focus point on the map from the mouse position - * - * @param currentMouse - * @return - */ - public abstract boolean setFocalPoint(double[] currentMouse, - IGraphicsTarget target); - /** * Scale the pixel extent to show the full display in the client area * diff --git a/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/drawables/ext/IOffscreenRenderingExtension.java b/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/drawables/ext/IOffscreenRenderingExtension.java index 778028c21f..e8a69947d8 100644 --- a/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/drawables/ext/IOffscreenRenderingExtension.java +++ b/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/drawables/ext/IOffscreenRenderingExtension.java @@ -2,7 +2,9 @@ package com.raytheon.uf.viz.core.drawables.ext; import java.nio.Buffer; +import com.raytheon.uf.viz.core.IExtent; import com.raytheon.uf.viz.core.drawables.ColorMapParameters; +import com.raytheon.uf.viz.core.drawables.IColormappedImage; import com.raytheon.uf.viz.core.drawables.IImage; import com.raytheon.uf.viz.core.drawables.ext.GraphicsExtension.IGraphicsExtensionInterface; import com.raytheon.uf.viz.core.exception.VizException; @@ -12,6 +14,8 @@ public interface IOffscreenRenderingExtension extends /** * All drawing between a call to renderOffscreen and the next call to * renderOnscreen will be drawn to offscreenImage rather than to the screen. + * Will use the current screen's world as the coverage area for the + * offscreen image * * @param offscreenImage * image to render to @@ -19,6 +23,19 @@ public interface IOffscreenRenderingExtension extends */ public void renderOffscreen(IImage offscreenImage) throws VizException; + /** + * All drawing between a call to renderOffscreen and the next call to + * renderOnscreen will be drawn to offscreenImage rather than to the screen. + * Will use the extent passed in as the world coverage area for the + * offscreen image + * + * @param offscreenImage + * @param offscreenExtent + * @throws VizException + */ + public void renderOffscreen(IImage offscreenImage, IExtent offscreenExtent) + throws VizException; + /** * Reset rendering to the screen. This only needs to be called if * renderOffscreen has been called. @@ -27,6 +44,16 @@ public interface IOffscreenRenderingExtension extends */ public void renderOnscreen() throws VizException; + /** + * Construct an offscreen image with the specified dimensions. This image + * will be an RGB based image + * + * @param dimensions + * @return + * @throws VizException + */ + public IImage constructOffscreenImage(int[] dimensions) throws VizException; + /** * Construct an offscreen image for given Buffer type and size * @@ -35,8 +62,9 @@ public interface IOffscreenRenderingExtension extends * @return * @throws VizException */ - public IImage constructOffscreenImage(Class dataType, - int[] dimensions) throws VizException; + public IColormappedImage constructOffscreenImage( + Class dataType, int[] dimensions) + throws VizException; /** * Construct an offscreen image for given Buffer type and size, applying @@ -48,7 +76,7 @@ public interface IOffscreenRenderingExtension extends * @return * @throws VizException */ - public IImage constructOffscreenImage(Class dataType, - int[] dimensions, ColorMapParameters parameters) - throws VizException; + public IColormappedImage constructOffscreenImage( + Class dataType, int[] dimensions, + ColorMapParameters parameters) throws VizException; } diff --git a/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/map/MapDescriptor.java b/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/map/MapDescriptor.java index fffc07272e..8d7be07ca9 100644 --- a/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/map/MapDescriptor.java +++ b/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/map/MapDescriptor.java @@ -22,7 +22,6 @@ package com.raytheon.uf.viz.core.map; import java.text.DecimalFormat; import java.text.NumberFormat; -import java.util.ArrayList; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; @@ -46,13 +45,10 @@ import com.raytheon.uf.common.geospatial.MapUtil; import com.raytheon.uf.common.serialization.ISerializableObject; import com.raytheon.uf.common.status.IUFStatusHandler; import com.raytheon.uf.common.status.UFStatus; -import com.raytheon.uf.common.status.UFStatus.Priority; import com.raytheon.uf.viz.core.IExtent; import com.raytheon.uf.viz.core.PixelCoverage; import com.raytheon.uf.viz.core.drawables.AbstractDescriptor; -import com.raytheon.uf.viz.core.drawables.ResourcePair; import com.raytheon.uf.viz.core.exception.VizException; -import com.raytheon.uf.viz.core.rsc.AbstractVizResource; import com.vividsolutions.jts.geom.Coordinate; import com.vividsolutions.jts.geom.Envelope; @@ -249,72 +245,59 @@ public class MapDescriptor extends AbstractDescriptor implements */ public MapDescriptor(GeneralGridGeometry gridGeometry) throws VizException { super(gridGeometry); - init(); } - protected void init() throws VizException { - try { - GeneralGridGeometry gridGeometry = getGridGeometry(); - mapToCoordinateTransform = gridGeometry - .getGridToCRS(PixelInCell.CELL_CENTER); - coordinateToMapTransform = mapToCoordinateTransform.inverse(); + /* + * (non-Javadoc) + * + * @see + * com.raytheon.uf.viz.core.drawables.AbstractDescriptor#setupTransforms() + */ + @Override + protected void setupTransforms() throws Exception { + super.setupTransforms(); + GeneralGridGeometry gridGeometry = getGridGeometry(); + mapToCoordinateTransform = gridGeometry + .getGridToCRS(PixelInCell.CELL_CENTER); + coordinateToMapTransform = mapToCoordinateTransform.inverse(); + if (pixelToWorld == null && MapUtil.LATLON_PROJECTION.equals(getCRS())) { + pixelToWorld = mapToCoordinateTransform; + worldToPixel = coordinateToMapTransform; + } - CoordinateReferenceSystem crs = gridGeometry - .getCoordinateReferenceSystem(); + CoordinateReferenceSystem crs = gridGeometry + .getCoordinateReferenceSystem(); - DirectPosition s1, d1, s2, d2; - if (crs.getCoordinateSystem().getDimension() == 2) { - double centerX = (gridGeometry.getGridRange().getLow(0) + gridGeometry - .getGridRange().getHigh(0)) / 2; + DirectPosition s1, d1, s2, d2; + if (crs.getCoordinateSystem().getDimension() == 2) { + double centerX = (gridGeometry.getGridRange().getLow(0) + gridGeometry + .getGridRange().getHigh(0)) / 2; - double centerY = (gridGeometry.getGridRange().getLow(1) + gridGeometry - .getGridRange().getHigh(1)) / 2; + double centerY = (gridGeometry.getGridRange().getLow(1) + gridGeometry + .getGridRange().getHigh(1)) / 2; - s1 = new DirectPosition2D(centerX, centerY); - d1 = new DirectPosition2D(centerX + 1, centerY); - s2 = new DirectPosition2D(crs); - d2 = new DirectPosition2D(crs); + s1 = new DirectPosition2D(centerX, centerY); + d1 = new DirectPosition2D(centerX + 1, centerY); + s2 = new DirectPosition2D(crs); + d2 = new DirectPosition2D(crs); - mapToCoordinateTransform.transform(s1, s2); - mapToCoordinateTransform.transform(d1, d2); + mapToCoordinateTransform.transform(s1, s2); + mapToCoordinateTransform.transform(d1, d2); - GeodeticCalculator gc = new GeodeticCalculator(crs); - gc.setStartingPosition(s2); - gc.setDestinationPosition(d2); + GeodeticCalculator gc = new GeodeticCalculator(crs); + gc.setStartingPosition(s2); + gc.setDestinationPosition(d2); - double distance = gc.getOrthodromicDistance(); - // System.out.println("Azimuth: " + azimuth + ", - // Distance: " - // + distance); - this.mapWidth = (int) distance - * gridGeometry.getGridRange().getHigh(0); + double distance = gc.getOrthodromicDistance(); + // System.out.println("Azimuth: " + azimuth + ", + // Distance: " + // + distance); + this.mapWidth = (int) distance + * gridGeometry.getGridRange().getHigh(0); - } else { - // TODO come up with a better way of calculating this for 3D - this.mapWidth = 12700000; - } - - // reproject all resources contained in this descriptor - ArrayList unProjectable = new ArrayList(); - for (ResourcePair rp : this.resourceList) { - AbstractVizResource rsc = rp.getResource(); - if (rsc == null) { - continue; - } - try { - rsc.project(gridGeometry.getCoordinateReferenceSystem()); - } catch (VizException e) { - // TODO: what to do here? - unProjectable.add(rp); - statusHandler.handle(Priority.PROBLEM, - "Error projecting resource :: " + rsc.getName(), e); - } - } - this.resourceList.removeAll(unProjectable); - - // System.out.println("mapWidth = " + mapWidth + " meters"); - } catch (Exception e) { - throw new VizException("Error setting up map transformations", e); + } else { + // TODO come up with a better way of calculating this for 3D + this.mapWidth = 12700000; } } @@ -328,7 +311,7 @@ public class MapDescriptor extends AbstractDescriptor implements public double[] pixelToWorld(final double[] pixel, CoordinateReferenceSystem crs) { - if (crs == MapUtil.LATLON_PROJECTION) { + if (MapUtil.LATLON_PROJECTION.equals(crs)) { return pixelToWorld(pixel); } else if (!crs.getName().equals( getGridGeometry().getCoordinateReferenceSystem().getName())) { @@ -353,7 +336,7 @@ public class MapDescriptor extends AbstractDescriptor implements */ @Override public double[] worldToPixel(double[] pixel, CoordinateReferenceSystem crs) { - if (crs == MapUtil.LATLON_PROJECTION) { + if (MapUtil.LATLON_PROJECTION.equals(crs)) { return worldToPixel(pixel); } else if (!crs.getName().equals( getGridGeometry().getCoordinateReferenceSystem().getName())) { @@ -520,20 +503,6 @@ public class MapDescriptor extends AbstractDescriptor implements setGridGeometry(gridGeometry); } - /* - * (non-Javadoc) - * - * @see - * com.raytheon.uf.viz.core.map.IMapDescriptor#setGridGeometry(org.geotools - * .coverage.grid.GeneralGridGeometry) - */ - @Override - public void setGridGeometry(GeneralGridGeometry gridGeometry) - throws VizException { - super.setGridGeometry(gridGeometry); - init(); - } - /** * Get the current display width * diff --git a/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/notification/jobs/NotificationManagerJob.java b/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/notification/jobs/NotificationManagerJob.java index fd5761231f..b671c659b6 100644 --- a/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/notification/jobs/NotificationManagerJob.java +++ b/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/notification/jobs/NotificationManagerJob.java @@ -54,7 +54,6 @@ import com.raytheon.uf.viz.core.Activator; import com.raytheon.uf.viz.core.comm.JMSConnection; import com.raytheon.uf.viz.core.notification.INotificationObserver; import com.raytheon.uf.viz.core.notification.NotificationMessage; -import com.raytheon.uf.viz.core.preferences.JMSPreferences; /** * Job to monitor the JMS topic containing notification messages, delegating the @@ -506,11 +505,10 @@ public class NotificationManagerJob implements ExceptionListener, IDisposable { disconnect(); session = manager.connection.createSession(false, Session.AUTO_ACKNOWLEDGE); - if (session != null) { String topicName = id; - Topic t = session.createTopic(JMSPreferences - .getPolicyString(topicName)); + Topic t = session.createTopic(topicName); + if (queryString != null) { consumer = session.createConsumer(t, queryString); } else { diff --git a/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/rsc/ResourceList.java b/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/rsc/ResourceList.java index 022aebe050..359958e9e0 100644 --- a/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/rsc/ResourceList.java +++ b/cave/com.raytheon.uf.viz.core/src/com/raytheon/uf/viz/core/rsc/ResourceList.java @@ -23,8 +23,8 @@ import java.util.ArrayList; import java.util.Collection; import java.util.Collections; import java.util.Comparator; -import java.util.HashSet; import java.util.Iterator; +import java.util.LinkedHashSet; import java.util.LinkedList; import java.util.List; import java.util.Set; @@ -98,10 +98,10 @@ public class ResourceList extends CopyOnWriteArrayList implements }; public ResourceList() { - preAddListeners = new HashSet(); - postAddListeners = new HashSet(); - preRemoveListeners = new HashSet(); - postRemoveListeners = new HashSet(); + preAddListeners = new LinkedHashSet(); + postAddListeners = new LinkedHashSet(); + preRemoveListeners = new LinkedHashSet(); + postRemoveListeners = new LinkedHashSet(); addPostAddListener(new AddListener() { @Override @@ -308,10 +308,12 @@ public class ResourceList extends CopyOnWriteArrayList implements boolean anyModified = false; for (ResourcePair rp : toAdd) { - try { - firePreAddListeners(rp); - } catch (VizException e1) { - return false; + if (rp.getResource() != null) { + try { + firePreAddListeners(rp); + } catch (VizException e1) { + return false; + } } boolean modified = this.addInternal(rp); @@ -321,10 +323,12 @@ public class ResourceList extends CopyOnWriteArrayList implements rp.setProperties(new ResourceProperties()); } - try { - firePostAddListeners(rp); - } catch (VizException e1) { - return false; + if (rp.getResource() != null) { + try { + firePostAddListeners(rp); + } catch (VizException e1) { + return false; + } } anyModified = true; } diff --git a/cave/com.raytheon.uf.viz.d2d.core/src/com/raytheon/uf/viz/d2d/core/time/TimeMatcher.java b/cave/com.raytheon.uf.viz.d2d.core/src/com/raytheon/uf/viz/d2d/core/time/TimeMatcher.java index f703241ff9..59ce32760f 100644 --- a/cave/com.raytheon.uf.viz.d2d.core/src/com/raytheon/uf/viz/d2d/core/time/TimeMatcher.java +++ b/cave/com.raytheon.uf.viz.d2d.core/src/com/raytheon/uf/viz/d2d/core/time/TimeMatcher.java @@ -1501,8 +1501,6 @@ public class TimeMatcher { loadTimes = doValTimOverlay(filteredTimes.toArray(new DataTime[0]), frameTimes, deltaTime, mode, latest, tolerance); break; - case ANALYSIS_LOOP: - forecast = 0; // intentional fall thru case SLOT: filteredTimes = filterByForecast(depictTimes, forecast); if (!filteredTimes.isEmpty()) { @@ -1512,6 +1510,8 @@ public class TimeMatcher { filteredTimes.get(filteredTimes.size() - 1)); } break; + case ANALYSIS_LOOP: + forecast = 0; // intentional fall thru case INVENTORY: case PROG_LOOP: filteredTimes = filterByForecast(depictTimes, forecast); diff --git a/cave/com.raytheon.uf.viz.d2d.nsharp/src/com/raytheon/uf/viz/d2d/nsharp/display/D2DNSharpDescriptor.java b/cave/com.raytheon.uf.viz.d2d.nsharp/src/com/raytheon/uf/viz/d2d/nsharp/display/D2DNSharpDescriptor.java index 106a55b4ec..5b93ad130a 100644 --- a/cave/com.raytheon.uf.viz.d2d.nsharp/src/com/raytheon/uf/viz/d2d/nsharp/display/D2DNSharpDescriptor.java +++ b/cave/com.raytheon.uf.viz.d2d.nsharp/src/com/raytheon/uf/viz/d2d/nsharp/display/D2DNSharpDescriptor.java @@ -21,6 +21,9 @@ package com.raytheon.uf.viz.d2d.nsharp.display; import gov.noaa.nws.ncep.ui.nsharp.skewt.NsharpSkewTDescriptor; import gov.noaa.nws.ncep.ui.nsharp.skewt.rsc.NsharpSkewTResource; +import gov.noaa.nws.ncep.ui.nsharp.skewt.rsc.NsharpSkewTResource.ElementStateProperty; + +import java.util.List; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; @@ -54,23 +57,39 @@ public class D2DNSharpDescriptor extends NsharpSkewTDescriptor { public D2DNSharpDescriptor() { super(); setTimeMatcher(new D2DTimeMatcher()); + // NSharp does not handle frame changes in the descriptor so it needs a + // custom frame coordinator to handle the events using the frame + // information in the resource. frameCoordinator = new FrameCoordinator(this) { @Override public void changeFrame(LoopProperties loopProperties) { - super.changeFrame(loopProperties); - // Copied code NsharpSkewTDescriptor, this entire class should - // go away once NsharpSkewTDescriptor is fixed - if (loopProperties == null || getFrames() == null) { - // System.out.println("NsharpSkewTDescriptor checkDrawTime called but jump "); + if (loopProperties == null || !loopProperties.isLooping()) { return; } + NsharpSkewTResource skewRsc = getSkewtResource(); + List frames = skewRsc + .getDataTimelineList(); + if (frames == null || frames.isEmpty()) { + return; + } + // Determine wait time based off of direction + long waitTime = loopDirection > 0 ? loopProperties + .getFwdFrameTime() : loopProperties.getRevFrameTime(); + // use special wait time for first and last frame + if (frames.get(frames.size() - 1).getElementDescription() + .equals(skewRsc.getPickedStnInfoStr())) { + waitTime = loopProperties.getLastFrameDwell(); + } else if (frames.get(0).getElementDescription() + .equals(skewRsc.getPickedStnInfoStr())) { + waitTime = loopProperties.getFirstFrameDwell(); + } + // Tell the loop propertied how long to wait + loopProperties.drawAfterWait(waitTime); - if (loopProperties.isLooping() && loopProperties.isShouldDraw()) { - NsharpSkewTResource skewRsc = getSkewtResource(); - + // Tell the resource to handle looping + if (loopProperties.isShouldDraw()) { skewRsc.setLoopingDataTimeLine(loopProperties); - // System.out.println("NsharpSkewTDescriptor handleDataTimeIndex handled!!!!!! "); } } @@ -82,8 +101,17 @@ public class D2DNSharpDescriptor extends NsharpSkewTDescriptor { .valueOf(operation.name()); IDescriptor.FrameChangeMode dmode = IDescriptor.FrameChangeMode .valueOf(mode.name()); - D2DNSharpDescriptor.this.changeFrame(dop, dmode); + // Just hand this off to the resource. + getSkewtResource().setSteppingTimeLine(dop, dmode); } }; } + + @Override + public void checkDrawTime(LoopProperties loopProperties) { + // Do nothing, this is a deprecated method that should never get called + // but for some reason ncep continues writing new code that calls this + // and it continues to conflict with the frame coordinator object. + } + } diff --git a/cave/com.raytheon.uf.viz.d2d.nsharp/src/com/raytheon/uf/viz/d2d/nsharp/display/D2DNSharpDisplay.java b/cave/com.raytheon.uf.viz.d2d.nsharp/src/com/raytheon/uf/viz/d2d/nsharp/display/D2DNSharpDisplay.java index b74d06180f..21d3d30a0f 100644 --- a/cave/com.raytheon.uf.viz.d2d.nsharp/src/com/raytheon/uf/viz/d2d/nsharp/display/D2DNSharpDisplay.java +++ b/cave/com.raytheon.uf.viz.d2d.nsharp/src/com/raytheon/uf/viz/d2d/nsharp/display/D2DNSharpDisplay.java @@ -101,8 +101,7 @@ public class D2DNSharpDisplay extends NsharpSkewTDisplay implements * handled by a separate manager or something.T */ NsharpSkewTResource skewRsc = getDescriptor().getSkewtResource(); - if (activeNativeResource != null - && activeNativeResource.get() != skewRsc + if ((activeNativeResource == null || activeNativeResource.get() != skewRsc) && skewRsc.getSoundingLys() != null) { // TODO we need a better way of tracking what is in native. List soundingLys = skewRsc.getSoundingLys(); diff --git a/cave/com.raytheon.uf.viz.d2d.nsharp/src/com/raytheon/uf/viz/d2d/nsharp/rsc/D2DNSharpResource.java b/cave/com.raytheon.uf.viz.d2d.nsharp/src/com/raytheon/uf/viz/d2d/nsharp/rsc/D2DNSharpResource.java index f36da97538..2ad57c617b 100644 --- a/cave/com.raytheon.uf.viz.d2d.nsharp/src/com/raytheon/uf/viz/d2d/nsharp/rsc/D2DNSharpResource.java +++ b/cave/com.raytheon.uf.viz.d2d.nsharp/src/com/raytheon/uf/viz/d2d/nsharp/rsc/D2DNSharpResource.java @@ -40,6 +40,8 @@ import org.eclipse.core.runtime.jobs.Job; import com.raytheon.uf.common.time.DataTime; import com.raytheon.uf.viz.core.IGraphicsTarget; +import com.raytheon.uf.viz.core.drawables.IDescriptor.FrameChangeMode; +import com.raytheon.uf.viz.core.drawables.IDescriptor.FrameChangeOperation; import com.raytheon.uf.viz.core.drawables.PaintProperties; import com.raytheon.uf.viz.core.exception.VizException; import com.raytheon.uf.viz.core.rsc.AbstractVizResource; @@ -144,9 +146,17 @@ public class D2DNSharpResource extends if (stnInfo == null) { return; } + String picked = skewRsc.getPickedStnInfoStr(); // For some reason this has to happen on the UI thread, so do it in // paint. skewRsc.addRsc(myDataMap, stnInfo); + // Adding to nsharp changes the frame but in D2D we like to keep the + // current frame. + while (picked != null + && !skewRsc.getPickedStnInfoStr().equals(picked)) { + skewRsc.setSteppingTimeLine(FrameChangeOperation.NEXT, + FrameChangeMode.TIME_AND_SPACE); + } issueRefresh(); } } diff --git a/cave/com.raytheon.uf.viz.d2d.nsharp/src/com/raytheon/uf/viz/d2d/nsharp/rsc/D2DNSharpResourceData.java b/cave/com.raytheon.uf.viz.d2d.nsharp/src/com/raytheon/uf/viz/d2d/nsharp/rsc/D2DNSharpResourceData.java index 19b4f97447..2faea2e9e8 100644 --- a/cave/com.raytheon.uf.viz.d2d.nsharp/src/com/raytheon/uf/viz/d2d/nsharp/rsc/D2DNSharpResourceData.java +++ b/cave/com.raytheon.uf.viz.d2d.nsharp/src/com/raytheon/uf/viz/d2d/nsharp/rsc/D2DNSharpResourceData.java @@ -30,7 +30,9 @@ import java.io.File; import java.io.FileWriter; import java.sql.Timestamp; import java.util.ArrayList; +import java.util.Arrays; import java.util.Calendar; +import java.util.Comparator; import java.util.List; import java.util.TimeZone; @@ -94,6 +96,16 @@ public abstract class D2DNSharpResourceData extends LoadProperties loadProperties, PluginDataObject[] objects) throws VizException { D2DNSharpResource skewRsc = new D2DNSharpResource(this, loadProperties); + // sort the objects so that the latest datatime gets loaded first. + Arrays.sort(objects, new Comparator() { + + @Override + public int compare(PluginDataObject o1, PluginDataObject o2) { + Long v1 = o1.getDataTime().getMatchValid(); + Long v2 = o2.getDataTime().getMatchValid(); + return v2.compareTo(v1); + } + }); for (PluginDataObject pdo : objects) { if (pdo instanceof D2DNSharpDataObject) { skewRsc.addDataObject((D2DNSharpDataObject) pdo); diff --git a/cave/com.raytheon.uf.viz.d2d.ui/localization/styleRules/d2dArrowStyleRules.xml b/cave/com.raytheon.uf.viz.d2d.ui/localization/styleRules/d2dArrowStyleRules.xml index ffff9300d2..9da60120be 100644 --- a/cave/com.raytheon.uf.viz.d2d.ui/localization/styleRules/d2dArrowStyleRules.xml +++ b/cave/com.raytheon.uf.viz.d2d.ui/localization/styleRules/d2dArrowStyleRules.xml @@ -122,4 +122,13 @@ kts + + + + MTV + + + g*m/(kg*s) + + diff --git a/cave/com.raytheon.uf.viz.d2d.ui/src/com/raytheon/uf/viz/d2d/ui/dialogs/PrintDialog.java b/cave/com.raytheon.uf.viz.d2d.ui/src/com/raytheon/uf/viz/d2d/ui/dialogs/PrintDialog.java index 04aa26fc31..230384f4c8 100644 --- a/cave/com.raytheon.uf.viz.d2d.ui/src/com/raytheon/uf/viz/d2d/ui/dialogs/PrintDialog.java +++ b/cave/com.raytheon.uf.viz.d2d.ui/src/com/raytheon/uf/viz/d2d/ui/dialogs/PrintDialog.java @@ -19,14 +19,12 @@ **/ package com.raytheon.uf.viz.d2d.ui.dialogs; +import java.awt.Color; import java.awt.geom.AffineTransform; import java.awt.image.AffineTransformOp; import java.awt.image.BufferedImage; -import java.awt.image.ByteLookupTable; import java.awt.image.ComponentColorModel; import java.awt.image.IndexColorModel; -import java.awt.image.LookupOp; -import java.awt.image.LookupTable; import java.awt.image.WritableRaster; import java.util.ArrayList; import java.util.HashMap; @@ -129,8 +127,6 @@ public class PrintDialog extends CaveSWTDialog { private BufferedImage bi; - private LookupTable lookupTable = null; - private MagnificationInformationStorage magnificationInformationStorage = null; private DensityInformationStorage densityInformationStorage = null; @@ -668,8 +664,19 @@ public class PrintDialog extends CaveSWTDialog { } if (printerSettings.invert) { - reverseLUT(); - applyFilter(); + // Only invert gray pixels, not colored pixels, awt doesn not have a + // good filter for this. + for (int x = 0; x < bi.getWidth(); x += 1) { + for (int y = 0; y < bi.getHeight(); y += 1) { + Color color = new Color(bi.getRGB(x, y)); + if (color.getRed() == color.getBlue() + && color.getBlue() == color.getGreen()) { + color = new Color(255 - color.getRed(), + 255 - color.getGreen(), 255 - color.getBlue()); + bi.setRGB(x, y, color.getRGB()); + } + } + } } ImageData imageData = convertToSWT(bi); Image image = null; @@ -824,22 +831,4 @@ public class PrintDialog extends CaveSWTDialog { return null; } - /* - * Create reverse lookup table for image - */ - private void reverseLUT() { - byte reverse[] = new byte[256]; - for (int i = 0; i < 256; i++) { - reverse[i] = (byte) (255 - i); - } - lookupTable = new ByteLookupTable(0, reverse); - } - - /* - * Apply lookup table filter to image - */ - private void applyFilter() { - LookupOp lop = new LookupOp(lookupTable, null); - lop.filter(bi, bi); - } } \ No newline at end of file diff --git a/cave/com.raytheon.uf.viz.d2d.ui/src/com/raytheon/uf/viz/d2d/ui/dialogs/procedures/ProcedureDlg.java b/cave/com.raytheon.uf.viz.d2d.ui/src/com/raytheon/uf/viz/d2d/ui/dialogs/procedures/ProcedureDlg.java index 8e55f1758f..3af3ceef9c 100644 --- a/cave/com.raytheon.uf.viz.d2d.ui/src/com/raytheon/uf/viz/d2d/ui/dialogs/procedures/ProcedureDlg.java +++ b/cave/com.raytheon.uf.viz.d2d.ui/src/com/raytheon/uf/viz/d2d/ui/dialogs/procedures/ProcedureDlg.java @@ -50,7 +50,6 @@ import org.eclipse.swt.widgets.Label; import org.eclipse.swt.widgets.Layout; import org.eclipse.swt.widgets.List; import org.eclipse.swt.widgets.Shell; -import org.eclipse.ui.IEditorPart; import com.raytheon.uf.common.localization.IPathManager; import com.raytheon.uf.common.localization.LocalizationContext; @@ -78,7 +77,6 @@ import com.raytheon.uf.viz.core.rsc.AbstractRequestableResourceData; import com.raytheon.uf.viz.core.rsc.AbstractResourceData; import com.raytheon.uf.viz.core.rsc.AbstractVizResource; import com.raytheon.uf.viz.d2d.ui.dialogs.procedures.ProcedureComm.BundlePair; -import com.raytheon.viz.ui.EditorUtil; import com.raytheon.viz.ui.HistoryList; import com.raytheon.viz.ui.UiUtil; import com.raytheon.viz.ui.actions.SaveBundle; @@ -381,13 +379,6 @@ public class ProcedureDlg extends CaveSWTDialog { for (BundlePair b : bp) { Bundle bundle = Bundle.unmarshalBundle(b.xml, null); - // check if loop properties need to be saved - IEditorPart editorPart = EditorUtil.getActiveEditor(); - if (editorPart instanceof AbstractEditor) { - bundle.setLoopProperties(((AbstractEditor) editorPart) - .getLoopProperties()); - } - if (!frozen) { for (AbstractRenderableDisplay display : bundle .getDisplays()) { diff --git a/cave/com.raytheon.uf.viz.d2d.ui/src/com/raytheon/uf/viz/d2d/ui/map/actions/RotatePanelsHandler.java b/cave/com.raytheon.uf.viz.d2d.ui/src/com/raytheon/uf/viz/d2d/ui/map/actions/RotatePanelsHandler.java index 9cae7fec01..0079833191 100644 --- a/cave/com.raytheon.uf.viz.d2d.ui/src/com/raytheon/uf/viz/d2d/ui/map/actions/RotatePanelsHandler.java +++ b/cave/com.raytheon.uf.viz.d2d.ui/src/com/raytheon/uf/viz/d2d/ui/map/actions/RotatePanelsHandler.java @@ -42,28 +42,52 @@ public class RotatePanelsHandler extends AbstractTool { if (container == null) { return null; } + // direction is usually +1 or -1 to specify which direction to rotate String dirStr = arg0.getParameter("direction"); + // start index is the index to start rotating from, for example if you + // want to display pane 3 then you set startIndex to 2 and direction to + // +1, this is done so that if pane 3 has no data it will rotate past + // pane 3 and the next available pane with data. String startStr = arg0.getParameter("startIndex"); + // hideIndex can be set to 0 or 1 to specify which half of a blended + // images should be hidden. String hideIndexStr = arg0.getParameter("hideIndex"); - + boolean toggle = false; int dir = Integer.parseInt(dirStr); if (startStr == null) { - rotateCurrent(container, dir); + // If there is no startIndex rotate from the currently displayed + // pane + if (container instanceof IMultiPaneEditor) { + // If it is going from multiple panes to a single pain, toggle + // the blended image + toggle = ((IMultiPaneEditor) container).displayedPaneCount() > 1; + } + if (rotateCurrent(container, dir)) { + // if it wraps around when we rotate, toggle the blended image. + toggle = true; + } } else { int start = Integer.parseInt(startStr); rotate(container, start, dir); } + Integer hideIndex = null; if (hideIndexStr != null) { - int hideIndex = Integer.parseInt(hideIndexStr); + hideIndex = Integer.parseInt(hideIndexStr); + } + if (toggle || hideIndex != null) { for (IDisplayPane pane : container.getDisplayPanes()) { for (ResourcePair rp : pane.getDescriptor().getResourceList()) { if (rp.getResource() != null && rp.getResource().hasCapability( BlendableCapability.class)) { - rp.getResource() - .getCapability(BlendableCapability.class) - .toggle(hideIndex); + BlendableCapability cap = rp.getResource() + .getCapability(BlendableCapability.class); + if (hideIndex != null) { + cap.toggle(hideIndex); + } else { + cap.toggle(); + } } } } @@ -82,13 +106,15 @@ public class RotatePanelsHandler extends AbstractTool { * * @param direction * should be either 1, or -1 + * @return true if the data wrapped to the other side of the pane array. */ - public void rotateCurrent(IDisplayPaneContainer container, int direction) { + public boolean rotateCurrent(IDisplayPaneContainer container, int direction) { if (container instanceof IMultiPaneEditor) { IMultiPaneEditor mEditor = (IMultiPaneEditor) container; int index = getIndex(container, mEditor.getActiveDisplayPane()); - rotate(container, index, direction); + return rotate(container, index, direction); } + return false; } public void rotate(IDisplayPaneContainer container, IDisplayPane pane, @@ -105,9 +131,11 @@ public class RotatePanelsHandler extends AbstractTool { * the index to start rotating from * @param direction * should be either 1, or -1 + * @return true if the data wrapped to the other side of the pane array. */ - private void rotate(IDisplayPaneContainer container, int index, + private boolean rotate(IDisplayPaneContainer container, int index, int direction) { + boolean wrapped = false; IMultiPaneEditor mEditor = (IMultiPaneEditor) container; IDisplayPane[] panes = mEditor.getDisplayPanes(); if (panes.length == 4) { @@ -124,10 +152,10 @@ public class RotatePanelsHandler extends AbstractTool { IDisplayPane paneToShow = null; if (panes != null && index < panes.length && panes.length != 1) { + boolean from4To1 = mEditor.displayedPaneCount() > 1; for (IDisplayPane displayPane : panes) { mEditor.hidePane(displayPane); } - boolean from4To1 = mEditor.displayedPaneCount() > 1; boolean hasProducts = false; if (panes[index] != null) { List rscs = panes[index].getDescriptor() @@ -146,9 +174,14 @@ public class RotatePanelsHandler extends AbstractTool { } else { IDisplayPane displayedPane = null; boolean done = false; - for (int i = (index + direction + panes.length) % panes.length; !done; i = (i - + direction + panes.length) - % panes.length) { + for (int i = index + direction; !done; i = i + direction) { + if (i < 0) { + i += panes.length; + wrapped = true; + } else if (i >= panes.length) { + wrapped = true; + i -= panes.length; + } IDisplayPane pane = panes[i]; if (i == index) { done = true; @@ -183,6 +216,7 @@ public class RotatePanelsHandler extends AbstractTool { } catch (VizException e) { e.printStackTrace(); } + return wrapped; } private int getIndex(IDisplayPaneContainer container, IDisplayPane pane) { diff --git a/cave/com.raytheon.uf.viz.d2d.xy.adapters/src/com/raytheon/uf/viz/d2d/xy/adapters/crosssection/GribCSAdapter.java b/cave/com.raytheon.uf.viz.d2d.xy.adapters/src/com/raytheon/uf/viz/d2d/xy/adapters/crosssection/GribCSAdapter.java index 91c3283150..403aa100f1 100644 --- a/cave/com.raytheon.uf.viz.d2d.xy.adapters/src/com/raytheon/uf/viz/d2d/xy/adapters/crosssection/GribCSAdapter.java +++ b/cave/com.raytheon.uf.viz.d2d.xy.adapters/src/com/raytheon/uf/viz/d2d/xy/adapters/crosssection/GribCSAdapter.java @@ -241,6 +241,8 @@ public class GribCSAdapter extends AbstractCrossSectionAdapter { while (dataLists.size() < results.length) { dataLists.add(new ArrayList()); } + double speed = Float.NaN; + double direction = Double.NaN; for (int c = 0; c < results.length; c++) { FloatDataRecord xRec = (FloatDataRecord) results[c]; float xVal = InterpUtils.getInterpolatedData(requestArea, @@ -248,6 +250,21 @@ public class GribCSAdapter extends AbstractCrossSectionAdapter { if (xVal <= -9999) { continue; } + // these cases handle rotating a vector to be oriented + // towards the north pole rather than the up direction of a + // grid. + if (c == 0) { + speed = xVal; + } else if (c == 1) { + direction = xVal - 180 + + MapUtil.rotation(coordinates[i], area); + xVal = (float) direction; + direction = Math.toRadians(direction); + } else if (c == 2) { + xVal = (float) (-speed * Math.sin(direction)); + } else if (c == 3) { + xVal = (float) (-speed * Math.cos(direction)); + } dataLists.get(c).add(new XYData(xVal, yVal)); } } diff --git a/cave/com.raytheon.uf.viz.derivparam.python/localization/derivedParameters/functions/LvlFgen.py b/cave/com.raytheon.uf.viz.derivparam.python/localization/derivedParameters/functions/LvlFgen.py index c860f752fa..95820d73a2 100644 --- a/cave/com.raytheon.uf.viz.derivparam.python/localization/derivedParameters/functions/LvlFgen.py +++ b/cave/com.raytheon.uf.viz.derivparam.python/localization/derivedParameters/functions/LvlFgen.py @@ -41,7 +41,7 @@ def execute(GHxSM, TxSM, P, dx, dy, coriolis): # Now calculate the QG frontogensis function for this level. # Fgen = 2(Qx * d(theta)/dx + Qy * d(theta)/dy) result = slqx * dtdx - result += slqy * dtdy - result *= (-1) * t2th + result -= slqy * dtdy + result *= t2th return result diff --git a/cave/com.raytheon.uf.viz.derivparam.python/localization/derivedParameters/functions/LyrFgen.py b/cave/com.raytheon.uf.viz.derivparam.python/localization/derivedParameters/functions/LyrFgen.py index 1730bf869d..4662572cd6 100644 --- a/cave/com.raytheon.uf.viz.derivparam.python/localization/derivedParameters/functions/LyrFgen.py +++ b/cave/com.raytheon.uf.viz.derivparam.python/localization/derivedParameters/functions/LyrFgen.py @@ -24,7 +24,7 @@ def execute(height_up, height_lo, pressure_up, pressure_lo, dx, dy, coriolis): qx, qy, dtdx, dtdy = lyrQvec(height_up, height_lo, pressure_up, pressure_lo, dx, dy, coriolis) fgen = qx * dtdx - fgen += qy * dtdy + fgen -= qy * dtdy fgen *= 2 return fgen diff --git a/cave/com.raytheon.uf.viz.derivparam/localization/derivedParameters/definitions/MTV.xml b/cave/com.raytheon.uf.viz.derivparam/localization/derivedParameters/definitions/MTV.xml index 089426e534..8d2fb61921 100644 --- a/cave/com.raytheon.uf.viz.derivparam/localization/derivedParameters/definitions/MTV.xml +++ b/cave/com.raytheon.uf.viz.derivparam/localization/derivedParameters/definitions/MTV.xml @@ -18,7 +18,7 @@ See_the_AWIPS_II_Master_Rights_File_("Master_Rights_File.pdf")_for further_licensing_information. --> - + diff --git a/cave/com.raytheon.uf.viz.derivparam/localization/derivedParameters/definitions/TP.xml b/cave/com.raytheon.uf.viz.derivparam/localization/derivedParameters/definitions/TP.xml index b18074c1c8..9a452ad309 100644 --- a/cave/com.raytheon.uf.viz.derivparam/localization/derivedParameters/definitions/TP.xml +++ b/cave/com.raytheon.uf.viz.derivparam/localization/derivedParameters/definitions/TP.xml @@ -58,6 +58,12 @@ + + + + + + diff --git a/cave/com.raytheon.uf.viz.derivparam/src/com/raytheon/uf/viz/derivparam/inv/AbstractInventory.java b/cave/com.raytheon.uf.viz.derivparam/src/com/raytheon/uf/viz/derivparam/inv/AbstractInventory.java index fa5882292c..7046d034fa 100644 --- a/cave/com.raytheon.uf.viz.derivparam/src/com/raytheon/uf/viz/derivparam/inv/AbstractInventory.java +++ b/cave/com.raytheon.uf.viz.derivparam/src/com/raytheon/uf/viz/derivparam/inv/AbstractInventory.java @@ -81,8 +81,6 @@ import com.raytheon.uf.viz.derivparam.tree.UnionLevelNode; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * Mar 17, 2010 bsteffen Initial creation - * Apr 11, 2012 DR14666 porricel Modified resolveField to - * use middle of layer for BL * * * @@ -1023,24 +1021,17 @@ public abstract class AbstractInventory implements DerivParamUpdateListener { if (pStatic != null) { return pStatic; } - + // Check to see if we can set the field from the // masterlevel name if (level.getMasterLevel().getName().equals(fieldParamAbbrev)) { - FloatRequestableData data; - if (level.isRangeLevel() && fieldParamAbbrev.equals("BL")){ - // get midpoint of boundary layer - data = new FloatRequestableData( - (float) ((level.getLevelonevalue() + level.getLeveltwovalue())/2)); - } - else { - data = new FloatRequestableData( + FloatRequestableData data = new FloatRequestableData( (float) level.getLevelonevalue()); - } data.setUnit(level.getMasterLevel().getUnit()); return data; } + String validSource = field.getValidSource(); SourceNode fieldSourceNode = sourceNode; diff --git a/cave/com.raytheon.uf.viz.derivparam/src/com/raytheon/uf/viz/derivparam/tree/DerivedLevelNode.java b/cave/com.raytheon.uf.viz.derivparam/src/com/raytheon/uf/viz/derivparam/tree/DerivedLevelNode.java index 996cac67c1..220f9fa03a 100644 --- a/cave/com.raytheon.uf.viz.derivparam/src/com/raytheon/uf/viz/derivparam/tree/DerivedLevelNode.java +++ b/cave/com.raytheon.uf.viz.derivparam/src/com/raytheon/uf/viz/derivparam/tree/DerivedLevelNode.java @@ -57,9 +57,6 @@ import com.raytheon.uf.viz.derivparam.library.IDerivParamField; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * Dec 14, 2009 rjpeter Initial creation - * Apr 11, 2012 DR14666 porricel Modified getDataInternal to - * use 0-30MB for derived boundary - * layer * * * @@ -399,12 +396,9 @@ public class DerivedLevelNode extends AbstractDerivedLevelNode { if (record.getRequest().getBaseParams().size() == method .getFields().size()) { modifyRequest(record); - // Define derived BL as 0-30MB - if (record.getLevel().getMasterLevel().getName().equals("BL") && record.getLevel().getLevelOneValueAsString().equals("0.0") && - !record.getLevel().getLevelTwoValueAsString().equals("30.0")) - continue; finalResponses.add(record); } + } return finalResponses; } diff --git a/cave/com.raytheon.uf.viz.monitor.ffmp/localization/styleRules/ffmpImageryStyleRules.xml b/cave/com.raytheon.uf.viz.monitor.ffmp/localization/styleRules/ffmpImageryStyleRules.xml index a958398d7a..03c808389c 100644 --- a/cave/com.raytheon.uf.viz.monitor.ffmp/localization/styleRules/ffmpImageryStyleRules.xml +++ b/cave/com.raytheon.uf.viz.monitor.ffmp/localization/styleRules/ffmpImageryStyleRules.xml @@ -102,20 +102,20 @@ be put in localization. ffmp/qpe - - - - - - - - - - - - - - + + + + + + + + + + + + + + @@ -131,20 +131,20 @@ be put in localization. ffmp/qpe6 - - - - - - - - - - - - - - + + + + + + + + + + + + + + @@ -160,20 +160,20 @@ be put in localization. ffmp/qpe12 - - - - - - - - - - - - - - + + + + + + + + + + + + + + @@ -189,19 +189,19 @@ be put in localization. ffmp/rate - - - - - - - - - - - - - + + + + + + + + + + + + + @@ -218,19 +218,19 @@ be put in localization. ffmp/ratio - - - - - - - - - - - - - + + + + + + + + + + + + + @@ -247,20 +247,20 @@ be put in localization. ffmp/diff - - - - - - - - - - - - - - + + + + + + + + + + + + + + @@ -294,4 +294,4 @@ be put in localization. - \ No newline at end of file + \ No newline at end of file diff --git a/cave/com.raytheon.uf.viz.monitor.ffmp/src/com/raytheon/uf/viz/monitor/ffmp/FFMPMonitor.java b/cave/com.raytheon.uf.viz.monitor.ffmp/src/com/raytheon/uf/viz/monitor/ffmp/FFMPMonitor.java index a52554ffd2..ed8500c198 100644 --- a/cave/com.raytheon.uf.viz.monitor.ffmp/src/com/raytheon/uf/viz/monitor/ffmp/FFMPMonitor.java +++ b/cave/com.raytheon.uf.viz.monitor.ffmp/src/com/raytheon/uf/viz/monitor/ffmp/FFMPMonitor.java @@ -87,7 +87,7 @@ import com.raytheon.uf.viz.monitor.listeners.IMonitorListener; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * 04/03/10 4494 D. Hladky Initial release - * 16/04/12 DR 14511 G. Zhang Data retrieval uses Job + * * * * @author dhladky @@ -137,11 +137,9 @@ public class FFMPMonitor extends ResourceMonitor implements public ArrayList dataTimes = null; - private FFMPTimeWindow rateWindow = null; private FFMPTimeWindow qpfWindow = null; + private FFMPTimeWindow qpeWindow = null; - //DR 14511: Data retrieval uses Job. VizApp.runAsync() uses GUI thread - private DataJob dj1=new DataJob(), dj2=new DataJob(), dj3=new DataJob(), dj4=new DataJob(); /** The infamous templates **/ private FFMPTemplates templates = null; @@ -456,7 +454,7 @@ public class FFMPMonitor extends ResourceMonitor implements final String fsource = source; final String fhuc = huc; - /*VizApp.runAsync*/dj1.request(new Runnable() { + VizApp.runAsync(new Runnable() { @Override public void run() { @@ -507,7 +505,7 @@ public class FFMPMonitor extends ResourceMonitor implements final String fsource = source; final FFMPBasin fbasin = basin; - /*VizApp.runAsync*/dj2.request(new Runnable() { + VizApp.runAsync(new Runnable() { @Override public void run() { @@ -1606,20 +1604,12 @@ public class FFMPMonitor extends ResourceMonitor implements String siteKey) { FFMPTimeWindow window = new FFMPTimeWindow(); long lwindow = getSourceTimeWindow(sourceName, siteKey); - window.setAfterTime(new Date(date.getTime() + lwindow)); - window.setBeforeTime(new Date(date.getTime() - lwindow)); + window.setAfterTime(new Date(date.getTime() - lwindow)); + window.setBeforeTime(new Date(date.getTime() + lwindow)); return window; } - public FFMPTimeWindow getRateWindow() { - return rateWindow; - } - - public void setRateWindow(FFMPTimeWindow rateWindow) { - this.rateWindow = rateWindow; - } - public FFMPTimeWindow getQpfWindow() { return qpfWindow; } @@ -1813,7 +1803,7 @@ public class FFMPMonitor extends ResourceMonitor implements final String fsourceName = sourceName; final String fhuc = phuc; - /*VizApp.runAsync*/dj3.request(new Runnable() { + VizApp.runAsync(new Runnable() { @Override public void run() { @@ -1865,7 +1855,7 @@ public class FFMPMonitor extends ResourceMonitor implements final Date fbarrierTime = barrierTime; final String fhuc = phuc; - /*VizApp.runAsync*/dj4.request(new Runnable() { + VizApp.runAsync(new Runnable() { @Override public void run() { @@ -2591,44 +2581,5 @@ public class FFMPMonitor extends ResourceMonitor implements } } } - - /** - * DR 14511: Using Eclipse Job for data retrieval since - * the original VizApp.runAsync() is using the GUI thread. - */ - private class DataJob extends org.eclipse.core.runtime.jobs.Job { - - private static final int QUEUE_LIMIT = 1; - - private java.util.concurrent.ArrayBlockingQueue requestQueue = new java.util.concurrent.ArrayBlockingQueue( - QUEUE_LIMIT); - - public DataJob() { super("Retrieving FFMP Graph Data..."); } - - public void request(Runnable r) { - - if (requestQueue.size() == QUEUE_LIMIT) { - requestQueue.poll(); - } - - requestQueue.add(r); - this.schedule(); - } - - @SuppressWarnings({ "unchecked" }) - @Override - protected org.eclipse.core.runtime.IStatus run(org.eclipse.core.runtime.IProgressMonitor progMonitor) { - - Runnable r = requestQueue.poll(); - while (r != null) { - - r.run(); - - r= requestQueue.poll(); - } - - return org.eclipse.core.runtime.Status.OK_STATUS; - } - } } diff --git a/cave/com.raytheon.uf.viz.monitor.ffmp/src/com/raytheon/uf/viz/monitor/ffmp/ui/dialogs/AttributesDlg.java b/cave/com.raytheon.uf.viz.monitor.ffmp/src/com/raytheon/uf/viz/monitor/ffmp/ui/dialogs/AttributesDlg.java index 3507cca602..df5c749227 100644 --- a/cave/com.raytheon.uf.viz.monitor.ffmp/src/com/raytheon/uf/viz/monitor/ffmp/ui/dialogs/AttributesDlg.java +++ b/cave/com.raytheon.uf.viz.monitor.ffmp/src/com/raytheon/uf/viz/monitor/ffmp/ui/dialogs/AttributesDlg.java @@ -309,6 +309,8 @@ public class AttributesDlg extends CaveSWTDialog { for (Button button: qpfRdoBtns) { if (button.getSelection()) { qpfType = button.getText(); + // split window requires redraw on change + updateData = true; break; } } diff --git a/cave/com.raytheon.uf.viz.monitor.ffmp/src/com/raytheon/uf/viz/monitor/ffmp/ui/dialogs/FFMPTableCellData.java b/cave/com.raytheon.uf.viz.monitor.ffmp/src/com/raytheon/uf/viz/monitor/ffmp/ui/dialogs/FFMPTableCellData.java index 85c17d4431..3acef4b86f 100644 --- a/cave/com.raytheon.uf.viz.monitor.ffmp/src/com/raytheon/uf/viz/monitor/ffmp/ui/dialogs/FFMPTableCellData.java +++ b/cave/com.raytheon.uf.viz.monitor.ffmp/src/com/raytheon/uf/viz/monitor/ffmp/ui/dialogs/FFMPTableCellData.java @@ -175,6 +175,10 @@ public class FFMPTableCellData { double tmpVal = value; if (displayAsInt == true) { tmpVal = Math.rint(value); + } else { + if (!value.isNaN()) { + tmpVal = (double) (((int) ((value + 0.005) * 100))) / 100; + } } if ((columnName == FIELDS.GUIDANCE) && this.guidForcedFlag) { diff --git a/cave/com.raytheon.uf.viz.monitor.ffmp/src/com/raytheon/uf/viz/monitor/ffmp/ui/dialogs/FfmpBasinTableDlg.java b/cave/com.raytheon.uf.viz.monitor.ffmp/src/com/raytheon/uf/viz/monitor/ffmp/ui/dialogs/FfmpBasinTableDlg.java index 23f0182fe9..bbfc85a03e 100644 --- a/cave/com.raytheon.uf.viz.monitor.ffmp/src/com/raytheon/uf/viz/monitor/ffmp/ui/dialogs/FfmpBasinTableDlg.java +++ b/cave/com.raytheon.uf.viz.monitor.ffmp/src/com/raytheon/uf/viz/monitor/ffmp/ui/dialogs/FfmpBasinTableDlg.java @@ -95,7 +95,7 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * Sep 30, 2009 lvenable Initial creation - * Apr 16, 2012 DR 14511 gzhang No use GUI thread for Graph data + * * * * @author lvenable @@ -187,9 +187,6 @@ public class FfmpBasinTableDlg extends CaveSWTDialog implements private Date date = null; - // @SuppressWarnings("unused") - // private FFMPGraphData graphData = null; - private BasinTrendDlg basinTrendDlg; private double time = Double.MIN_VALUE; @@ -569,6 +566,9 @@ public class FfmpBasinTableDlg extends CaveSWTDialog implements }); if (sourceMenuItems.contains(guidMenu.getText()) == false) { sourceMenuItems.add(guidMenu); + // selects at least one as default + ffmpConfig.getFFMPConfigData().setGuidSrc(guidMenu.getText()); + fireConfigUpdateEvent(); } } } @@ -1186,7 +1186,7 @@ public class FfmpBasinTableDlg extends CaveSWTDialog implements shell.setCursor(getDisplay().getSystemCursor(SWT.CURSOR_WAIT)); updateTimeDurationLabel(val, split); if (dialogInitialized) { - fireTimeChangedEvent(val); + fireTimeChangedEvent(val, split); } updateD2DRefresh(); } @@ -1314,7 +1314,7 @@ public class FfmpBasinTableDlg extends CaveSWTDialog implements ffmpListeners.remove(fl); } - public void fireTimeChangedEvent(double newTime) { + public void fireTimeChangedEvent(double newTime, boolean split) { FFMPRecord.FIELDS field = FFMPRecord.FIELDS.QPE; @@ -1326,7 +1326,7 @@ public class FfmpBasinTableDlg extends CaveSWTDialog implements } if (time != newTime) { - FFMPTimeChangeEvent ftce = new FFMPTimeChangeEvent(newTime); + FFMPTimeChangeEvent ftce = new FFMPTimeChangeEvent(newTime, split); Iterator iter = ffmpListeners.iterator(); while (iter.hasNext()) { try { @@ -1404,7 +1404,9 @@ public class FfmpBasinTableDlg extends CaveSWTDialog implements if (!selected) { cwas.remove(cwa); } else { - cwas.add(cwa); + if (!cwas.contains(cwa)) { + cwas.add(cwa); + } } FFMPCWAChangeEvent fcce = new FFMPCWAChangeEvent(cwas); @@ -1608,19 +1610,9 @@ public class FfmpBasinTableDlg extends CaveSWTDialog implements */ private void fireGraphDataEvent(final String pfaf, final boolean differentPfaf, final Date ffmpDate) { - if((pfaf==null) || pfaf.isEmpty()){ resetCursor(); return; } + shell.setCursor(getDisplay().getSystemCursor(SWT.CURSOR_WAIT)); - //DR 14511: GUI thread should not be used for Graph Data retrieval - FFMPGraphData fgd = null; - try{ - fgd = resource.getGraphData(pfaf); - }catch (VizException e) { - shell.setCursor(null); - statusHandler.handle(Priority.PROBLEM,"Graph Data request failed ", e); - } - final FFMPGraphData fgd2 = fgd; - if(fgd2 == null) { resetCursor(); return; } // This needs to be in sync Display.getDefault().asyncExec(new Runnable() { @Override @@ -1632,9 +1624,9 @@ public class FfmpBasinTableDlg extends CaveSWTDialog implements return; } try { - setGraphData(/*resource.getGraphData(pfaf)*/fgd2, pfaf, + setGraphData(resource.getGraphData(pfaf), pfaf, differentPfaf, ffmpDate); - } catch (/*Viz*/Exception e) { + } catch (VizException e) { shell.setCursor(null); statusHandler.handle(Priority.PROBLEM, "Graph Data request failed in resource", e); @@ -1654,20 +1646,20 @@ public class FfmpBasinTableDlg extends CaveSWTDialog implements if (!ffmpTable.isDisposed()) { this.mainTableData = tData; - System.out.println("---" + tData.getTableRows().size()); + //System.out.println("---" + tData.getTableRows().size()); ffmpTable.clearTableSelection(); - long time = System.currentTimeMillis(); + //long time = System.currentTimeMillis(); ffmpTable .setCenteredAggregationKey(resource.centeredAggregationKey); ffmpTable.setTableData(mainTableData); - long time1 = System.currentTimeMillis(); + //long time1 = System.currentTimeMillis(); resetCursor(); shell.pack(); shell.redraw(); - System.out - .println("Time to load Data into table " + (time1 - time)); + //System.out + // .println("Time to load Data into table " + (time1 - time)); } } @@ -1764,7 +1756,7 @@ public class FfmpBasinTableDlg extends CaveSWTDialog implements */ timeDurScale.setTimeDurationAndUpdate(ffmpConfig.getFFMPConfigData() .getTimeFrame()); - fireTimeChangedEvent(ffmpConfig.getFFMPConfigData().getTimeFrame()); + fireTimeChangedEvent(ffmpConfig.getFFMPConfigData().getTimeFrame(), false); /* * Layer @@ -2088,4 +2080,14 @@ public class FfmpBasinTableDlg extends CaveSWTDialog implements }); } } + + /** + * used to blank the group label when channging HUC + * while in an aggregate. + */ + public void blankGroupLabel() { + if (groupLbl != null) { + groupLbl.setText(""); + } + } } diff --git a/cave/com.raytheon.uf.viz.monitor.ffmp/src/com/raytheon/uf/viz/monitor/ffmp/ui/listeners/FFMPTimeChangeEvent.java b/cave/com.raytheon.uf.viz.monitor.ffmp/src/com/raytheon/uf/viz/monitor/ffmp/ui/listeners/FFMPTimeChangeEvent.java index ebfc232cd0..c13ecd2be2 100644 --- a/cave/com.raytheon.uf.viz.monitor.ffmp/src/com/raytheon/uf/viz/monitor/ffmp/ui/listeners/FFMPTimeChangeEvent.java +++ b/cave/com.raytheon.uf.viz.monitor.ffmp/src/com/raytheon/uf/viz/monitor/ffmp/ui/listeners/FFMPTimeChangeEvent.java @@ -21,6 +21,8 @@ package com.raytheon.uf.viz.monitor.ffmp.ui.listeners; import java.util.EventObject; +import com.raytheon.uf.viz.monitor.ffmp.ui.rsc.FFMPTime; + /** * * Hour slider Update Event @@ -43,7 +45,7 @@ public class FFMPTimeChangeEvent extends EventObject { */ private static final long serialVersionUID = 189898618L; - public FFMPTimeChangeEvent(double time) { - super(time); + public FFMPTimeChangeEvent(double time, boolean split) { + super(new FFMPTime(time, split)); } } diff --git a/cave/com.raytheon.uf.viz.monitor.ffmp/src/com/raytheon/uf/viz/monitor/ffmp/ui/rsc/FFMPColorUtils.java b/cave/com.raytheon.uf.viz.monitor.ffmp/src/com/raytheon/uf/viz/monitor/ffmp/ui/rsc/FFMPColorUtils.java index 5b1c41d039..30ac429cc6 100644 --- a/cave/com.raytheon.uf.viz.monitor.ffmp/src/com/raytheon/uf/viz/monitor/ffmp/ui/rsc/FFMPColorUtils.java +++ b/cave/com.raytheon.uf.viz.monitor.ffmp/src/com/raytheon/uf/viz/monitor/ffmp/ui/rsc/FFMPColorUtils.java @@ -84,17 +84,6 @@ public class FFMPColorUtils { this.tableLoad = tableLoad; this.colormapparams = null; - // LocalizationFile[] files = ColorMapLoader.listColorMapFiles(); - // for (LocalizationFile file : files) { - // String fn = file.getName(); - // if (fn.startsWith("colormaps/ffmp/qpe")) - // { - // System.out.println(file.getName()); - // String hour = fn.s - // } - // - // } - StyleRule sr = null; try { sr = StyleManager.getInstance().getStyleRule( @@ -178,8 +167,8 @@ public class FFMPColorUtils { double val2 = (Math.round(valueArg * 100.0)) / 100.0; Double value = val2; - - if (value < 0.005 && field != FIELDS.DIFF) { + + if (value < 0.01 && field != FIELDS.DIFF) { ret = 0; } else if (field == FIELDS.DIFF) { @@ -227,16 +216,6 @@ public class FFMPColorUtils { + determineQpeToUse(time); paramList.add(qpeName); - // if (time < 6.0) { - // paramList.add(FIELDS.QPE.getFieldName()); - // // System.out.println("QPE: less than 6"); - // } else if (time >= 6.0 && time < 12.0) { - // paramList.add(FIELDS.QPE.getFieldName() + "6"); - // // System.out.println("QPE: greater than 6 less than 12"); - // } else if (time >= 12.0) { - // paramList.add(FIELDS.QPE.getFieldName() + "12"); - // // System.out.println("QPE: greater than 12"); - // } } else { if (field == FIELDS.GUIDANCE) { paramList.add(FIELDS.GUIDANCE.getFieldName()); diff --git a/cave/com.raytheon.uf.viz.monitor.ffmp/src/com/raytheon/uf/viz/monitor/ffmp/ui/rsc/FFMPDataGenerator.java b/cave/com.raytheon.uf.viz.monitor.ffmp/src/com/raytheon/uf/viz/monitor/ffmp/ui/rsc/FFMPDataGenerator.java index b56f1cc8b3..ec9e26c716 100644 --- a/cave/com.raytheon.uf.viz.monitor.ffmp/src/com/raytheon/uf/viz/monitor/ffmp/ui/rsc/FFMPDataGenerator.java +++ b/cave/com.raytheon.uf.viz.monitor.ffmp/src/com/raytheon/uf/viz/monitor/ffmp/ui/rsc/FFMPDataGenerator.java @@ -36,6 +36,7 @@ import com.raytheon.uf.common.dataplugin.ffmp.FFMPVirtualGageBasin; import com.raytheon.uf.common.dataplugin.ffmp.FFMPVirtualGageBasinMetaData; import com.raytheon.uf.common.monitor.config.FFFGDataMgr; import com.raytheon.uf.common.monitor.config.FFMPRunConfigurationManager; +import com.raytheon.uf.common.monitor.config.FFMPSourceConfigurationManager; import com.raytheon.uf.common.monitor.xml.DomainXML; import com.raytheon.uf.common.monitor.xml.ProductRunXML; import com.raytheon.uf.common.monitor.xml.ProductXML; @@ -62,7 +63,7 @@ import com.raytheon.uf.viz.monitor.ffmp.ui.dialogs.FfmpTableConfigData; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * Jul 20, 2009 dhladky Initial creation - * Jan 25, 2012 DR 13839 gzhang Use paintTime for QPF + * Jan 25, 2012 DR 13839 gzhang Use paintTime for QPF * * * @author dhladky @@ -70,1229 +71,1240 @@ import com.raytheon.uf.viz.monitor.ffmp.ui.dialogs.FfmpTableConfigData; */ public class FFMPDataGenerator { - private FfmpTableConfig tableConfig; + private FfmpTableConfig tableConfig; - private static final transient IUFStatusHandler statusHandler = UFStatus - .getHandler(FFMPDataGenerator.class); + private static final transient IUFStatusHandler statusHandler = UFStatus + .getHandler(FFMPDataGenerator.class); - FFMPConfig ffmpCfg = FFMPConfig.getInstance(); + FFMPConfig ffmpCfg = FFMPConfig.getInstance(); - FFMPTemplates ft = null; + FFMPTemplates ft = null; - FFMPResource resource = null; + FFMPResource resource = null; - FFMPMonitor monitor = null; + FFMPMonitor monitor = null; - FFMPBasinData qpeBasin = null; + FFMPBasinData qpeBasin = null; - FFMPBasinData qpfBasin = null; + FFMPBasinData qpfBasin = null; - FFMPBasinData rateBasin = null; + FFMPBasinData rateBasin = null; - HashMap guidBasins = null; + HashMap guidBasins = null; - FFMPBasinData virtualBasin = null; + FFMPBasinData virtualBasin = null; - FFMPRecord rateRecord = null; + FFMPRecord rateRecord = null; - FFMPRecord qpeRecord = null; + FFMPRecord qpeRecord = null; - FFMPRecord qpfRecord = null; + FFMPRecord qpfRecord = null; - HashMap guidRecords = null; + HashMap guidRecords = null; - FFMPRecord virtualRecord = null; + FFMPRecord virtualRecord = null; - FFMPRecord baseRec = null; + FFMPRecord baseRec = null; - Date time = null; + // Date time = null; - Date recentTime = null; + // Date recentTime = null; - SourceXML primarySource = null; + SourceXML primarySource = null; - FFFGDataMgr dman = null; + FFFGDataMgr dman = null; - boolean isRate = false; + boolean isRate = false; - long expirationTime = 0l; + long expirationTime = 0l; - private String[] cwaArr = null; + private String[] cwaArr = null; - private HashMap forceUtils = null; + private HashMap forceUtils = null; - private FfmpTableConfigData ffmpTableCfgData = null; + private FfmpTableConfigData ffmpTableCfgData = null; + + public FFMPDataGenerator(FFMPMonitor monitor, FFMPResource resource) { + this.tableConfig = FfmpTableConfig.getInstance(); + this.resource = resource; + this.monitor = monitor; + this.ft = monitor.getTemplates(resource.getSiteKey()); + this.primarySource = resource.getResourceData().getPrimarySourceXML(); + this.isRate = primarySource.isRate(); + this.expirationTime = primarySource.getExpirationMinutes(resource + .getSiteKey()) * 60 * 1000; + ffmpTableCfgData = tableConfig + .getTableConfigData(resource.getSiteKey()); + } + + public FFMPTableData generateFFMPData() throws Exception { + // You should always have at least a QPE data source + FFMPTableData tData = null; + // update the FFFGDataManager + FFFGDataMgr.getUpdatedInstance(); + tData = new FFMPTableData(); + + try { + FIELDS field = getBaseField(); + if (field != null) { + if (baseRec != null) { + FFMPBasinData fbd = null; + if (resource.centeredAggregationKey != null) { + fbd = baseRec.getBasinData("ALL"); + } else { + fbd = baseRec.getBasinData(resource.getHuc()); + } + + if (fbd.getBasins().size() > 0) { + if ((resource.centeredAggregationKey == null) + || resource.getHuc().equals("ALL")) { + // System.out.println(fbd.getBasins().keySet().size() + // + " rows in the table"); + for (Long key : fbd.getBasins().keySet()) { + if (resource.getHuc().equals("ALL")) { + for (DomainXML domain : resource + .getDomains()) { + + FFMPBasinMetaData fmdb = ft.getBasin( + resource.getSiteKey(), key); + + if (fmdb == null) { + continue; + } + + if ((domain.getCwa().equals(fmdb + .getCwa())) + || (domain.isPrimary() && fmdb + .isPrimaryCwa())) { + + setFFMPRow(fbd.get(key), tData, + false, domain.getCwa()); + + if (virtualBasin != null) { + for (Long id : ft + .getVirtualGageBasinLookupIds( + resource.getSiteKey(), + key)) { + setFFMPRow( + virtualBasin + .get(id), + tData, true, domain + .getCwa()); + } + } + } + } + + } else { + /* + * make sure at least one basin in the agg + * is in the CWA + */ + + ArrayList pfafs = ft + .getAggregatePfafs(key, + resource.getSiteKey(), + resource.getHuc()); + + boolean isVGB = false; + if (ft.checkVGBsInAggregate(key, + resource.getSiteKey(), + resource.getHuc())) { + isVGB = true; + } + + if (pfafs.size() > 0) { + + FFMPBasinMetaData fmdb = ft + .getBasinInDomains( + resource.getSiteKey(), + resource.getDomains(), + pfafs); + + if (fmdb != null) { + try { + setFFMPRow(fbd.get(key), tData, + isVGB, null); + } catch (Exception e) { + e.printStackTrace(); + } + } + } + } + } + } + // show pfafs in aggregation + else { + for (Long key : resource + .getCenteredAggregatePfafs()) { + + FFMPBasinMetaData fmdb = ft.getBasin( + resource.getSiteKey(), key); + + if (fmdb != null) { + for (DomainXML domain : resource + .getDomains()) { + + if ((domain.getCwa().equals(fmdb + .getCwa())) + || (domain.isPrimary() && fmdb + .isPrimaryCwa())) { + + setFFMPRow(fbd.get(key), tData, + false, null); + // virtual basin + if (virtualBasin != null) { + for (Long id : ft + .getVirtualGageBasinLookupIds( + resource.getSiteKey(), + key)) { + setFFMPRow( + virtualBasin + .get(id), + tData, true, null); + } + } + } + } + } + } + } + + tData.sortData(); + } + } + } + } catch (Exception e) { + e.printStackTrace(); + } + + return tData; + } + + private void setFFMPRow(FFMPBasin cBasin, FFMPTableData tData, + boolean isVGB, String domain) { + try { + if (cBasin instanceof FFMPVirtualGageBasin) { + if (tData.containsPfaf(((FFMPVirtualGageBasin) cBasin).getLid() + .toString()) == true) { + return; + } + } else { + if (tData.containsPfaf(cBasin.getPfaf().toString()) == true) { + return; + } + } + } catch (Exception e) { + return; + } + + String displayName = ""; + String mouseOverText = ""; + + FFMPTableRowData trd = new FFMPTableRowData( + ffmpTableCfgData.getTableColumnKeys().length); + + Float guidance = Float.NaN; + Float qpe = Float.NaN; + Float rate = Float.NaN; + Float qpf = Float.NaN; + FIELDS rowField = FIELDS.NAME; + + if (isVGB) { + rowField = FIELDS.VIRTUAL; + } + + if (cBasin instanceof FFMPVirtualGageBasin) { + + rowField = FIELDS.VIRTUAL; + + displayName = ((FFMPVirtualGageBasin) cBasin).getLid(); + + if (displayName != null) { + + // in this special case it is actually the LID + trd.setPfaf(((FFMPVirtualGageBasin) cBasin).getLid()); + FFMPVirtualGageBasinMetaData fvgmbd = ft + .getVirtualGageBasinMetaData(resource.getSiteKey(), + ((FFMPVirtualGageBasin) cBasin).getLid()); + FFMPBasinMetaData metabasin = ft.getBasin( + resource.getSiteKey(), fvgmbd.getParentPfaf()); + Long parentBasinPfaf = fvgmbd.getParentPfaf(); + + if (fvgmbd != null) { + mouseOverText = metabasin.getBasinId() + "\n" + + fvgmbd.getLid() + "-" + fvgmbd.getName(); + + if (!resource.getHuc().equals("ALL")) { + displayName += "-" + fvgmbd.getName(); + } + } + + trd.setTableCellData(0, new FFMPTableCellData(rowField, + displayName, mouseOverText)); + + if (!resource.isWorstCase() || resource.getHuc().equals("ALL") + || (resource.centeredAggregationKey != null)) { + + if (cBasin.getValues().size() > 0) { + rate = ((FFMPVirtualGageBasin) cBasin) + .getValue(resource.getPaintTime().getRefTime()); + trd.setTableCellData(1, new FFMPTableCellData( + FIELDS.RATE, rate)); + } else { + trd.setTableCellData(1, new FFMPTableCellData( + FIELDS.RATE, Float.NaN)); + } + if (cBasin.getValues().size() > 0) { + + if (resource.getTime() > 0.00) { + qpe = cBasin.getAccumValue(monitor.getQpeWindow() + .getAfterTime(), monitor.getQpeWindow() + .getBeforeTime(), expirationTime, isRate); + } else { + qpe = 0.0f; + } + trd.setTableCellData(2, new FFMPTableCellData( + FIELDS.QPE, qpe)); + + } else { + trd.setTableCellData(2, new FFMPTableCellData( + FIELDS.QPE, Float.NaN)); + } + + if ((qpfBasin != null) + && (qpfBasin.get(parentBasinPfaf) != null)) { + qpf = qpfBasin.get(parentBasinPfaf).getValue( + monitor.getQpfWindow().getAfterTime(), + monitor.getQpfWindow().getBeforeTime()); + trd.setTableCellData(3, new FFMPTableCellData( + FIELDS.QPF, qpf)); + } else { + trd.setTableCellData(3, new FFMPTableCellData( + FIELDS.QPF, Float.NaN)); + } + + // run over each guidance type + int i = 0; + + for (String guidType : guidBasins.keySet()) { + ArrayList pfafList = new ArrayList(); + ArrayList forcedPfafs = new ArrayList(); + guidance = Float.NaN; + boolean forced = false; + FFFGForceUtil forceUtil = forceUtils.get(guidType); + FFMPBasinData guidBasin = guidBasins.get(guidType); + forceUtil.setSliderTime(resource.getTime()); + + if ((guidBasin != null) + && ((FFMPGuidanceBasin) guidBasin + .get(parentBasinPfaf) != null)) { + FFMPGuidanceBasin ffmpGuidBasin = ((FFMPGuidanceBasin) guidBasin + .get(parentBasinPfaf)); + + // If aggregate, get basins within the aggregate + if (cBasin.getAggregated()) { + if (domain == null) { + pfafList = ft.getAggregatePfafs( + cBasin.getPfaf(), + resource.getSiteKey(), + resource.getHuc()); + } else if (!domain.equals("NA")) { + if (!resource.getHuc().equals("ALL")) { + pfafList = ft + .getAggregatePfafsByDomain( + parentBasinPfaf, + resource.getSiteKey(), + domain, + resource.getHuc()); + } + } else { + pfafList = ft.getAggregatePfafsByDomain( + parentBasinPfaf, + resource.getSiteKey(), domain, + resource.getHuc()); + pfafList.add(ft.getAggregatedPfaf( + cBasin.getPfaf(), + resource.getSiteKey(), + resource.getHuc())); + } + } + + FFFGDataMgr fdm = FFFGDataMgr.getInstance(); + + if (fdm.isForcingConfigured()) { + FFMPBasin parentBasin = baseRec.getBasinData( + "ALL").get(parentBasinPfaf); + forceUtil.calculateForcings(domain, ft, + parentBasin); + forcedPfafs = forceUtil.getForcedPfafList(); + forced = forceUtil.isForced(); + } + + if (((forcedPfafs.size() > 1)) && forced) { + // Recalculate the guidance using the forced + // value(s) + guidance = guidRecords + .get(guidType) + .getBasinData("ALL") + .getAverageGuidanceValue( + pfafList, + resource.getGuidanceInterpolators() + .get(guidType), + guidance, + forcedPfafs, + resource.getGuidSourceExpiration()); + } else if (forcedPfafs.size() > 1) { + guidance = guidRecords + .get(guidType) + .getBasinData("ALL") + .getAverageGuidanceValue( + pfafList, + resource.getGuidanceInterpolators() + .get(guidType), + Float.NaN, + forcedPfafs, + resource.getGuidSourceExpiration()); + forced = true; + } else if (pfafList.size() > 1) { + guidance = guidRecords + .get(guidType) + .getBasinData("ALL") + .getAverageGuidanceValue( + pfafList, + resource.getGuidanceInterpolators() + .get(guidType), + Float.NaN, + forcedPfafs, + resource.getGuidSourceExpiration()); + } else { + guidance = resource.getGuidanceValue( + ffmpGuidBasin, resource.getPaintTime() + .getRefTime(), guidType); + + if (guidance < 0.0f) { + guidance = Float.NaN; + } + } + + trd.setTableCellData(i + 4, new FFMPTableCellData( + FIELDS.GUIDANCE, guidance, forced)); + } else { + trd.setTableCellData(i + 4, new FFMPTableCellData( + FIELDS.GUIDANCE, Float.NaN)); + } + + if (!qpe.isNaN() && (guidance > 0.0f)) { + trd.setTableCellData( + i + 5, + new FFMPTableCellData(FIELDS.RATIO, + FFMPUtils.getRatioValue(qpe, + guidance))); + trd.setTableCellData( + i + 6, + new FFMPTableCellData(FIELDS.DIFF, + FFMPUtils.getDiffValue(qpe, + guidance))); + } else { + trd.setTableCellData(i + 5, new FFMPTableCellData( + FIELDS.RATIO, Float.NaN)); + trd.setTableCellData(i + 6, new FFMPTableCellData( + FIELDS.DIFF, Float.NaN)); + } + + i += 3; + } + } else { + trd = getMaxValue(trd, cBasin); + } + + tData.addDataRow(trd); + + } + } else { + displayName = getDisplayName(cBasin); + + if (displayName != null) { + trd.setPfaf(cBasin.getPfaf().toString()); + trd.setTableCellData(0, new FFMPTableCellData(rowField, + displayName, cBasin.getPfaf().toString() + "\n" + + displayName)); + + if (!resource.isWorstCase() || resource.getHuc().equals("ALL") + || (resource.centeredAggregationKey != null)) { + if ((rateBasin != null) + && (rateBasin.get(cBasin.getPfaf()) != null)) { + rate = rateBasin.get(cBasin.getPfaf()).getValue(resource.getPaintTime().getRefTime()); + trd.setTableCellData(1, new FFMPTableCellData( + FIELDS.RATE, rate)); + // System.out.println("rate: "+rate); + } else { + trd.setTableCellData(1, new FFMPTableCellData( + FIELDS.RATE, Float.NaN)); + } + if ((qpeBasin != null) + && (qpeBasin.get(cBasin.getPfaf()) != null)) { + qpe = qpeBasin.get(cBasin.getPfaf()).getAccumValue( + monitor.getQpeWindow().getAfterTime(), + monitor.getQpeWindow().getBeforeTime(), + expirationTime, isRate); + trd.setTableCellData(2, new FFMPTableCellData( + FIELDS.QPE, qpe)); + } else { + trd.setTableCellData(2, new FFMPTableCellData( + FIELDS.QPE, Float.NaN)); + } + if ((qpfBasin != null) + && (qpfBasin.get(cBasin.getPfaf()) != null)) { + + qpf = qpfBasin.get(cBasin.getPfaf()).getValue( + monitor.getQpfWindow().getAfterTime(), + monitor.getQpfWindow().getBeforeTime()); + // qpf = getQPFValue(false, cBasin.getPfaf(), + // new ArrayList());/* DR13839 */ + trd.setTableCellData(3, new FFMPTableCellData( + FIELDS.QPF, qpf)); + // System.out.println("qpf: "+qpf); + } else { + trd.setTableCellData(3, new FFMPTableCellData( + FIELDS.QPF, Float.NaN)); + } + + // run over each guidance type + int i = 0; + for (String guidType : guidBasins.keySet()) { + ArrayList pfafList = new ArrayList(); + ArrayList forcedPfafs = new ArrayList(); + guidance = Float.NaN; + boolean forced = false; + FFFGForceUtil forceUtil = forceUtils.get(guidType); + FFMPBasinData guidBasin = guidBasins.get(guidType); + forceUtil.setSliderTime(resource.getTime()); + + if ((guidBasin != null) + && ((FFMPGuidanceBasin) guidBasin.get(cBasin + .getPfaf()) != null)) { + FFMPGuidanceBasin ffmpGuidBasin = ((FFMPGuidanceBasin) guidBasin + .get(cBasin.getPfaf())); + + // If aggregate, get basins within the aggregate + if (cBasin.getAggregated()) { + if (domain == null) { + pfafList = ft.getAggregatePfafs( + cBasin.getPfaf(), + resource.getSiteKey(), + resource.getHuc()); + } else if (!domain.equals("NA")) { + if (!resource.getHuc().equals("ALL")) { + pfafList = ft + .getAggregatePfafsByDomain( + cBasin.getPfaf(), + resource.getSiteKey(), + domain, + resource.getHuc()); + } + } else { + pfafList = ft.getAggregatePfafsByDomain( + cBasin.getPfaf(), + resource.getSiteKey(), domain, + resource.getHuc()); + pfafList.add(ft.getAggregatedPfaf( + cBasin.getPfaf(), + resource.getSiteKey(), + resource.getHuc())); + } + } + + FFFGDataMgr fdm = FFFGDataMgr.getInstance(); + + if (fdm.isForcingConfigured()) { + forceUtil.calculateForcings(domain, ft, cBasin); + forcedPfafs = forceUtil.getForcedPfafList(); + forced = forceUtil.isForced(); + } + + if (((forcedPfafs.size() > 1)) && forced) { + // Recalculate the guidance using the forced + // value(s) + guidance = guidRecords + .get(guidType) + .getBasinData("ALL") + .getAverageGuidanceValue( + pfafList, + resource.getGuidanceInterpolators() + .get(guidType), + guidance, + forcedPfafs, + resource.getGuidSourceExpiration()); + } else if (forcedPfafs.size() > 1) { + guidance = guidRecords + .get(guidType) + .getBasinData("ALL") + .getAverageGuidanceValue( + pfafList, + resource.getGuidanceInterpolators() + .get(guidType), + Float.NaN, + forcedPfafs, + resource.getGuidSourceExpiration()); + forced = true; + } else if (pfafList.size() > 1) { + guidance = guidRecords + .get(guidType) + .getBasinData("ALL") + .getAverageGuidanceValue( + pfafList, + resource.getGuidanceInterpolators() + .get(guidType), + Float.NaN, + forcedPfafs, + resource.getGuidSourceExpiration()); + if (forcedPfafs.size() > 0) { + forced = true; + } + } else { + guidance = resource.getGuidanceValue( + ffmpGuidBasin, monitor.getQpeWindow() + .getBeforeTime(), guidType); + + if (guidance < 0.0f) { + guidance = Float.NaN; + } + } + + trd.setTableCellData(i + 4, new FFMPTableCellData( + FIELDS.GUIDANCE, guidance, forced)); + } else { + // check for forcing even if no data are available + guidance = getForcedAvg(forceUtil, domain, cBasin, + guidType); + if (guidance.isNaN() == false) { + forced = true; + } else { + forced = false; + } + + trd.setTableCellData(i + 4, new FFMPTableCellData( + FIELDS.GUIDANCE, guidance, forced)); + } + + if (!qpe.isNaN() && (guidance > 0.0f)) { + trd.setTableCellData( + i + 5, + new FFMPTableCellData(FIELDS.RATIO, + FFMPUtils.getRatioValue(qpe, + guidance))); + trd.setTableCellData( + i + 6, + new FFMPTableCellData(FIELDS.DIFF, + FFMPUtils.getDiffValue(qpe, + guidance))); + } else { + trd.setTableCellData(i + 5, new FFMPTableCellData( + FIELDS.RATIO, Float.NaN)); + trd.setTableCellData(i + 6, new FFMPTableCellData( + FIELDS.DIFF, Float.NaN)); + } + + i += 3; + } + } else { + trd = getMaxValue(trd, cBasin); + } + + tData.addDataRow(trd); + } + } + } + + private float getForcedAvg(FFFGForceUtil forceUtil, String domain, + FFMPBasin cBasin, String guidType) { + FFFGDataMgr fdm = FFFGDataMgr.getInstance(); + ArrayList forcedPfafs; + ArrayList pfafList = new ArrayList(); + float guidance = Float.NaN; + + boolean forced = false; + if (fdm.isForcingConfigured()) { + forceUtil.calculateForcings(domain, ft, cBasin); + forcedPfafs = forceUtil.getForcedPfafList(); + forced = forceUtil.isForced(); + if (forced == false) { + return Float.NaN; + } + } else { + return Float.NaN; + } + + if (cBasin.getAggregated()) { + if (domain == null) { + pfafList = ft.getAggregatePfafs(cBasin.getPfaf(), + resource.getSiteKey(), resource.getHuc()); + } else if (!domain.equals("NA")) { + if (!resource.getHuc().equals("ALL")) { + pfafList = ft.getAggregatePfafsByDomain(cBasin.getPfaf(), + resource.getSiteKey(), domain, resource.getHuc()); + } + } else { + pfafList = ft.getAggregatePfafsByDomain(cBasin.getPfaf(), + resource.getSiteKey(), domain, resource.getHuc()); + pfafList.add(ft.getAggregatedPfaf(cBasin.getPfaf(), + resource.getSiteKey(), resource.getHuc())); + } + } + + if (!resource.isWorstCase() || resource.getHuc().equals("ALL") + || (resource.centeredAggregationKey != null)) { + if (((forcedPfafs.size() > 1)) || forced) { + // Calculate an average + guidance = forceUtil.getAvgForcedValue(pfafList, forcedPfafs, + resource.getGuidanceInterpolators().get(guidType), + resource.getGuidSourceExpiration(), ft); + // } else if (forcedPfafs.size() > 1) { + // guidance = forceUtil.getAvgForcedValue(pfafList, + // forcedPfafs, + // resource.getGuidanceInterpolators().get(guidType), + // resource.getGuidSourceExpiration(), ft); + // forced = true; + } + } else { + // TODO Calculate a max value + + } + + return guidance; + } + + /** + * Regular basin display name + * + * @param basin + * @return + */ + private String getDisplayName(FFMPBasin basin) { + String name = null; + + try { + if (resource.getHuc().equals("ALL") + || (resource.centeredAggregationKey != null)) { + name = ft.getBasin(resource.getSiteKey(), basin.getPfaf()) + .getStreamName(); + } + // aggregations + else { + + ArrayList pfafs = ft.getAggregatePfafs(basin.getPfaf(), + resource.getSiteKey(), resource.getHuc()); + if (pfafs.size() > 0) { + if (resource.getHuc().equals("COUNTY")) { + name = ft.getCountyStateName(resource.getSiteKey(), + basin.getPfaf()); + } else { + for (int i = 0; i < pfafs.size(); i++) { + if (ft.getBasin(resource.getSiteKey(), pfafs.get(0)) + .getHucName() != null) { + name = ft.getBasin(resource.getSiteKey(), + pfafs.get(0)).getHucName(); + break; + } + } + } + } + } + } catch (Exception e) { + statusHandler.handle(Priority.WARN, "No display name for basin.." + + basin.getPfaf()); + } + return name; + } + + private FFMPTableRowData getMaxValue(FFMPTableRowData trd, FFMPBasin cBasin) { + ArrayList domainList = FFMPRunConfigurationManager + .getInstance().getDomains(); + ArrayList activeDomains = new ArrayList(); + for (DomainXML domainXml : domainList) { + for (String cwa : cwaArr) { + if (domainXml.getCwa().equalsIgnoreCase(cwa)) { + activeDomains.add(domainXml); + break; + } + } + } + + ArrayList pfafs = ft.getAggregatePfafs(cBasin.getPfaf(), + resource.getSiteKey(), resource.getHuc(), activeDomains); + trd.setPfaf(cBasin.getPfaf().toString()); + Float qpe = Float.NaN; + Float guidance = Float.NaN; + Float rate = Float.NaN; + Float qpf = Float.NaN; + + if (cBasin instanceof FFMPVirtualGageBasin) { + if (pfafs.size() == 0) { + if (virtualBasin != null) { + trd.setTableCellData( + 1, + new FFMPTableCellData(FIELDS.RATE, virtualBasin + .get(cBasin.getPfaf()).getValue( + resource.getPaintTime().getRefTime()))); + } else { + trd.setTableCellData(1, new FFMPTableCellData(FIELDS.RATE, + Float.NaN)); + } + if (virtualBasin != null) { + if (resource.getTime() > 0.00) { + qpe = virtualBasin.get(cBasin.getPfaf()).getAccumValue( + monitor.getQpeWindow().getAfterTime(), + monitor.getQpeWindow().getBeforeTime(), + expirationTime, isRate); + } else { + qpe = 0.0f; + } + + trd.setTableCellData(2, new FFMPTableCellData(FIELDS.QPE, + qpe)); + + } else { + trd.setTableCellData(2, new FFMPTableCellData(FIELDS.QPE, + Float.NaN)); + } + if (qpfBasin != null) { + trd.setTableCellData( + 3, + new FFMPTableCellData(FIELDS.QPF, new Float( + qpeBasin.get(cBasin.getPfaf()).getValue( + monitor.getQpfWindow() + .getAfterTime(), + monitor.getQpfWindow() + .getBeforeTime())) + .floatValue())); + } else { + trd.setTableCellData(3, new FFMPTableCellData(FIELDS.QPF, + Float.NaN)); + } + + // run over each guidance type + int i = 0; + for (String guidType : guidBasins.keySet()) { + FFFGForceUtil forceUtil = forceUtils.get(guidType); + forceUtil.setSliderTime(resource.getTime()); + + FFMPBasinData guidBasin = guidBasins.get(guidType); + + if (guidBasin != null) { + + FFMPGuidanceBasin basin = ((FFMPGuidanceBasin) guidBasin + .get(cBasin.getPfaf())); + guidance = resource.getGuidanceValue(basin, monitor + .getQpeWindow().getBeforeTime(), guidType); + + forceUtil.calculateForcings(pfafs, ft, cBasin); + + ArrayList forcedPfafs = forceUtil + .getForcedPfafList(); + boolean forced = forceUtil.isForced(); + + if (!forced) { + if ((forcedPfafs != null) + && (forcedPfafs.size() > 0)) { + forced = true; + } + } + + trd.setTableCellData(i + 4, new FFMPTableCellData( + FIELDS.GUIDANCE, guidance, forced)); + } else { + trd.setTableCellData(i + 4, new FFMPTableCellData( + FIELDS.GUIDANCE, Float.NaN)); + } + if (!qpe.isNaN() && (guidance > 0.0f)) { + + trd.setTableCellData( + i + 5, + new FFMPTableCellData(FIELDS.RATIO, FFMPUtils + .getRatioValue(qpe, guidance))); + trd.setTableCellData( + i + 6, + new FFMPTableCellData(FIELDS.DIFF, FFMPUtils + .getDiffValue(qpe, guidance))); + } else { + trd.setTableCellData(i + 5, new FFMPTableCellData( + FIELDS.RATIO, Float.NaN)); + trd.setTableCellData(i + 6, new FFMPTableCellData( + FIELDS.DIFF, Float.NaN)); + } + + i += 3; + } + } + + } else { + if (pfafs.size() > 0) { + if (rateBasin != null) { + rate = rateBasin.getMaxValue(pfafs, resource.getPaintTime().getRefTime()); + trd.setTableCellData(1, new FFMPTableCellData(FIELDS.RATE, + rate)); + } else { + trd.setTableCellData(1, new FFMPTableCellData(FIELDS.RATE, + Float.NaN)); + } + if (qpeBasin != null) { + qpe = qpeBasin.getAccumMaxValue(pfafs, monitor + .getQpeWindow().getAfterTime(), monitor + .getQpeWindow().getBeforeTime(), expirationTime, + isRate); + trd.setTableCellData(2, new FFMPTableCellData(FIELDS.QPE, + qpe)); + } else { + trd.setTableCellData(2, new FFMPTableCellData(FIELDS.QPE, + Float.NaN)); + } + if (qpfBasin != null) { + qpf = qpfBasin.getMaxValue(pfafs, monitor.getQpfWindow() + .getAfterTime(), monitor.getQpfWindow() + .getBeforeTime()); + + // qpf = getQPFValue(true, new Long(0l), pfafs);/* DR13839 + // */ + trd.setTableCellData(3, new FFMPTableCellData(FIELDS.QPF, + qpf.floatValue())); + } else { + trd.setTableCellData(3, new FFMPTableCellData(FIELDS.QPF, + Float.NaN)); + } + + // run over each guidance type + int i = 0; + for (String guidType : guidBasins.keySet()) { + FFFGForceUtil forceUtil = forceUtils.get(guidType); + forceUtil.setSliderTime(resource.getTime()); + + FFMPBasinData guidBasin = guidBasins.get(guidType); + + ArrayList pfafList = new ArrayList(); + if ((guidBasin != null) + && (guidBasin.getBasins().size() > 0)) { + if (cBasin.getAggregated()) { + pfafList = ft.getAggregatePfafs(cBasin.getPfaf(), + resource.getSiteKey(), resource.getHuc()); + pfafList.add(ft.getAggregatedPfaf(cBasin.getPfaf(), + resource.getSiteKey(), resource.getHuc())); + } + + boolean forced = false; + ArrayList forcedPfafs = new ArrayList(); + FFFGDataMgr fdm = FFFGDataMgr.getInstance(); + + if (fdm.isForcingConfigured()) { + forceUtil.calculateForcings(pfafList, ft, cBasin); + forcedPfafs = forceUtil.getForcedPfafList(); + forced = forceUtil.isForced(); + } + + if (!forced) { + if ((forcedPfafs != null) + && (forcedPfafs.size() > 0)) { + forced = true; + } + } + + if (resource.isWorstCase()) { + guidance = guidRecords + .get(guidType) + .getBasinData("ALL") + .getMaxGuidanceValue( + pfafs, + resource.getGuidanceInterpolators() + .get(guidType), + resource.getGuidSourceExpiration(), + cBasin.getPfaf()); + } else { + FFMPGuidanceBasin basin = (FFMPGuidanceBasin) guidRecords + .get(guidType) + .getBasinData(resource.getHuc()) + .get(cBasin.getPfaf()); + guidance = resource.getGuidanceValue(basin, monitor + .getQpeWindow().getBeforeTime(), guidType); + } + + trd.setTableCellData(i + 4, new FFMPTableCellData( + FIELDS.GUIDANCE, guidance, forced)); + } else { + trd.setTableCellData(i + 4, new FFMPTableCellData( + FIELDS.GUIDANCE, Float.NaN)); + } + if (!qpe.isNaN() && (guidance > 0.0f)) { + + ArrayList qpes = qpeBasin.getAccumValues(pfafs, + monitor.getQpeWindow().getAfterTime(), monitor + .getQpeWindow().getBeforeTime(), + expirationTime, isRate); + ArrayList guids = null; + if (guidBasin != null) { + guids = guidBasin.getGuidanceValues(pfafs, resource + .getGuidanceInterpolators().get(guidType), + resource.getGuidSourceExpiration()); + } + + if ((qpes.size() > 0) + && ((guids != null) && (guids.size() > 0))) { + + trd.setTableCellData( + i + 5, + new FFMPTableCellData(FIELDS.RATIO, + FFMPUtils.getMaxRatioValue(qpes, + guids))); + trd.setTableCellData( + i + 6, + new FFMPTableCellData(FIELDS.DIFF, + FFMPUtils.getMaxDiffValue(qpes, + guids))); + } else { + trd.setTableCellData(i + 5, new FFMPTableCellData( + FIELDS.RATIO, Float.NaN)); + trd.setTableCellData(i + 6, new FFMPTableCellData( + FIELDS.DIFF, Float.NaN)); + } + } else { + trd.setTableCellData(i + 5, new FFMPTableCellData( + FIELDS.RATIO, Float.NaN)); + trd.setTableCellData(i + 6, new FFMPTableCellData( + FIELDS.DIFF, Float.NaN)); + } + + i += 3; + } + + } else { + if ((rateBasin != null) + && (rateBasin.get(cBasin.getPfaf()) != null)) { + trd.setTableCellData( + 1, + new FFMPTableCellData(FIELDS.RATE, rateBasin.get( + cBasin.getPfaf()).getValue(resource.getPaintTime().getRefTime()))); + } else { + trd.setTableCellData(1, new FFMPTableCellData(FIELDS.RATE, + Float.NaN)); + } + if ((qpeBasin != null) + && (qpeBasin.get(cBasin.getPfaf()) != null)) { + qpe = qpeBasin.get(cBasin.getPfaf()).getAccumValue( + monitor.getQpeWindow().getAfterTime(), + monitor.getQpeWindow().getBeforeTime(), + expirationTime, isRate); + trd.setTableCellData(2, new FFMPTableCellData(FIELDS.QPE, + qpe)); + } else { + trd.setTableCellData(2, new FFMPTableCellData(FIELDS.QPE, + Float.NaN)); + } + if ((qpfBasin != null) + && (qpfBasin.get(cBasin.getPfaf()) != null)) { + trd.setTableCellData( + 3, + new FFMPTableCellData(FIELDS.QPF, new Float( + qpeBasin.get(cBasin.getPfaf()).getValue( + monitor.getQpfWindow() + .getAfterTime(), + monitor.getQpfWindow() + .getBeforeTime())) + .floatValue())); + } else { + trd.setTableCellData(3, new FFMPTableCellData(FIELDS.QPF, + Float.NaN)); + } + + // run over each guidance type + int i = 0; + for (String guidType : guidBasins.keySet()) { + FFFGForceUtil forceUtil = forceUtils.get(guidType); + forceUtil.setSliderTime(resource.getTime()); + + FFMPBasinData guidBasin = guidBasins.get(guidType); + + if (guidBasin != null) { + + FFMPGuidanceBasin basin = ((FFMPGuidanceBasin) guidBasin + .get(cBasin.getPfaf())); + guidance = resource.getGuidanceValue(basin, monitor + .getQpeWindow().getBeforeTime(), guidType); + + if (guidance < 0.0f) { + guidance = Float.NaN; + } + + forceUtil.calculateForcings(pfafs, ft, cBasin); + + ArrayList forcedPfafs = forceUtil + .getForcedPfafList(); + boolean forced = forceUtil.isForced(); + + if (!forced) { + if ((forcedPfafs != null) + && (forcedPfafs.size() > 0)) { + forced = true; + } + } + + trd.setTableCellData(i + 4, new FFMPTableCellData( + FIELDS.GUIDANCE, guidance, forced)); + } else { + trd.setTableCellData(i + 4, new FFMPTableCellData( + FIELDS.GUIDANCE, Float.NaN)); + } + if (!qpe.isNaN() && (guidance > 0.0f)) { + + trd.setTableCellData( + i + 5, + new FFMPTableCellData(FIELDS.RATIO, FFMPUtils + .getRatioValue(qpe, guidance))); + trd.setTableCellData( + i + 6, + new FFMPTableCellData(FIELDS.DIFF, FFMPUtils + .getDiffValue(qpe, guidance))); + } else { + trd.setTableCellData(i + 5, new FFMPTableCellData( + FIELDS.RATIO, Float.NaN)); + trd.setTableCellData(i + 6, new FFMPTableCellData( + FIELDS.DIFF, Float.NaN)); + } + + i += 3; + } + } + + } + + return trd; + } + + /** + * Gets the base field + * + * @return + * @throws VizException + */ + private FIELDS getBaseField() { + FIELDS field = null; + String huc = null; + dman = FFFGDataMgr.getInstance(); + + FfmpTableConfigData ffmpTableCfgData = FfmpTableConfig.getInstance() + .getTableConfigData(resource.getSiteKey()); + String qpfType = ffmpTableCfgData.getQpfType(); + ProductRunXML productRun = FFMPRunConfigurationManager.getInstance() + .getProduct(resource.getSiteKey()); + String qpfSource = productRun + .getQpfSources(resource.getProduct(), qpfType).get(0) + .getSourceName(); + + FFMPConfig config = FFMPConfig.getInstance(); + String includedCWAs = config.getFFMPConfigData().getIncludedCWAs(); + cwaArr = includedCWAs.split(","); + monitor.setQpfWindow(monitor.getTimeWindow(qpfSource, resource + .getPaintTime().getRefTime(), resource.getSiteKey())); + Date qpeTime = resource.getPaintTime().getRefTime(); + if (resource.isSplit()) { + // hack off the QPF duration for the table values of QPE (Split + // Window) + double duration = FFMPSourceConfigurationManager.getInstance() + .getSource(qpfSource).getDurationHour(); + qpeTime = new Date((long) (resource.getPaintTime().getRefTime() + .getTime() - (duration * 3600 * 1000))); + } + + monitor.setQpeWindow(new FFMPTimeWindow(resource.getTableTime(), + qpeTime)); + // set keys + String siteKey = resource.getSiteKey(); + String dataKey = resource.getDataKey(); + ProductXML product = resource.getProduct(); + + if (resource.isWorstCase() || (resource.centeredAggregationKey != null)) { + // make sure that "ALL" is loaded + huc = "ALL"; + + rateRecord = monitor.getRateRecord(product, siteKey, dataKey, + product.getRate(), resource.getPaintTime().getRefTime(), + huc, true); + qpeRecord = monitor.getQPERecord(product, siteKey, dataKey, + product.getQpe(), resource.getTableTime(), huc, true); + qpfRecord = monitor.getQPFRecord(product, siteKey, dataKey, null, + resource.getPaintTime().getRefTime(), huc, true); + guidRecords = monitor.getGuidanceRecords(product, siteKey, + resource.getTableTime(), huc, true); + virtualRecord = monitor.getVirtualRecord(product, siteKey, dataKey, + product.getVirtual(), resource.getTableTime(), huc, true); + } else { + rateRecord = monitor.getRateRecord(product, siteKey, dataKey, + product.getRate(), resource.getPaintTime().getRefTime(), + resource.getHuc(), true); + qpeRecord = monitor.getQPERecord(product, siteKey, dataKey, + product.getQpe(), resource.getTableTime(), + resource.getHuc(), true); + qpfRecord = monitor.getQPFRecord(product, siteKey, dataKey, null, + resource.getPaintTime().getRefTime(), resource.getHuc(), true); + guidRecords = monitor.getGuidanceRecords(product, siteKey, + resource.getTableTime(), resource.getHuc(), true); + if (resource.getHuc().equals("ALL")) { + virtualRecord = monitor.getVirtualRecord(product, siteKey, + dataKey, product.getVirtual(), resource.getTableTime(), + resource.getHuc(), true); + } + huc = resource.getHuc(); + } + + try { + if (rateRecord != null) { + rateBasin = rateRecord.getBasinData(huc); + if (rateBasin.getBasins().size() > 0) { + field = FIELDS.RATE; + baseRec = rateRecord; + } + } + if (qpeRecord != null) { + qpeBasin = qpeRecord.getBasinData(huc); + if (qpeBasin.getBasins().size() > 0) { + field = FIELDS.QPE; + baseRec = qpeRecord; + } + } + if (qpfRecord != null) { + qpfBasin = qpfRecord.getBasinData(huc); + } + if (guidRecords != null) { + guidBasins = new HashMap(); + for (String type : guidRecords.keySet()) { + if (guidRecords.get(type) != null) { + guidBasins.put(type, guidRecords.get(type) + .getBasinData(huc)); + } else { + guidBasins.put(type, null); + } + } + } + if (virtualRecord != null) { + virtualBasin = virtualRecord.getBasinData(huc); + } + + // Get interpolators + HashMap interpolators = resource + .getGuidanceInterpolators(); + if ((forceUtils == null) || (forceUtils.size() == 0)) { + forceUtils = new HashMap(); + + for (String guidType : interpolators.keySet()) { + FFFGForceUtil fu = new FFFGForceUtil(resource, guidType); + forceUtils.put(guidType, fu); + } + } + + } catch (Exception e) { + e.printStackTrace(); + statusHandler.handle(Priority.WARN, "field Not Available"); + } + + return field; + } - public FFMPDataGenerator(FFMPMonitor monitor, FFMPResource resource) { - this.tableConfig = FfmpTableConfig.getInstance(); - this.resource = resource; - this.monitor = monitor; - this.ft = monitor.getTemplates(resource.getSiteKey()); - this.time = resource.getTableTime(); - this.recentTime = resource.getPaintTime().getRefTime(); - this.primarySource = resource.getResourceData().getPrimarySourceXML(); - this.isRate = primarySource.isRate(); - this.expirationTime = primarySource.getExpirationMinutes(resource - .getSiteKey()) * 60 * 1000; - ffmpTableCfgData = tableConfig - .getTableConfigData(resource.getSiteKey()); - } - - public FFMPTableData generateFFMPData() throws Exception { - // You should always have at least a QPE data source - FFMPTableData tData = null; - // update the FFFGDataManager - FFFGDataMgr.getUpdatedInstance(); - tData = new FFMPTableData(); - - try { - FIELDS field = getBaseField(); - if (field != null) { - if (baseRec != null) { - FFMPBasinData fbd = null; - if (resource.centeredAggregationKey != null) { - fbd = baseRec.getBasinData("ALL"); - } else { - fbd = baseRec.getBasinData(resource.getHuc()); - } - - if (fbd.getBasins().size() > 0) { - if ((resource.centeredAggregationKey == null) - || resource.getHuc().equals("ALL")) { - // System.out.println(fbd.getBasins().keySet().size() - // + " rows in the table"); - for (Long key : fbd.getBasins().keySet()) { - if (resource.getHuc().equals("ALL")) { - for (DomainXML domain : resource - .getDomains()) { - FFMPBasinMetaData fmdb = ft.getBasin( - resource.getSiteKey(), key); - - if (fmdb == null) { - continue; - } - - if ((domain.getCwa().equals(fmdb - .getCwa())) - || (domain.isPrimary() && fmdb - .isPrimaryCwa())) { - - setFFMPRow(fbd.get(key), tData, - false, domain.getCwa()); - - if (virtualBasin != null) { - for (Long id : ft - .getVirtualGageBasinLookupIds( - resource.getSiteKey(), - key)) { - setFFMPRow( - virtualBasin - .get(id), - tData, true, domain - .getCwa()); - } - } - } - } - - } else { - /* - * make sure at least one basin in the agg - * is in the CWA - */ - - ArrayList pfafs = ft - .getAggregatePfafs(key, - resource.getSiteKey(), - resource.getHuc()); - - boolean isVGB = false; - if (ft.checkVGBsInAggregate(key, - resource.getSiteKey(), - resource.getHuc())) { - isVGB = true; - } - - if (pfafs.size() > 0) { - - FFMPBasinMetaData fmdb = ft - .getBasinInDomains( - resource.getSiteKey(), - resource.getDomains(), - pfafs); - - if (fmdb != null) { - try { - setFFMPRow(fbd.get(key), tData, - isVGB, null); - } catch (Exception e) { - e.printStackTrace(); - } - } - } - } - } - } - // show pfafs in aggregation - else { - for (Long key : resource - .getCenteredAggregatePfafs()) { - FFMPBasinMetaData fmdb = ft.getBasin( - resource.getSiteKey(), key); - - if (fmdb != null) { - setFFMPRow(fbd.get(key), tData, false, null); - // virtual basin - if (virtualBasin != null) { - for (Long id : ft - .getVirtualGageBasinLookupIds( - resource.getSiteKey(), - key)) { - setFFMPRow(virtualBasin.get(id), - tData, true, null); - } - } - } - } - } - - tData.sortData(); - } - } - } - } catch (Exception e) { - e.printStackTrace(); - } - - return tData; - } - - private void setFFMPRow(FFMPBasin cBasin, FFMPTableData tData, - boolean isVGB, String domain) { - try { - if (cBasin instanceof FFMPVirtualGageBasin) { - if (tData.containsPfaf(((FFMPVirtualGageBasin) cBasin).getLid() - .toString()) == true) { - return; - } - } else { - if (tData.containsPfaf(cBasin.getPfaf().toString()) == true) { - return; - } - } - } catch (Exception e) { - return; - } - - String displayName = ""; - String mouseOverText = ""; - - FFMPTableRowData trd = new FFMPTableRowData( - ffmpTableCfgData.getTableColumnKeys().length); - - Float guidance = Float.NaN; - Float qpe = Float.NaN; - Float rate = Float.NaN; - Float qpf = Float.NaN; - FIELDS rowField = FIELDS.NAME; - - if (isVGB) { - rowField = FIELDS.VIRTUAL; - } - - if (cBasin instanceof FFMPVirtualGageBasin) { - - rowField = FIELDS.VIRTUAL; - - displayName = ((FFMPVirtualGageBasin) cBasin).getLid(); - - if (displayName != null) { - - // in this special case it is actually the LID - trd.setPfaf(((FFMPVirtualGageBasin) cBasin).getLid()); - FFMPVirtualGageBasinMetaData fvgmbd = ft - .getVirtualGageBasinMetaData(resource.getSiteKey(), - ((FFMPVirtualGageBasin) cBasin).getLid()); - FFMPBasinMetaData metabasin = ft.getBasin( - resource.getSiteKey(), fvgmbd.getParentPfaf()); - Long parentBasinPfaf = fvgmbd.getParentPfaf(); - - if (fvgmbd != null) { - mouseOverText = metabasin.getBasinId() + "\n" - + fvgmbd.getLid() + "-" + fvgmbd.getName(); - - if (!resource.getHuc().equals("ALL")) { - displayName += "-" + fvgmbd.getName(); - } - } - - trd.setTableCellData(0, new FFMPTableCellData(rowField, - displayName, mouseOverText)); - - if (!resource.isWorstCase() || resource.getHuc().equals("ALL") - || (resource.centeredAggregationKey != null)) { - - if (cBasin.getValues().size() > 0) { - rate = ((FFMPVirtualGageBasin) cBasin) - .getValue(recentTime); - trd.setTableCellData(1, new FFMPTableCellData( - FIELDS.RATE, rate)); - } else { - trd.setTableCellData(1, new FFMPTableCellData( - FIELDS.RATE, Float.NaN)); - } - if (cBasin.getValues().size() > 0) { - - if (resource.getTime() > 0.00) { - - qpe = cBasin.getAccumValue(time, recentTime, - expirationTime, isRate); - } else { - qpe = 0.0f; - } - trd.setTableCellData(2, new FFMPTableCellData( - FIELDS.QPE, qpe)); - - } else { - trd.setTableCellData(2, new FFMPTableCellData( - FIELDS.QPE, Float.NaN)); - } - - if ((qpfBasin != null) - && (qpfBasin.get(parentBasinPfaf) != null)) { - qpf = qpfBasin.get(parentBasinPfaf).getValue( - monitor.getQpfWindow().getBeforeTime(), - monitor.getQpfWindow().getAfterTime()); - trd.setTableCellData(3, new FFMPTableCellData( - FIELDS.QPF, qpf)); - } else { - trd.setTableCellData(3, new FFMPTableCellData( - FIELDS.QPF, Float.NaN)); - } - - // run over each guidance type - int i = 0; - - for (String guidType : guidBasins.keySet()) { - ArrayList pfafList = new ArrayList(); - ArrayList forcedPfafs = new ArrayList(); - guidance = Float.NaN; - boolean forced = false; - FFFGForceUtil forceUtil = forceUtils.get(guidType); - FFMPBasinData guidBasin = guidBasins.get(guidType); - forceUtil.setSliderTime(resource.getTime()); - - if ((guidBasin != null) - && ((FFMPGuidanceBasin) guidBasin - .get(parentBasinPfaf) != null)) { - FFMPGuidanceBasin ffmpGuidBasin = ((FFMPGuidanceBasin) guidBasin - .get(parentBasinPfaf)); - - // If aggregate, get basins within the aggregate - if (cBasin.getAggregated()) { - if (domain == null) { - pfafList = ft.getAggregatePfafs( - cBasin.getPfaf(), - resource.getSiteKey(), - resource.getHuc()); - } else if (!domain.equals("NA")) { - if (!resource.getHuc().equals("ALL")) { - pfafList = ft - .getAggregatePfafsByDomain( - parentBasinPfaf, - resource.getSiteKey(), - domain, - resource.getHuc()); - } - } else { - pfafList = ft.getAggregatePfafsByDomain( - parentBasinPfaf, - resource.getSiteKey(), domain, - resource.getHuc()); - pfafList.add(ft.getAggregatedPfaf( - cBasin.getPfaf(), - resource.getSiteKey(), - resource.getHuc())); - } - } - - FFFGDataMgr fdm = FFFGDataMgr.getInstance(); - if ((cBasin.getPfaf() == 31055) - || (cBasin.getPfaf() == 2071284100000l)) { - System.out.println("Fouglas"); - } - - if (fdm.isForcingConfigured()) { - FFMPBasin parentBasin = baseRec.getBasinData( - "ALL").get(parentBasinPfaf); - forceUtil.calculateForcings(domain, ft, - parentBasin); - forcedPfafs = forceUtil.getForcedPfafList(); - forced = forceUtil.isForced(); - } - - if (((forcedPfafs.size() > 1)) && forced) { - // Recalculate the guidance using the forced - // value(s) - guidance = guidRecords - .get(guidType) - .getBasinData("ALL") - .getAverageGuidanceValue( - pfafList, - resource.getGuidanceInterpolators() - .get(guidType), - guidance, - forcedPfafs, - resource.getGuidSourceExpiration()); - } else if (forcedPfafs.size() > 1) { - guidance = guidRecords - .get(guidType) - .getBasinData("ALL") - .getAverageGuidanceValue( - pfafList, - resource.getGuidanceInterpolators() - .get(guidType), - Float.NaN, - forcedPfafs, - resource.getGuidSourceExpiration()); - forced = true; - } else if (pfafList.size() > 1) { - guidance = guidRecords - .get(guidType) - .getBasinData("ALL") - .getAverageGuidanceValue( - pfafList, - resource.getGuidanceInterpolators() - .get(guidType), - Float.NaN, - forcedPfafs, - resource.getGuidSourceExpiration()); - } else { - guidance = resource.getGuidanceValue( - ffmpGuidBasin, recentTime, guidType); - - if (guidance < 0.0f) { - guidance = Float.NaN; - } - } - - trd.setTableCellData(i + 4, new FFMPTableCellData( - FIELDS.GUIDANCE, guidance, forced)); - } else { - trd.setTableCellData(i + 4, new FFMPTableCellData( - FIELDS.GUIDANCE, Float.NaN)); - } - - if (!qpe.isNaN() && (guidance > 0.0f)) { - trd.setTableCellData( - i + 5, - new FFMPTableCellData(FIELDS.RATIO, - FFMPUtils.getRatioValue(qpe, - guidance))); - trd.setTableCellData( - i + 6, - new FFMPTableCellData(FIELDS.DIFF, - FFMPUtils.getDiffValue(qpe, - guidance))); - } else { - trd.setTableCellData(i + 5, new FFMPTableCellData( - FIELDS.RATIO, Float.NaN)); - trd.setTableCellData(i + 6, new FFMPTableCellData( - FIELDS.DIFF, Float.NaN)); - } - - i += 3; - } - } else { - trd = getMaxValue(trd, cBasin); - } - - tData.addDataRow(trd); - - } - } else { - displayName = getDisplayName(cBasin); - - if (displayName != null) { - trd.setPfaf(cBasin.getPfaf().toString()); - trd.setTableCellData(0, new FFMPTableCellData(rowField, - displayName, cBasin.getPfaf().toString() + "\n" - + displayName)); - - if (!resource.isWorstCase() || resource.getHuc().equals("ALL") - || (resource.centeredAggregationKey != null)) { - if ((rateBasin != null) - && (rateBasin.get(cBasin.getPfaf()) != null)) { - rate = rateBasin.get(cBasin.getPfaf()).getValue( - recentTime); - trd.setTableCellData(1, new FFMPTableCellData( - FIELDS.RATE, rate)); - // System.out.println("rate: "+rate); - } else { - trd.setTableCellData(1, new FFMPTableCellData( - FIELDS.RATE, Float.NaN)); - } - if ((qpeBasin != null) - && (qpeBasin.get(cBasin.getPfaf()) != null)) { - qpe = qpeBasin.get(cBasin.getPfaf()).getAccumValue( - time, recentTime, expirationTime, isRate); - // time, recentTime, expirationTime, isRate); - trd.setTableCellData(2, new FFMPTableCellData( - FIELDS.QPE, qpe)); - } else { - trd.setTableCellData(2, new FFMPTableCellData( - FIELDS.QPE, Float.NaN)); - } - if ((qpfBasin != null) - && (qpfBasin.get(cBasin.getPfaf()) != null)) { - /*qpf = qpfBasin.get(cBasin.getPfaf()).getValue( - monitor.getQpfWindow().getBeforeTime(), - monitor.getQpfWindow().getAfterTime());*/ - qpf = getQPFValue(false,cBasin.getPfaf(),new ArrayList());/*DR13839*/ - trd.setTableCellData(3, new FFMPTableCellData( - FIELDS.QPF, qpf)); - // System.out.println("qpf: "+qpf); - } else { - trd.setTableCellData(3, new FFMPTableCellData( - FIELDS.QPF, Float.NaN)); - } - - // run over each guidance type - int i = 0; - for (String guidType : guidBasins.keySet()) { - ArrayList pfafList = new ArrayList(); - ArrayList forcedPfafs = new ArrayList(); - guidance = Float.NaN; - boolean forced = false; - FFFGForceUtil forceUtil = forceUtils.get(guidType); - FFMPBasinData guidBasin = guidBasins.get(guidType); - forceUtil.setSliderTime(resource.getTime()); - - if ((guidBasin != null) - && ((FFMPGuidanceBasin) guidBasin.get(cBasin - .getPfaf()) != null)) { - FFMPGuidanceBasin ffmpGuidBasin = ((FFMPGuidanceBasin) guidBasin - .get(cBasin.getPfaf())); - - // If aggregate, get basins within the aggregate - if (cBasin.getAggregated()) { - if (domain == null) { - pfafList = ft.getAggregatePfafs( - cBasin.getPfaf(), - resource.getSiteKey(), - resource.getHuc()); - } else if (!domain.equals("NA")) { - if (!resource.getHuc().equals("ALL")) { - pfafList = ft - .getAggregatePfafsByDomain( - cBasin.getPfaf(), - resource.getSiteKey(), - domain, - resource.getHuc()); - } - } else { - pfafList = ft.getAggregatePfafsByDomain( - cBasin.getPfaf(), - resource.getSiteKey(), domain, - resource.getHuc()); - pfafList.add(ft.getAggregatedPfaf( - cBasin.getPfaf(), - resource.getSiteKey(), - resource.getHuc())); - } - } - - FFFGDataMgr fdm = FFFGDataMgr.getInstance(); - - if (fdm.isForcingConfigured()) { - forceUtil.calculateForcings(domain, ft, cBasin); - forcedPfafs = forceUtil.getForcedPfafList(); - forced = forceUtil.isForced(); - } - - if (((forcedPfafs.size() > 1)) && forced) { - // Recalculate the guidance using the forced - // value(s) - guidance = guidRecords - .get(guidType) - .getBasinData("ALL") - .getAverageGuidanceValue( - pfafList, - resource.getGuidanceInterpolators() - .get(guidType), - guidance, - forcedPfafs, - resource.getGuidSourceExpiration()); - } else if (forcedPfafs.size() > 1) { - guidance = guidRecords - .get(guidType) - .getBasinData("ALL") - .getAverageGuidanceValue( - pfafList, - resource.getGuidanceInterpolators() - .get(guidType), - Float.NaN, - forcedPfafs, - resource.getGuidSourceExpiration()); - forced = true; - } else if (pfafList.size() > 1) { - guidance = guidRecords - .get(guidType) - .getBasinData("ALL") - .getAverageGuidanceValue( - pfafList, - resource.getGuidanceInterpolators() - .get(guidType), - Float.NaN, - forcedPfafs, - resource.getGuidSourceExpiration()); - if (forcedPfafs.size() > 0) { - forced = true; - } - } else { - guidance = resource.getGuidanceValue( - ffmpGuidBasin, recentTime, guidType); - - if (guidance < 0.0f) { - guidance = Float.NaN; - } - } - - trd.setTableCellData(i + 4, new FFMPTableCellData( - FIELDS.GUIDANCE, guidance, forced)); - } else { - // check for forcing even if no data are available - guidance = getForcedAvg(forceUtil, domain, cBasin, - guidType); - if (guidance.isNaN() == false) { - forced = true; - } else { - forced = false; - } - - trd.setTableCellData(i + 4, new FFMPTableCellData( - FIELDS.GUIDANCE, guidance, forced)); - } - - if (!qpe.isNaN() && (guidance > 0.0f)) { - trd.setTableCellData( - i + 5, - new FFMPTableCellData(FIELDS.RATIO, - FFMPUtils.getRatioValue(qpe, - guidance))); - trd.setTableCellData( - i + 6, - new FFMPTableCellData(FIELDS.DIFF, - FFMPUtils.getDiffValue(qpe, - guidance))); - } else { - trd.setTableCellData(i + 5, new FFMPTableCellData( - FIELDS.RATIO, Float.NaN)); - trd.setTableCellData(i + 6, new FFMPTableCellData( - FIELDS.DIFF, Float.NaN)); - } - - i += 3; - } - } else { - trd = getMaxValue(trd, cBasin); - } - - tData.addDataRow(trd); - } - } - } - - private float getForcedAvg(FFFGForceUtil forceUtil, String domain, - FFMPBasin cBasin, String guidType) { - FFFGDataMgr fdm = FFFGDataMgr.getInstance(); - ArrayList forcedPfafs; - ArrayList pfafList = new ArrayList(); - float guidance = Float.NaN; - - boolean forced = false; - if (fdm.isForcingConfigured()) { - forceUtil.calculateForcings(domain, ft, cBasin); - forcedPfafs = forceUtil.getForcedPfafList(); - forced = forceUtil.isForced(); - if (forced == false) { - return Float.NaN; - } - } else { - return Float.NaN; - } - - if (cBasin.getAggregated()) { - if (domain == null) { - pfafList = ft.getAggregatePfafs(cBasin.getPfaf(), - resource.getSiteKey(), resource.getHuc()); - } else if (!domain.equals("NA")) { - if (!resource.getHuc().equals("ALL")) { - pfafList = ft.getAggregatePfafsByDomain(cBasin.getPfaf(), - resource.getSiteKey(), domain, resource.getHuc()); - } - } else { - pfafList = ft.getAggregatePfafsByDomain(cBasin.getPfaf(), - resource.getSiteKey(), domain, resource.getHuc()); - pfafList.add(ft.getAggregatedPfaf(cBasin.getPfaf(), - resource.getSiteKey(), resource.getHuc())); - } - } - - if (!resource.isWorstCase() || resource.getHuc().equals("ALL") - || (resource.centeredAggregationKey != null)) { - if (((forcedPfafs.size() > 1)) || forced) { - // Calculate an average - guidance = forceUtil.getAvgForcedValue(pfafList, forcedPfafs, - resource.getGuidanceInterpolators().get(guidType), - resource.getGuidSourceExpiration(), ft); - // } else if (forcedPfafs.size() > 1) { - // guidance = forceUtil.getAvgForcedValue(pfafList, - // forcedPfafs, - // resource.getGuidanceInterpolators().get(guidType), - // resource.getGuidSourceExpiration(), ft); - // forced = true; - } - } else { - // TODO Calculate a max value - - } - - return guidance; - } - - /** - * Regular basin display name - * - * @param basin - * @return - */ - private String getDisplayName(FFMPBasin basin) { - String name = null; - - try { - if (resource.getHuc().equals("ALL") - || (resource.centeredAggregationKey != null)) { - name = ft.getBasin(resource.getSiteKey(), basin.getPfaf()) - .getStreamName(); - } - // aggregations - else { - - ArrayList pfafs = ft.getAggregatePfafs(basin.getPfaf(), - resource.getSiteKey(), resource.getHuc()); - if (pfafs.size() > 0) { - if (resource.getHuc().equals("COUNTY")) { - name = ft.getCountyStateName(resource.getSiteKey(), - basin.getPfaf()); - } else { - for (int i = 0; i < pfafs.size(); i++) { - if (ft.getBasin(resource.getSiteKey(), pfafs.get(0)) - .getHucName() != null) { - name = ft.getBasin(resource.getSiteKey(), - pfafs.get(0)).getHucName(); - break; - } - } - } - } - } - } catch (Exception e) { - statusHandler.handle(Priority.WARN, "No display name for basin.." - + basin.getPfaf()); - } - return name; - } - - private FFMPTableRowData getMaxValue(FFMPTableRowData trd, FFMPBasin cBasin) { - ArrayList domainList = FFMPRunConfigurationManager - .getInstance().getDomains(); - ArrayList activeDomains = new ArrayList(); - for (DomainXML domainXml : domainList) { - for (String cwa : cwaArr) { - if (domainXml.getCwa().equalsIgnoreCase(cwa)) { - activeDomains.add(domainXml); - break; - } - } - } - - ArrayList pfafs = ft.getAggregatePfafs(cBasin.getPfaf(), - resource.getSiteKey(), resource.getHuc(), activeDomains); - trd.setPfaf(cBasin.getPfaf().toString()); - Float qpe = Float.NaN; - Float guidance = Float.NaN; - Float rate = Float.NaN; - Float qpf = Float.NaN; - - if (cBasin instanceof FFMPVirtualGageBasin) { - if (pfafs.size() == 0) { - if (virtualBasin != null) { - trd.setTableCellData( - 1, - new FFMPTableCellData(FIELDS.RATE, virtualBasin - .get(cBasin.getPfaf()).getValue(recentTime))); - } else { - trd.setTableCellData(1, new FFMPTableCellData(FIELDS.RATE, - Float.NaN)); - } - if (virtualBasin != null) { - if (resource.getTime() > 0.00) { - qpe = virtualBasin.get(cBasin.getPfaf()).getAccumValue( - time, recentTime, expirationTime, isRate); - } else { - qpe = 0.0f; - } - - trd.setTableCellData(2, new FFMPTableCellData(FIELDS.QPE, - qpe)); - - } else { - trd.setTableCellData(2, new FFMPTableCellData(FIELDS.QPE, - Float.NaN)); - } - if (qpfBasin != null) { - trd.setTableCellData( - 3, - new FFMPTableCellData(FIELDS.QPF, new Float( - qpeBasin.get(cBasin.getPfaf()).getValue( - monitor.getQpfWindow() - .getBeforeTime(), - monitor.getQpfWindow() - .getAfterTime())) - .floatValue())); - } else { - trd.setTableCellData(3, new FFMPTableCellData(FIELDS.QPF, - Float.NaN)); - } - - // run over each guidance type - int i = 0; - for (String guidType : guidBasins.keySet()) { - FFFGForceUtil forceUtil = forceUtils.get(guidType); - forceUtil.setSliderTime(resource.getTime()); - - FFMPBasinData guidBasin = guidBasins.get(guidType); - - if (guidBasin != null) { - - FFMPGuidanceBasin basin = ((FFMPGuidanceBasin) guidBasin - .get(cBasin.getPfaf())); - guidance = resource.getGuidanceValue(basin, recentTime, - guidType); - - forceUtil.calculateForcings(pfafs, ft, cBasin); - - ArrayList forcedPfafs = forceUtil - .getForcedPfafList(); - boolean forced = forceUtil.isForced(); - - if (!forced) { - if ((forcedPfafs != null) - && (forcedPfafs.size() > 0)) { - forced = true; - } - } - - trd.setTableCellData(i + 4, new FFMPTableCellData( - FIELDS.GUIDANCE, guidance, forced)); - } else { - trd.setTableCellData(i + 4, new FFMPTableCellData( - FIELDS.GUIDANCE, Float.NaN)); - } - if (!qpe.isNaN() && (guidance > 0.0f)) { - - trd.setTableCellData( - i + 5, - new FFMPTableCellData(FIELDS.RATIO, FFMPUtils - .getRatioValue(qpe, guidance))); - trd.setTableCellData( - i + 6, - new FFMPTableCellData(FIELDS.DIFF, FFMPUtils - .getDiffValue(qpe, guidance))); - } else { - trd.setTableCellData(i + 5, new FFMPTableCellData( - FIELDS.RATIO, Float.NaN)); - trd.setTableCellData(i + 6, new FFMPTableCellData( - FIELDS.DIFF, Float.NaN)); - } - - i += 3; - } - } - - } else { - if (pfafs.size() > 0) { - if (rateBasin != null) { - rate = rateBasin.getMaxValue(pfafs, recentTime); - trd.setTableCellData(1, new FFMPTableCellData(FIELDS.RATE, - rate)); - } else { - trd.setTableCellData(1, new FFMPTableCellData(FIELDS.RATE, - Float.NaN)); - } - if (qpeBasin != null) { - qpe = qpeBasin.getAccumMaxValue(pfafs, time, recentTime, - expirationTime, isRate); - trd.setTableCellData(2, new FFMPTableCellData(FIELDS.QPE, - qpe)); - } else { - trd.setTableCellData(2, new FFMPTableCellData(FIELDS.QPE, - Float.NaN)); - } - if (qpfBasin != null) { - /*qpf = qpfBasin.getMaxValue(pfafs, monitor.getQpfWindow() - .getBeforeTime(), monitor.getQpfWindow() - .getAfterTime());*/ - - qpf = getQPFValue(true,new Long(0l),pfafs);/*DR13839*/ - trd.setTableCellData(3, new FFMPTableCellData(FIELDS.QPF, - qpf.floatValue())); - } else { - trd.setTableCellData(3, new FFMPTableCellData(FIELDS.QPF, - Float.NaN)); - } - - // run over each guidance type - int i = 0; - for (String guidType : guidBasins.keySet()) { - FFFGForceUtil forceUtil = forceUtils.get(guidType); - forceUtil.setSliderTime(resource.getTime()); - - FFMPBasinData guidBasin = guidBasins.get(guidType); - - ArrayList pfafList = new ArrayList(); - if ((guidBasin != null) - && (guidBasin.getBasins().size() > 0)) { - if (cBasin.getAggregated()) { - pfafList = ft.getAggregatePfafs(cBasin.getPfaf(), - resource.getSiteKey(), resource.getHuc()); - pfafList.add(ft.getAggregatedPfaf(cBasin.getPfaf(), - resource.getSiteKey(), resource.getHuc())); - } - - boolean forced = false; - ArrayList forcedPfafs = new ArrayList(); - FFFGDataMgr fdm = FFFGDataMgr.getInstance(); - - if (fdm.isForcingConfigured()) { - forceUtil.calculateForcings(pfafList, ft, cBasin); - forcedPfafs = forceUtil.getForcedPfafList(); - forced = forceUtil.isForced(); - } - - if (!forced) { - if ((forcedPfafs != null) - && (forcedPfafs.size() > 0)) { - forced = true; - } - } - - if (resource.isWorstCase()) { - guidance = guidRecords - .get(guidType) - .getBasinData("ALL") - .getMaxGuidanceValue( - pfafs, - resource.getGuidanceInterpolators() - .get(guidType), - resource.getGuidSourceExpiration(), - cBasin.getPfaf()); - } else { - FFMPGuidanceBasin basin = (FFMPGuidanceBasin) guidRecords - .get(guidType) - .getBasinData(resource.getHuc()) - .get(cBasin.getPfaf()); - guidance = resource.getGuidanceValue(basin, - recentTime, guidType); - } - - trd.setTableCellData(i + 4, new FFMPTableCellData( - FIELDS.GUIDANCE, guidance, forced)); - } else { - trd.setTableCellData(i + 4, new FFMPTableCellData( - FIELDS.GUIDANCE, Float.NaN)); - } - if (!qpe.isNaN() && (guidance > 0.0f)) { - - ArrayList qpes = qpeBasin.getAccumValues(pfafs, - time, recentTime, expirationTime, isRate); - ArrayList guids = null; - if (guidBasin != null) { - guids = guidBasin.getGuidanceValues(pfafs, resource - .getGuidanceInterpolators().get(guidType), - resource.getGuidSourceExpiration()); - } - - if ((qpes.size() > 0) - && ((guids != null) && (guids.size() > 0))) { - - trd.setTableCellData( - i + 5, - new FFMPTableCellData(FIELDS.RATIO, - FFMPUtils.getMaxRatioValue(qpes, - guids))); - trd.setTableCellData( - i + 6, - new FFMPTableCellData(FIELDS.DIFF, - FFMPUtils.getMaxDiffValue(qpes, - guids))); - } else { - trd.setTableCellData(i + 5, new FFMPTableCellData( - FIELDS.RATIO, Float.NaN)); - trd.setTableCellData(i + 6, new FFMPTableCellData( - FIELDS.DIFF, Float.NaN)); - } - } else { - trd.setTableCellData(i + 5, new FFMPTableCellData( - FIELDS.RATIO, Float.NaN)); - trd.setTableCellData(i + 6, new FFMPTableCellData( - FIELDS.DIFF, Float.NaN)); - } - - i += 3; - } - - } else { - if ((rateBasin != null) - && (rateBasin.get(cBasin.getPfaf()) != null)) { - trd.setTableCellData( - 1, - new FFMPTableCellData(FIELDS.RATE, rateBasin.get( - cBasin.getPfaf()).getValue( - monitor.getRateWindow().getBeforeTime(), - monitor.getRateWindow().getAfterTime()))); - } else { - trd.setTableCellData(1, new FFMPTableCellData(FIELDS.RATE, - Float.NaN)); - } - if ((qpeBasin != null) - && (qpeBasin.get(cBasin.getPfaf()) != null)) { - qpe = qpeBasin.get(cBasin.getPfaf()).getAccumValue(time, - recentTime, expirationTime, isRate); - trd.setTableCellData(2, new FFMPTableCellData(FIELDS.QPE, - qpe)); - } else { - trd.setTableCellData(2, new FFMPTableCellData(FIELDS.QPE, - Float.NaN)); - } - if ((qpfBasin != null) - && (qpfBasin.get(cBasin.getPfaf()) != null)) { - trd.setTableCellData( - 3, - new FFMPTableCellData(FIELDS.QPF, new Float( - qpeBasin.get(cBasin.getPfaf()).getValue( - monitor.getQpfWindow() - .getBeforeTime(), - monitor.getQpfWindow() - .getAfterTime())) - .floatValue())); - } else { - trd.setTableCellData(3, new FFMPTableCellData(FIELDS.QPF, - Float.NaN)); - } - - // run over each guidance type - int i = 0; - for (String guidType : guidBasins.keySet()) { - FFFGForceUtil forceUtil = forceUtils.get(guidType); - forceUtil.setSliderTime(resource.getTime()); - - FFMPBasinData guidBasin = guidBasins.get(guidType); - - if (guidBasin != null) { - - FFMPGuidanceBasin basin = ((FFMPGuidanceBasin) guidBasin - .get(cBasin.getPfaf())); - guidance = resource.getGuidanceValue(basin, recentTime, - guidType); - - if (guidance < 0.0f) { - guidance = Float.NaN; - } - - forceUtil.calculateForcings(pfafs, ft, cBasin); - - ArrayList forcedPfafs = forceUtil - .getForcedPfafList(); - boolean forced = forceUtil.isForced(); - - if (!forced) { - if ((forcedPfafs != null) - && (forcedPfafs.size() > 0)) { - forced = true; - } - } - - trd.setTableCellData(i + 4, new FFMPTableCellData( - FIELDS.GUIDANCE, guidance, forced)); - } else { - trd.setTableCellData(i + 4, new FFMPTableCellData( - FIELDS.GUIDANCE, Float.NaN)); - } - if (!qpe.isNaN() && (guidance > 0.0f)) { - - trd.setTableCellData( - i + 5, - new FFMPTableCellData(FIELDS.RATIO, FFMPUtils - .getRatioValue(qpe, guidance))); - trd.setTableCellData( - i + 6, - new FFMPTableCellData(FIELDS.DIFF, FFMPUtils - .getDiffValue(qpe, guidance))); - } else { - trd.setTableCellData(i + 5, new FFMPTableCellData( - FIELDS.RATIO, Float.NaN)); - trd.setTableCellData(i + 6, new FFMPTableCellData( - FIELDS.DIFF, Float.NaN)); - } - - i += 3; - } - } - - } - - return trd; - } - - /** - * Gets the base field - * - * @return - * @throws VizException - */ - private FIELDS getBaseField() { - FIELDS field = null; - String huc = null; - dman = FFFGDataMgr.getInstance(); - - FfmpTableConfigData ffmpTableCfgData = FfmpTableConfig.getInstance() - .getTableConfigData(resource.getSiteKey()); - String qpfType = ffmpTableCfgData.getQpfType(); - ProductRunXML productRun = FFMPRunConfigurationManager.getInstance() - .getProduct(resource.getSiteKey()); - String qpfSource = productRun - .getQpfSources(resource.getProduct(), qpfType).get(0) - .getSourceName(); - - FFMPConfig config = FFMPConfig.getInstance(); - String includedCWAs = config.getFFMPConfigData().getIncludedCWAs(); - cwaArr = includedCWAs.split(","); - - if (monitor.getQpfWindow() == null) { - monitor.setQpfWindow(monitor.getTimeWindow(qpfSource, - resource.getTableTime(), resource.getSiteKey())); - } - if (monitor.getQpeWindow() == null) { - monitor.setQpeWindow(new FFMPTimeWindow(resource.getTableTime(), - recentTime)); - } - if (monitor.getRateWindow() == null) { - monitor.setRateWindow(monitor.getTimeWindow(resource.getProduct() - .getRate(), recentTime, resource.getSiteKey())); - } - - String siteKey = resource.getSiteKey(); - String dataKey = resource.getDataKey(); - ProductXML product = resource.getProduct(); - - if (resource.isWorstCase() || (resource.centeredAggregationKey != null)) { - // make sure that "ALL" is loaded - huc = "ALL"; - - rateRecord = monitor.getRateRecord(product, siteKey, dataKey, - product.getRate(), recentTime, huc, true); - qpeRecord = monitor.getQPERecord(product, siteKey, dataKey, - product.getQpe(), time, huc, true); - qpfRecord = monitor.getQPFRecord(product, siteKey, dataKey, null, - time, huc, true); - guidRecords = monitor.getGuidanceRecords(product, siteKey, time, - huc, true); - virtualRecord = monitor.getVirtualRecord(product, siteKey, dataKey, - product.getVirtual(), time, huc, true); - } else { - rateRecord = monitor.getRateRecord(product, siteKey, dataKey, - product.getRate(), recentTime, resource.getHuc(), true); - qpeRecord = monitor.getQPERecord(product, siteKey, dataKey, - product.getQpe(), time, resource.getHuc(), true); - qpfRecord = monitor.getQPFRecord(product, siteKey, dataKey, null, - time, resource.getHuc(), true); - guidRecords = monitor.getGuidanceRecords(product, siteKey, time, - resource.getHuc(), true); - if (resource.getHuc().equals("ALL")) { - virtualRecord = monitor.getVirtualRecord(product, siteKey, - dataKey, product.getVirtual(), time, resource.getHuc(), - true); - } - huc = resource.getHuc(); - } - - try { - if (rateRecord != null) { - rateBasin = rateRecord.getBasinData(huc); - if (rateBasin.getBasins().size() > 0) { - field = FIELDS.RATE; - baseRec = rateRecord; - } - } - if (qpeRecord != null) { - qpeBasin = qpeRecord.getBasinData(huc); - if (qpeBasin.getBasins().size() > 0) { - field = FIELDS.QPE; - baseRec = qpeRecord; - } - } - if (qpfRecord != null) { - qpfBasin = qpfRecord.getBasinData(huc); - } - if (guidRecords != null) { - guidBasins = new HashMap(); - for (String type : guidRecords.keySet()) { - if (guidRecords.get(type) != null) { - guidBasins.put(type, guidRecords.get(type) - .getBasinData(huc)); - } else { - guidBasins.put(type, null); - } - } - } - if (virtualRecord != null) { - virtualBasin = virtualRecord.getBasinData(huc); - } - - // Get interpolators - HashMap interpolators = resource - .getGuidanceInterpolators(); - if ((forceUtils == null) || (forceUtils.size() == 0)) { - forceUtils = new HashMap(); - - for (String guidType : interpolators.keySet()) { - FFFGForceUtil fu = new FFFGForceUtil(resource, guidType); - forceUtils.put(guidType, fu); - } - } - - } catch (Exception e) { - e.printStackTrace(); - statusHandler.handle(Priority.WARN, "field Not Available"); - } - - return field; - } - - /** - * DR13839: Basin Table QPF should match independent QPFSCAN display. - * Since the latter use FFMPResource.getPaintTime().getRefTime() - * in FFMPResource.inspect(), it used here as well. - * @param isMax: if the Maximum value is required; - * @param p: the pfafs value for a basin, not used if isMax true; - * @param pfafs: a list of pfafs values, not used if isMax false. - * @return: the qpf value. - */ - private float getQPFValue(boolean isMax, Long p, ArrayList pfafs){ - return isMax - ? qpfBasin.getMaxValue(pfafs, resource.getPaintTime().getRefTime()) - : qpfBasin.get(p).getValue(resource.getPaintTime().getRefTime()); - } } diff --git a/cave/com.raytheon.uf.viz.monitor.ffmp/src/com/raytheon/uf/viz/monitor/ffmp/ui/rsc/FFMPDataLoader.java b/cave/com.raytheon.uf.viz.monitor.ffmp/src/com/raytheon/uf/viz/monitor/ffmp/ui/rsc/FFMPDataLoader.java index 2b5fda9f76..bed5a74482 100644 --- a/cave/com.raytheon.uf.viz.monitor.ffmp/src/com/raytheon/uf/viz/monitor/ffmp/ui/rsc/FFMPDataLoader.java +++ b/cave/com.raytheon.uf.viz.monitor.ffmp/src/com/raytheon/uf/viz/monitor/ffmp/ui/rsc/FFMPDataLoader.java @@ -67,9 +67,7 @@ public class FFMPDataLoader extends Thread { private static final transient IUFStatusHandler statusHandler = UFStatus .getHandler(FFMPDataLoader.class); - private static String sharePath = AppsDefaults.getInstance().getToken( - "apps_dir") - + File.separator + "ffmp" + File.separator; + private String sharePath = null; private ProductXML product = null; @@ -103,6 +101,7 @@ public class FFMPDataLoader extends Thread { sharePath = AppsDefaults.getInstance().getToken("apps_dir") + File.separator + "ffmp" + File.separator; + //sharePath = "/awips2/edex/data/share/hydroapps/ffmp/"; this.product = resourceData.getProduct(); this.siteKey = resourceData.siteKey; @@ -309,11 +308,11 @@ public class FFMPDataLoader extends Thread { source.getSourceName(), phuc); } } - if (isUrisProcessNeeded(qpfData,qpfURIs)) {/*DR13839*/ - /*if ((qpfData == null) && !qpfURIs.isEmpty()) { + //if (isUrisProcessNeeded(qpfData,qpfURIs)) {/*DR13839*/ + if ((qpfData == null) && !qpfURIs.isEmpty()) { if (phuc.equals(config.getFFMPConfigData() - .getLayer())) { old code: keep for reference*/ - if (isHucProcessNeeded(phuc)) {/*DR13839*/ + .getLayer())) { //old code: keep for reference*/ + //if (isHucProcessNeeded(phuc)) {/*DR13839*/ getMonitor().processUris(qpfURIs, isProductLoad, siteKey, product.getQpf(i), timeBack, phuc, @@ -518,25 +517,4 @@ public class FFMPDataLoader extends Thread { } - /** - * DR13839: Basin Table QPF should match independent QPFSCAN display. - * Old code: qpfData==null in if statement causing some uris not processed. - * @param qpfData: FFMPBasinData read from file; - * @param qpfURIs: qpf uris. - * @return: true if qpf uris not empty. - */ - private boolean isUrisProcessNeeded(FFMPBasinData qpfData, NavigableMap> qpfURIs){ - return ! qpfURIs.isEmpty(); - } - - /** - * DR13839: Basin Table QPF should match independent QPFSCAN display. - * with phuc is ALL allows matching independent QPFSCAN values. - * @param phuc: the huc string of a basin; - * @return: true if the huc needs processing. - */ - private boolean isHucProcessNeeded(String phuc){ - return "ALL".equals(phuc); //config.getFFMPConfigData().getLayer().equals(phuc); - } - } \ No newline at end of file diff --git a/cave/com.raytheon.uf.viz.monitor.ffmp/src/com/raytheon/uf/viz/monitor/ffmp/ui/rsc/FFMPResource.java b/cave/com.raytheon.uf.viz.monitor.ffmp/src/com/raytheon/uf/viz/monitor/ffmp/ui/rsc/FFMPResource.java index cc20f9fe31..010cb50ffb 100644 --- a/cave/com.raytheon.uf.viz.monitor.ffmp/src/com/raytheon/uf/viz/monitor/ffmp/ui/rsc/FFMPResource.java +++ b/cave/com.raytheon.uf.viz.monitor.ffmp/src/com/raytheon/uf/viz/monitor/ffmp/ui/rsc/FFMPResource.java @@ -134,13 +134,13 @@ import com.vividsolutions.jts.geom.Point; /** * Resource to display FFMP data + * *
  * SOFTWARE HISTORY
  * Date         Ticket#    Engineer    Description
  * ------------ ---------- ----------- --------------------------
  * 29 June, 2009 2521          dhladky     Initial creation
  * 11 Apr.  2012 DR 14522      gzhang      Fixing invalid thread error.
- * 16 Apr.  2012 DR 14511      gzhang      Handling NullPointer in getGraphData()
  * 
* @author dhladky * @version 1.0 @@ -207,7 +207,7 @@ public class FFMPResource extends private IShadedShape streamShadedShape = null; /** always the same vertexes, one for each CWA **/ - private FFMPShapeContainer shadedShapes = new FFMPShapeContainer(); + private FFMPShapeContainer shadedShapes = new FFMPShapeContainer(); /** Basin shaded shape **/ protected ConcurrentHashMap drawables = new ConcurrentHashMap(); @@ -297,6 +297,9 @@ public class FFMPResource extends /** show ffmp color display */ private boolean showFfmpData = true; + + /** qpf split window */ + private boolean isSplit = false; /** aggregation for centering **/ public Object centeredAggregationKey = null; @@ -470,15 +473,12 @@ public class FFMPResource extends } issueRefresh(); } - + @Override public void hucChanged() { center = null; lowestCenter = FFMPRecord.ZOOM.WFO; - // setQuery(true); - centeredAggregationKey = null; - centeredAggregatePfafList = null; if (isAutoRefresh()) { setQuery(true); @@ -1275,7 +1275,7 @@ public class FFMPResource extends } // the product string - if (isFfmpDataToggle()) { + if (isFfmpDataToggle() && fieldDescString != null) { paintProductString(aTarget, paintProps); } } @@ -1463,7 +1463,13 @@ public class FFMPResource extends @Override public void project(CoordinateReferenceSystem mapData) throws VizException { - clear(); + + if (shadedShapes != null) { + shadedShapes.clear(); + } + + setQuery(true); + refresh(); } protected String getGeometryType() { @@ -1534,8 +1540,13 @@ public class FFMPResource extends try { FFMPBasinMetaData metaBasin = monitor.getTemplates(getSiteKey()) .findBasinByLatLon(getSiteKey(), coord.asLatLon()); - if (getHuc().equals("ALL") || (centeredAggregationKey != null)) { + if (getHuc().equals("ALL") || centeredAggregationKey != null) { pfaf = metaBasin.getPfaf(); + if (isMaintainLayer) { + pfaf = monitor.getTemplates(getSiteKey()).findAggregatedPfaf( + pfaf, getSiteKey(), getHuc()); + aggregate = true; + } } else { pfaf = monitor.getTemplates(getSiteKey()).findAggregatedPfaf( metaBasin.getPfaf(), getSiteKey(), getHuc()); @@ -1730,8 +1741,10 @@ public class FFMPResource extends } // reset the screen as if it where a pan - getDescriptor().getRenderableDisplay().recenter( - new double[] { center.x, center.y }); + if (center != null) { + getDescriptor().getRenderableDisplay().recenter( + new double[] { center.x, center.y }); + } } /** @@ -1956,6 +1969,8 @@ public class FFMPResource extends for (Entry entry : drawables.entrySet()) { entry.getValue().dispose(); } + + drawables.clear(); } } @@ -2502,11 +2517,11 @@ public class FFMPResource extends // the // the basin when the color map changes. if (globalRegen || drawable.genCwa(cwa)) { - // System.out - // .println("Regenerating the entire image: CWA: +" - // + cwa - // + " Table:" - // + resourceData.tableLoad); + //System.out + //.println("Regenerating the entire image: CWA: +" + //+ cwa + //+ " Table:" + //+ resourceData.tableLoad); // get base aggr basins that are in screen area Set cwaPfafs = null; cwaPfafs = getAreaBasins(cwa, req, phuc); @@ -2980,7 +2995,6 @@ public class FFMPResource extends } updateDialog(); - } @Override @@ -2990,7 +3004,15 @@ public class FFMPResource extends centeredAggregationKey = null; centeredAggregatePfafList = null; - hucChanged(); + if (isAutoRefresh) { + if (basinTableDlg != null) { + // Gets rid of the aggregate name if it is zoomed into one + basinTableDlg.blankGroupLabel(); + } + clearTables(); + hucChanged(); + refresh(); + } updateDialog(); } @@ -2999,9 +3021,12 @@ public class FFMPResource extends public void timeChanged(FFMPTimeChangeEvent fhce, FFMPRecord.FIELDS fieldArg) throws VizException { - if ((Double) fhce.getSource() != time) { + FFMPTime ffmpTime = (FFMPTime) fhce.getSource(); + + if (ffmpTime.getTime() != time || isSplit != ffmpTime.isSplit()) { - setTime((Double) fhce.getSource()); + isSplit = ffmpTime.isSplit(); + setTime(ffmpTime.getTime()); setTableTime(); if (interpolationMap != null) { interpolationMap.clear(); @@ -3147,27 +3172,27 @@ public class FFMPResource extends Long dataId = null; FFMPVirtualGageBasinMetaData fvgbmd = null; FFMPBasin basin = null; + // System.out.println("*************************************************"); - //DR 14511: handle null pointer exceptions - try { + + try { basinPfaf = Long.parseLong(pfafString); dataId = basinPfaf; - } catch (NumberFormatException nfe) { + } catch (NumberFormatException nfe) { // can't parse a string for VGB - fvgbmd = monitor.getTemplates(getSiteKey()).getVirtualGageBasinMetaData(getSiteKey(), pfafString); + fvgbmd = monitor.getTemplates(getSiteKey()) + .getVirtualGageBasinMetaData(getSiteKey(), pfafString); basinPfaf = fvgbmd.getParentPfaf(); dataId = fvgbmd.getLookupId(); - } - FFMPBasinMetaData mBasin = null; - try{ - mBasin = monitor.getTemplates(getSiteKey()).getBasin(getSiteKey(), basinPfaf); - }catch (Exception e){ return null;} - /*getSiteKey(), basinPfaf);*/ /* + } + + FFMPBasinMetaData mBasin = monitor.getTemplates(getSiteKey()).getBasin( + getSiteKey(), basinPfaf); /* * TODO: mBasin is never used so it is * not clear if this should be * basinPfaf or dataId */ - if(mBasin == null) return null; + FFMPGraphData fgd = null; // VGB if (fvgbmd != null) { @@ -3823,6 +3848,10 @@ public class FFMPResource extends public boolean isLinkToFrame() { return isLinkToFrame; } + + public boolean isSplit() { + return isSplit; + } /** * gets the list of the current centered agg diff --git a/cave/com.raytheon.uf.viz.monitor.ffmp/src/com/raytheon/uf/viz/monitor/ffmp/ui/rsc/FFMPShapeContainer.java b/cave/com.raytheon.uf.viz.monitor.ffmp/src/com/raytheon/uf/viz/monitor/ffmp/ui/rsc/FFMPShapeContainer.java index a119b26eaf..88c45e0396 100644 --- a/cave/com.raytheon.uf.viz.monitor.ffmp/src/com/raytheon/uf/viz/monitor/ffmp/ui/rsc/FFMPShapeContainer.java +++ b/cave/com.raytheon.uf.viz.monitor.ffmp/src/com/raytheon/uf/viz/monitor/ffmp/ui/rsc/FFMPShapeContainer.java @@ -106,5 +106,13 @@ public class FFMPShapeContainer { return shape; } + + /** + * clears the shapes + * @return + */ + public void clear() { + shadedShapes.clear(); + } } diff --git a/cave/com.raytheon.uf.viz.monitor.ffmp/src/com/raytheon/uf/viz/monitor/ffmp/ui/rsc/FFMPTableDataLoader.java b/cave/com.raytheon.uf.viz.monitor.ffmp/src/com/raytheon/uf/viz/monitor/ffmp/ui/rsc/FFMPTableDataLoader.java index d89908e31a..7aba78010f 100644 --- a/cave/com.raytheon.uf.viz.monitor.ffmp/src/com/raytheon/uf/viz/monitor/ffmp/ui/rsc/FFMPTableDataLoader.java +++ b/cave/com.raytheon.uf.viz.monitor.ffmp/src/com/raytheon/uf/viz/monitor/ffmp/ui/rsc/FFMPTableDataLoader.java @@ -125,7 +125,7 @@ public class FFMPTableDataLoader implements Runnable { } if (drawable.getTableData(iHuc) != null) { - System.out.println(" Cache HITTTTTTTTT!!!!!"); + //System.out.println(" Cache HITTTTTTTTT!!!!!"); tData = drawable.getTableData(iHuc); } } @@ -140,8 +140,8 @@ public class FFMPTableDataLoader implements Runnable { iHuc = "ALL"; } - System.out - .println(" Cache MISSSSSSSSSSSS!!!!!"); + //System.out + // .println(" Cache MISSSSSSSSSSSS!!!!!"); FFMPDataGenerator dg = new FFMPDataGenerator( ffmp, resource); tData = dg.generateFFMPData(); diff --git a/cave/com.raytheon.uf.viz.monitor.ffmp/src/com/raytheon/uf/viz/monitor/ffmp/ui/rsc/FFMPTime.java b/cave/com.raytheon.uf.viz.monitor.ffmp/src/com/raytheon/uf/viz/monitor/ffmp/ui/rsc/FFMPTime.java new file mode 100644 index 0000000000..d877951e78 --- /dev/null +++ b/cave/com.raytheon.uf.viz.monitor.ffmp/src/com/raytheon/uf/viz/monitor/ffmp/ui/rsc/FFMPTime.java @@ -0,0 +1,37 @@ +package com.raytheon.uf.viz.monitor.ffmp.ui.rsc; + +/** + * Time object + * + *
+ * SOFTWARE HISTORY
+ * Date         Ticket#    Engineer    Description
+ * ------------ ---------- ----------- --------------------------
+ * 22 April, 2012 2521          dhladky     Initial creation
+ * 
+ * + * @author dhladky + * @version 1.0 + */ + + +public class FFMPTime { + + public double time = 0.0; + public boolean split = false; + + public FFMPTime(double time, boolean split) { + this.time = time; + this.split = split; + } + + public double getTime() { + return time; + } + + public boolean isSplit() { + return split; + } + +} + diff --git a/cave/com.raytheon.uf.viz.monitor.fog/src/com/raytheon/uf/viz/monitor/fog/FogMonitor.java b/cave/com.raytheon.uf.viz.monitor.fog/src/com/raytheon/uf/viz/monitor/fog/FogMonitor.java index 99b14c299a..c9f8cc9aa3 100644 --- a/cave/com.raytheon.uf.viz.monitor.fog/src/com/raytheon/uf/viz/monitor/fog/FogMonitor.java +++ b/cave/com.raytheon.uf.viz.monitor.fog/src/com/raytheon/uf/viz/monitor/fog/FogMonitor.java @@ -77,6 +77,8 @@ import com.vividsolutions.jts.geom.Geometry; * 3/2/2009 2047 grichard Added stationName array. * 10/7/2009 **** dhladky reworked * 11/30/2009 3424 Zhidong/Slav/Wen Adds stationTableData to keep station info. + * May 15, 2012 14510 zhao Modified processing at startup + * * * * @author dhladky @@ -157,7 +159,8 @@ public class FogMonitor extends ObsMonitor implements IFogResourceListener { monitor.createDataStructures(); monitor.getAdjAreas(); monitor.processProductAtStartup("fog"); - } + monitor.fireMonitorEvent(monitor); + } return monitor; } @@ -585,4 +588,12 @@ public class FogMonitor extends ObsMonitor implements IFogResourceListener { this.geoAdjAreas = geoAdjAreas; } + @Override + protected void processAtStartup(ObReport report) { + obData.addReport(report); + String zone = findZone(report.getPlatformId()); + getTableData().getArea(zone).addReport(report.getObservationTime(), + report); + } + } diff --git a/cave/com.raytheon.uf.viz.monitor.safeseas/src/com/raytheon/uf/viz/monitor/safeseas/SafeSeasMonitor.java b/cave/com.raytheon.uf.viz.monitor.safeseas/src/com/raytheon/uf/viz/monitor/safeseas/SafeSeasMonitor.java index 98313c4435..d50b2eab0a 100644 --- a/cave/com.raytheon.uf.viz.monitor.safeseas/src/com/raytheon/uf/viz/monitor/safeseas/SafeSeasMonitor.java +++ b/cave/com.raytheon.uf.viz.monitor.safeseas/src/com/raytheon/uf/viz/monitor/safeseas/SafeSeasMonitor.java @@ -77,6 +77,7 @@ import com.vividsolutions.jts.geom.Geometry; * 11/30/2009 3424 Zhidong/Slav/wkwock Use real station data. * Dec 30, 2009 3424 zhao use ObMultiHrsReports for obs data archive over time * July 20,2010 4891 skorolev Added resource listener + * May 15, 2012 14510 zhao Modified processing at startup * * * @@ -157,6 +158,7 @@ public class SafeSeasMonitor extends ObsMonitor implements ISSResourceListener { monitor.createDataStructures(); monitor.getAdjAreas(); monitor.processProductAtStartup("ss"); + monitor.fireMonitorEvent(monitor); } return monitor; } @@ -529,4 +531,9 @@ public class SafeSeasMonitor extends ObsMonitor implements ISSResourceListener { } + @Override + protected void processAtStartup(ObReport report) { + obData.addReport(report); + } + } diff --git a/cave/com.raytheon.uf.viz.monitor.snow/src/com/raytheon/uf/viz/monitor/snow/SnowMonitor.java b/cave/com.raytheon.uf.viz.monitor.snow/src/com/raytheon/uf/viz/monitor/snow/SnowMonitor.java index 45c18bc4d5..450ec979de 100644 --- a/cave/com.raytheon.uf.viz.monitor.snow/src/com/raytheon/uf/viz/monitor/snow/SnowMonitor.java +++ b/cave/com.raytheon.uf.viz.monitor.snow/src/com/raytheon/uf/viz/monitor/snow/SnowMonitor.java @@ -66,6 +66,7 @@ import com.raytheon.viz.alerts.observers.ProductAlertObserver; * Dec 18, 2009 3424 zhao use ObMultiHrsReports for obs data archive over time * Dec 22, 2009 3424 zhao revised processProductAtStartup method to retrieve all data * July 20,2010 4891 skorolev Added resource listener + * May 15, 2012 14510 zhao Modified processing at startup * * * @@ -131,12 +132,13 @@ public class SnowMonitor extends ObsMonitor { obData = new ObMultiHrsReports(CommonConfig.AppName.SNOW); obData.setThresholdMgr(SnowThresholdMgr.getInstance()); // Pre-populate dialog with an observation (METAR) for KOMA - processProductAtStartup("snow"); - } + } public static synchronized SnowMonitor getInstance() { if (monitor == null) { monitor = new SnowMonitor(); + monitor.processProductAtStartup("snow"); + monitor.fireMonitorEvent(monitor); } return monitor; } @@ -382,4 +384,9 @@ public class SnowMonitor extends ObsMonitor { public void setZoneDialog(SnowZoneTableDlg zoneDialog) { this.zoneDialog = zoneDialog; } + + @Override + protected void processAtStartup(ObReport report) { + obData.addReport(report); + } } diff --git a/cave/com.raytheon.uf.viz.monitor/src/com/raytheon/uf/viz/monitor/GenerateFSSObReport.java b/cave/com.raytheon.uf.viz.monitor/src/com/raytheon/uf/viz/monitor/GenerateFSSObReport.java index 61a51ff097..186cdafd5d 100644 --- a/cave/com.raytheon.uf.viz.monitor/src/com/raytheon/uf/viz/monitor/GenerateFSSObReport.java +++ b/cave/com.raytheon.uf.viz.monitor/src/com/raytheon/uf/viz/monitor/GenerateFSSObReport.java @@ -10,7 +10,12 @@ import com.raytheon.uf.common.monitor.data.ObConst.ReportType; import com.raytheon.uf.viz.monitor.data.ObReport; /** - * @author skorolev + * @author skorolev (initial creation) + * + * Change history: + * Date Ticket # Engineer Description + * --------------------------------------------------- + * May 15, 2012 14510 zhao Modified generateObReport() * */ public class GenerateFSSObReport { @@ -28,8 +33,13 @@ public class GenerateFSSObReport { // Generate the observation report. ObReport obReport = new ObReport(); FSSObsRecord metar = (FSSObsRecord) report; - obReport.setObservationTime(metar.getTimeObs().getTime()); - obReport.setRefHour(metar.getRefHour().getTime()); + try { + obReport.setObservationTime(metar.getTimeObs().getTime()); + obReport.setRefHour(metar.getRefHour().getTime()); + } catch (Exception e) { + System.out.println("Warning: missing obsTime or refHour at getTimeObs() when processing obs data; " + e + "; trying to set obsTime and refHour from dataURI"); + obReport.setTimesFromFssobDataURI(report.getDataURI()); + } obReport.setPlatformId(metar.getPlatformId()); obReport.setStationary(true); obReport.setLatitude((float) metar.getLatitude()); diff --git a/cave/com.raytheon.uf.viz.monitor/src/com/raytheon/uf/viz/monitor/ObsMonitor.java b/cave/com.raytheon.uf.viz.monitor/src/com/raytheon/uf/viz/monitor/ObsMonitor.java index 14a57f9295..ab54e7aa90 100644 --- a/cave/com.raytheon.uf.viz.monitor/src/com/raytheon/uf/viz/monitor/ObsMonitor.java +++ b/cave/com.raytheon.uf.viz.monitor/src/com/raytheon/uf/viz/monitor/ObsMonitor.java @@ -29,9 +29,6 @@ import org.eclipse.swt.widgets.Display; import com.raytheon.uf.common.dataplugin.PluginDataObject; import com.raytheon.uf.common.dataplugin.fssobs.FSSObsRecord; import com.raytheon.uf.common.dataquery.requests.RequestConstraint; -import com.raytheon.uf.common.status.IUFStatusHandler; -import com.raytheon.uf.common.status.UFStatus; -import com.raytheon.uf.common.status.UFStatus.Priority; import com.raytheon.uf.common.time.DataTime; import com.raytheon.uf.viz.core.alerts.AlertMessage; import com.raytheon.uf.viz.core.catalog.LayerProperty; @@ -54,6 +51,7 @@ import com.raytheon.uf.viz.monitor.events.IMonitorThresholdEvent; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * Feb 25, 2010 4759 dhladky Initial creation. + * Mar 15, 2012 14510 zhao modified processProductAtStartup() * * * @@ -63,8 +61,6 @@ import com.raytheon.uf.viz.monitor.events.IMonitorThresholdEvent; */ public abstract class ObsMonitor extends Monitor { - private static final IUFStatusHandler statusHandler = UFStatus.getHandler( - ObsMonitor.class, "ObsMonitor"); @Override protected abstract boolean filterNotifyMessage(NotificationMessage alertMessage); @@ -90,6 +86,8 @@ public abstract class ObsMonitor extends Monitor { */ protected abstract void process(ObReport result) throws Exception; + + protected abstract void processAtStartup(ObReport report); @Override protected abstract void processNotifyMessage(NotificationMessage filtered); @@ -246,30 +244,19 @@ public abstract class ObsMonitor extends Monitor { final Object[] resp = Connector.getInstance().connect(script, null, 60000); - System.out.println("ObsMonitor: Retriving data for monitor: " - + monitorUse); + System.out.println("ObsMonitor: Retriving data for monitor: " + monitorUse); if ((resp != null) && (resp.length > 0)) { - Display.getDefault().syncExec(new Runnable() { - public void run() { + //Display.getDefault().syncExec(new Runnable() { + //public void run() { for (int j = 0; j < resp.length; j++) { PluginDataObject objectToSend = (PluginDataObject) resp[j]; - // ObReport obReport = new ObReport(); - // obReport.init(); - ObReport result = GenerateFSSObReport - .generateObReport(objectToSend); - try { - process(result); - } catch (Exception e) { - // TODO Auto-generated catch block. Please - // revise as appropriate. - statusHandler.handle(Priority.PROBLEM, - e.getLocalizedMessage(), e); - } + ObReport result = GenerateFSSObReport.generateObReport(objectToSend); + processAtStartup(result); } - } + //} - }); + //}); } else if (resp == null) { System.out diff --git a/cave/com.raytheon.uf.viz.monitor/src/com/raytheon/uf/viz/monitor/data/AreaContainer.java b/cave/com.raytheon.uf.viz.monitor/src/com/raytheon/uf/viz/monitor/data/AreaContainer.java index 39952c777d..f34434621b 100644 --- a/cave/com.raytheon.uf.viz.monitor/src/com/raytheon/uf/viz/monitor/data/AreaContainer.java +++ b/cave/com.raytheon.uf.viz.monitor/src/com/raytheon/uf/viz/monitor/data/AreaContainer.java @@ -113,7 +113,6 @@ public class AreaContainer { if (report == null) { report = new ObReport(); - report.init(); } return report; diff --git a/cave/com.raytheon.uf.viz.monitor/src/com/raytheon/uf/viz/monitor/data/ObReport.java b/cave/com.raytheon.uf.viz.monitor/src/com/raytheon/uf/viz/monitor/data/ObReport.java index 02279c4a85..25f637af10 100644 --- a/cave/com.raytheon.uf.viz.monitor/src/com/raytheon/uf/viz/monitor/data/ObReport.java +++ b/cave/com.raytheon.uf.viz.monitor/src/com/raytheon/uf/viz/monitor/data/ObReport.java @@ -19,6 +19,7 @@ **/ package com.raytheon.uf.viz.monitor.data; +import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; import java.util.TimeZone; @@ -41,6 +42,7 @@ import com.raytheon.uf.common.time.SimulatedTime; * Feb 12, 2009 1999 grichard Initial creation. * Dec 9, 2009 3424 zhao Added member waveHeight and method get(varName) * Jan 22, 2010 3888 zhao Removed member waveHeight, which is the same as highResWaveHeight + * May 15, 2012 14510 zhao added setTimesFromFssobsDataURI() * * * @@ -175,11 +177,11 @@ public class ObReport { // Public constructor public ObReport() { - + init(); } // Initializer of report - public void init() { + private void init() { Date now = SimulatedTime.getSystemTime().getTime(); Calendar deltaTime = Calendar.getInstance(TimeZone.getTimeZone("UTC")); @@ -694,5 +696,22 @@ public class ObReport { public void setSeaLevelPress(float seaLevelPress) { this.seaLevelPress = seaLevelPress; } - +/** + * When obs time is missing; set obs time and ref time from fssobs dataURI + * Format of fssobs dataURI: + * /fssobs/2012-05-14_16:35:00.0/METAR/OAX/KSDA/40.75/-95.41999816894531/ss + */ + public void setTimesFromFssobDataURI(String dataURI) { + String str = dataURI.substring(8, 24); + SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd'_'hh:mm"); + try { + Date obsTime = df.parse(str); + Date refTime = TableUtil.getNominalTime(obsTime); + this.observationTime = obsTime; + this.refHour = refTime; + } catch (java.text.ParseException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + } } diff --git a/cave/com.raytheon.uf.viz.monitor/src/com/raytheon/uf/viz/monitor/data/ObStnHourReports.java b/cave/com.raytheon.uf.viz.monitor/src/com/raytheon/uf/viz/monitor/data/ObStnHourReports.java index 2287568ad3..e2a057dc3a 100644 --- a/cave/com.raytheon.uf.viz.monitor/src/com/raytheon/uf/viz/monitor/data/ObStnHourReports.java +++ b/cave/com.raytheon.uf.viz.monitor/src/com/raytheon/uf/viz/monitor/data/ObStnHourReports.java @@ -87,7 +87,6 @@ public class ObStnHourReports { ObReport report = null; if ( stnReports.isEmpty() ) { // empty report for empty/default row in station table report = new ObReport(); - report.init(); } else { report = stnReports.get(stnReports.lastKey()); } diff --git a/cave/com.raytheon.uf.viz.monitor/src/com/raytheon/uf/viz/monitor/data/ObZoneHourReports.java b/cave/com.raytheon.uf.viz.monitor/src/com/raytheon/uf/viz/monitor/data/ObZoneHourReports.java index 877ca33c92..0bd541647a 100644 --- a/cave/com.raytheon.uf.viz.monitor/src/com/raytheon/uf/viz/monitor/data/ObZoneHourReports.java +++ b/cave/com.raytheon.uf.viz.monitor/src/com/raytheon/uf/viz/monitor/data/ObZoneHourReports.java @@ -91,7 +91,6 @@ public class ObZoneHourReports { private void InitWorstValues() { worstValues = new ObReport(); - worstValues.init(); worstValues.setZoneId(zone); // the ObReport's init() sets "zone id" to "" !!! } diff --git a/cave/com.raytheon.uf.viz.ncep.displays.feature/feature.xml b/cave/com.raytheon.uf.viz.ncep.displays.feature/feature.xml index a80cc9b566..32717cd93c 100644 --- a/cave/com.raytheon.uf.viz.ncep.displays.feature/feature.xml +++ b/cave/com.raytheon.uf.viz.ncep.displays.feature/feature.xml @@ -312,4 +312,25 @@ version="0.0.0" unpack="false"/> + + + + + + diff --git a/cave/com.raytheon.uf.viz.npp.feature/.project b/cave/com.raytheon.uf.viz.npp.feature/.project deleted file mode 100644 index 1d3ac2a01e..0000000000 --- a/cave/com.raytheon.uf.viz.npp.feature/.project +++ /dev/null @@ -1,17 +0,0 @@ - - - com.raytheon.uf.viz.npp.feature - - - - - - org.eclipse.pde.FeatureBuilder - - - - - - org.eclipse.pde.FeatureNature - - diff --git a/cave/com.raytheon.uf.viz.npp.feature/build.properties b/cave/com.raytheon.uf.viz.npp.feature/build.properties deleted file mode 100644 index 64f93a9f0b..0000000000 --- a/cave/com.raytheon.uf.viz.npp.feature/build.properties +++ /dev/null @@ -1 +0,0 @@ -bin.includes = feature.xml diff --git a/cave/com.raytheon.uf.viz.npp.feature/feature.xml b/cave/com.raytheon.uf.viz.npp.feature/feature.xml deleted file mode 100644 index 011e1133d9..0000000000 --- a/cave/com.raytheon.uf.viz.npp.feature/feature.xml +++ /dev/null @@ -1,40 +0,0 @@ - - - - - [Enter Feature Description here.] - - - - [Enter Copyright Description here.] - - - - [Enter License Description here.] - - - - - - - - - - - - - - diff --git a/cave/com.raytheon.uf.viz.npp.viirs/META-INF/MANIFEST.MF b/cave/com.raytheon.uf.viz.npp.viirs/META-INF/MANIFEST.MF deleted file mode 100644 index edbc8e4378..0000000000 --- a/cave/com.raytheon.uf.viz.npp.viirs/META-INF/MANIFEST.MF +++ /dev/null @@ -1,23 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: VIIRS Satellite -Bundle-SymbolicName: com.raytheon.uf.viz.npp.viirs;singleton:=true -Bundle-Version: 1.0.0.qualifier -Bundle-Activator: com.raytheon.uf.viz.npp.viirs.Activator -Bundle-Vendor: RAYTHEON -Eclipse-RegisterBuddy: com.raytheon.uf.viz.core -Require-Bundle: org.eclipse.ui, - org.eclipse.core.runtime, - com.raytheon.uf.viz.core;bundle-version="1.12.1174", - com.raytheon.uf.common.time;bundle-version="1.12.1174", - com.raytheon.uf.common.geospatial;bundle-version="1.12.1174", - com.raytheon.uf.common.colormap;bundle-version="1.12.1174", - org.geotools;bundle-version="2.6.4", - com.raytheon.uf.common.datastorage;bundle-version="1.12.1174", - com.raytheon.uf.common.datastorage.hdf5;bundle-version="1.12.1174", - com.raytheon.uf.common.dataplugin;bundle-version="1.12.1174", - com.raytheon.uf.common.dataplugin.npp.viirs;bundle-version="1.0.0", - javax.measure;bundle-version="1.0.0", - com.raytheon.uf.viz.productbrowser;bundle-version="1.12.1174" -Bundle-RequiredExecutionEnvironment: JavaSE-1.6 -Bundle-ActivationPolicy: lazy diff --git a/cave/com.raytheon.uf.viz.npp.viirs/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject b/cave/com.raytheon.uf.viz.npp.viirs/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject deleted file mode 100755 index ff1a6ba8b8..0000000000 --- a/cave/com.raytheon.uf.viz.npp.viirs/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject +++ /dev/null @@ -1 +0,0 @@ -com.raytheon.uf.viz.npp.viirs.rsc.VIIRSResourceData diff --git a/cave/com.raytheon.uf.viz.npp.viirs/build.properties b/cave/com.raytheon.uf.viz.npp.viirs/build.properties deleted file mode 100644 index 6e2f847b66..0000000000 --- a/cave/com.raytheon.uf.viz.npp.viirs/build.properties +++ /dev/null @@ -1,6 +0,0 @@ -source.. = src/ -output.. = bin/ -bin.includes = META-INF/,\ - .,\ - plugin.xml,\ - localization/ diff --git a/cave/com.raytheon.uf.viz.npp.viirs/localization/colormaps/NPP/VIIRS/IR Default.cmap b/cave/com.raytheon.uf.viz.npp.viirs/localization/colormaps/NPP/VIIRS/IR Default.cmap deleted file mode 100644 index 9ebafc4047..0000000000 --- a/cave/com.raytheon.uf.viz.npp.viirs/localization/colormaps/NPP/VIIRS/IR Default.cmap +++ /dev/null @@ -1,259 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/cave/com.raytheon.uf.viz.npp.viirs/plugin.xml b/cave/com.raytheon.uf.viz.npp.viirs/plugin.xml deleted file mode 100644 index 75b159da9b..0000000000 --- a/cave/com.raytheon.uf.viz.npp.viirs/plugin.xml +++ /dev/null @@ -1,38 +0,0 @@ - - - - - - - - - - - - diff --git a/cave/com.raytheon.uf.viz.npp.viirs/src/com/raytheon/uf/viz/npp/viirs/Activator.java b/cave/com.raytheon.uf.viz.npp.viirs/src/com/raytheon/uf/viz/npp/viirs/Activator.java deleted file mode 100644 index 45f1b019bd..0000000000 --- a/cave/com.raytheon.uf.viz.npp.viirs/src/com/raytheon/uf/viz/npp/viirs/Activator.java +++ /dev/null @@ -1,50 +0,0 @@ -package com.raytheon.uf.viz.npp.viirs; - -import org.eclipse.ui.plugin.AbstractUIPlugin; -import org.osgi.framework.BundleContext; - -/** - * The activator class controls the plug-in life cycle - */ -public class Activator extends AbstractUIPlugin { - - // The plug-in ID - public static final String PLUGIN_ID = "com.raytheon.uf.viz.satellite.viirs"; //$NON-NLS-1$ - - // The shared instance - private static Activator plugin; - - /** - * The constructor - */ - public Activator() { - } - - /* - * (non-Javadoc) - * @see org.eclipse.ui.plugin.AbstractUIPlugin#start(org.osgi.framework.BundleContext) - */ - public void start(BundleContext context) throws Exception { - super.start(context); - plugin = this; - } - - /* - * (non-Javadoc) - * @see org.eclipse.ui.plugin.AbstractUIPlugin#stop(org.osgi.framework.BundleContext) - */ - public void stop(BundleContext context) throws Exception { - plugin = null; - super.stop(context); - } - - /** - * Returns the shared instance - * - * @return the shared instance - */ - public static Activator getDefault() { - return plugin; - } - -} diff --git a/cave/com.raytheon.uf.viz.npp.viirs/src/com/raytheon/uf/viz/npp/viirs/VIIRSProductBrowserDefinition.java b/cave/com.raytheon.uf.viz.npp.viirs/src/com/raytheon/uf/viz/npp/viirs/VIIRSProductBrowserDefinition.java deleted file mode 100644 index 42f69d17f5..0000000000 --- a/cave/com.raytheon.uf.viz.npp.viirs/src/com/raytheon/uf/viz/npp/viirs/VIIRSProductBrowserDefinition.java +++ /dev/null @@ -1,69 +0,0 @@ -/** - * 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.npp.viirs; - -import com.raytheon.uf.common.time.BinOffset; -import com.raytheon.uf.viz.core.rsc.LoadProperties; -import com.raytheon.uf.viz.npp.viirs.rsc.VIIRSResourceData; -import com.raytheon.uf.viz.productbrowser.AbstractRequestableProductBrowserDataDefinition; - -/** - * TODO Add Description - * - *
- * 
- * SOFTWARE HISTORY
- * 
- * Date         Ticket#    Engineer    Description
- * ------------ ---------- ----------- --------------------------
- * Dec 6, 2011            mschenke     Initial creation
- * 
- * 
- * - * @author mschenke - * @version 1.0 - */ - -public class VIIRSProductBrowserDefinition extends - AbstractRequestableProductBrowserDataDefinition { - - public VIIRSProductBrowserDefinition() { - productName = "viirs"; - displayName = "VIIRS"; - order = new String[] { "pluginName", "commonData.region", - "commonData.channelType", "wavelength" }; - order = getOrder(); - loadProperties = new LoadProperties(); - } - - /* - * (non-Javadoc) - * - * @see com.raytheon.uf.viz.productbrowser. - * AbstractRequestableProductBrowserDataDefinition#getResourceData() - */ - @Override - public VIIRSResourceData getResourceData() { - VIIRSResourceData resourceData = new VIIRSResourceData(); - resourceData.setBinOffset(new BinOffset(60 * 30, 60 * 30)); - return resourceData; - } - -} diff --git a/cave/com.raytheon.uf.viz.npp.viirs/src/com/raytheon/uf/viz/npp/viirs/rsc/VIIRSDataCallback.java b/cave/com.raytheon.uf.viz.npp.viirs/src/com/raytheon/uf/viz/npp/viirs/rsc/VIIRSDataCallback.java deleted file mode 100644 index 9e254f82d6..0000000000 --- a/cave/com.raytheon.uf.viz.npp.viirs/src/com/raytheon/uf/viz/npp/viirs/rsc/VIIRSDataCallback.java +++ /dev/null @@ -1,135 +0,0 @@ -/** - * 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.npp.viirs.rsc; - -import java.awt.Rectangle; -import java.nio.Buffer; -import java.nio.ShortBuffer; - -import com.raytheon.uf.common.dataplugin.npp.viirs.VIIRSDataRecord; -import com.raytheon.uf.common.datastorage.DataStoreFactory; -import com.raytheon.uf.common.datastorage.IDataStore; -import com.raytheon.uf.common.datastorage.Request; -import com.raytheon.uf.common.datastorage.records.IDataRecord; -import com.raytheon.uf.common.datastorage.records.ShortDataRecord; -import com.raytheon.uf.viz.core.HDF5Util; -import com.raytheon.uf.viz.core.data.IColorMapDataRetrievalCallback; -import com.raytheon.uf.viz.core.exception.VizException; - -/** - * TODO Add Description - * - *
- * 
- * SOFTWARE HISTORY
- * 
- * Date         Ticket#    Engineer    Description
- * ------------ ---------- ----------- --------------------------
- * Nov 30, 2011            mschenke     Initial creation
- * 
- * 
- * - * @author mschenke - * @version 1.0 - */ - -public class VIIRSDataCallback implements IColorMapDataRetrievalCallback { - - private VIIRSDataRecord dataRecord; - - private Rectangle validDataBounds; - - public VIIRSDataCallback(VIIRSDataRecord dataRecord, - Rectangle validDataBounds) { - this.dataRecord = dataRecord; - this.validDataBounds = validDataBounds; - } - - /* - * (non-Javadoc) - * - * @see - * com.raytheon.uf.viz.core.data.IColorMapDataRetrievalCallback#getColorMapData - * () - */ - @Override - public ColorMapData getColorMapData() throws VizException { - try { - int[] sizes = new int[] { validDataBounds.width, - validDataBounds.height }; - IDataStore dataStore = DataStoreFactory.getDataStore(HDF5Util - .findHDF5Location(dataRecord)); - IDataRecord rawData = dataStore.retrieve(dataRecord.getDataURI(), - VIIRSDataRecord.getDataSet(0), - Request.buildSlab(new int[] { 0, 0 }, sizes)); - - Buffer shortData = ShortBuffer.wrap(((ShortDataRecord) rawData) - .getShortData()); - return new ColorMapData(shortData, sizes, - ColorMapDataType.UNSIGNED_SHORT); - } catch (Throwable t) { - throw new VizException(t); - } - } - - /* - * (non-Javadoc) - * - * @see java.lang.Object#hashCode() - */ - @Override - public int hashCode() { - final int prime = 31; - int result = 1; - result = prime * result - + ((dataRecord == null) ? 0 : dataRecord.hashCode()); - result = prime * result - + ((validDataBounds == null) ? 0 : validDataBounds.hashCode()); - return result; - } - - /* - * (non-Javadoc) - * - * @see java.lang.Object#equals(java.lang.Object) - */ - @Override - public boolean equals(Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - VIIRSDataCallback other = (VIIRSDataCallback) obj; - if (dataRecord == null) { - if (other.dataRecord != null) - return false; - } else if (!dataRecord.equals(other.dataRecord)) - return false; - if (validDataBounds == null) { - if (other.validDataBounds != null) - return false; - } else if (!validDataBounds.equals(other.validDataBounds)) - return false; - return true; - } - -} diff --git a/cave/com.raytheon.uf.viz.npp.viirs/src/com/raytheon/uf/viz/npp/viirs/rsc/VIIRSDataMathTransform.java b/cave/com.raytheon.uf.viz.npp.viirs/src/com/raytheon/uf/viz/npp/viirs/rsc/VIIRSDataMathTransform.java deleted file mode 100644 index b26db0540c..0000000000 --- a/cave/com.raytheon.uf.viz.npp.viirs/src/com/raytheon/uf/viz/npp/viirs/rsc/VIIRSDataMathTransform.java +++ /dev/null @@ -1,300 +0,0 @@ -/** - * 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.npp.viirs.rsc; - -import org.opengis.geometry.DirectPosition; -import org.opengis.geometry.MismatchedDimensionException; -import org.opengis.referencing.operation.MathTransform; -import org.opengis.referencing.operation.Matrix; -import org.opengis.referencing.operation.NoninvertibleTransformException; -import org.opengis.referencing.operation.TransformException; - -import com.vividsolutions.jts.geom.Coordinate; -import com.vividsolutions.jts.geom.LineSegment; - -/** - * TODO Add Description - * - *
- * 
- * SOFTWARE HISTORY
- * 
- * Date         Ticket#    Engineer    Description
- * ------------ ---------- ----------- --------------------------
- * Nov 30, 2011            mschenke     Initial creation
- * 
- * 
- * - * @author mschenke - * @version 1.0 - */ - -public class VIIRSDataMathTransform implements MathTransform { - - private float[] latitudes; - - private float[] longitudes; - - private int width, height; - - public VIIRSDataMathTransform(float[][] projectionData, int width, - int height) { - this.longitudes = projectionData[0]; - this.latitudes = projectionData[1]; - this.height = height; - this.width = width; - } - - /* - * (non-Javadoc) - * - * @see - * org.opengis.referencing.operation.MathTransform#derivative(org.opengis - * .geometry.DirectPosition) - */ - @Override - public Matrix derivative(DirectPosition arg0) - throws MismatchedDimensionException, TransformException { - return null; - } - - /* - * (non-Javadoc) - * - * @see - * org.opengis.referencing.operation.MathTransform#getSourceDimensions() - */ - @Override - public int getSourceDimensions() { - return 0; - } - - /* - * (non-Javadoc) - * - * @see - * org.opengis.referencing.operation.MathTransform#getTargetDimensions() - */ - @Override - public int getTargetDimensions() { - return 0; - } - - /* - * (non-Javadoc) - * - * @see org.opengis.referencing.operation.MathTransform#inverse() - */ - @Override - public MathTransform inverse() throws NoninvertibleTransformException { - return null; - } - - /* - * (non-Javadoc) - * - * @see org.opengis.referencing.operation.MathTransform#isIdentity() - */ - @Override - public boolean isIdentity() { - return false; - } - - /* - * (non-Javadoc) - * - * @see org.opengis.referencing.operation.MathTransform#toWKT() - */ - @Override - public String toWKT() throws UnsupportedOperationException { - System.out.println("toWKT?"); - return null; - } - - /* - * (non-Javadoc) - * - * @see - * org.opengis.referencing.operation.MathTransform#transform(org.opengis - * .geometry.DirectPosition, org.opengis.geometry.DirectPosition) - */ - @Override - public DirectPosition transform(DirectPosition arg0, DirectPosition arg1) - throws MismatchedDimensionException, TransformException { - System.out.println("transform a bunch of DirectPositions?"); - return null; - } - - /* - * (non-Javadoc) - * - * @see org.opengis.referencing.operation.MathTransform#transform(double[], - * int, double[], int, int) - */ - @Override - public void transform(double[] in, int inOffset, double[] out, - int outOffset, int numPoints) throws TransformException { - for (int i = 0; i < numPoints; ++i) { - int xIdx = (i * 2); - int yIdx = (i * 2) + 1; - - double xLoc = in[xIdx] - 0.5; - // TODO: Why is data flipped along "y" axis? - double yLoc = height - in[yIdx] - 0.5; - out[xIdx] = getInterpolatedValue(xLoc, yLoc, 0); - out[yIdx] = getInterpolatedValue(xLoc, yLoc, 1); - } - } - - /* - * (non-Javadoc) - * - * @see org.opengis.referencing.operation.MathTransform#transform(float[], - * int, float[], int, int) - */ - @Override - public void transform(float[] arg0, int arg1, float[] arg2, int arg3, - int arg4) throws TransformException { - } - - /* - * (non-Javadoc) - * - * @see org.opengis.referencing.operation.MathTransform#transform(float[], - * int, double[], int, int) - */ - @Override - public void transform(float[] arg0, int arg1, double[] arg2, int arg3, - int arg4) throws TransformException { - } - - /* - * (non-Javadoc) - * - * @see org.opengis.referencing.operation.MathTransform#transform(double[], - * int, float[], int, int) - */ - @Override - public void transform(double[] arg0, int arg1, float[] arg2, int arg3, - int arg4) throws TransformException { - } - - protected float getInterpolatedValue(double xd, double yd, int dim) { - float value = 0.0f; - float missing = 1.0f; - - float x = (float) xd; - float y = (float) yd; - - int xi = (int) x; - int yi = (int) y; - // Upper left corner - float xWeight = 1 - x + xi; - float yWeight = 1 - y + yi; - float weight = xWeight * yWeight; - float val = getRawDataValue(xi, yi, dim); - if (Float.isNaN(val)) { - missing -= weight; - } else { - value += weight * val; - } - // upper right corner - xi = xi + 1; - xWeight = 1 - xi + x; - yWeight = 1 - y + yi; - weight = xWeight * yWeight; - val = getRawDataValue(xi, yi, dim); - if (Float.isNaN(val)) { - missing -= weight; - } else { - value += weight * val; - } - // lower right corner - yi = yi + 1; - xWeight = 1 - xi + x; - yWeight = 1 - yi + y; - weight = xWeight * yWeight; - val = getRawDataValue(xi, yi, dim); - if (Float.isNaN(val)) { - missing -= weight; - } else { - value += weight * val; - } - // lower left corner - xi = xi - 1; - xWeight = 1 - x + xi; - yWeight = 1 - yi + y; - weight = xWeight * yWeight; - val = getRawDataValue(xi, yi, dim); - if (Float.isNaN(val)) { - missing -= weight; - } else { - value += weight * val; - } - - return value / missing; - } - - /** - * @param xi - * @param yi - * @param dim - * @return - */ - private float getRawDataValue(int xi, int yi, int dim) { - Coordinate c = null; - if (xi >= 0 && xi < width && yi >= 0 && yi < height) { - c = index(xi, yi); - } else { - int xInc = 0; - int closestX = xi; - if (closestX < 0) { - closestX = 0; - xInc = 1; - } else if (closestX >= width) { - closestX = width - 1; - xInc = -1; - } - - int yInc = 0; - int closestY = yi; - if (closestY < 0) { - closestY = 0; - yInc = 1; - } else if (closestY >= height) { - closestY = height - 1; - yInc = -1; - } - - Coordinate a = index(closestX, closestY); - Coordinate b = index(closestX + xInc, closestY + yInc); - LineSegment ls = new LineSegment(a, b); - int xDiff = closestX - xi; - int yDiff = closestY - yi; - c = ls.pointAlong(-Math.sqrt(xDiff * xDiff + yDiff * yDiff)); - } - return (float) (dim == 0 ? c.x : c.y); - } - - private Coordinate index(int xi, int yi) { - return new Coordinate(longitudes[yi * width + xi], latitudes[yi * width - + xi]); - } -} \ No newline at end of file diff --git a/cave/com.raytheon.uf.viz.npp.viirs/src/com/raytheon/uf/viz/npp/viirs/rsc/VIIRSResource.java b/cave/com.raytheon.uf.viz.npp.viirs/src/com/raytheon/uf/viz/npp/viirs/rsc/VIIRSResource.java deleted file mode 100644 index 745f942f11..0000000000 --- a/cave/com.raytheon.uf.viz.npp.viirs/src/com/raytheon/uf/viz/npp/viirs/rsc/VIIRSResource.java +++ /dev/null @@ -1,445 +0,0 @@ -/** - * 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.npp.viirs.rsc; - -import java.awt.Point; -import java.awt.Rectangle; -import java.util.ArrayList; -import java.util.Arrays; -import java.util.HashMap; -import java.util.List; -import java.util.Map; - -import javax.measure.unit.Unit; - -import com.raytheon.uf.common.dataplugin.annotations.DataURI; -import com.raytheon.uf.common.dataplugin.npp.viirs.VIIRSDataRecord; -import com.raytheon.uf.common.dataplugin.npp.viirs.VIIRSSpatialRecord; -import com.raytheon.uf.common.datastorage.DataStoreFactory; -import com.raytheon.uf.common.datastorage.IDataStore; -import com.raytheon.uf.common.datastorage.Request; -import com.raytheon.uf.common.datastorage.records.FloatDataRecord; -import com.raytheon.uf.common.datastorage.records.IDataRecord; -import com.raytheon.uf.common.status.IUFStatusHandler; -import com.raytheon.uf.common.status.UFStatus; -import com.raytheon.uf.common.status.UFStatus.Priority; -import com.raytheon.uf.common.time.BinOffset; -import com.raytheon.uf.common.time.DataTime; -import com.raytheon.uf.viz.core.DrawableImage; -import com.raytheon.uf.viz.core.HDF5Util; -import com.raytheon.uf.viz.core.IGraphicsTarget; -import com.raytheon.uf.viz.core.IGraphicsTarget.RasterMode; -import com.raytheon.uf.viz.core.drawables.ColorMapLoader; -import com.raytheon.uf.viz.core.drawables.ColorMapParameters; -import com.raytheon.uf.viz.core.drawables.IImage; -import com.raytheon.uf.viz.core.drawables.PaintProperties; -import com.raytheon.uf.viz.core.drawables.ext.colormap.IColormappedImageExtension; -import com.raytheon.uf.viz.core.exception.VizException; -import com.raytheon.uf.viz.core.map.IMapDescriptor; -import com.raytheon.uf.viz.core.rsc.AbstractVizResource; -import com.raytheon.uf.viz.core.rsc.IResourceDataChanged; -import com.raytheon.uf.viz.core.rsc.LoadProperties; -import com.raytheon.uf.viz.core.rsc.capabilities.ColorMapCapability; -import com.raytheon.uf.viz.core.rsc.capabilities.ImagingCapability; -import com.raytheon.uf.viz.core.rsc.hdf5.ImageTile; - -/** - * NPP VIIRS resource. Responsible for drawing a single color band - * - *
- * 
- * SOFTWARE HISTORY
- * 
- * Date         Ticket#    Engineer    Description
- * ------------ ---------- ----------- --------------------------
- * Nov 30, 2011            mschenke     Initial creation
- * 
- * 
- * - * @author mschenke - * @version 1.0 - */ - -public class VIIRSResource extends - AbstractVizResource implements - IResourceDataChanged { - - protected static final IUFStatusHandler statusHandler = UFStatus - .getHandler(VIIRSResource.class); - - protected static class VIIRSData { - public VIIRSDataCallback callback; - - public IImage image; - - public ImageTile tile; - - public float[][] projectionData; - } - - protected static class VIIRSFrame { - public Map dataMap = new HashMap(); - } - - private static final String NAME_FORMAT = "NPP VIIRS %s %s (%s microns)"; - - protected Map frameData; - - private String name; - - private List records; - - private IGraphicsTarget target; - - /** - * @param resourceData - * @param loadProperties - */ - public VIIRSResource(VIIRSResourceData resourceData, - LoadProperties loadProperties, List initialRecords) { - super(resourceData, loadProperties); - this.records = new ArrayList(initialRecords); - resourceData.addChangeListener(this); - frameData = new HashMap(); - dataTimes = new ArrayList(); - } - - /* - * (non-Javadoc) - * - * @see com.raytheon.uf.viz.core.rsc.AbstractVizResource#getName() - */ - @Override - public String getName() { - return name; - } - - protected boolean addRecord(VIIRSDataRecord dataRecord) throws Exception { - // TODO: Ignore isHasSpatial == false - if (name == null) { - initializeFirstRecord(dataRecord); - } - - // Valid dataRecord with spatial data - DataTime time = dataRecord.getDataTime(); - DataTime normalTime = normalizeTime(time); - - VIIRSFrame frame = frameData.get(normalTime); - if (frame == null) { - // First record for normalized time - frame = new VIIRSFrame(); - frameData.put(normalTime, frame); - dataTimes.add(normalTime); - } - - Object recordKey = getRecordKey(dataRecord); - VIIRSData data = frame.dataMap.get(recordKey); - if (data == null) { - data = new VIIRSData(); - IDataStore dataStore = DataStoreFactory.getDataStore(HDF5Util - .findHDF5Location(dataRecord)); - String dataURI = dataRecord.getSpatialURI(); - IDataRecord[] latLons = dataStore - .retrieveDatasets( - new String[] { - dataURI - + DataURI.SEPARATOR - + VIIRSSpatialRecord - .getLatitudeDataSet(0), - dataURI - + DataURI.SEPARATOR - + VIIRSSpatialRecord - .getLongitudeDataSet(0) }, - Request.ALL); - if (latLons == null || latLons.length != 2) { - // No spatial data available - return false; - } - - IDataRecord lats = latLons[0]; - IDataRecord lons = latLons[1]; - - float[] latFloats = ((FloatDataRecord) lats).getFloatData(); - float[] lonFloats = ((FloatDataRecord) lons).getFloatData(); - - // Get the width and valid height of the data - int width = dataRecord.getWidth(); - int height = (Integer) lats.getDataAttributes().get( - VIIRSSpatialRecord.VALID_HEIGHT_ID); - - latFloats = Arrays.copyOf(latFloats, height * width); - lonFloats = Arrays.copyOf(lonFloats, height * width); - data.projectionData = new float[][] { lonFloats, latFloats }; - - data.tile = new ImageTile(); - // data.tile.rect = new Rectangle(0, 0, width, height); - // data.tile.envelope = new Envelope(0, width, 0, height); - - calculateMesh(data, target); - - data.callback = new VIIRSDataCallback(dataRecord, new Rectangle(0, - 0, width, height)); - - data.image = target.getExtension(IColormappedImageExtension.class) - .initializeRaster( - data.callback, - getCapability(ColorMapCapability.class) - .getColorMapParameters()); - - frame.dataMap.put(recordKey, data); - return true; - } else { - System.err.println("Recieved duplicate record for VIIRS data"); - return false; - } - } - - /** - * First record was added, initialize any fields that require information - * from a record - * - * @param dataRecord - * @throws VizException - */ - protected void initializeFirstRecord(VIIRSDataRecord dataRecord) - throws VizException { - // First record, process name and parameters - name = String.format( - NAME_FORMAT, - dataRecord.getChannelType(), - (dataRecord.getChannel() != null ? "Channel " - + dataRecord.getChannel() : "Band"), - dataRecord.getWavelength()); - - ColorMapParameters colorMapParameters = getCapability( - ColorMapCapability.class).getColorMapParameters(); - if (colorMapParameters == null) { - colorMapParameters = new ColorMapParameters(); - } - if (colorMapParameters.getColorMap() == null) { - String name = colorMapParameters.getColorMapName(); - if (name == null) { - name = "NPP/VIIRS/IR Default"; - } - colorMapParameters.setColorMap(ColorMapLoader.loadColorMap(name)); - } - - // TODO: Get data unit from record and display unit from style rules - Unit displayUnit = Unit.ONE; - Unit dataUnit = Unit.ONE; - - // Static, should be moved from ColorMapParameters into GLDataFormat - colorMapParameters.setDataMin(0); - colorMapParameters.setDataMax(0xFFFF); - - try { - IDataStore ds = DataStoreFactory.getDataStore(HDF5Util - .findHDF5Location(dataRecord)); - IDataRecord record = ds.retrieve(dataRecord.getDataURI(), - VIIRSDataRecord.getDataSet(0), - Request.buildPointRequest(new Point(0, 0))); - Map attrs = record.getDataAttributes(); - Float offset = (Float) attrs.get(VIIRSDataRecord.OFFSET_ID); - Float scale = (Float) attrs.get(VIIRSDataRecord.SCALE_ID); - if (offset != null && scale != null) { - dataUnit = dataUnit.plus(offset).times(scale); - } - } catch (Exception e) { - throw new VizException(e); - } - - colorMapParameters.setDataUnit(dataUnit); - colorMapParameters.setDisplayUnit(displayUnit); - - // TODO: Get from style rules? - colorMapParameters.setColorMapMin(12900); - colorMapParameters.setColorMapMax(52700); - - getCapability(ColorMapCapability.class).setColorMapParameters( - colorMapParameters); - } - - /** - * Construct a unique key for the record. Base implementation assumes all - * records are same channel/region and only uses DataTime as unique key. - * Object returned will be added to a HashMap so must implement hashCode and - * equals - * - * @param dataRecord - * @return - */ - protected Object getRecordKey(VIIRSDataRecord dataRecord) { - return dataRecord.getDataTime(); - } - - /* - * (non-Javadoc) - * - * @see com.raytheon.uf.viz.core.rsc.AbstractVizResource#disposeInternal() - */ - @Override - protected void disposeInternal() { - clearCoverages(); - for (VIIRSFrame frame : frameData.values()) { - for (VIIRSData data : frame.dataMap.values()) { - data.image.dispose(); - } - frame.dataMap.clear(); - } - frameData.clear(); - } - - private void clearCoverages() { - for (VIIRSFrame frame : frameData.values()) { - for (VIIRSData data : frame.dataMap.values()) { - if (data.tile != null) { - data.tile.dispose(); - data.tile = null; - } - } - } - } - - /* - * (non-Javadoc) - * - * @see - * com.raytheon.uf.viz.core.rsc.AbstractVizResource#paintInternal(com.raytheon - * .uf.viz.core.IGraphicsTarget, - * com.raytheon.uf.viz.core.drawables.PaintProperties) - */ - @Override - protected void paintInternal(IGraphicsTarget target, - PaintProperties paintProps) throws VizException { - VIIRSFrame frame = frameData.get(paintProps.getDataTime()); - if (frame != null) { - ImagingCapability imgCap = getCapability(ImagingCapability.class); - float brightness = imgCap.getBrightness(); - float contrast = imgCap.getContrast(); - boolean interp = imgCap.isInterpolationState(); - - List images = new ArrayList(); - for (VIIRSData data : frame.dataMap.values()) { - data.image.setBrightness(brightness); - data.image.setContrast(contrast); - data.image.setInterpolated(interp); - - DrawableImage di = new DrawableImage(data.image, - data.tile.coverage); - di.setMode(RasterMode.ASYNCHRONOUS); - images.add(di); - } - target.drawRasters(paintProps, - images.toArray(new DrawableImage[images.size()])); - } - } - - /* - * (non-Javadoc) - * - * @see - * com.raytheon.uf.viz.core.rsc.AbstractVizResource#initInternal(com.raytheon - * .uf.viz.core.IGraphicsTarget) - */ - @Override - protected synchronized void initInternal(IGraphicsTarget target) - throws VizException { - this.target = target; - try { - if (records != null) { - for (VIIRSDataRecord record : records) { - addRecord(record); - } - } - } catch (Exception e) { - throw new VizException(e); - } - } - - /** - * @param frame - * @param target - */ - private void calculateMesh(VIIRSData frame, IGraphicsTarget target) - throws VizException { - // Rectangle tile = frame.tile.rect; - // frame.tile.coverage = new PixelCoverage(new - // Coordinate(tile.getMinX(), - // tile.getMinY()), - // new Coordinate(tile.getMaxX(), tile.getMinY()), new Coordinate( - // tile.getMaxX(), tile.getMaxY()), new Coordinate( - // tile.getMinX(), tile.getMaxY())); - // IMesh mesh = target.getExtension(IMapMeshExtension.class) - // .constructMesh(descriptor); - // mesh.calculateMesh(frame.tile.coverage, frame.tile, - // new VIIRSDataMathTransform(frame.projectionData, - // frame.tile.rect.width, frame.tile.rect.height)); - // frame.projectionData = null; - // frame.tile.coverage.setMesh(mesh); - // frame.projectionData = null; - } - - /** - * Normalize the DataTime using BinOffset of resourceData if set - * - * @param dt - * @return - */ - private DataTime normalizeTime(DataTime dt) { - BinOffset offset = resourceData.getBinOffset(); - if (offset != null) { - dt = offset.getNormalizedTime(dt); - } - return dt; - } - - /* - * (non-Javadoc) - * - * @see - * com.raytheon.uf.viz.core.rsc.IResourceDataChanged#resourceChanged(com - * .raytheon.uf.viz.core.rsc.IResourceDataChanged.ChangeType, - * java.lang.Object) - */ - @Override - public synchronized void resourceChanged(ChangeType type, Object object) { - if (type == ChangeType.DATA_UPDATE) { - VIIRSDataRecord[] records = (VIIRSDataRecord[]) object; - for (VIIRSDataRecord record : records) { - this.records.add(record); - if (target != null) { - // target is set in initInternal, this means we have already - // initialized and can add records freely. If we get updates - // before we've initialized, they will be processed in - // initInternal - try { - addRecord(record); - } catch (Exception e) { - statusHandler.handle( - Priority.PROBLEM, - "Error adding record from update: " - + e.getLocalizedMessage(), e); - } - } - } - } - issueRefresh(); - } -} diff --git a/cave/com.raytheon.uf.viz.npp.viirs/src/com/raytheon/uf/viz/npp/viirs/rsc/VIIRSResourceData.java b/cave/com.raytheon.uf.viz.npp.viirs/src/com/raytheon/uf/viz/npp/viirs/rsc/VIIRSResourceData.java deleted file mode 100644 index 907ee7461f..0000000000 --- a/cave/com.raytheon.uf.viz.npp.viirs/src/com/raytheon/uf/viz/npp/viirs/rsc/VIIRSResourceData.java +++ /dev/null @@ -1,74 +0,0 @@ -/** - * 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.npp.viirs.rsc; - -import java.util.ArrayList; -import java.util.List; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; - -import com.raytheon.uf.common.dataplugin.PluginDataObject; -import com.raytheon.uf.common.dataplugin.npp.viirs.VIIRSDataRecord; -import com.raytheon.uf.viz.core.exception.VizException; -import com.raytheon.uf.viz.core.rsc.AbstractRequestableResourceData; -import com.raytheon.uf.viz.core.rsc.AbstractVizResource; -import com.raytheon.uf.viz.core.rsc.LoadProperties; - -/** - * VIIRS Resource data - * - *
- * 
- * SOFTWARE HISTORY
- * 
- * Date         Ticket#    Engineer    Description
- * ------------ ---------- ----------- --------------------------
- * Nov 30, 2011            mschenke     Initial creation
- * 
- * 
- * - * @author mschenke - * @version 1.0 - */ -@XmlAccessorType(XmlAccessType.NONE) -public class VIIRSResourceData extends AbstractRequestableResourceData { - - /* - * (non-Javadoc) - * - * @see com.raytheon.uf.viz.core.rsc.AbstractRequestableResourceData# - * constructResource(com.raytheon.uf.viz.core.rsc.LoadProperties, - * com.raytheon.uf.viz.core.rsc.PluginDataObject[]) - */ - @Override - protected AbstractVizResource constructResource( - LoadProperties loadProperties, PluginDataObject[] objects) - throws VizException { - List viirsRecords = new ArrayList(); - for (PluginDataObject pdo : objects) { - if (pdo instanceof VIIRSDataRecord) { - viirsRecords.add((VIIRSDataRecord) pdo); - } - } - return new VIIRSResource(this, loadProperties, viirsRecords); - } - -} diff --git a/cave/com.raytheon.uf.viz.preciprate/localization/styleRules/precipRateImageryStyleRules.xml b/cave/com.raytheon.uf.viz.preciprate/localization/styleRules/precipRateImageryStyleRules.xml index 0736774543..14d5ee8c1e 100644 --- a/cave/com.raytheon.uf.viz.preciprate/localization/styleRules/precipRateImageryStyleRules.xml +++ b/cave/com.raytheon.uf.viz.preciprate/localization/styleRules/precipRateImageryStyleRules.xml @@ -1,23 +1,4 @@ - @@ -25,17 +6,26 @@ in/hr - scan/16 Level Reflectivity (DHR) + Radar/OSF/16 Level Reflectivity - - - - - - - - + + + + + + + + + + + + + + + + + - \ No newline at end of file + \ No newline at end of file diff --git a/cave/com.raytheon.uf.viz.preciprate/src/com/raytheon/uf/viz/preciprate/PrecipRateResource.java b/cave/com.raytheon.uf.viz.preciprate/src/com/raytheon/uf/viz/preciprate/PrecipRateResource.java index e2110e2743..58b8ba4cfa 100644 --- a/cave/com.raytheon.uf.viz.preciprate/src/com/raytheon/uf/viz/preciprate/PrecipRateResource.java +++ b/cave/com.raytheon.uf.viz.preciprate/src/com/raytheon/uf/viz/preciprate/PrecipRateResource.java @@ -25,6 +25,10 @@ import java.text.DecimalFormat; import java.util.ArrayList; import java.util.Map; +import javax.measure.converter.MultiplyConverter; +import javax.measure.converter.UnitConverter; +import javax.measure.unit.NonSI; +import javax.measure.unit.Unit; import javax.xml.bind.JAXB; import com.raytheon.uf.common.colormap.ColorMap; @@ -54,35 +58,37 @@ import com.raytheon.uf.viz.core.rsc.capabilities.ColorMapCapability; import com.raytheon.uf.viz.core.style.ParamLevelMatchCriteria; import com.raytheon.uf.viz.core.style.StyleManager; import com.raytheon.uf.viz.core.style.StyleRule; +import com.raytheon.uf.viz.core.style.DataMappingPreferences.DataMappingEntry; import com.raytheon.uf.viz.preciprate.xml.PrecipRateXML; import com.raytheon.uf.viz.preciprate.xml.SCANConfigPrecipRateXML; import com.raytheon.viz.core.style.image.ImagePreferences; +import com.raytheon.viz.core.units.PiecewisePixel; import com.raytheon.viz.radar.VizRadarRecord; import com.raytheon.viz.radar.interrogators.IRadarInterrogator; import com.raytheon.viz.radar.rsc.RadarTextResource.IRadarTextGeneratingResource; import com.raytheon.viz.radar.rsc.image.RadarRadialResource; +import com.raytheon.viz.radar.util.DataUtilities; public class PrecipRateResource extends RadarRadialResource implements IRadarTextGeneratingResource { private static final transient IUFStatusHandler statusHandler = UFStatus .getHandler(PrecipRateResource.class); - // max and min preciprate english unit vals - private static final float prmax = 7.0f; - - private static final float prmin = 0.0f; - /* formatter */ private DecimalFormat df = new DecimalFormat(); private SCANConfigPrecipRateXML cfgMXL = null; private PrecipRateRecord precipRecord; + + private PrecipRateResourceData data = null; public PrecipRateResource(PrecipRateResourceData data, LoadProperties props, IRadarInterrogator interrogator) throws VizException { + super(data, props, interrogator); + this.data = data; } /* @@ -211,7 +217,7 @@ public class PrecipRateResource extends RadarRadialResource implements * raytheon.uf.viz.core.IGraphicsTarget, * com.raytheon.uf.viz.core.drawables.ColorMapParameters, * com.raytheon.uf.common.dataplugin.radar.RadarRecord, java.awt.Rectangle) - */ + @Override protected IImage createImage(IGraphicsTarget target, ColorMapParameters params, final RadarRecord record, @@ -221,6 +227,7 @@ public class PrecipRateResource extends RadarRadialResource implements new RadarImageDataRetrievalAdapter(record, null, rect) { }, params); } + */ @Override protected ColorMapParameters getColorMapParameters(IGraphicsTarget target, @@ -245,6 +252,11 @@ public class PrecipRateResource extends RadarRadialResource implements colorMapParameters.setDataMin(0); colorMapParameters.setDataMapping(((ImagePreferences) sr .getPreferences()).getDataMapping()); + double[] d1 = {1,255}; + double[] d2 = {0,25.4}; + @SuppressWarnings({ "rawtypes", "unchecked" }) + PiecewisePixel pw = new PiecewisePixel(NonSI.INCH.divide(NonSI.HOUR), d1, d2); + colorMapParameters.setDataUnit(pw); getCapability(ColorMapCapability.class).setColorMapParameters( colorMapParameters); return colorMapParameters; @@ -346,6 +358,10 @@ public class PrecipRateResource extends RadarRadialResource implements try { dataVal = new RadarDataInterrogator(record).getDataValue(latLon .asLatLon()); + if (dataVal == 0) { + return "NO DATA"; + } + } catch (Exception e) { UFStatus.getHandler().handle( Priority.PROBLEM, @@ -353,13 +369,10 @@ public class PrecipRateResource extends RadarRadialResource implements + e.getLocalizedMessage(), e); } - if (dataVal == null || dataVal == 0) { - return "NO DATA"; - } - ColorMapParameters params = getCapability(ColorMapCapability.class) .getColorMapParameters(); - double val = params.getImageToDisplayConverter().convert(dataVal); + double val = params.getDataToDisplayConverter().convert(dataVal); + if (val >= ScanUtils.MM_TO_INCH * precipRecord.getHailcap() || Double.isNaN(val)) { return String.format( @@ -377,5 +390,81 @@ public class PrecipRateResource extends RadarRadialResource implements throws VizException { return null; } + + protected byte[] createConversionTable(ColorMapParameters params, + RadarRecord record) { + + UnitConverter dataToImage = params.getDataToImageConverter();; + Unit dataUnit = params.getDataUnit(); + // precompute the converted value for every possible value in the + // record. + byte[] table = new byte[record.getNumLevels()]; + for (int i = 0; i < record.getNumLevels(); i++) { + double image = dataToImage.convert(i); + if (Double.isNaN(image)) { + double d = dataUnit.getConverterTo(params.getDisplayUnit()) + .convert(i); + if (Double.isNaN(d)) { + // This means that the data is a non-numeric value, most + // likely a flag of some sort + if (record.getNumLevels() <= 16) { + // For 3 and 4 bit products products try to match the + // flag value to a string value in the params + String value = record.getDecodedThreshold(i).toString(); + for (DataMappingEntry entry : params.getDataMapping() + .getEntries()) { + if (value.equals(entry.getLabel()) + || value.equals(entry.getSample())) { + table[i] = entry.getPixelValue().byteValue(); + break; + } + } + } else { + // For 8 bit products the flag value should be + // specifically handled in the style rules. For example + // if 1 is a flag for RF than pixel value 1 in the style + // rules will need to be RF. This is not + // a graceful seperation of data and representation but + // it works + table[i] = (byte) i; + } + } else { + // the data value is outside the range of the colormap + UnitConverter image2disp = params + .getImageToDisplayConverter(); + if (image2disp == null) { + continue; + } + for (int j = 0; j < 256; j++) { + double disp = image2disp.convert(j); + if (Double.isNaN(disp)) { + continue; + } + if (d < disp) { + // Map data values smaller than the colormap min to + // 0, which should be no data. + // table[i] = (byte) 0; + // If we want small values to appear as the lowest + // data value than do this next line instead + // This was changed for the DUA product so + // differences less than -5 get mapped to a data + // value. + table[i] = (byte) j; + break; + } + if (d > disp) { + // map data values larger than the colormap max to + // the highest value + table[i] = (byte) j; + } + + } + } + } else { + table[i] = (byte) Math.round(image); + } + } + return table; + } } diff --git a/cave/com.raytheon.uf.viz.python.swt/src/com/raytheon/uf/viz/python/swt/widgets/ScaleWidget.java b/cave/com.raytheon.uf.viz.python.swt/src/com/raytheon/uf/viz/python/swt/widgets/ScaleWidget.java index f5e5ce53e6..6c84499acc 100644 --- a/cave/com.raytheon.uf.viz.python.swt/src/com/raytheon/uf/viz/python/swt/widgets/ScaleWidget.java +++ b/cave/com.raytheon.uf.viz.python.swt/src/com/raytheon/uf/viz/python/swt/widgets/ScaleWidget.java @@ -59,6 +59,8 @@ public class ScaleWidget extends Widget { private int range; private float resolution; + + private int precision; private DecimalFormat format; @@ -71,7 +73,6 @@ public class ScaleWidget extends Widget { public ScaleWidget(String label) { this(); setLabel(label); - setResolution(1.0f); } /** @@ -85,6 +86,7 @@ public class ScaleWidget extends Widget { range = 100; resolution = 1; + precision = 3; } /* @@ -111,15 +113,18 @@ public class ScaleWidget extends Widget { minValue = ((Number) (getOptions().get(0))).floatValue(); maxValue = ((Number) (getOptions().get(1))).floatValue(); - range = (int) ((maxValue - minValue) / getResolution()); - + range = Math.round((maxValue - minValue) / getResolution()); + + format = new DecimalFormat(); + format.setMaximumFractionDigits(precision); + scale.setMinimum(0); scale.setMaximum(range); scale.setIncrement(1); scale.setPageIncrement(1); if (getValue() == null) { - setValue(new Float(minValue)); + setValue(new Float(minValue)); } setInitialScaleValue(((Number) (getValue())).floatValue()); @@ -145,7 +150,7 @@ public class ScaleWidget extends Widget { * @return the scaleValue */ private float getScaleValue() { - return scale.getSelection() * resolution + minValue; + return scale.getSelection() * resolution + minValue; } /** @@ -159,14 +164,14 @@ public class ScaleWidget extends Widget { */ private void setInitialScaleValue(float scaleValue) { - int position = (int) ((scaleValue - minValue) / resolution); + int position = Math.round((scaleValue - minValue) / resolution); scale.setSelection(position); } /** * @return the resolution */ - public double getResolution() { + public float getResolution() { return resolution; } @@ -182,17 +187,14 @@ public class ScaleWidget extends Widget { public void setResolution(float resolution) { if (resolution != 0.0f) { this.resolution = resolution; - int digits = 0; - double log = Math.log10(resolution); - if (log < 0) { - digits = (int) Math.ceil(-log); - } - format = new DecimalFormat(); - format.setMaximumFractionDigits(digits); } } - /* + public int getPrecision() { + return precision; + } + + /* * (non-Javadoc) * * @see com.raytheon.viz.gfe.ui.runtimeui.widgets.Widget#toString() @@ -233,4 +235,8 @@ public class ScaleWidget extends Widget { super.setOptions(options); } + public void setPrecision(int precision) { + this.precision = precision; + } + } diff --git a/cave/com.raytheon.uf.viz.radar.gl/src/com/raytheon/uf/viz/radar/gl/mosaic/GLMosaicImage.java b/cave/com.raytheon.uf.viz.radar.gl/src/com/raytheon/uf/viz/radar/gl/mosaic/GLMosaicImage.java index de4808393f..7f1b5114f2 100644 --- a/cave/com.raytheon.uf.viz.radar.gl/src/com/raytheon/uf/viz/radar/gl/mosaic/GLMosaicImage.java +++ b/cave/com.raytheon.uf.viz.radar.gl/src/com/raytheon/uf/viz/radar/gl/mosaic/GLMosaicImage.java @@ -20,7 +20,9 @@ package com.raytheon.uf.viz.radar.gl.mosaic; import com.raytheon.uf.viz.core.DrawableImage; -import com.raytheon.viz.core.gl.images.AbstractGLImage; +import com.raytheon.uf.viz.core.IExtent; +import com.raytheon.uf.viz.core.drawables.ColorMapParameters; +import com.raytheon.viz.core.gl.images.GLColormappedImage; import com.raytheon.viz.core.gl.images.GLDelegateImage; import com.raytheon.viz.radar.rsc.mosaic.ext.IRadarMosaicImageExtension.IMosaicImage; @@ -42,8 +44,8 @@ import com.raytheon.viz.radar.rsc.mosaic.ext.IRadarMosaicImageExtension.IMosaicI * @version 1.0 */ -public class GLMosaicImage extends GLDelegateImage implements - IMosaicImage { +public class GLMosaicImage extends GLDelegateImage + implements IMosaicImage { private DrawableImage[] images; @@ -51,14 +53,18 @@ public class GLMosaicImage extends GLDelegateImage implements private int[] bounds; + private IExtent extent; + /** * @param target * @param image * @param extensionClass */ - public GLMosaicImage(AbstractGLImage image, int[] bounds) { + public GLMosaicImage(GLColormappedImage image, int[] bounds, + IExtent imageExtent) { super(image, GLRadarMosaicImageExtension.class); this.bounds = bounds; + this.extent = imageExtent; } /* @@ -104,4 +110,56 @@ public class GLMosaicImage extends GLDelegateImage implements this.images = images; repaint = true; } + + /* + * (non-Javadoc) + * + * @see + * com.raytheon.viz.radar.rsc.mosaic.ext.IRadarMosaicImageExtension.IMosaicImage + * #setImageExtent(com.raytheon.uf.viz.core.IExtent) + */ + @Override + public void setImageExtent(IExtent imageExtent) { + this.extent = imageExtent; + } + + public IExtent getImageExtent() { + return extent; + } + + /* + * (non-Javadoc) + * + * @see + * com.raytheon.uf.viz.core.drawables.IColormappedImage#getColorMapParameters + * () + */ + @Override + public ColorMapParameters getColorMapParameters() { + return image.getColorMapParameters(); + } + + /* + * (non-Javadoc) + * + * @see + * com.raytheon.uf.viz.core.drawables.IColormappedImage#setColorMapParameters + * (com.raytheon.uf.viz.core.drawables.ColorMapParameters) + */ + @Override + public void setColorMapParameters(ColorMapParameters params) { + image.setColorMapParameters(params); + } + + /* + * (non-Javadoc) + * + * @see com.raytheon.uf.viz.core.drawables.IColormappedImage#getValue(int, + * int) + */ + @Override + public double getValue(int x, int y) { + return image.getValue(x, y); + } + } diff --git a/cave/com.raytheon.uf.viz.radar.gl/src/com/raytheon/uf/viz/radar/gl/mosaic/GLRadarMosaicImageExtension.java b/cave/com.raytheon.uf.viz.radar.gl/src/com/raytheon/uf/viz/radar/gl/mosaic/GLRadarMosaicImageExtension.java index 30a0fce788..3fbd1ff9ea 100644 --- a/cave/com.raytheon.uf.viz.radar.gl/src/com/raytheon/uf/viz/radar/gl/mosaic/GLRadarMosaicImageExtension.java +++ b/cave/com.raytheon.uf.viz.radar.gl/src/com/raytheon/uf/viz/radar/gl/mosaic/GLRadarMosaicImageExtension.java @@ -24,6 +24,7 @@ import java.nio.ByteBuffer; import javax.media.opengl.GL; import com.raytheon.uf.viz.core.DrawableImage; +import com.raytheon.uf.viz.core.IExtent; import com.raytheon.uf.viz.core.PixelCoverage; import com.raytheon.uf.viz.core.drawables.ColorMapParameters; import com.raytheon.uf.viz.core.drawables.IImage; @@ -60,10 +61,11 @@ public class GLRadarMosaicImageExtension extends AbstractGLSLImagingExtension private AbstractGLImage writeToImage; public GLMosaicImage initializeRaster(int[] imageBounds, - ColorMapParameters params) throws VizException { + IExtent imageExtent, ColorMapParameters params) throws VizException { return new GLMosaicImage(target.getExtension( GLOffscreenRenderingExtension.class).constructOffscreenImage( - ByteBuffer.class, imageBounds, params), imageBounds); + ByteBuffer.class, imageBounds, params), imageBounds, + imageExtent); } /* @@ -96,14 +98,23 @@ public class GLRadarMosaicImageExtension extends AbstractGLSLImagingExtension IOffscreenRenderingExtension extension = target .getExtension(IOffscreenRenderingExtension.class); try { - extension.renderOffscreen(mosaicImage); + extension.renderOffscreen(mosaicImage, + mosaicImage.getImageExtent()); DrawableImage[] imagesToMosaic = mosaicImage .getImagesToMosaic(); // Make sure images are staged before we mosaic them ImagingSupport.prepareImages(target, imagesToMosaic); - // Need to set repaint based on if drawing completed - mosaicImage.setRepaint(drawRasters(paintProps, - imagesToMosaic) == false); + + boolean allPainted = true; + // Each image needs to draw separately due to gl issues when + // zoomed in very far, rendered parts near the corners don't + // show all the pixels for each image. Pushing and popping + // GL_TEXTURE_BIT before/after each render fixes this issue + for (DrawableImage di : imagesToMosaic) { + allPainted &= drawRasters(paintProps, di); + } + // Need to set repaint based on if drawing completed. + mosaicImage.setRepaint(allPainted == false); } finally { extension.renderOnscreen(); } @@ -117,7 +128,7 @@ public class GLRadarMosaicImageExtension extends AbstractGLSLImagingExtension } else { GL gl = target.getGl(); // activate on texture2 as 0 is radar image and 1 is colormap - gl.glActiveTexture(GL.GL_TEXTURE2); + gl.glActiveTexture(GL.GL_TEXTURE1); gl.glBindTexture(writeToImage.getTextureStorageType(), writeToImage.getTextureid()); return image; @@ -136,8 +147,8 @@ public class GLRadarMosaicImageExtension extends AbstractGLSLImagingExtension public void postImageRender(PaintProperties paintProps, AbstractGLImage image, Object data) throws VizException { GL gl = target.getGl(); - // activate on texture2 as 0 is radar image and 1 is colormap - gl.glActiveTexture(GL.GL_TEXTURE2); + // activate on texture2 as 0 is radar image + gl.glActiveTexture(GL.GL_TEXTURE1); gl.glBindTexture(writeToImage.getTextureStorageType(), 0); } @@ -154,7 +165,7 @@ public class GLRadarMosaicImageExtension extends AbstractGLSLImagingExtension public void loadShaderData(GLShaderProgram program, IImage image, PaintProperties paintProps) throws VizException { program.setUniform("radarData", 0); - program.setUniform("mosaicTexture", 2); + program.setUniform("mosaicTexture", 1); // pass in width and height program.setUniform("height", (paintProps.getCanvasBounds().height)); diff --git a/cave/com.raytheon.uf.viz.radarapps.rps/src/com/raytheon/uf/viz/radarapps/rps/ListEditorWindow.java b/cave/com.raytheon.uf.viz.radarapps.rps/src/com/raytheon/uf/viz/radarapps/rps/ListEditorWindow.java index 930c329682..77b9c83eac 100644 --- a/cave/com.raytheon.uf.viz.radarapps.rps/src/com/raytheon/uf/viz/radarapps/rps/ListEditorWindow.java +++ b/cave/com.raytheon.uf.viz.radarapps.rps/src/com/raytheon/uf/viz/radarapps/rps/ListEditorWindow.java @@ -544,8 +544,11 @@ public class ListEditorWindow { // See AWIPS-1 D-2D/src/applications/radar/common/prod-mgmt.tcl : // format_product protected String getRequestLabel(Request req) { + RadarProduct rp = ProductInfo.getInstance().getPoductForCode( req.productCode); + Collection variants = ProductInfo.getInstance().select( + new ProductInfo.Selector(null, rp.mnemonic, null, null)); StringBuilder sb = new StringBuilder(); if (rp != null) { if (rp.name != null) @@ -555,9 +558,9 @@ public class ListEditorWindow { * sb.append(" (").append(rp.mnemonic).append(')'); */ - if (rp.levels != null) + if (rp.levels != null && variants.size() > 1) sb.append(", levels ").append(rp.levels); - if (rp.resolution != null) + if (rp.resolution != null && variants.size() > 1) sb.append(", resol ").append(rp.resolution); if (rp.params.contains(Param.BASELINE) || rp.params.contains(Param.CFC_BITMAP)) { @@ -583,6 +586,20 @@ public class ListEditorWindow { sb.append(", Latest"); } + if (rp.params.contains(Param.TIME_SPAN_MINUTES)) { + int thour = req.getTimeSpan() / 60; + int tmin = req.getTimeSpan() - thour * 60; + sb.append(String.format(", Time span %d:%02d", thour, tmin)); + if (req.getEndHour() != -1) { + int ehour = req.getEndHour() / 60; + int emin = req.getEndHour() - ehour * 60; + sb.append(String + .format(", End time %02d:%02d", ehour, emin)); + } else { + sb.append(", Latest"); + } + } + if (rp.params.contains(Param.ELEVATION)) { sb.append(", "); float angle = req.getElevationAngle() / 10.0f; diff --git a/cave/com.raytheon.uf.viz.thinclient/src/com/raytheon/uf/viz/thinclient/localization/ThinClientLocalizationInitializer.java b/cave/com.raytheon.uf.viz.thinclient/src/com/raytheon/uf/viz/thinclient/localization/ThinClientLocalizationInitializer.java index 5abf32146b..fd712a0b85 100644 --- a/cave/com.raytheon.uf.viz.thinclient/src/com/raytheon/uf/viz/thinclient/localization/ThinClientLocalizationInitializer.java +++ b/cave/com.raytheon.uf.viz.thinclient/src/com/raytheon/uf/viz/thinclient/localization/ThinClientLocalizationInitializer.java @@ -63,7 +63,7 @@ public class ThinClientLocalizationInitializer extends LocalizationInitializer { @Override protected void setupServers() throws VizException { - HttpClient.getInstance().enableGzipHandling(); + HttpClient.getInstance().enableGzipResponseHandling(); if (promptUI) { ThinClientConnectivityDialog dlg = new ThinClientConnectivityDialog( checkAlertviz); @@ -100,6 +100,10 @@ public class ThinClientLocalizationInitializer extends LocalizationInitializer { .getString(ThinClientPreferenceConstants.P_SERVICES_PROXY)); VizApp.setPypiesServer(store .getString(ThinClientPreferenceConstants.P_PYPIES_PROXY)); + if (store + .getBoolean(ThinClientPreferenceConstants.P_ENABLE_REQUEST_COMPRESSION)) { + HttpClient.getInstance().enableRequestCompression(); + } } else { GetServersRequest req = new GetServersRequest(); GetServersResponse resp = (GetServersResponse) ThriftClient diff --git a/cave/com.raytheon.uf.viz.thinclient/src/com/raytheon/uf/viz/thinclient/preferences/PreferenceInitializer.java b/cave/com.raytheon.uf.viz.thinclient/src/com/raytheon/uf/viz/thinclient/preferences/PreferenceInitializer.java index 01178a8d6e..fe660a6c61 100644 --- a/cave/com.raytheon.uf.viz.thinclient/src/com/raytheon/uf/viz/thinclient/preferences/PreferenceInitializer.java +++ b/cave/com.raytheon.uf.viz.thinclient/src/com/raytheon/uf/viz/thinclient/preferences/PreferenceInitializer.java @@ -69,6 +69,10 @@ public class PreferenceInitializer extends AbstractPreferenceInitializer { // By default keep jms enabled store.setDefault(ThinClientPreferenceConstants.P_DISABLE_JMS, false); + store.setDefault( + ThinClientPreferenceConstants.P_ENABLE_REQUEST_COMPRESSION, + true); + // Menu times will be enabled by default store.setDefault(ThinClientPreferenceConstants.P_DISABLE_MENU_TIMES, false); diff --git a/cave/com.raytheon.uf.viz.thinclient/src/com/raytheon/uf/viz/thinclient/preferences/ThinClientPreferenceConstants.java b/cave/com.raytheon.uf.viz.thinclient/src/com/raytheon/uf/viz/thinclient/preferences/ThinClientPreferenceConstants.java index 27e8e90e6a..bb9e2af67f 100644 --- a/cave/com.raytheon.uf.viz.thinclient/src/com/raytheon/uf/viz/thinclient/preferences/ThinClientPreferenceConstants.java +++ b/cave/com.raytheon.uf.viz.thinclient/src/com/raytheon/uf/viz/thinclient/preferences/ThinClientPreferenceConstants.java @@ -68,5 +68,7 @@ public class ThinClientPreferenceConstants { public static String P_DISABLE_JMS = "disableJms"; + public static String P_ENABLE_REQUEST_COMPRESSION = "enableRequestCompression"; + public static String P_PREFERENCE_PLACEHOLDER = "placeholderPreference"; } diff --git a/cave/com.raytheon.uf.viz.xy.crosssection/localization/volumebrowser/CrossSectionRotations.xml b/cave/com.raytheon.uf.viz.xy.crosssection/localization/volumebrowser/CrossSectionRotations.xml index 851602e0d3..bd7a78f306 100644 --- a/cave/com.raytheon.uf.viz.xy.crosssection/localization/volumebrowser/CrossSectionRotations.xml +++ b/cave/com.raytheon.uf.viz.xy.crosssection/localization/volumebrowser/CrossSectionRotations.xml @@ -19,8 +19,8 @@ further_licensing_information. --> - - + + diff --git a/cave/com.raytheon.uf.viz.xy.crosssection/src/com/raytheon/uf/viz/xy/crosssection/CrossSectionRotation.java b/cave/com.raytheon.uf.viz.xy.crosssection/src/com/raytheon/uf/viz/xy/crosssection/CrossSectionRotation.java index e33a6d9939..e7b8c92085 100644 --- a/cave/com.raytheon.uf.viz.xy.crosssection/src/com/raytheon/uf/viz/xy/crosssection/CrossSectionRotation.java +++ b/cave/com.raytheon.uf.viz.xy.crosssection/src/com/raytheon/uf/viz/xy/crosssection/CrossSectionRotation.java @@ -60,6 +60,14 @@ public class CrossSectionRotation { } float[] u = floatData.get(2); float[] v = floatData.get(3); + for (int i = 0; i < u.length; i += 1) { + if (u[i] <= -9999) { + u[i] = Float.NaN; + } + if (v[i] <= -9999) { + v[i] = Float.NaN; + } + } float[] result = new float[u.length]; int width = linePoints.size(); int height = result.length / width; diff --git a/cave/com.raytheon.uf.viz.xy.timeheight/src/com/raytheon/uf/viz/xy/timeheight/display/TimeHeightDescriptor.java b/cave/com.raytheon.uf.viz.xy.timeheight/src/com/raytheon/uf/viz/xy/timeheight/display/TimeHeightDescriptor.java index 58ad325bdf..b81a6685be 100644 --- a/cave/com.raytheon.uf.viz.xy.timeheight/src/com/raytheon/uf/viz/xy/timeheight/display/TimeHeightDescriptor.java +++ b/cave/com.raytheon.uf.viz.xy.timeheight/src/com/raytheon/uf/viz/xy/timeheight/display/TimeHeightDescriptor.java @@ -55,6 +55,8 @@ import com.raytheon.viz.core.slice.request.VerticalPointRequest.TimeDirection; @XmlAccessorType(XmlAccessType.NONE) public class TimeHeightDescriptor extends XyGraphDescriptor { + public static final int REAL_FRAME_COUNT_TO_USE_WHEN_FRAME_COUNT_IS_ONE = 999; + @XmlAttribute public TimeDirection timeDirection; @@ -138,4 +140,16 @@ public class TimeHeightDescriptor extends XyGraphDescriptor { return false; } + @Override + public int getNumberOfFrames() { + int numFrames = super.getNumberOfFrames(); + if (numFrames == 1) { + // reset to a different number because A1 did + numFrames = Math.min( + REAL_FRAME_COUNT_TO_USE_WHEN_FRAME_COUNT_IS_ONE, + limitedNumberOfFrames); + } + return numFrames; + } + } diff --git a/cave/com.raytheon.uf.viz.xy.timeheight/src/com/raytheon/uf/viz/xy/timeheight/display/TimeHeightRenderableDisplay.java b/cave/com.raytheon.uf.viz.xy.timeheight/src/com/raytheon/uf/viz/xy/timeheight/display/TimeHeightRenderableDisplay.java index d2c3467a51..beb96af98d 100644 --- a/cave/com.raytheon.uf.viz.xy.timeheight/src/com/raytheon/uf/viz/xy/timeheight/display/TimeHeightRenderableDisplay.java +++ b/cave/com.raytheon.uf.viz.xy.timeheight/src/com/raytheon/uf/viz/xy/timeheight/display/TimeHeightRenderableDisplay.java @@ -19,6 +19,8 @@ **/ package com.raytheon.uf.viz.xy.timeheight.display; +import java.util.Map; + import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlRootElement; @@ -28,6 +30,7 @@ import com.raytheon.uf.common.status.UFStatus; import com.raytheon.uf.common.status.UFStatus.Priority; import com.raytheon.uf.viz.core.IGraphicsTarget; import com.raytheon.uf.viz.core.PixelExtent; +import com.raytheon.uf.viz.core.VizConstants; import com.raytheon.uf.viz.core.drawables.PaintProperties; import com.raytheon.uf.viz.core.drawables.ResourcePair; import com.raytheon.uf.viz.core.exception.VizException; @@ -147,4 +150,15 @@ public class TimeHeightRenderableDisplay extends AbstractHeightDisplay { resourceList.addPostAddListener(new ImageCombiner(getDescriptor())); } + @Override + public Map getGlobalsMap() { + Map globals = super.getGlobalsMap(); + if (globals + .get(VizConstants.FRAMES_ID) + .equals(TimeHeightDescriptor.REAL_FRAME_COUNT_TO_USE_WHEN_FRAME_COUNT_IS_ONE)) { + globals.put(VizConstants.FRAMES_ID, 1); + } + return globals; + } + } diff --git a/cave/com.raytheon.uf.viz.xy.timeseries/src/com/raytheon/uf/viz/xy/timeseries/display/TimeSeriesDescriptor.java b/cave/com.raytheon.uf.viz.xy.timeseries/src/com/raytheon/uf/viz/xy/timeseries/display/TimeSeriesDescriptor.java index 215922c31b..61aa4427a2 100644 --- a/cave/com.raytheon.uf.viz.xy.timeseries/src/com/raytheon/uf/viz/xy/timeseries/display/TimeSeriesDescriptor.java +++ b/cave/com.raytheon.uf.viz.xy.timeseries/src/com/raytheon/uf/viz/xy/timeseries/display/TimeSeriesDescriptor.java @@ -46,6 +46,8 @@ import com.raytheon.uf.viz.xy.timeseries.graph.TimeSeriesGraph; @XmlAccessorType(XmlAccessType.NONE) public class TimeSeriesDescriptor extends XyGraphDescriptor { + public static final int REAL_FRAME_COUNT_TO_USE_WHEN_FRAME_COUNT_IS_ONE = 999; + public TimeSeriesDescriptor() { super(); } @@ -64,4 +66,16 @@ public class TimeSeriesDescriptor extends XyGraphDescriptor { return new TimeSeriesGraph(this); } + @Override + public int getNumberOfFrames() { + int numFrames = super.getNumberOfFrames(); + if (numFrames == 1) { + // reset to a different number because A1 did + numFrames = Math.min( + REAL_FRAME_COUNT_TO_USE_WHEN_FRAME_COUNT_IS_ONE, + limitedNumberOfFrames); + } + return numFrames; + } + } diff --git a/cave/com.raytheon.uf.viz.xy.timeseries/src/com/raytheon/uf/viz/xy/timeseries/display/TimeSeriesRenderableDisplay.java b/cave/com.raytheon.uf.viz.xy.timeseries/src/com/raytheon/uf/viz/xy/timeseries/display/TimeSeriesRenderableDisplay.java index 26190add27..f5685f6013 100644 --- a/cave/com.raytheon.uf.viz.xy.timeseries/src/com/raytheon/uf/viz/xy/timeseries/display/TimeSeriesRenderableDisplay.java +++ b/cave/com.raytheon.uf.viz.xy.timeseries/src/com/raytheon/uf/viz/xy/timeseries/display/TimeSeriesRenderableDisplay.java @@ -19,6 +19,8 @@ **/ package com.raytheon.uf.viz.xy.timeseries.display; +import java.util.Map; + import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; import javax.xml.bind.annotation.XmlRootElement; @@ -27,14 +29,13 @@ import com.raytheon.uf.common.status.IUFStatusHandler; import com.raytheon.uf.common.status.UFStatus; import com.raytheon.uf.common.status.UFStatus.Priority; import com.raytheon.uf.viz.core.PixelExtent; +import com.raytheon.uf.viz.core.VizConstants; import com.raytheon.uf.viz.core.drawables.ResourcePair; import com.raytheon.uf.viz.core.exception.VizException; import com.raytheon.uf.viz.core.rsc.LoadProperties; import com.raytheon.uf.viz.core.rsc.ResourceList; import com.raytheon.uf.viz.core.rsc.ResourceProperties; -import com.raytheon.uf.viz.core.status.StatusConstants; import com.raytheon.uf.viz.d2d.ui.AbstractNonMapDisplay; -import com.raytheon.uf.viz.d2d.ui.Activator; import com.raytheon.uf.viz.xy.map.rsc.GraphResource; import com.raytheon.uf.viz.xy.map.rsc.GraphResourceData; import com.raytheon.uf.viz.xy.map.rsc.GraphResourceData.OverlayMode; @@ -58,7 +59,9 @@ import com.raytheon.uf.viz.xy.map.rsc.GraphResourceData.OverlayMode; @XmlAccessorType(XmlAccessType.NONE) @XmlRootElement public class TimeSeriesRenderableDisplay extends AbstractNonMapDisplay { - private static final transient IUFStatusHandler statusHandler = UFStatus.getHandler(TimeSeriesRenderableDisplay.class); + private static final transient IUFStatusHandler statusHandler = UFStatus + .getHandler(TimeSeriesRenderableDisplay.class); + public TimeSeriesRenderableDisplay() { this(new PixelExtent(0, 1000, 0, 1000)); } @@ -97,4 +100,15 @@ public class TimeSeriesRenderableDisplay extends AbstractNonMapDisplay { } } + @Override + public Map getGlobalsMap() { + Map globals = super.getGlobalsMap(); + if (globals + .get(VizConstants.FRAMES_ID) + .equals(TimeSeriesDescriptor.REAL_FRAME_COUNT_TO_USE_WHEN_FRAME_COUNT_IS_ONE)) { + globals.put(VizConstants.FRAMES_ID, 1); + } + return globals; + } + } diff --git a/cave/com.raytheon.uf.viz.xy.timeseries/src/com/raytheon/uf/viz/xy/timeseries/graph/TimeSeriesGraph.java b/cave/com.raytheon.uf.viz.xy.timeseries/src/com/raytheon/uf/viz/xy/timeseries/graph/TimeSeriesGraph.java index b0691645e8..5676709aa0 100644 --- a/cave/com.raytheon.uf.viz.xy.timeseries/src/com/raytheon/uf/viz/xy/timeseries/graph/TimeSeriesGraph.java +++ b/cave/com.raytheon.uf.viz.xy.timeseries/src/com/raytheon/uf/viz/xy/timeseries/graph/TimeSeriesGraph.java @@ -77,10 +77,6 @@ public class TimeSeriesGraph extends AbstractGraph { xLabels = new ArrayList>(); } - public double getVerticleMiddle() { - return xAxes[5].getCoordinates()[0].y; - } - @Override protected void createAxes() { // Create the Axis if they do not exist diff --git a/cave/com.raytheon.uf.viz.xy.timeseries/src/com/raytheon/uf/viz/xy/timeseries/rsc/TimeSeriesResource.java b/cave/com.raytheon.uf.viz.xy.timeseries/src/com/raytheon/uf/viz/xy/timeseries/rsc/TimeSeriesResource.java index 4e7dfa9bb5..6be8e20194 100644 --- a/cave/com.raytheon.uf.viz.xy.timeseries/src/com/raytheon/uf/viz/xy/timeseries/rsc/TimeSeriesResource.java +++ b/cave/com.raytheon.uf.viz.xy.timeseries/src/com/raytheon/uf/viz/xy/timeseries/rsc/TimeSeriesResource.java @@ -25,6 +25,7 @@ import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Collections; import java.util.Comparator; +import java.util.List; import java.util.Set; import java.util.TimeZone; import java.util.TreeSet; @@ -45,6 +46,7 @@ import com.raytheon.uf.common.status.IUFStatusHandler; import com.raytheon.uf.common.status.UFStatus; import com.raytheon.uf.common.status.UFStatus.Priority; import com.raytheon.uf.common.time.DataTime; +import com.raytheon.uf.viz.core.IExtent; import com.raytheon.uf.viz.core.IGraphicsTarget; import com.raytheon.uf.viz.core.PixelCoverage; import com.raytheon.uf.viz.core.PixelExtent; @@ -70,7 +72,6 @@ import com.raytheon.uf.viz.xy.map.rsc.IInsetMapResource; import com.raytheon.uf.viz.xy.map.rsc.PointRenderable; import com.raytheon.uf.viz.xy.timeseries.adapter.AbstractTimeSeriesAdapter; import com.raytheon.uf.viz.xy.timeseries.display.TimeSeriesDescriptor; -import com.raytheon.uf.viz.xy.timeseries.graph.TimeSeriesGraph; import com.raytheon.viz.core.graphing.util.GraphPrefsFactory; import com.raytheon.viz.core.graphing.xy.XYData; import com.raytheon.viz.core.graphing.xy.XYDataList; @@ -295,8 +296,16 @@ public class TimeSeriesResource extends // draw wind Data if (point instanceof XYImageData) { + // Draw all images in a striaight line. Move the line to be able + // to accomodate multiple resources. + List> tsrs = descriptor + .getResourceList().getResourcesByType( + TimeSeriesResource.class); + int index = tsrs.indexOf(this); + IExtent extent = graph.getExtent(); + screen[1] = extent.getMinY() + (index + 1) + * (extent.getHeight() / (tsrs.size() + 1)); XYImageData imageData = (XYImageData) point; - screen[1] = ((TimeSeriesGraph) graph).getVerticleMiddle(); imageData.setColor(color); imageData.setTarget(target); PaintProperties imagePaintProperties = new PaintProperties( diff --git a/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/guidance/MetarViewer.java b/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/guidance/MetarViewer.java index 886426adc0..0e20bfdb5c 100644 --- a/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/guidance/MetarViewer.java +++ b/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/guidance/MetarViewer.java @@ -319,6 +319,7 @@ public class MetarViewer extends ViewerTab implements req.setSize(prevChkHrs); String siteObj = myGetCacheSiteObj(siteID, prevChkHrs); if (siteObj == null) { + // System.out // .println("Generate cache for: " + tag + " cnt " + cnt); CacheGuidanceRequest cReq = createCacheRequest(siteID, prevChkHrs); diff --git a/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/monitor/SiteMonitor.java b/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/monitor/SiteMonitor.java index 1bea1116fd..66b15e14d8 100644 --- a/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/monitor/SiteMonitor.java +++ b/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/monitor/SiteMonitor.java @@ -35,6 +35,7 @@ import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Label; import com.raytheon.edex.plugin.taf.common.TafRecord; +import com.raytheon.uf.common.time.SimulatedTime; import com.raytheon.uf.common.util.StringUtil; import com.raytheon.uf.viz.core.jobs.IRequestCompleteListener; import com.raytheon.viz.aviation.resource.ResourceConfigMgr; @@ -60,6 +61,7 @@ import com.raytheon.viz.aviation.xml.MonitorCfg; * Oct 6, 2010 7229 rferrel Update to Metar/Taf's set time methods. * Nov 4, 2010 6866 rferrel Impact statements no longer malformed. * May 13, 2011 8611 rferrel Added type to help determine blink state. + * Apr 30, 2012 14717 zhao Indicators turn gray when Metar is outdated * * * @@ -68,7 +70,16 @@ import com.raytheon.viz.aviation.xml.MonitorCfg; */ public class SiteMonitor implements IRequestCompleteListener> { - /** + /** + * For DR14717: + * check if Metar is outdated + * and turn indicator labels gray when Metar is outdated + */ + private static long latestMetarTime = -1; + private final int GRAY_COLOR_SEVERITY = 1; + private boolean GRAY_LABEL = false; + + /** * False while monitor is running a query otherwise true. */ private final AtomicBoolean requestCompleted = new AtomicBoolean(true); @@ -389,6 +400,11 @@ public class SiteMonitor implements IRequestCompleteListener> { @SuppressWarnings("unchecked") @Override public void requestComplete(Map result) { + /** + * DR14717: Outdated Metar should turn gray + */ + String thisMonitor = this.getMonitorClassName(); + if (!parent.isDisposed()) { Object obj = result.get("fatal"); if (obj != null) { @@ -409,6 +425,19 @@ public class SiteMonitor implements IRequestCompleteListener> { alertMap.clear(); } + /** + * DR14717: for checking if Metar is outdated. + */ + if ( thisMonitor.equals("MetarMonitor") ) { + Map mtrdcdMap = (Map) statusMap.get("dcd"); + if ( mtrdcdMap != null ) { + Map mtrItimeMap = (Map) mtrdcdMap.get("itime"); + latestMetarTime = ((Float) mtrItimeMap.get("value")).longValue() * 1000; + } + } + + long currentTime = SimulatedTime.getSystemTime().getTime().getTime(); + for (Object key : keys) { Label label = labelMap.get(key); if (label != null && !label.isDisposed()) { @@ -417,7 +446,42 @@ public class SiteMonitor implements IRequestCompleteListener> { if (severity > maxSeverity) { maxSeverity = severity; } - label.setBackground(colors[severity]); + + String msg = (String) valueMap.get("msg"); + + /** + * DR14717: Metar monitor indicators should turn gray when Metar is outdated + */ + if ( latestMetarTime > 0 ) { + if ( ( currentTime > ( latestMetarTime + TafSiteComp.METAR_TIMEOUT_4HR ) ) + && ( thisMonitor.equals("MetarMonitor") || thisMonitor.equals("PersistMonitor") ) ) { + /** + * both Current observation monitoring indicators + * and persistence indicators should turn gray + */ + GRAY_LABEL = true; + msg = "METAR outdated"; + } else if ( ( currentTime > ( latestMetarTime + TafSiteComp.METAR_TIMEOUT_2HR ) ) + && thisMonitor.equals("PersistMonitor") ) { + /** + * Persistence indicators should turn gray + */ + GRAY_LABEL = true; + msg = "METAR outdated for persistence monitoring"; + } + } + + if ( ( latestMetarTime < 0 ) && thisMonitor.equals("PersistMonitor") ) { + parentSiteComp.setPersistMonitorProcessedFirst(true); + } + + if ( GRAY_LABEL ) { + label.setBackground(colors[GRAY_COLOR_SEVERITY]); + GRAY_LABEL = false; + } else { + label.setBackground(colors[severity]); + } + String toolTip = null; String taf = (String) tafMap.get("text"); Object text = statusMap.get("text"); @@ -428,7 +492,6 @@ public class SiteMonitor implements IRequestCompleteListener> { } } - String msg = (String) valueMap.get("msg"); toolTip = toolTipFormat(taf, text, msg, impactPlacement.toLowerCase()); @@ -567,4 +630,17 @@ public class SiteMonitor implements IRequestCompleteListener> { return cfg.getClassName(); } + /** + * for DR14717: + */ + public Map getLabelMap() { + return labelMap; + } + + /** + * for DR14717: + */ + public Color getGraySeverityColor() { + return getSeverityColors()[GRAY_COLOR_SEVERITY]; + } } diff --git a/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/monitor/TafSiteComp.java b/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/monitor/TafSiteComp.java index 97bd33572b..b1d9012a6a 100755 --- a/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/monitor/TafSiteComp.java +++ b/cave/com.raytheon.viz.aviation/src/com/raytheon/viz/aviation/monitor/TafSiteComp.java @@ -27,6 +27,7 @@ import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.Set; import java.util.concurrent.atomic.AtomicInteger; import org.eclipse.core.runtime.IProgressMonitor; @@ -88,6 +89,7 @@ import com.raytheon.viz.avnconfig.IStatusSettable; * is false. * 05/13/2011 8611 rferrel Added type to Site Monitor requests and update * Viewer when a METAR changes alert status. + * 04/26/2012 14717 zhao Indicator labels turn gray when Metar is outdated * * * @@ -106,9 +108,29 @@ public class TafSiteComp { * A metar is good for up to one hour and can be issued up to 10 minutes * before they take affect. This is the time out in milliseconds for 1 hour * with a 10 minute grace period. + * + * DR14717: changed grace period from 10 minutes to 5 minutes. */ - private final static long METAR_TIMEOUT = (1L * 60L + 10L) * 60L * 1000L; - + private final static long METAR_TIMEOUT = (1L * 60L + 5L) * 60L * 1000L; + + /** + * DR14717: When Metar is 2 hours old, the persistence indicators turn gray. + * This is the timeout in milliseconds for 2 hours. + */ + public final static long METAR_TIMEOUT_2HR = 2L * 60L * 60L * 1000L; + + /** + * DR14717: When Metar is 4 hours plus 10 minutes old, Metar Time Label is replaced by "None", + * and the current observation and persistence indicators turn gray. + * This is the timeout in milliseconds for 4 hours plus 10 minutes. + */ + public final static long METAR_TIMEOUT_4HR = (4L * 60L + 10L) * 60L * 1000L; + + /** + * DR14717: + */ + private boolean persistMonitorProcessedFirst = false; + /** * A TAF is good for up to 6 hours and can be issued up to 40 minutes before * they take affect. This time out is in milliseconds for 6 hours with a 40 @@ -628,8 +650,32 @@ public class TafSiteComp { + timestamp.substring(4, 6)); long currentTime = SimulatedTime.getSystemTime().getTime() .getTime(); - if (currentTime > (metarTime + METAR_TIMEOUT)) { + + if ( currentTime > ( metarTime + METAR_TIMEOUT_4HR ) ) { + mtrTimeLbl.setText("None"); + mtrTimeLbl.setBackground(getBackgroundColor()); + if ( persistMonitorProcessedFirst ) { + SiteMonitor psstMonitor = monitorArray.get(1); + Color grayColor = psstMonitor.getGraySeverityColor(); + Map psstLabelMap = psstMonitor.getLabelMap(); + Set psstKeys = psstLabelMap.keySet(); + for ( String key : psstKeys ) { + psstLabelMap.get(key).setBackground(grayColor); + } + } + } else if (currentTime > (metarTime + METAR_TIMEOUT)) { mtrTimeLbl.setBackground(getWarningColor()); + if ( currentTime > ( metarTime + METAR_TIMEOUT_2HR ) ) { + if ( persistMonitorProcessedFirst ) { + SiteMonitor psstMonitor = monitorArray.get(1); + Color grayColor = psstMonitor.getGraySeverityColor(); + Map psstLabelMap = psstMonitor.getLabelMap(); + Set psstKeys = psstLabelMap.keySet(); + for ( String key : psstKeys ) { + psstLabelMap.get(key).setBackground(grayColor); + } + } + } } else { mtrTimeLbl.setBackground(getBackgroundColor()); } @@ -764,4 +810,8 @@ public class TafSiteComp { return org.eclipse.core.runtime.Status.OK_STATUS; } } + + public void setPersistMonitorProcessedFirst(boolean b) { + persistMonitorProcessedFirst = b; + } } diff --git a/cave/com.raytheon.viz.core.gl/src/com/raytheon/viz/core/gl/AbstractGLMesh.java b/cave/com.raytheon.viz.core.gl/src/com/raytheon/viz/core/gl/AbstractGLMesh.java index f5c950a751..bb0f5ed2ec 100644 --- a/cave/com.raytheon.viz.core.gl/src/com/raytheon/viz/core/gl/AbstractGLMesh.java +++ b/cave/com.raytheon.viz.core.gl/src/com/raytheon/viz/core/gl/AbstractGLMesh.java @@ -78,6 +78,12 @@ public abstract class AbstractGLMesh implements IMesh { protected SharedCoordinateKey key; + // For world wrapping we maintain a set of triangle strips that fill in any + // cut segements. + private GLGeometryObject2D wwcVertexCoords; + + private GLGeometryObject2D wwcTextureCoords; + private Runnable calculate = new Runnable() { @Override public void run() { @@ -147,12 +153,22 @@ public abstract class AbstractGLMesh implements IMesh { // We finished calculating the mesh, compile it sharedTextureCoords = SharedCoordMap.get(key, glTarget); vertexCoords.compile(glTarget.getGl()); + if (wwcTextureCoords != null && wwcVertexCoords != null) { + wwcTextureCoords.compile(glTarget.getGl()); + wwcVertexCoords.compile(glTarget.getGl()); + } this.internalState = internalState = State.COMPILED; } if (internalState == State.COMPILED) { GLGeometryPainter.paintGeometries(glTarget.getGl(), vertexCoords, sharedTextureCoords.getTextureCoords()); + if (wwcTextureCoords != null && wwcVertexCoords != null) { + glTarget.getGl().glColor3f(1.0f, 0.0f, 0.0f); + GLGeometryPainter.paintGeometries(glTarget.getGl(), + wwcVertexCoords, wwcTextureCoords); + glTarget.getGl().glColor3f(0.0f, 1.0f, 0.0f); + } return PaintStatus.PAINTED; } else if (internalState == State.CALCULATING) { target.setNeedsRefresh(true); @@ -181,6 +197,14 @@ public abstract class AbstractGLMesh implements IMesh { SharedCoordMap.remove(key); sharedTextureCoords = null; } + if (wwcTextureCoords != null) { + wwcTextureCoords.dispose(); + wwcTextureCoords = null; + } + if (wwcVertexCoords != null) { + wwcVertexCoords.dispose(); + wwcVertexCoords = null; + } internalState = State.INVALID; } } @@ -227,21 +251,21 @@ public abstract class AbstractGLMesh implements IMesh { * worldCoordinates[0].length); // Check for world wrapping WorldWrapChecker wwc = new WorldWrapChecker(targetGeometry); - for (int i = 0; i < worldCoordinates.length; ++i) { double[][] strip = worldCoordinates[i]; List vSegment = new ArrayList(); double[] prev1 = null, prev2 = null; for (int j = 0; j < strip.length; ++j) { double[] next = strip[j]; - if ((prev1 != null && wwc.check(prev1[0], next[0])) || (prev2 != null && wwc.check(prev2[0], next[0]))) { - vertexCoords.addSegment(vSegment - .toArray(new double[vSegment.size()][])); - vSegment = new ArrayList(); - prev1 = null; - prev2 = null; + fixWorldWrap(wwc, prev2, prev1, next, i, j); + if ((prev1 != null && wwc.check(prev1[0], next[0])) + || vSegment.size() > 1) { + vertexCoords.addSegment(vSegment + .toArray(new double[vSegment.size()][])); + vSegment = new ArrayList(); + } } vSegment.add(worldToPixel(next)); @@ -260,6 +284,123 @@ public abstract class AbstractGLMesh implements IMesh { return false; } + private void fixWorldWrap(WorldWrapChecker wwc, double[] p2, double[] p1, + double[] n, int i, int j) { + // make sure we have all 3 points + if (p2 == null || p1 == null || n == null) { + return; + } + // figure out texture coordinates + float dX = (1.0f / (key.horizontalDivisions)); + float dY = (1.0f / (key.verticalDivisions)); + double[] tp2 = { (i + ((j - 2) % 2)) * dX, (j - 2) / 2 * dY }; + double[] tp1 = { (i + ((j - 1) % 2)) * dX, (j - 1) / 2 * dY }; + double[] tn = { (i + (j % 2)) * dX, j / 2 * dY }; + // find which two sides are cut + boolean wwcp1n = wwc.check(p1[0], n[0]); + boolean wwcp2n = wwc.check(p2[0], n[0]); + boolean wwcp1p2 = wwc.check(p1[0], p2[0]); + double[] a = null; + double[] b = null; + double[] c = null; + double[] ta = null; + double[] tb = null; + double[] tc = null; + if (wwcp1n && wwcp2n && !wwcp1p2) { + a = n; + b = p1; + c = p2; + ta = tn; + tb = tp1; + tc = tp2; + } else if (wwcp1n && !wwcp2n && wwcp1p2) { + a = p1; + b = p2; + c = n; + ta = tp1; + tb = tp2; + tc = tn; + } else if (!wwcp1n && wwcp2n && wwcp1p2) { + a = p2; + b = n; + c = p1; + ta = tp2; + tb = tn; + tc = tp1; + } else { + // this occurs when a pole is within the triangle, maybe we should + // try to cut these triangles, but its hard. + return; + } + if (wwcTextureCoords == null || wwcVertexCoords == null) { + wwcVertexCoords = new GLGeometryObject2D(new GLGeometryObjectData( + GL.GL_TRIANGLE_STRIP, GL.GL_VERTEX_ARRAY)); + wwcTextureCoords = new GLGeometryObject2D(new GLGeometryObjectData( + GL.GL_TRIANGLE_STRIP, GL.GL_TEXTURE_COORD_ARRAY)); + } + // at this point triangle abc is a triangle in which sides ab and ac + // are cut by the inverse central meridian. We need to find the two + // points of intersection and use them to make a triangle with a ion one + // side and a quad with bc on the other side. ta, tb, tc represent the + // texture coordinates for their respective points. + double ax = wwc.toProjectionRange(a[0]); + double bx = wwc.toProjectionRange(b[0]); + double cx = wwc.toProjectionRange(c[0]); + // Get various x distances to use as weights in interpolating + double abDist = 360 - Math.abs(ax - bx); + double acDist = 360 - Math.abs(ax - cx); + double amDist = 360 + ax - wwc.getInverseCentralMeridian(); + if (amDist > 360) { + amDist = amDist - 360; + } + // x location to use for midpoints on the triangle side, should be on + // same side of central meridian as a + double tx = wwc.getInverseCentralMeridian() - 360 + 0.00001; + // x location to use for midpoints on the quad side, should be on + // same side of central meridian as b and c + double qx = wwc.getInverseCentralMeridian() - 0.00001; + // If a is closer to the central meridian on the other side then switch + // amDist, tx, and qx + if (amDist > 180) { + amDist = 360 - amDist; + double tmp = tx; + tx = qx; + qx = tmp; + } + // interpolated y coordinate and texture coordinates along the ab line. + double aby = a[1] + amDist * (b[1] - a[1]) / abDist; + double abtx = ta[0] + amDist * (tb[0] - ta[0]) / abDist; + double abty = ta[1] + amDist * (tb[1] - ta[1]) / abDist; + // interpolated y coordinate and texture coordinates along the ac line. + double acy = a[1] + amDist * (c[1] - a[1]) / acDist; + double actx = ta[0] + amDist * (tc[0] - ta[0]) / acDist; + double acty = ta[1] + amDist * (tc[1] - ta[1]) / acDist; + // all done with math, assemble everything into a triangle and a quad to + // set in the geometry. + double[][] tri = new double[3][]; + double[][] triTex = new double[3][]; + tri[0] = worldToPixel(a); + triTex[0] = ta; + tri[1] = worldToPixel(new double[] { tx, aby }); + triTex[1] = new double[] { abtx, abty }; + tri[2] = worldToPixel(new double[] { tx, acy }); + triTex[2] = new double[] { actx, acty }; + double[][] quad = new double[4][]; + double[][] quadTex = new double[4][]; + quad[0] = worldToPixel(b); + quadTex[0] = tb; + quad[1] = worldToPixel(c); + quadTex[1] = tc; + quad[2] = worldToPixel(new double[] { qx, aby }); + quadTex[2] = new double[] { abtx, abty }; + quad[3] = worldToPixel(new double[] { qx, acy }); + quadTex[3] = new double[] { actx, acty }; + wwcVertexCoords.addSegment(tri); + wwcTextureCoords.addSegment(triTex); + wwcVertexCoords.addSegment(quad); + wwcTextureCoords.addSegment(quadTex); + } + protected final double[] worldToPixel(double[] world) { double[] in = null; if (world.length == 2) { diff --git a/cave/com.raytheon.viz.core.gl/src/com/raytheon/viz/core/gl/IGLTarget.java b/cave/com.raytheon.viz.core.gl/src/com/raytheon/viz/core/gl/IGLTarget.java index a2d2dea427..9b47706258 100644 --- a/cave/com.raytheon.viz.core.gl/src/com/raytheon/viz/core/gl/IGLTarget.java +++ b/cave/com.raytheon.viz.core.gl/src/com/raytheon/viz/core/gl/IGLTarget.java @@ -25,6 +25,7 @@ import javax.media.opengl.glu.GLU; import org.eclipse.swt.graphics.Rectangle; import com.raytheon.uf.viz.core.IGraphicsTarget; +import com.raytheon.uf.viz.core.IView; import com.raytheon.uf.viz.core.drawables.ColorMapParameters; import com.raytheon.viz.core.gl.objects.GLTextureObject; @@ -111,4 +112,10 @@ public interface IGLTarget extends IGraphicsTarget { */ public abstract void handleError(int errorid); + /** + * Set the targets current view + * + * @param view + */ + public void setView(IView view); } diff --git a/cave/com.raytheon.viz.core.gl/src/com/raytheon/viz/core/gl/ext/GLOffscreenRenderingExtension.java b/cave/com.raytheon.viz.core.gl/src/com/raytheon/viz/core/gl/ext/GLOffscreenRenderingExtension.java index 90f77f275e..ef20f7d020 100644 --- a/cave/com.raytheon.viz.core.gl/src/com/raytheon/viz/core/gl/ext/GLOffscreenRenderingExtension.java +++ b/cave/com.raytheon.viz.core.gl/src/com/raytheon/viz/core/gl/ext/GLOffscreenRenderingExtension.java @@ -1,13 +1,18 @@ package com.raytheon.viz.core.gl.ext; +import java.awt.Rectangle; +import java.awt.image.BufferedImage; +import java.awt.image.RenderedImage; import java.nio.Buffer; import java.nio.ByteBuffer; +import java.util.Stack; import javax.media.opengl.GL; -import org.eclipse.swt.graphics.Rectangle; - +import com.raytheon.uf.viz.core.IExtent; +import com.raytheon.uf.viz.core.IView; import com.raytheon.uf.viz.core.data.IColorMapDataRetrievalCallback; +import com.raytheon.uf.viz.core.data.IRenderedImageCallback; import com.raytheon.uf.viz.core.drawables.ColorMapParameters; import com.raytheon.uf.viz.core.drawables.IImage; import com.raytheon.uf.viz.core.drawables.ext.GraphicsExtension; @@ -18,17 +23,57 @@ import com.raytheon.viz.core.gl.dataformat.AbstractGLColorMapDataFormat; import com.raytheon.viz.core.gl.dataformat.GLByteDataFormat; import com.raytheon.viz.core.gl.dataformat.IGLColorMapDataFormatProvider; import com.raytheon.viz.core.gl.images.AbstractGLImage; +import com.raytheon.viz.core.gl.images.GLColormappedImage; +import com.raytheon.viz.core.gl.internal.GLView2D; import com.raytheon.viz.core.gl.internal.ext.GLColormappedImageExtension; public class GLOffscreenRenderingExtension extends GraphicsExtension implements IOffscreenRenderingExtension { + private static class ViewInfo { + private IView view; + + private AbstractGLImage image; + + /** + * @param extent + * @param bounds + */ + public ViewInfo(IView view, AbstractGLImage image) { + this.view = view; + this.image = image; + } + } + private static boolean checkedLuminance = false; private static boolean supportsLuminance = true; + private Stack viewStack = new Stack(); + + private ViewInfo currentInfo = null; + + /* + * (non-Javadoc) + * + * @see com.raytheon.uf.viz.core.drawables.ext.IOffscreenRenderingExtension# + * renderOffscreen(com.raytheon.uf.viz.core.drawables.IImage) + */ @Override public void renderOffscreen(IImage offscreenImage) throws VizException { + renderOffscreen(offscreenImage, target.getView().getExtent()); + } + + /* + * (non-Javadoc) + * + * @see com.raytheon.uf.viz.core.drawables.ext.IOffscreenRenderingExtension# + * renderOffscreen(com.raytheon.uf.viz.core.drawables.IImage, + * com.raytheon.uf.viz.core.IExtent) + */ + @Override + public void renderOffscreen(IImage offscreenImage, IExtent offscreenExtent) + throws VizException { if (!(offscreenImage instanceof AbstractGLImage)) { throw new VizException( "Can only use GLImages as offscreen frameBuffer on GLTarget"); @@ -43,16 +88,44 @@ public class GLOffscreenRenderingExtension extends GraphicsExtension if (glImage.getStatus() == IImage.Status.STAGED) { glImage.target(target); } - target.getGl() - .glViewport(0, 0, glImage.getWidth(), glImage.getHeight()); - glImage.usaAsFrameBuffer(); + + IView view = new GLView2D(offscreenExtent); + + if (currentInfo == null) { + // Use null for image so we use canvas when we pop + viewStack.push(new ViewInfo(target.getView(), null)); + } else { + viewStack.push(currentInfo); + } + setCurrentView(new ViewInfo(view, glImage)); } @Override public void renderOnscreen() throws VizException { - Rectangle canvasSize = target.getBounds(); - target.getGl().glViewport(0, 0, canvasSize.width, canvasSize.height); - target.getGl().glBindFramebufferEXT(GL.GL_FRAMEBUFFER_EXT, 0); + if (viewStack.size() > 0) { + setCurrentView(viewStack.pop()); + } + } + + private void setCurrentView(ViewInfo current) throws VizException { + currentInfo = current; + Rectangle bounds = null; + if (currentInfo.image == null) { + // Null bounds means use current targets bounds + bounds = new Rectangle(target.getBounds().width, + target.getBounds().height); + // Set currentInfo to null since we are using screen/display info + // and we don't want to cache old info + currentInfo = null; + target.getGl().glBindFramebufferEXT(GL.GL_FRAMEBUFFER_EXT, 0); + } else { + bounds = new Rectangle(currentInfo.image.getWidth(), + currentInfo.image.getHeight()); + currentInfo.image.usaAsFrameBuffer(); + } + + target.setView(current.view); + target.getGl().glViewport(0, 0, bounds.width, bounds.height); } /* @@ -66,6 +139,24 @@ public class GLOffscreenRenderingExtension extends GraphicsExtension return Compatibilty.TARGET_COMPATIBLE; } + /* + * (non-Javadoc) + * + * @see com.raytheon.uf.viz.core.drawables.ext.IOffscreenRenderingExtension# + * constructOffscreenImage(int[]) + */ + @Override + public IImage constructOffscreenImage(final int[] dimensions) + throws VizException { + return target.initializeRaster(new IRenderedImageCallback() { + @Override + public RenderedImage getImage() throws VizException { + return new BufferedImage(dimensions[0], dimensions[1], + BufferedImage.TYPE_INT_RGB); + } + }); + } + /* * (non-Javadoc) * @@ -73,7 +164,7 @@ public class GLOffscreenRenderingExtension extends GraphicsExtension * constructOffscreenImage(java.lang.Class, java.awt.Rectangle) */ @Override - public AbstractGLImage constructOffscreenImage( + public GLColormappedImage constructOffscreenImage( Class dataType, int[] dimensions) throws VizException { return constructOffscreenImage(dataType, dimensions, null); @@ -86,7 +177,7 @@ public class GLOffscreenRenderingExtension extends GraphicsExtension * constructOffscreenImage(java.lang.Class, java.awt.Rectangle) */ @Override - public AbstractGLImage constructOffscreenImage( + public GLColormappedImage constructOffscreenImage( Class dataType, final int[] dimensions, ColorMapParameters parameters) throws VizException { int width = dimensions[0]; @@ -103,7 +194,7 @@ public class GLOffscreenRenderingExtension extends GraphicsExtension } if (imageBuffer != null) { - AbstractGLImage image = null; + GLColormappedImage image = null; final Buffer buffer = imageBuffer; GLColormappedImageExtension cmapExt = target .getExtension(GLColormappedImageExtension.class); diff --git a/cave/com.raytheon.viz.core.gl/src/com/raytheon/viz/core/gl/images/GLCMTextureData.java b/cave/com.raytheon.viz.core.gl/src/com/raytheon/viz/core/gl/images/GLCMTextureData.java index 4d7b046f17..07ca2ae3dd 100644 --- a/cave/com.raytheon.viz.core.gl/src/com/raytheon/viz/core/gl/images/GLCMTextureData.java +++ b/cave/com.raytheon.viz.core.gl/src/com/raytheon/viz/core/gl/images/GLCMTextureData.java @@ -29,6 +29,7 @@ import javax.media.opengl.glu.GLU; import com.raytheon.uf.viz.core.data.IColorMapDataRetrievalCallback; import com.raytheon.uf.viz.core.data.IColorMapDataRetrievalCallback.ColorMapData; import com.raytheon.uf.viz.core.exception.VizException; +import com.raytheon.viz.core.gl.GLContextBridge; import com.raytheon.viz.core.gl.dataformat.GLColorMapData; import com.raytheon.viz.core.gl.dataformat.IGLColorMapDataFormatProvider; import com.raytheon.viz.core.gl.internal.cache.IImageCacheable; @@ -202,6 +203,7 @@ public class GLCMTextureData implements IImageCacheable { public double getValue(int x, int y) { if (!isStaged() && isLoaded()) { + GLContextBridge.makeMasterContextCurrent(); GL gl = GLU.getCurrentGL(); int textureStorageType = getTextureStorageType(); int copybackTextureType = data.getCopyBackTextureType(); @@ -217,6 +219,7 @@ public class GLCMTextureData implements IImageCacheable { data.setTextureType(copybackTextureType); data.setData(copybackBuffer); + GLContextBridge.releaseMasterContext(); } ImageCache.getInstance(CacheType.MEMORY).put(this); return data.getValue(x, y).doubleValue(); diff --git a/cave/com.raytheon.viz.core.gl/src/com/raytheon/viz/core/gl/internal/GLAbstractView.java b/cave/com.raytheon.viz.core.gl/src/com/raytheon/viz/core/gl/internal/GLAbstractView.java deleted file mode 100644 index 9efb3dd254..0000000000 --- a/cave/com.raytheon.viz.core.gl/src/com/raytheon/viz/core/gl/internal/GLAbstractView.java +++ /dev/null @@ -1,441 +0,0 @@ -/** - * 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.viz.core.gl.internal; - -import javax.media.opengl.GL; -import javax.vecmath.Matrix4d; -import javax.vecmath.Vector3d; - -import org.eclipse.swt.graphics.Rectangle; - -import com.raytheon.uf.viz.core.IExtent; -import com.raytheon.uf.viz.core.IGraphicsTarget; -import com.raytheon.uf.viz.core.IView; -import com.raytheon.uf.viz.core.geom.Plane; -import com.raytheon.uf.viz.core.geom.Ray; -import com.raytheon.viz.core.gl.IGLTarget; - -/** - * @author estrabal - * - */ -public abstract class GLAbstractView implements IView, Cloneable { - - // private static final double MIN_ZOOM_REQUEST = 0.01; - // - // private static final double ZOOM_ANIMATION_FACTOR = 2.0; - - protected IExtent extent; - - // protected double[] eye = new double[] { 0.0, 0.0, 7000.0, 0 }; - - protected double elevationExaggeration = 1.0; - - protected double tilt = 0.0; - - static final protected Matrix4d IDENTITY_MATRIX = new Matrix4d(1.0, 0.0, - 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, 1.0, 0.0, 0.0, 0.0, 0.0, - 1.0); - - protected Matrix4d projection = new Matrix4d(IDENTITY_MATRIX); - - protected Matrix4d modelView = new Matrix4d(IDENTITY_MATRIX); - - protected Rectangle bounds; - - public GLAbstractView() { - // this.extent = e; - } - - public GLAbstractView(IExtent pe) { - this.extent = pe; - } - - /** - * - * @param pm - */ - public void calcFrustum(Matrix4d pm) { - - } - - public double getZoom() { - - return getExtent().getScale(); - } - - public double[] applyRotation(double[] c) { - return null; - } - - /** - * Rotation around left vector. - */ - public void rotateX(double angle) { - - } - - /** - * Rotation around up vector. - */ - public void rotateY(double angle) { - } - - public void rotateZ(double angle) { - } - - /** - * - * @param gl - * @param glu - */ - public void setupView(IGraphicsTarget target) { - IGLTarget glTarget = asIGLTarget(target); - - boolean release = glTarget.makeContextCurrent(); - glTarget.getGl().glMatrixMode(GL.GL_PROJECTION); - glTarget.getGl().glLoadIdentity(); - setProjectionMatrix(glTarget); - - glTarget.getGl().glMatrixMode(GL.GL_MODELVIEW); - glTarget.getGl().glLoadIdentity(); - setModelViewMatrix(glTarget); - - setModelView(glTarget.getModelView()); - setProjection(glTarget.getProjection()); - - setViewArea(glTarget); - // glTarget.setupClippingPlane(getClippingPlanes()); - if (release) { - glTarget.releaseContext(); - } - } - - protected IGLTarget asIGLTarget(IGraphicsTarget target) { - if (target instanceof IGLTarget) { - return (IGLTarget) target; - } else { - throw new IllegalArgumentException("Require type IGLTarget got " - + target); - } - } - - protected abstract void setViewArea(IGLTarget target); - - /** - * - * @param glu - */ - protected abstract void setModelViewMatrix(IGLTarget target); - - protected abstract void setProjectionMatrix(IGLTarget target); - - @Override - public abstract Object clone(); - - /** - * - * @return projection matrix - */ - public Matrix4d getProjection() { - return this.projection; - } - - /** - * - * @return modelview matrix - */ - public Matrix4d getModelView() { - - return this.modelView; - } - - /** - * Set the modelview matrix - * - * @param mv - */ - protected void setModelView(double[] mv) { - modelView = new Matrix4d(mv); - - int index = 0; - // values of mv are "column major" 0-3 are first column ... - for (int i = 0; i < 4; ++i) { - for (int j = 0; j < 4; ++j) { - modelView.setElement(j, i, mv[index]); - ++index; - } - - } - - } - - /** - * Set the projection matrix - * - * @param mv - */ - protected void setProjection(double[] mv) { - // Matrix4d rot - projection = new Matrix4d(); - - int index = 0; - // values of mv are "column major" 0-3 are first column ... - for (int i = 0; i < 4; ++i) { - for (int j = 0; j < 4; ++j) { - projection.setElement(j, i, mv[index]); - ++index; - } - - } - - } - - /** - * - * @param m - * @return - */ - public double[] matrixToArray(Matrix4d m) { - - // OpenGL matrices are column major - double[] mArray = new double[16]; - int index = 0; - for (int i = 0; i < 4; ++i) { - for (int j = 0; j < 4; ++j) { - mArray[index] = m.getElement(j, i); - ++index; - } - } - return mArray; - } - - /** - * Serialize a pixel extent - * - * @param view - * @return the serialized form - */ - // public static String serialize(DisplayView view) { - // if (view == null) - // return null; - // - // StringBuffer sb = new StringBuffer(); - // sb.append(view.getMinX()); - // sb.append(" "); - // sb.append(view.getMaxX()); - // sb.append(" "); - // sb.append(view.getMinY()); - // sb.append(" "); - // sb.append(view.getMaxY()); - // return sb.toString(); - // } - /** - * Deserialize a pixel extent from a string - * - * @param data - * the serialized form fo the pixel extent - * @return the pixel extent object - */ - // public static DisplayView deserialize(String data) { - // if (data == null) { - // return null; - // } - // - // String[] parts = data.split(" "); - // if (parts.length != 4) { - // return null; - // } - // - // double[] vals = new double[4]; - // for (int i = 0; i < vals.length; i++) { - // vals[i] = Double.parseDouble(parts[i]); - // } - // - // return new DisplayView(vals[0], vals[1], vals[2], vals[3]); - // - // } - // - public boolean setCameraPos(Vector3d newEye) { - return true; - } - - /** - * Get the clipping planes - * - * @return - */ - abstract public Plane[] getClippingPlanes(); - - public void setExtent(IExtent pixelExtent) { - this.extent = pixelExtent; - } - - public IExtent getExtent() { - return extent; - } - - /* - * (non-Javadoc) - * - * @see com.raytheon.viz.core.IView#setFocalPoint(javax.vecmath.Vector3d) - */ - @Override - public boolean setFocalPoint(double[] currentMouse, IGraphicsTarget target) { - return false; - - } - - /* - * (non-Javadoc) - * - * @see com.raytheon.viz.core.IView#setTilt(double) - */ - @Override - public void setTilt(double delta) { - this.tilt = delta; - } - - /* - * (non-Javadoc) - * - * @see com.raytheon.viz.core.IView#getEyeDistance(javax.vecmath.Vector3d) - */ - @Override - public double getEyeDistance(Vector3d point) { - // TODO Auto-generated method stub - return 0; - } - - /* - * (non-Javadoc) - * - * @see com.raytheon.viz.core.IView#getTilt() - */ - @Override - public double getTilt() { - return this.tilt; - } - - /* - * (non-Javadoc) - * - * @see com.raytheon.viz.core.IView#getEye() - */ - @Override - public double[] getEye() { - return new double[] { 0, 0, -1 }; - } - - /* - * (non-Javadoc) - * - * @see com.raytheon.viz.core.IView#setEye(double[]) - */ - @Override - public void setEye(double[] eye) { - // TODO Auto-generated method stub - - } - - /* - * (non-Javadoc) - * - * @see com.raytheon.viz.core.IView#getFocalPoint() - */ - @Override - public double[] getFocalPoint() { - return new double[] { 0, 0, 0 }; - } - - /* - * (non-Javadoc) - * - * @see com.raytheon.viz.core.IView#setElevationExaggeration(double) - */ - @Override - public void setElevationExaggeration(double factor) { - elevationExaggeration = factor; - } - - /* - * (non-Javadoc) - * - * @see com.raytheon.viz.core.IView#getElevationExaggeration() - */ - @Override - public double getElevationExaggeration() { - return elevationExaggeration; - } - - /* - * (non-Javadoc) - * - * @see com.raytheon.viz.core.IView#screenToGrid(double, double, double) - */ - @Override - public abstract double[] screenToGrid(double x, double y, double depth, - IGraphicsTarget target); - - /* - * (non-Javadoc) - * - * @see com.raytheon.viz.core.IView#gridToScreen(double[]) - */ - @Override - public abstract double[] gridToScreen(double[] grid, IGraphicsTarget target); - - /** - * Create a Ray starting a the near plane with direction towards the far - * - * @param mouse - * mouse x,y - * @return Ray - */ - public Ray computeRay(double[] mouse, IGraphicsTarget target) { - - Vector3d far = new Vector3d(screenToGrid(mouse[0], mouse[1], 1, target)); - Vector3d near = new Vector3d( - screenToGrid(mouse[0], mouse[1], 0, target)); - if (near == null || far == null) { - return null; - } - - far.sub(near); - far.normalize(); - - return new Ray(near, far); - } - - /* - * (non-Javadoc) - * - * @see com.raytheon.viz.core.drawables.IRenderableDisplay#zoom(double) - */ - @Override - public void zoom(double factor) { - // zoom = Math.max(Math.min(factor, IRenderableDisplay.MAX_ZOOM_LEVEL), - // IRenderableDisplay.MIN_ZOOM_LEVEL); - this.extent.scale(factor); - } -} diff --git a/cave/com.raytheon.viz.core.gl/src/com/raytheon/viz/core/gl/internal/GLMesh2DStrips.java b/cave/com.raytheon.viz.core.gl/src/com/raytheon/viz/core/gl/internal/GLMesh2DStrips.java index fab333c4bf..b6ac7eb4a9 100644 --- a/cave/com.raytheon.viz.core.gl/src/com/raytheon/viz/core/gl/internal/GLMesh2DStrips.java +++ b/cave/com.raytheon.viz.core.gl/src/com/raytheon/viz/core/gl/internal/GLMesh2DStrips.java @@ -27,6 +27,7 @@ import org.geotools.geometry.jts.ReferencedEnvelope; import org.opengis.referencing.operation.MathTransform; import org.opengis.referencing.operation.TransformException; +import com.raytheon.uf.common.geospatial.MapUtil; import com.raytheon.uf.common.status.UFStatus.Priority; import com.raytheon.uf.viz.core.exception.VizException; import com.raytheon.viz.core.gl.AbstractGLMesh; @@ -197,7 +198,11 @@ public class GLMesh2DStrips extends AbstractGLMesh { maxHorzDiv, mt); horzDiv = Math.max(horzDiv, horzDivTest); } - + ReferencedEnvelope latLonEnv = envelope.transform( + MapUtil.LATLON_PROJECTION, true, 100); + if (latLonEnv.getWidth() > 180) { + horzDiv = Math.max(horzDiv, 4); + } return new SharedCoordinateKey(vertDiv, horzDiv); } catch (Exception e) { Activator.statusHandler diff --git a/cave/com.raytheon.viz.core.gl/src/com/raytheon/viz/core/gl/internal/GLTarget.java b/cave/com.raytheon.viz.core.gl/src/com/raytheon/viz/core/gl/internal/GLTarget.java index 800c55f07e..a5e7f7c1f3 100644 --- a/cave/com.raytheon.viz.core.gl/src/com/raytheon/viz/core/gl/internal/GLTarget.java +++ b/cave/com.raytheon.viz.core.gl/src/com/raytheon/viz/core/gl/internal/GLTarget.java @@ -67,6 +67,7 @@ import com.raytheon.uf.viz.core.DrawableLine; import com.raytheon.uf.viz.core.DrawableString; import com.raytheon.uf.viz.core.IExtent; import com.raytheon.uf.viz.core.IGraphicsTarget; +import com.raytheon.uf.viz.core.IView; import com.raytheon.uf.viz.core.PixelCoverage; import com.raytheon.uf.viz.core.VizConstants; import com.raytheon.uf.viz.core.data.IColorMapDataRetrievalCallback; @@ -184,7 +185,7 @@ public class GLTarget implements IGLTarget { .getInstance().getBoolean("-no_shader"); /** The current visible extent */ - protected IExtent viewExtent; + protected IView targetView; protected IExtent updatedExtent; @@ -392,7 +393,7 @@ public class GLTarget implements IGLTarget { this.updatedExtent = null; } - viewExtent = display.getExtent().clone(); + this.targetView = display.getView(); makeContextCurrent(); @@ -400,6 +401,7 @@ public class GLTarget implements IGLTarget { gl.glClear(GL.GL_COLOR_BUFFER_BIT | GL.GL_DEPTH_BUFFER_BIT); } + IExtent viewExtent = targetView.getExtent(); theCurrentZoom = (viewExtent.getMaxY() - viewExtent.getMinY()) / theHeight; @@ -1399,8 +1401,9 @@ public class GLTarget implements IGLTarget { if (shape instanceof GLWireframeShape2D) { pushGLState(); try { - ((GLWireframeShape2D) shape).paint(this, viewExtent, - canvasSize, aColor, lineWidth, lineStyle, font, alpha); + ((GLWireframeShape2D) shape).paint(this, + targetView.getExtent(), canvasSize, aColor, lineWidth, + lineStyle, font, alpha); } finally { popGLState(); } @@ -1415,7 +1418,7 @@ public class GLTarget implements IGLTarget { throws VizException { this.pushGLState(); try { - + IExtent viewExtent = targetView.getExtent(); boolean usedStencilBuffer = false; Map labels = shape.getLabelMap(); @@ -1439,7 +1442,7 @@ public class GLTarget implements IGLTarget { Rectangle2D bounds = null; for (Entry entry : entrySet) { double[] pos = entry.getKey(); - if (this.viewExtent.contains(pos)) { + if (viewExtent.contains(pos)) { bounds = this.getStringBounds(font, entry.getValue()); gl.glPolygonMode(GL.GL_BACK, GL.GL_FILL); @@ -1478,7 +1481,7 @@ public class GLTarget implements IGLTarget { int[] spatialZones = new int[] { 0 }; if (level != 0) { - spatialZones = shape.getSpatialIndices(this.viewExtent); + spatialZones = shape.getSpatialIndices(viewExtent); } gl.glEnable(GL.GL_BLEND); @@ -1536,7 +1539,7 @@ public class GLTarget implements IGLTarget { entrySet.size()); for (Entry entry : entrySet) { double[] pos = entry.getKey(); - if (this.viewExtent.contains(pos)) { + if (viewExtent.contains(pos)) { DrawableString string = new DrawableString( entry.getValue(), color); string.font = font; @@ -1614,12 +1617,12 @@ public class GLTarget implements IGLTarget { } private double getScaleX() { - return viewExtent.getWidth() / this.canvasSize.width; + return targetView.getExtent().getWidth() / this.canvasSize.width; } private double getScaleY() { - return viewExtent.getHeight() / this.canvasSize.height; + return targetView.getExtent().getHeight() / this.canvasSize.height; } @@ -1971,7 +1974,7 @@ public class GLTarget implements IGLTarget { @Override public BufferedImage screenshot() { - makeContextCurrent(); + boolean release = makeContextCurrent(); if (theCanvas != null) { theCanvas.swapBuffers(); } @@ -1981,8 +1984,9 @@ public class GLTarget implements IGLTarget { if (theCanvas != null) { theCanvas.swapBuffers(); } - - releaseContext(); + if (release) { + releaseContext(); + } return bi; } @@ -2298,6 +2302,29 @@ public class GLTarget implements IGLTarget { this.updatedExtent = updatedExtent; } + /* + * (non-Javadoc) + * + * @see com.raytheon.uf.viz.core.IGraphicsTarget#getView() + */ + @Override + public IView getView() { + return targetView; + } + + /* + * (non-Javadoc) + * + * @see + * com.raytheon.viz.core.gl.IGLTarget#setView(com.raytheon.uf.viz.core.IView + * ) + */ + @Override + public void setView(IView view) { + this.targetView = view; + this.targetView.setupView(this); + } + /* * (non-Javadoc) * diff --git a/cave/com.raytheon.viz.core.gl/src/com/raytheon/viz/core/gl/internal/GLView2D.java b/cave/com.raytheon.viz.core.gl/src/com/raytheon/viz/core/gl/internal/GLView2D.java index eb8f2a1e5e..5f8dbeb8c5 100644 --- a/cave/com.raytheon.viz.core.gl/src/com/raytheon/viz/core/gl/internal/GLView2D.java +++ b/cave/com.raytheon.viz.core.gl/src/com/raytheon/viz/core/gl/internal/GLView2D.java @@ -20,25 +20,22 @@ package com.raytheon.viz.core.gl.internal; import javax.media.opengl.GL; +import javax.media.opengl.glu.GLU; import javax.vecmath.Vector3d; import org.eclipse.swt.graphics.Rectangle; import com.raytheon.uf.viz.core.IExtent; import com.raytheon.uf.viz.core.IGraphicsTarget; +import com.raytheon.uf.viz.core.IView; import com.raytheon.uf.viz.core.PixelCoverage; import com.raytheon.uf.viz.core.PixelExtent; -import com.raytheon.uf.viz.core.exception.VizException; import com.raytheon.uf.viz.core.geom.Plane; import com.raytheon.uf.viz.core.geom.Ray; import com.raytheon.viz.core.gl.IGLTarget; /** - * @author estrabal - * - */ -/** - * TODO Add Description + * View that represents a 2 dimensional GL world * *
  * SOFTWARE HISTORY
@@ -51,21 +48,14 @@ import com.raytheon.viz.core.gl.IGLTarget;
  * @author estrabal
  * @version 1.0
  */
-public class GLView2D extends GLAbstractView {
-    private final Plane mapPlane = new Plane(0.0, 0.0, 1.0, 0.0, false);
+public class GLView2D implements IView {
 
-    /*
-     * (non-Javadoc)
-     * 
-     * @see com.raytheon.viz.core.IView#getDisplayType()
-     */
-    @Override
-    public String getDisplayType() {
-        return "2D";
-    }
+    private static final Plane mapPlane = new Plane(0.0, 0.0, 1.0, 0.0, false);
+
+    private IExtent extent;
 
     public GLView2D() {
-
+        this(0, 0, 0, 0);
     }
 
     /**
@@ -75,20 +65,27 @@ public class GLView2D extends GLAbstractView {
      * @param maxY
      */
     public GLView2D(double minX, double maxX, double minY, double maxY) {
-        super(new PixelExtent(minX, maxX, minY, maxY));
+        this.extent = new PixelExtent(minX, maxX, minY, maxY);
     }
 
     /**
      * @param rect
      */
     public GLView2D(Rectangle rect) {
-
         this(rect.x, rect.x + rect.width, rect.y, rect.y + rect.height);
-
     }
 
-    public GLView2D(PixelExtent pe) {
-        super(pe);
+    public GLView2D(IExtent pe) {
+        this.extent = pe;
+    }
+
+    protected IGLTarget asIGLTarget(IGraphicsTarget target) {
+        if (target instanceof IGLTarget) {
+            return (IGLTarget) target;
+        } else {
+            throw new IllegalArgumentException("Require type IGLTarget got "
+                    + target);
+        }
     }
 
     /**
@@ -119,20 +116,6 @@ public class GLView2D extends GLAbstractView {
                 (extent.getMaxY() - extent.getMinY()) / worldHeight);
     }
 
-    /*
-     * (non-Javadoc)
-     * 
-     * @see java.lang.Object#equals(java.lang.Object)
-     */
-    @Override
-    public boolean equals(Object arg0) {
-        if (arg0 == null || !(arg0 instanceof GLView2D)) {
-            return false;
-        }
-
-        return this.getExtent().equals(((GLView2D) arg0).getExtent());
-    }
-
     public boolean isVisible(double[] pixel) {
         return getExtent().contains(pixel);
     }
@@ -167,81 +150,6 @@ public class GLView2D extends GLAbstractView {
         return "GLView2D { " + this.getExtent().toString() + " }";
     }
 
-    // /**
-    // * Serialize a pixel extent
-    // *
-    // * @param view
-    // * @return the serialized form
-    // */
-    // public static String serialize(DisplayView view) {
-    // if (view == null)
-    // return null;
-    //
-    // StringBuffer sb = new StringBuffer();
-    // sb.append(view.getMinX());
-    // sb.append(" ");
-    // sb.append(view.getMaxX());
-    // sb.append(" ");
-    // sb.append(view.getMinY());
-    // sb.append(" ");
-    // sb.append(view.getMaxY());
-    // return sb.toString();
-    // }
-    //
-    // /**
-    // * Deserialize a pixel extent from a string
-    // *
-    // * @param data
-    // * the serialized form fo the pixel extent
-    // * @return the pixel extent object
-    // */
-    // public static DisplayView deserialize(String data) {
-    // if (data == null) {
-    // return null;
-    // }
-    //		
-    // String[] parts = data.split(" ");
-    // if (parts.length != 4) {
-    // return null;
-    // }
-    //
-    // double[] vals = new double[4];
-    // for (int i = 0; i < vals.length; i++) {
-    // vals[i] = Double.parseDouble(parts[i]);
-    // }
-    //
-    // return new DisplayView(vals[0], vals[1], vals[2], vals[3]);
-    //
-    // }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see
-     * com.raytheon.viz.core.gl.internal.GLAbstractView#setProjectionMatrix()
-     */
-    @Override
-    protected void setProjectionMatrix(IGLTarget target) {
-
-        // We "flip" y-axis for sanity reasons
-        target.getGlu().gluOrtho2D(this.extent.getMinX(),
-                this.extent.getMaxX(), this.extent.getMaxY(),
-                this.extent.getMinY());
-
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see
-     * com.raytheon.viz.core.gl.internal.GLAbstractView#setModelViewMatrix(IGLTarget
-     * )
-     */
-    @Override
-    protected void setModelViewMatrix(IGLTarget target) {
-
-    }
-
     /*
      * (non-Javadoc)
      * 
@@ -296,32 +204,42 @@ public class GLView2D extends GLAbstractView {
             return null;
         }
 
-        Vector3d i = this.mapPlane.intersection(r);
+        Vector3d i = mapPlane.intersection(r);
         if (i == null) {
             return null;
         }
         return new double[] { i.x, i.y, i.z };
     }
 
-    /*
-     * (non-Javadoc)
+    /**
+     * Create a Ray starting a the near plane with direction towards the far
      * 
-     * @see com.raytheon.viz.core.IView#setClippingPlanes()
+     * @param mouse
+     *            mouse x,y
+     * @return Ray
      */
-    @Override
-    public void setClippingPlanes() throws VizException {
+    public Ray computeRay(double[] mouse, IGraphicsTarget target) {
+        Vector3d far = new Vector3d(screenToGrid(mouse[0], mouse[1], 1, target));
+        Vector3d near = new Vector3d(
+                screenToGrid(mouse[0], mouse[1], 0, target));
+        if (near == null || far == null) {
+            return null;
+        }
 
+        far.sub(near);
+        far.normalize();
+
+        return new Ray(near, far);
     }
 
     /*
      * (non-Javadoc)
      * 
-     * @see com.raytheon.viz.core.View#getClippingPlanes()
+     * @see com.raytheon.uf.viz.core.IView#getExtent()
      */
     @Override
-    public Plane[] getClippingPlanes() {
-        // TODO Auto-generated method stub
-        return null;
+    public IExtent getExtent() {
+        return extent;
     }
 
     /*
@@ -331,42 +249,7 @@ public class GLView2D extends GLAbstractView {
      */
     @Override
     public void setExtent(IExtent e) {
-        extent = e;
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see java.lang.Object#clone()
-     */
-    @Override
-    public Object clone() {
-
-        GLView2D v = new GLView2D((PixelExtent) this.extent.clone());
-        return v;
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see com.raytheon.viz.core.IView#shiftPOV(double[], double[])
-     */
-    @Override
-    public boolean shiftPOV(double[] lastMouse, double[] currentMouse,
-            POVShiftType shiftType, IGraphicsTarget target) {
-        // TODO Auto-generated method stub
-        return false;
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see com.raytheon.viz.core.IView#setMapCenter(javax.vecmath.Vector3d)
-     */
-    @Override
-    public void setCenter(Vector3d point) {
-        // TODO Auto-generated method stub
-
+        this.extent = e;
     }
 
     /*
@@ -378,8 +261,8 @@ public class GLView2D extends GLAbstractView {
      */
     @Override
     public IExtent createExtent(PixelCoverage pc) {
-        return new PixelExtent(pc.getMinX(), pc.getMaxX(), pc.getMinY(), pc
-                .getMaxY());
+        return new PixelExtent(pc.getMinX(), pc.getMaxX(), pc.getMinY(),
+                pc.getMaxY());
     }
 
     /*
@@ -394,7 +277,6 @@ public class GLView2D extends GLAbstractView {
         double[] end = screenToGrid(endScreen[0], endScreen[1], 0, target);
 
         this.extent.shift(end[0] - start[0], end[1] - start[1]);
-
     }
 
     /*
@@ -430,18 +312,78 @@ public class GLView2D extends GLAbstractView {
 
         this.extent.shift((f_worldWidth - extent.getWidth()) / 2,
                 (f_worldHeight - extent.getHeight()) / 2);
-
     }
 
     /*
      * (non-Javadoc)
      * 
-     * @see com.raytheon.viz.core.gl.internal.GLAbstractView#setViewArea()
+     * @see com.raytheon.uf.viz.core.IView#setupView(com.raytheon.uf.viz.core.
+     * IGraphicsTarget)
      */
     @Override
-    protected void setViewArea(IGLTarget target) {
-        target.getGl().glDisable(GL.GL_DEPTH_TEST);
+    public void setupView(IGraphicsTarget target) {
+        IGLTarget glTarget = asIGLTarget(target);
+        GL gl = glTarget.getGl();
+        GLU glu = glTarget.getGlu();
 
+        boolean release = glTarget.makeContextCurrent();
+        gl.glMatrixMode(GL.GL_PROJECTION);
+        gl.glLoadIdentity();
+        // We "flip" y-axis for sanity reasons
+        glu.gluOrtho2D(this.extent.getMinX(), this.extent.getMaxX(),
+                this.extent.getMaxY(), this.extent.getMinY());
+
+        gl.glMatrixMode(GL.GL_MODELVIEW);
+        gl.glLoadIdentity();
+
+        gl.glDisable(GL.GL_DEPTH_TEST);
+        if (release) {
+            glTarget.releaseContext();
+        }
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see com.raytheon.uf.viz.core.IView#getZoom()
+     */
+    @Override
+    public double getZoom() {
+        return extent.getScale();
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see com.raytheon.uf.viz.core.IView#zoom(double)
+     */
+    @Override
+    public void zoom(double zoomLevel) {
+        this.extent.scale(zoomLevel);
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see java.lang.Object#equals(java.lang.Object)
+     */
+    @Override
+    public boolean equals(Object arg0) {
+        if (arg0 == null || !(arg0 instanceof GLView2D)) {
+            return false;
+        }
+
+        return this.getExtent().equals(((GLView2D) arg0).getExtent());
+    }
+
+    /*
+     * (non-Javadoc)
+     * 
+     * @see java.lang.Object#clone()
+     */
+    @Override
+    public Object clone() {
+        return new GLView2D((PixelExtent) this.extent.clone());
     }
 
 }
diff --git a/cave/com.raytheon.viz.core/src/com/raytheon/viz/core/drawables/ColorMapParameterFactory.java b/cave/com.raytheon.viz.core/src/com/raytheon/viz/core/drawables/ColorMapParameterFactory.java
index 7b8566b535..2a921cd2da 100644
--- a/cave/com.raytheon.viz.core/src/com/raytheon/viz/core/drawables/ColorMapParameterFactory.java
+++ b/cave/com.raytheon.viz.core/src/com/raytheon/viz/core/drawables/ColorMapParameterFactory.java
@@ -137,10 +137,11 @@ public class ColorMapParameterFactory {
                 min = Float.POSITIVE_INFINITY;
                 max = Float.NEGATIVE_INFINITY;
                 for (Number num : numArray) {
-                    if (num.floatValue() != Util.GRID_FILL_VALUE) {
+                    if (num.floatValue() != Util.GRID_FILL_VALUE
+                            && !Float.isNaN(num.floatValue())) {
                         colormapMin = min = Math.min(min, num.floatValue());
+                        colormapMax = max = Math.max(max, num.floatValue());
                     }
-                    colormapMax = max = Math.max(max, num.floatValue());
                 }
 
                 if (min == Float.POSITIVE_INFINITY) {
diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/actions/DisplayModeButton.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/actions/DisplayModeButton.java
index d17da51687..521fdd090c 100644
--- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/actions/DisplayModeButton.java
+++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/actions/DisplayModeButton.java
@@ -21,9 +21,6 @@ package com.raytheon.viz.gfe.actions;
 
 import java.util.Map;
 
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
 import org.eclipse.ui.IWorkbenchWindow;
 import org.eclipse.ui.commands.IElementUpdater;
 import org.eclipse.ui.menus.UIElement;
@@ -32,6 +29,7 @@ import com.raytheon.viz.gfe.core.msgs.GMDisplayModeMsg;
 import com.raytheon.viz.gfe.core.msgs.Message;
 import com.raytheon.viz.gfe.gridmanager.GridMode;
 import com.raytheon.viz.ui.UiUtil;
+import com.raytheon.viz.ui.actions.AbstractDropDownMenuHandler;
 
 /**
  * Display Mode Button
@@ -48,21 +46,9 @@ import com.raytheon.viz.ui.UiUtil;
  * @version 1.0
  */
 
-public class DisplayModeButton extends AbstractHandler implements
+public class DisplayModeButton extends AbstractDropDownMenuHandler implements
         IElementUpdater {
 
-    /*
-     * (non-Javadoc)
-     * 
-     * @see
-     * org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands
-     * .ExecutionEvent)
-     */
-    @Override
-    public Object execute(ExecutionEvent arg0) throws ExecutionException {
-        return null;
-    }
-
     /*
      * (non-Javadoc)
      * 
diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/actions/EditAreaModeButton.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/actions/EditAreaModeButton.java
index a79a950c09..e46d177c76 100644
--- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/actions/EditAreaModeButton.java
+++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/actions/EditAreaModeButton.java
@@ -21,14 +21,12 @@ package com.raytheon.viz.gfe.actions;
 
 import java.util.Map;
 
-import org.eclipse.core.commands.AbstractHandler;
-import org.eclipse.core.commands.ExecutionEvent;
-import org.eclipse.core.commands.ExecutionException;
 import org.eclipse.ui.commands.IElementUpdater;
 import org.eclipse.ui.menus.UIElement;
 
 import com.raytheon.viz.gfe.core.DataManager;
 import com.raytheon.viz.gfe.core.IReferenceSetManager.RefSetMode;
+import com.raytheon.viz.ui.actions.AbstractDropDownMenuHandler;
 
 /**
  * TODO Add Description
@@ -45,24 +43,15 @@ import com.raytheon.viz.gfe.core.IReferenceSetManager.RefSetMode;
  * @version 1.0
  */
 
-public class EditAreaModeButton extends AbstractHandler implements
+public class EditAreaModeButton extends AbstractDropDownMenuHandler implements
         IElementUpdater {
 
     /*
      * (non-Javadoc)
      * 
-     * @see org.eclipse.core.commands.AbstractHandler#execute(org.eclipse.core.commands.ExecutionEvent)
-     */
-    @Override
-    public Object execute(ExecutionEvent arg0) throws ExecutionException {
-        return null;
-    }
-
-    /*
-     * (non-Javadoc)
-     * 
-     * @see org.eclipse.ui.commands.IElementUpdater#updateElement(org.eclipse.ui.menus.UIElement,
-     *      java.util.Map)
+     * @see
+     * org.eclipse.ui.commands.IElementUpdater#updateElement(org.eclipse.ui.
+     * menus.UIElement, java.util.Map)
      */
     @Override
     @SuppressWarnings("unchecked")
diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/griddata/AbstractGridData.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/griddata/AbstractGridData.java
index b015a8d24b..50df7c16a5 100644
--- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/griddata/AbstractGridData.java
+++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/griddata/AbstractGridData.java
@@ -242,6 +242,7 @@ public abstract class AbstractGridData implements IGridData {
      * Resets the fields, then notifies the parm that history has updated.
      * 
      */
+    @Override
     public void resetSavePublishHistory() {
         for (GridDataHistory history : this.gridSlice.getHistory()) {
             history.setUpdateTime(null);
@@ -256,6 +257,7 @@ public abstract class AbstractGridData implements IGridData {
      * 
      * @return true if the method succeeded
      */
+    @Override
     public boolean setSaveHistory() {
         Date current = SimulatedTime.getSystemTime().getTime();
         for (int i = 0; i < this.getHistory().length; i++) {
@@ -274,6 +276,7 @@ public abstract class AbstractGridData implements IGridData {
      *            the modifier
      * 
      */
+    @Override
     public void updateHistoryToModified(WsId modifier) {
         Date now = SimulatedTime.getSystemTime().getTime();
         for (int i = 0; i < getHistory().length; i++) {
@@ -295,6 +298,7 @@ public abstract class AbstractGridData implements IGridData {
      * @param sourceGrid
      *            the original grid
      */
+    @Override
     public boolean copyGridValues(final IGridData sourceGrid) {
         populate();
 
@@ -587,6 +591,7 @@ public abstract class AbstractGridData implements IGridData {
         return false;
     }
 
+    @Override
     public boolean smooth(final Date time, Grid2DBit pointsToSmooth) {
         populate();
 
@@ -730,6 +735,7 @@ public abstract class AbstractGridData implements IGridData {
     // ---------------------------------------------------------
     // Checks ok to edit. If okay, then calls virtual doMoveCopy.
     // ---------------------------------------------------------------------------
+    @Override
     public boolean moveCopyArea(final Date time,
             final Grid2DBit pointsToMoveCopy, final Point delta, boolean copyOp) {
         populate();
@@ -857,6 +863,10 @@ public abstract class AbstractGridData implements IGridData {
             if (!this.isPopulated()) {
                 return;
             }
+            String msg = "Depopulating " + getParm().getParmID() + " tr="
+                    + getGridTime();
+            statusHandler.handle(Priority.DEBUG, msg, new Exception("Debug: "
+                    + msg));
 
             this.lastAccessTime = SimulatedTime.getSystemTime().getTime();
             setGridSliceDataToNull();
@@ -865,6 +875,7 @@ public abstract class AbstractGridData implements IGridData {
 
     protected abstract void setGridSliceDataToNull();
 
+    @Override
     public List getHistorySites() {
         GridDataHistory[] h = this.getHistory();
         List sites = new ArrayList();
diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/griddata/DiscreteGridData.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/griddata/DiscreteGridData.java
index f6f28d79df..f61fb64209 100644
--- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/griddata/DiscreteGridData.java
+++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/griddata/DiscreteGridData.java
@@ -831,14 +831,17 @@ public class DiscreteGridData extends AbstractGridData implements INumpyable {
         return setIt;
     }
 
+    @Override
     public Object[] getNumPy() {
         return new Object[] { this.getGrid().getBuffer().array() };
     }
 
+    @Override
     public int getNumpyX() {
         return this.getGrid().getXdim();
     }
 
+    @Override
     public int getNumpyY() {
         return this.getGrid().getYdim();
     }
@@ -927,7 +930,7 @@ public class DiscreteGridData extends AbstractGridData implements INumpyable {
                     if (points.get(i, j) == 1) {
                         DiscreteKey combined = DiscreteKey.combine(
                                 key.get(values.get(i, j)),
-                                doGetDiscreteValue(grid, key, new Point(i, j)));
+                                doGetDiscreteValue(i, j));
                         grid.set(i, j, lookupKeyValue(combined));
                     }
                 }
@@ -937,10 +940,9 @@ public class DiscreteGridData extends AbstractGridData implements INumpyable {
         setGrid(grid);
     }
 
-    protected DiscreteKey doGetDiscreteValue(Grid2DByte grid,
-            List key, Point gridLoc) {
-        byte gridValue = grid.get(gridLoc.x, gridLoc.y);
-        return key.get(gridValue);
+    protected DiscreteKey doGetDiscreteValue(int x, int y) {
+        byte gridValue = getGrid().get(x, y);
+        return getKey()[gridValue];
     }
 
     /*
diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/griddata/WeatherGridData.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/griddata/WeatherGridData.java
index bfc9e30f3b..5b4168bac7 100644
--- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/griddata/WeatherGridData.java
+++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/griddata/WeatherGridData.java
@@ -807,14 +807,17 @@ public class WeatherGridData extends AbstractGridData implements INumpyable {
         return pointsToFillIn;
     }
 
+    @Override
     public Object[] getNumPy() {
         return new Object[] { this.getGrid().getBuffer().array() };
     }
 
+    @Override
     public int getNumpyX() {
         return this.getGrid().getXdim();
     }
 
+    @Override
     public int getNumpyY() {
         return this.getGrid().getYdim();
     }
@@ -897,8 +900,7 @@ public class WeatherGridData extends AbstractGridData implements INumpyable {
                     if (points.get(i, j) == 1) {
                         WeatherKey combined = new WeatherKey(key.get(values
                                 .get(i, j)));
-                        combined.addAll(doGetWeatherValue(grid, key, new Point(
-                                i, j)));
+                        combined.addAll(doGetWeatherValue(i, j));
                         grid.set(i, j, lookupKeyValue(combined));
                     }
                 }
@@ -908,10 +910,9 @@ public class WeatherGridData extends AbstractGridData implements INumpyable {
         setGrid(grid);
     }
 
-    protected WeatherKey doGetWeatherValue(Grid2DByte grid,
-            List key, Point gridLoc) {
-        byte gridValue = grid.get(gridLoc.x, gridLoc.y);
-        return key.get(gridValue);
+    protected WeatherKey doGetWeatherValue(int x, int y) {
+        byte gridValue = getGrid().get(x, y);
+        return getKeys()[gridValue];
     }
 
     /*
diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/parm/DbParm.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/parm/DbParm.java
index cb820f0e0f..32f2fdcf80 100644
--- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/parm/DbParm.java
+++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/parm/DbParm.java
@@ -39,6 +39,7 @@ import com.raytheon.uf.common.dataplugin.gfe.db.objects.ParmID;
 import com.raytheon.uf.common.dataplugin.gfe.discrete.DiscreteKey;
 import com.raytheon.uf.common.dataplugin.gfe.server.lock.LockTable;
 import com.raytheon.uf.common.dataplugin.gfe.server.lock.LockTable.LockMode;
+import com.raytheon.uf.common.dataplugin.gfe.server.lock.LockTable.LockStatus;
 import com.raytheon.uf.common.dataplugin.gfe.server.message.ServerMsg;
 import com.raytheon.uf.common.dataplugin.gfe.server.message.ServerResponse;
 import com.raytheon.uf.common.dataplugin.gfe.server.request.LockRequest;
@@ -471,6 +472,7 @@ public class DbParm extends Parm {
         // List gridsSaved = new ArrayList();
         List sgr = new ArrayList();
         List lreq = new ArrayList();
+        List pendingUnlocks = new ArrayList();
 
         GridLocation gloc = this.getGridInfo().getGridLoc();
         int gridSize = gloc.getNx() * gloc.getNy();
@@ -488,6 +490,7 @@ public class DbParm extends Parm {
         }
 
         boolean success = true;
+        long size = 0;
         for (int i = 0; i < trs.size(); i++) {
             // ensure we have a lock for the time period
             TimeRange lockTime = new TimeRange();
@@ -507,7 +510,6 @@ public class DbParm extends Parm {
             IGridData[] grids = this.getGridInventory(lockTime);
 
             List records = new ArrayList();
-            long size = 0;
             boolean allSaved = true;
 
             // time range remaining to be saved
@@ -539,7 +541,19 @@ public class DbParm extends Parm {
                             .getGridTime().getEnd());
                     sgr.add(new SaveGridRequest(getParmID(), tr, records,
                             dataManager.clientISCSendStatus()));
-                    allSaved &= doSave(sgr);
+
+                    // save this batch of grids
+                    if (doSave(sgr)) {
+                        // if successful add pending locks to unlock requests
+                        for (TimeRange t : pendingUnlocks) {
+                            lreq.add(new LockRequest(getParmID(), t,
+                                    LockMode.UNLOCK));
+                        }
+                    } else {
+                        allSaved = false;
+                    }
+
+                    pendingUnlocks.clear();
                     sgr.clear();
                     records.clear();
                     size = 0;
@@ -551,14 +565,25 @@ public class DbParm extends Parm {
             if (size > 0 || saveTime.getDuration() > 0) {
                 sgr.add(new SaveGridRequest(getParmID(), saveTime, records,
                         dataManager.clientISCSendStatus()));
-                allSaved &= doSave(sgr);
             }
 
+            // if we haven't had a failure yet add to pending locks
             if (allSaved) {
-                lreq.add(new LockRequest(getParmID(), lockTime, LockMode.UNLOCK));
+                pendingUnlocks.add(lockTime);
             }
+
             success &= allSaved;
         }
+        // if any pending saves
+        if (sgr.size() > 0) {
+            if (doSave(sgr)) {
+                for (TimeRange t : pendingUnlocks) {
+                    lreq.add(new LockRequest(getParmID(), t, LockMode.UNLOCK));
+                }
+            } else {
+                success = false;
+            }
+        }
 
         if (lreq.size() > 0) {
             success &= requestLock(lreq);
@@ -617,8 +642,6 @@ public class DbParm extends Parm {
         }
 
         long milliseconds = 1000L * seconds;
-        // get my locks
-        List myLocks = this.getLockTable().lockedByMe();
 
         // go through each grid in existence
         // must use for i loop to avoid concurrentModification exception
@@ -646,18 +669,15 @@ public class DbParm extends Parm {
 
                 // grid is populated, is it modified?
                 final TimeRange gTime = grid.getGridTime();
-                boolean locked = false;
-                for (int j = 0; j < myLocks.size(); j++) {
-                    if (gTime.overlaps(myLocks.get(j))) {
-                        locked = true;
-                        break;
-                    }
-                }
+                boolean locked = this.getLockTable().checkLock(gTime)
+                        .equals(LockStatus.LOCKED_BY_ME);
 
                 // only deallocate unlocked grids
                 if (!locked) {
-                    // logDebug << "Deallocating " << parmID() << " tr="
-                    // << gTime << std::endl;
+                    String msg = "Deallocating " + getParmID() + " tr=" + gTime;
+                    statusHandler.handle(Priority.DEBUG, msg, new Exception(
+                            "Debug: " + msg));
+
                     grid.depopulate();
                 }
             }
@@ -679,6 +699,11 @@ public class DbParm extends Parm {
 
         List lreq = new ArrayList(timesToSave.size());
         for (int i = 0; i < timesToSave.size(); i++) {
+            String msg = "Reverting " + getParmID() + " tr="
+                    + timesToSave.get(i);
+            statusHandler.handle(Priority.DEBUG, msg, new Exception("Debug: "
+                    + msg));
+
             boolean success = true;
             IGridData[] grids = null;
             try {
diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/parm/Parm.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/parm/Parm.java
index 32c5bd5c84..4d3f994ecf 100644
--- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/parm/Parm.java
+++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/parm/Parm.java
@@ -1963,6 +1963,12 @@ public abstract class Parm implements Comparable {
         int i;
         for (i = 0; i < this.undoBuffers.size(); i++) {
             UndoBuffer undoBuffer = this.undoBuffers.get(i);
+
+            String msg = "Undoing " + getParmID() + " tr="
+                    + undoBuffer.getUndoTimeRange();
+            statusHandler.handle(Priority.DEBUG, msg, new Exception("Debug: "
+                    + msg));
+
             baffectedTR[i] = undoBuffer.getUndoTimeRange();
             bgridCopies[i] = new ArrayList();
 
diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/parm/ParmListeners.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/parm/ParmListeners.java
index 5895942315..4b4fa0464e 100644
--- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/parm/ParmListeners.java
+++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/core/parm/ParmListeners.java
@@ -21,7 +21,6 @@ package com.raytheon.viz.gfe.core.parm;
 
 import org.apache.commons.lang.Validate;
 import org.eclipse.core.runtime.ListenerList;
-import org.eclipse.swt.widgets.Display;
 
 import com.raytheon.uf.common.dataplugin.gfe.db.objects.ParmID;
 import com.raytheon.uf.common.dataplugin.gfe.server.lock.LockTable;
@@ -58,7 +57,6 @@ import com.raytheon.viz.gfe.core.wxvalue.WxValue;
  *                                      multiple registration
  * Feb 23, 2012  #346       dgilling    Implement clearParmListeners.
  * Mar 01, 2012  #346       dgilling    Use identity-based ListenerLists.
- * Mar 21, 2012  14583      mli			fix invalid thread access for PickupValueChange
  * 
  * 
* @@ -248,13 +246,14 @@ public class ParmListeners { for (Object listener : this.pickupValueChangedListeners.getListeners()) { final IPickupValueChangedListener casted = (IPickupValueChangedListener) listener; - Display.getDefault().asyncExec( new Runnable() { - + Runnable notTask = new Runnable() { + @Override public void run() { casted.pickupValueChanged(parm, pickupValue); } - }); + }; + notificationPool.schedule(notTask); } } diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/formatterlauncher/ProductEditorComp.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/formatterlauncher/ProductEditorComp.java index c6df76ca74..aa6dbacf2d 100755 --- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/formatterlauncher/ProductEditorComp.java +++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/dialogs/formatterlauncher/ProductEditorComp.java @@ -149,8 +149,6 @@ public class ProductEditorComp extends Composite implements private static final String EMPTY = ""; - private static final String SPC = " "; - /** * Parent composite. */ @@ -320,8 +318,6 @@ public class ProductEditorComp extends Composite implements */ private ITransmissionState transmissionCB; - private String productTime = null; - private SimpleDateFormat purgeTimeFmt = new SimpleDateFormat("ddHHmm"); private SimpleDateFormat vtecTimeFmt = new SimpleDateFormat( @@ -442,6 +438,7 @@ public class ProductEditorComp extends Composite implements init(); visibilityListener = new Listener() { + @Override public void handleEvent(Event e) { switch (e.type) { case SWT.Hide: @@ -643,8 +640,8 @@ public class ProductEditorComp extends Composite implements }); menuItems.add(storeMI); - // TODO : we can't color the background of the menu item so - // we may want to use an image like the tab folder. + // we can't color the background of the menu item so + // we use an image like the tab folder. transmitMI = new MenuItem(fileMenu, SWT.PUSH); transmitMI.setText("Transmit..."); transmitMI.setImage(transLiveImg); @@ -952,11 +949,8 @@ public class ProductEditorComp extends Composite implements }); buttons.add(transmitBtn); - gd = new GridData(SWT.RIGHT, SWT.DEFAULT, true, false); - gd.widthHint = 35; Button checkBtn = new Button(bottomComp, SWT.PUSH); checkBtn.setImage(checkImg); - checkBtn.setLayoutData(gd); checkBtn.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent e) { @@ -964,8 +958,9 @@ public class ProductEditorComp extends Composite implements } }); - gd = new GridData(30, 20); Label sepLbl = new Label(bottomComp, SWT.SEPARATOR | SWT.VERTICAL); + gd = new GridData(SWT.DEFAULT, SWT.FILL, false, true); + gd.heightHint = 1; sepLbl.setLayoutData(gd); Label typeLbl = new Label(bottomComp, SWT.NONE); @@ -979,8 +974,9 @@ public class ProductEditorComp extends Composite implements } }); - gd = new GridData(30, 20); Label sepLbl2 = new Label(bottomComp, SWT.SEPARATOR | SWT.VERTICAL); + gd = new GridData(SWT.DEFAULT, SWT.FILL, false, true); + gd.heightHint = 1; sepLbl2.setLayoutData(gd); Label prodExpiresLbl = new Label(bottomComp, SWT.NONE); @@ -1011,6 +1007,7 @@ public class ProductEditorComp extends Composite implements private void updateExpireTimeFromTimer() { VizApp.runAsync(new Runnable() { + @Override public void run() { updateExpireTime(); } diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/edittool/contour/ContourTool.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/edittool/contour/ContourTool.java index ef0f9b1fae..b8f43e364d 100644 --- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/edittool/contour/ContourTool.java +++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/edittool/contour/ContourTool.java @@ -1084,16 +1084,14 @@ public class ContourTool extends AbstractFreeformTool implements { Collections.reverse(insert); contour.remove(0, startIndex); - contour.remove(endIndex, - contour.getLineString().getNumPoints() - 1); + contour.replace(endIndex, contour.getLineString() + .getNumPoints(), insert); } else // startIndex > endIndex { - contour.remove(startIndex, contour.getLineString() - .getNumPoints() - 1); + contour.replace(startIndex, contour.getLineString() + .getNumPoints(), insert); contour.remove(0, endIndex); } - // append the new points - contour.append(insert); contour.setModified(true); } contours.set(contourIndex, contour); diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/edittool/sample/SamplePainter.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/edittool/sample/SamplePainter.java index ff1626be93..bae55eb71d 100644 --- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/edittool/sample/SamplePainter.java +++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/edittool/sample/SamplePainter.java @@ -280,6 +280,9 @@ public class SamplePainter { inGrid = true; } + // sample label color + RGB labelColor = new RGB(255, 255, 255); + // get the list of samples that should be painted and in the // order for (GridID grid : grids) { @@ -290,30 +293,6 @@ public class SamplePainter { continue; // skip } - // calculate color - RGB labelColor; - // AFPSConfig.get(pName + "_Sample_color", labelColor); - String cfgColor = Activator.getDefault().getPreferenceStore() - .getString(pName + "_Sample_color"); - if (!cfgColor.equals("")) { - labelColor = RGBColors.getRGBColor(cfgColor); - } else { - labelColor = grid.getParm().getDisplayAttributes() - .getBaseColor(); - if (grid.equals(imageGrid)) { - RGB color = new RGB(255, 255, 255); - String imgLegColor = Activator.getDefault() - .getPreferenceStore() - .getString("ImageLegend_color"); - - if (!imgLegColor.equals("")) { - color = RGBColors.getRGBColor(imgLegColor); - } - - labelColor = color; - } - } - // get the data value String label = NO_DATA_LABEL; if (inGrid) { diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/ifpimage/GfeImageUtil.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/ifpimage/GfeImageUtil.java index fe18040fa1..ff26a863b4 100644 --- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/ifpimage/GfeImageUtil.java +++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/ifpimage/GfeImageUtil.java @@ -50,8 +50,8 @@ import com.vividsolutions.jts.geom.Point; public class GfeImageUtil { public static GridGeometry2D getLocationGeometry(GridLocation gloc, - com.vividsolutions.jts.geom.Envelope env, float width, - float height, float percentLeft, float percentRight, + com.vividsolutions.jts.geom.Envelope env, Integer width, + Integer height, float percentLeft, float percentRight, float percentTop, float percentBottom) { Envelope envelope = null; @@ -88,9 +88,33 @@ public class GfeImageUtil { envelope.getMaximum(0) + dRight); newEnvelope.setRange(1, envelope.getMinimum(1) - dBottom, envelope.getMaximum(1) + dTop); + + org.eclipse.swt.graphics.Point p = adjustAspect(width, height, + newEnvelope); + newGridGeometry = new GridGeometry2D(new GeneralGridEnvelope(new int[] { - 0, 0 }, new int[] { (int) width, (int) height }), newEnvelope); + 0, 0 }, new int[] { p.x, p.y }), newEnvelope); return newGridGeometry; } + + private static org.eclipse.swt.graphics.Point adjustAspect(Integer width, + Integer height, GeneralEnvelope wd) { + // Calculate the correct aspect ratio and adjust the width + // and height to fit. + if (width == null && height == null) { + width = 400; // The default + } + + org.eclipse.swt.graphics.Point p = new org.eclipse.swt.graphics.Point( + 0, 0); + if (width != null) { + p.x = width; + p.y = (int) ((width * wd.getSpan(1)) / wd.getSpan(0)); + } else { + p.x = (int) ((height * wd.getSpan(0)) / wd.getSpan(1)); + p.y = height; + } + return p; + } } diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/procedures/ProcedureUtil.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/procedures/ProcedureUtil.java index 5d93e61105..0cbf79a5ae 100644 --- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/procedures/ProcedureUtil.java +++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/procedures/ProcedureUtil.java @@ -45,6 +45,7 @@ import com.raytheon.viz.gfe.smarttool.PreviewInfo; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * Feb 9, 2010 njensen Initial creation + * 4/26/2012 14748 ryu Use edit area and time range from preview info * * * @@ -84,8 +85,8 @@ public class ProcedureUtil { final ProcedureRequest req = new ProcedureRequest(); req.setProcedureName(procName); req.setPreview(pi); - req.setRefSet(editArea); - req.setTimeRange(timeRange); + req.setRefSet(pi.getEditAction().getRefSet()); + req.setTimeRange(pi.getEditAction().getTimeRange()); if (varDict != null) { req.setVarDict(varDict); diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/rsc/colorbar/ContinuousColorbar.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/rsc/colorbar/ContinuousColorbar.java index c9e13ae6eb..502eb176cc 100644 --- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/rsc/colorbar/ContinuousColorbar.java +++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/rsc/colorbar/ContinuousColorbar.java @@ -37,6 +37,7 @@ import com.raytheon.uf.viz.core.drawables.PaintProperties; import com.raytheon.uf.viz.core.drawables.ResourcePair; import com.raytheon.uf.viz.core.exception.VizException; import com.raytheon.uf.viz.core.rsc.capabilities.ColorMapCapability; +import com.raytheon.uf.viz.core.rsc.capabilities.ImagingCapability; import com.raytheon.viz.gfe.Activator; import com.raytheon.viz.gfe.GFEOperationFailedException; import com.raytheon.viz.gfe.core.DataManager; @@ -134,11 +135,6 @@ public class ContinuousColorbar implements IColorBarDisplay { PixelExtent pe = colorbarResource.getExtent(); float center = (float) ((pe.getMinY() + pe.getMaxY()) / 2.0); - DrawableColorMap dcm = new DrawableColorMap(cmap); - dcm.alpha = 1.0f; - dcm.extent = pe; - target.drawColorRamp(dcm); - ResourcePair rscPair = spatialDisplayManager.getResourcePair(parm); if (rscPair == null) { // spatial display manager deactivated since we got the color map? @@ -146,6 +142,14 @@ public class ContinuousColorbar implements IColorBarDisplay { + parm.getParmID().getCompositeName() + ", exiting paint()"); return; } + + DrawableColorMap dcm = new DrawableColorMap(cmap); + dcm.alpha = 1.0f; + dcm.extent = pe; + dcm.interpolate = rscPair.getResource() + .getCapability(ImagingCapability.class).isInterpolationState(); + target.drawColorRamp(dcm); + GFEResource rsc = (GFEResource) rscPair.getResource(); float minParm = rsc.getCapability(ColorMapCapability.class) .getColorMapParameters().getColorMapMin(); diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/smartscript/FieldDefinition.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/smartscript/FieldDefinition.java index d980d3a15a..620df82026 100644 --- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/smartscript/FieldDefinition.java +++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/smartscript/FieldDefinition.java @@ -111,6 +111,8 @@ public class FieldDefinition { private List valueList; private float resolution; + + private int precision; public FieldDefinition() { valueList = new ArrayList(); @@ -125,13 +127,15 @@ public class FieldDefinition { * @param resolution */ public FieldDefinition(Object name, String description, FieldType type, - Object defaultValue, List valueList, float resolution) { + Object defaultValue, List valueList, float resolution, + int precision) { this.name = name; this.description = description; this.type = type; this.defaultValue = defaultValue; this.valueList = valueList; this.resolution = resolution; + this.precision = precision; } public Object getName() { @@ -181,6 +185,14 @@ public class FieldDefinition { public void setResolution(float resolution) { this.resolution = resolution; } + + public void setPrecision(int precision) { + this.precision = precision; + } + + private int getPrecision() { + return precision; + } public static List buildWidgetList(List fieldDefs, DataManager dataMgr) { @@ -208,7 +220,7 @@ public class FieldDefinition { } else if (fieldDef.getType() == FieldType.SCALE) { widget = makeScale(fieldDef.getDescription(), fieldDef.getValueList(), fieldDef.getDefaultValue(), - fieldDef.getResolution()); + fieldDef.getResolution(), fieldDef.getPrecision()); } else if (fieldDef.getType() == FieldType.SCROLLBAR) { widget = makeScrollbar(fieldDef.getDescription(), fieldDef.getDefaultValue()); @@ -345,14 +357,12 @@ public class FieldDefinition { } private static ScaleWidget makeScale(String labelText, - List valueList, Object initialValue, float res) { + List valueList, Object initialValue, float res, int precision) { ScaleWidget scale = new ScaleWidget(labelText); scale.setOptions(valueList); scale.setValue(initialValue); - - if (res != 0.0f) { - scale.setResolution(res); - } + scale.setResolution(res); + scale.setPrecision(precision); return scale; } diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/smarttool/Tool.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/smarttool/Tool.java index 70895878f0..70ed2e10ef 100644 --- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/smarttool/Tool.java +++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/smarttool/Tool.java @@ -441,7 +441,8 @@ public class Tool { // # PreProcess Tool handlePreAndPostProcess("preProcessTool", null, timeRange, editArea, dataMode); - + statusHandler.handle(Priority.DEBUG, "Running smartTool: " + toolName); + // Iterate over time range // Process each grid in the time range. int numberOfGrids = grids.length; diff --git a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/smarttool/script/SmartToolController.java b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/smarttool/script/SmartToolController.java index 28b2dbf60b..4c81b4319a 100644 --- a/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/smarttool/script/SmartToolController.java +++ b/cave/com.raytheon.viz.gfe/src/com/raytheon/viz/gfe/smarttool/script/SmartToolController.java @@ -174,8 +174,6 @@ public class SmartToolController extends BaseGfePyController { public Object executeTool(Parm parmToEdit, String toolName, Map args) throws JepException { - statusHandler.handle(Priority.DEBUG, "Running smartTool: " + toolName); - runToolMethod(toolName, "execute", args); if (parmToEdit == null) { return null; diff --git a/cave/com.raytheon.viz.grid/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject b/cave/com.raytheon.viz.grid/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject index 7734079b6e..933c5ffffe 100644 --- a/cave/com.raytheon.viz.grid/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject +++ b/cave/com.raytheon.viz.grid/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject @@ -1,7 +1,5 @@ com.raytheon.viz.grid.xml.ParameterList com.raytheon.viz.grid.xml.ParameterMapping -com.raytheon.viz.grid.xml.ValidTypeFile -com.raytheon.viz.grid.xml.ValidType com.raytheon.viz.grid.rsc.GridResourceData com.raytheon.viz.grid.rsc.FfgVizGroupResourceData com.raytheon.viz.grid.rsc.RcmResourceData diff --git a/cave/com.raytheon.viz.grid/localization/styleRules/gridImageryStyleRules.xml b/cave/com.raytheon.viz.grid/localization/styleRules/gridImageryStyleRules.xml index f00055fb5c..3a65243be8 100644 --- a/cave/com.raytheon.viz.grid/localization/styleRules/gridImageryStyleRules.xml +++ b/cave/com.raytheon.viz.grid/localization/styleRules/gridImageryStyleRules.xml @@ -4723,4 +4723,12 @@ K/hPa/s*1.0E-5 + + + Mmag + + + g*m/(kg*s) + + \ No newline at end of file diff --git a/cave/com.raytheon.viz.volumebrowser/localization/volumebrowser/FieldDisplayTypes.xml b/cave/com.raytheon.viz.grid/localization/volumebrowser/FieldDisplayTypes.xml similarity index 100% rename from cave/com.raytheon.viz.volumebrowser/localization/volumebrowser/FieldDisplayTypes.xml rename to cave/com.raytheon.viz.grid/localization/volumebrowser/FieldDisplayTypes.xml diff --git a/cave/com.raytheon.viz.grid/src/com/raytheon/viz/grid/rsc/GridResource.java b/cave/com.raytheon.viz.grid/src/com/raytheon/viz/grid/rsc/GridResource.java index cf12ce05cf..3c568b0b6e 100644 --- a/cave/com.raytheon.viz.grid/src/com/raytheon/viz/grid/rsc/GridResource.java +++ b/cave/com.raytheon.viz.grid/src/com/raytheon/viz/grid/rsc/GridResource.java @@ -131,6 +131,8 @@ import com.vividsolutions.jts.io.WKTReader; * Feb 28, 2007 chammack Initial Creation. * 02/12/09 njensen Refactored to new rsc architecture * 04/03/2012 14774/14775 D. Friedman Fixed tiling and lockup problem + * 05/08/2012 14828 D. Friedman Use nearest-neighbor interpolation for + * reprojected grids. * * * @@ -291,10 +293,10 @@ public class GridResource extends .getLocation().getGridGeometry(); GridGeometry2D expectedGridGeometry = this.gridGeometry[0]; if (!realGridGeometry.equals(expectedGridGeometry)) { - BilinearInterpolation interp = new BilinearInterpolation( + AbstractInterpolation interp = new NearestNeighborInterpolation( realGridGeometry, expectedGridGeometry, -9998, Float.POSITIVE_INFINITY, -999999); - interp.setMissingThreshold(1.0f); + //interp.setMissingThreshold(1.0f); // Should be used for bi-linear interpolation if (record instanceof FloatDataRecord) { float[] data = ((FloatDataRecord) record).getFloatData(); record = record.clone(); diff --git a/cave/com.raytheon.viz.grid/src/com/raytheon/viz/grid/rsc/GridVectorResource.java b/cave/com.raytheon.viz.grid/src/com/raytheon/viz/grid/rsc/GridVectorResource.java index 6f85ad856d..2732d43770 100644 --- a/cave/com.raytheon.viz.grid/src/com/raytheon/viz/grid/rsc/GridVectorResource.java +++ b/cave/com.raytheon.viz.grid/src/com/raytheon/viz/grid/rsc/GridVectorResource.java @@ -25,7 +25,6 @@ import java.util.Arrays; import java.util.Collection; import java.util.Collections; import java.util.Iterator; -import java.util.Map; import java.util.Set; import javax.measure.unit.Unit; @@ -45,7 +44,6 @@ import com.raytheon.uf.common.dataplugin.grib.CombinedGribRecord; import com.raytheon.uf.common.dataplugin.grib.GribModel; import com.raytheon.uf.common.dataplugin.grib.GribRecord; import com.raytheon.uf.common.dataplugin.grib.spatial.projections.GridCoverage; -import com.raytheon.uf.common.dataquery.requests.RequestConstraint; import com.raytheon.uf.common.datastorage.StorageException; import com.raytheon.uf.common.datastorage.records.FloatDataRecord; import com.raytheon.uf.common.datastorage.records.IDataRecord; @@ -55,8 +53,7 @@ import com.raytheon.uf.common.geospatial.PointUtil; import com.raytheon.uf.common.geospatial.ReferencedCoordinate; import com.raytheon.uf.common.geospatial.interpolation.AbstractInterpolation; import com.raytheon.uf.common.geospatial.interpolation.BilinearInterpolation; -import com.raytheon.uf.common.localization.PathManagerFactory; -import com.raytheon.uf.common.serialization.SerializationUtil; +import com.raytheon.uf.common.geospatial.interpolation.NearestNeighborInterpolation; import com.raytheon.uf.common.status.IUFStatusHandler; import com.raytheon.uf.common.status.UFStatus; import com.raytheon.uf.common.status.UFStatus.Priority; @@ -81,8 +78,6 @@ import com.raytheon.viz.grid.rsc.GridNameGenerator.IGridNameResource; import com.raytheon.viz.grid.rsc.GridNameGenerator.LegendParameters; import com.raytheon.viz.grid.util.CoverageUtils; import com.raytheon.viz.grid.util.RemappedImage; -import com.raytheon.viz.grid.xml.ValidType; -import com.raytheon.viz.grid.xml.ValidTypeFile; import com.raytheon.viz.pointdata.PointWindDisplay.DisplayType; import com.vividsolutions.jts.geom.Coordinate; @@ -105,7 +100,10 @@ import com.vividsolutions.jts.geom.Coordinate; * 01/31/12 14306 kshresth Cursor readout as you sample the dispay * 02/10/12 14472 mhuang Fixed VB 'Height' field legend display error * when click 'Diff' button. - * + * 05/08/2012 14828 D. Friedman Use nearest-neighbor interpolation for + * reprojected grids. + * 05/16/2012 14993 D. Friedman Fix "blocky" contours + * * * * @author chammack @@ -116,12 +114,6 @@ public class GridVectorResource extends AbstractMapVectorResource implements private static final transient IUFStatusHandler statusHandler = UFStatus .getHandler(GridVectorResource.class); - private ValidTypeFile arrowTypes; - - private ValidTypeFile windTypes; - - private ValidTypeFile streamlineTypes; - private GridGeometry2D remappedImageGeometry; private LegendParameters legendParams; @@ -183,15 +175,16 @@ public class GridVectorResource extends AbstractMapVectorResource implements String parameterName = modelInfo.getParameterName(); StyleType st = null; if (parameterName.equals("Height")) { - st = StyleType.CONTOUR; - } else if (parameterName.equals("Wind") || parameterName.equals("Total Wind") - || parameterName.equals("Total Wind (Vector)")) { - st = StyleType.ARROW; + st = StyleType.CONTOUR; + } else if (parameterName.equals("Wind") + || parameterName.equals("Total Wind") + || parameterName.equals("Total Wind (Vector)")) { + st = StyleType.ARROW; } else { - st = StyleType.IMAGERY; + st = StyleType.IMAGERY; } StyleRule secondaryStyleRule = StyleManager.getInstance() - .getStyleRule(st, match); + .getStyleRule(st, match); if (secondaryStyleRule != null && secondaryStyleRule.getPreferences() .getDisplayUnitLabel() != null) { @@ -223,7 +216,7 @@ public class GridVectorResource extends AbstractMapVectorResource implements StorageException, VizException { IDataRecord[] results = super.getDataRecord(pdo, styleRule); GribRecord gribRecord = (GribRecord) pdo; - + // We need to reproject global data to prevent a gap in the data boolean reproject = false; GridCoverage location = gribRecord.getModelInfo().getLocation(); @@ -242,50 +235,53 @@ public class GridVectorResource extends AbstractMapVectorResource implements GridGeometry2D remappedImageGeometry = GridGeometry2D .wrap(MapUtil.reprojectGeometry(gridGeometry, descriptor.getGridGeometry().getEnvelope(), - true)); + true, 2)); IDataRecord[] newData = new IDataRecord[results.length]; BilinearInterpolation interp = new BilinearInterpolation( gridGeometry, remappedImageGeometry, -9998, Float.POSITIVE_INFINITY, -999999); interp.setMissingThreshold(1.0f); - + /* * Convert speed/dirs into U, V before interpolation. */ - int len = ((FloatDataRecord) results[0]).getFloatData().length; + int len = ((FloatDataRecord) results[0]).getFloatData().length; float[] uu = new float[len]; float[] vv = new float[len]; - + boolean isVector = false; if (displayType == DisplayType.BARB || displayType == DisplayType.ARROW) { - isVector = true; - + isVector = true; + for (int i = 0; i < len; i++) { - float spd = ((FloatDataRecord) results[0]).getFloatData()[i]; - float dir = ((FloatDataRecord) results[1]).getFloatData()[i]; - - if ( spd > -999999.0f && dir > -999999.0f) { - uu[i] = (float) (-spd * Math.sin(dir * Math.PI/180)); - vv[i] = (float) (-spd * Math.cos(dir * Math.PI/180)); - } - else { - uu[i] = -999999.0f; - vv[i] = -999999.0f; - } + float spd = ((FloatDataRecord) results[0]) + .getFloatData()[i]; + float dir = ((FloatDataRecord) results[1]) + .getFloatData()[i]; + + if (spd > -999999.0f && dir > -999999.0f) { + uu[i] = (float) (-spd * Math.sin(dir * Math.PI + / 180)); + vv[i] = (float) (-spd * Math.cos(dir * Math.PI + / 180)); + } else { + uu[i] = -999999.0f; + vv[i] = -999999.0f; + } } } - + for (int i = 0; i < results.length; i++) { if (results[i] instanceof FloatDataRecord) { float[] data = new float[len]; if (isVector) { - data = i == 0 ? uu : vv; + data = i == 0 ? uu : vv; + } else { + data = ((FloatDataRecord) results[i]) + .getFloatData(); } - else { - data = ((FloatDataRecord) results[i]).getFloatData(); - } - + interp.setData(data); data = interp.getReprojectedGrid(); newData[i] = results[i].clone(); @@ -293,38 +289,39 @@ public class GridVectorResource extends AbstractMapVectorResource implements .setIntSizes(new int[] { remappedImageGeometry.getGridRange2D().width, remappedImageGeometry.getGridRange2D().height }); - ((FloatDataRecord) newData[i]).setFloatData(data); + ((FloatDataRecord) newData[i]).setFloatData(data); } } uu = null; vv = null; - + if (isVector) { - /* - * Convert U, V back to speed/dirs - */ - len = ((FloatDataRecord) newData[0]).getFloatData().length; + /* + * Convert U, V back to speed/dirs + */ + len = ((FloatDataRecord) newData[0]).getFloatData().length; float[] new_spds = new float[len]; float[] new_dirs = new float[len]; for (int i = 0; i < len; i++) { - float u = ((FloatDataRecord) newData[0]).getFloatData()[i]; - float v = ((FloatDataRecord) newData[1]).getFloatData()[i]; - - if ( u > -999999.0f && v > -999999.0f) { - new_spds[i] = (float) Math.hypot(u, v); - new_dirs[i] = (float) (Math.atan2(u, v) * 180 / Math.PI) + 180; - - if (new_dirs[i] > 360) new_dirs[i] -= 360; - if (new_dirs[i] < 0) new_dirs[i] += 360; - - } else { - new_spds[i] = new_dirs[i] = -999999.0f; - } + float u = ((FloatDataRecord) newData[0]).getFloatData()[i]; + float v = ((FloatDataRecord) newData[1]).getFloatData()[i]; + + if (u > -999999.0f && v > -999999.0f) { + new_spds[i] = (float) Math.hypot(u, v); + new_dirs[i] = (float) (Math.atan2(u, v) * 180 / Math.PI) + 180; + + if (new_dirs[i] > 360) + new_dirs[i] -= 360; + if (new_dirs[i] < 0) + new_dirs[i] += 360; + + } else { + new_spds[i] = new_dirs[i] = -999999.0f; + } } ((FloatDataRecord) newData[0]).setFloatData(new_spds); new_spds = null; - - + // When reprojecting it is necessary to recalculate the // direction of vectors based off the change in the "up" // direction @@ -353,11 +350,10 @@ public class GridVectorResource extends AbstractMapVectorResource implements } } } - + ((FloatDataRecord) newData[1]).setFloatData(new_dirs); new_dirs = null; - - + } this.remappedImageGeometry = remappedImageGeometry; results = newData; @@ -598,25 +594,6 @@ public class GridVectorResource extends AbstractMapVectorResource implements @Override public boolean isStreamlineVector() { - if (streamlineTypes == null) { - String filePath = PathManagerFactory.getPathManager() - .getStaticFile("vectorTypes/streamlineTypes.xml") - .toString(); - - try { - streamlineTypes = (ValidTypeFile) SerializationUtil - .jaxbUnmarshalFromXmlFile(filePath); - } catch (Exception e) { - statusHandler.handle(Priority.PROBLEM, - "An error was encountered while creating the type from " - + filePath, e); - } - } - - if (isValidType(streamlineTypes) - && !(displayType == DisplayType.STREAMLINE)) { - return true; - } return false; } @@ -632,23 +609,6 @@ public class GridVectorResource extends AbstractMapVectorResource implements @Override public boolean isWindVector() { - if (windTypes == null) { - String filePath = PathManagerFactory.getPathManager() - .getStaticFile("vectorTypes/windTypes.xml").toString(); - - try { - windTypes = (ValidTypeFile) SerializationUtil - .jaxbUnmarshalFromXmlFile(filePath); - } catch (Exception e) { - statusHandler.handle(Priority.PROBLEM, - "An error was encountered while creating the type from " - + filePath, e); - } - } - - if (isValidType(windTypes) && !(displayType == DisplayType.BARB)) { - return true; - } return false; } @@ -664,23 +624,6 @@ public class GridVectorResource extends AbstractMapVectorResource implements @Override public boolean isArrowVector() { - if (arrowTypes == null) { - String filePath = PathManagerFactory.getPathManager() - .getStaticFile("vectorTypes/arrowTypes.xml").toString(); - - try { - arrowTypes = (ValidTypeFile) SerializationUtil - .jaxbUnmarshalFromXmlFile(filePath); - } catch (Exception e) { - statusHandler.handle(Priority.PROBLEM, - "An error was encountered while creating the type from " - + filePath, e); - } - } - - if (isValidType(arrowTypes) && !(displayType == DisplayType.ARROW)) { - return true; - } return false; } @@ -706,19 +649,6 @@ public class GridVectorResource extends AbstractMapVectorResource implements this.remappedImageGeometry = remappedImageGeometry; } - private boolean isValidType(ValidTypeFile types) { - ValidType type = new ValidType(); - final String searchString = "modelInfo.parameterAbbreviation"; - Map req = ((GridResourceData) resourceData) - .getMetadataMap(); - - if (req.containsKey(searchString)) { - type.setName(req.get(searchString).getConstraintValue()); - return types.contains(type); - } - return false; - } - @Override public void resourceChanged(ChangeType type, Object object) { if (type.equals(ChangeType.DATA_UPDATE)) { @@ -746,9 +676,9 @@ public class GridVectorResource extends AbstractMapVectorResource implements @Override public String inspect(ReferencedCoordinate coord) throws VizException { if (!((GridResourceData) resourceData).isSampling()) { - if (displayType != DisplayType.ARROW){ - return super.inspect(coord); - } + if (displayType != DisplayType.ARROW) { + return super.inspect(coord); + } } GribRecord record = (GribRecord) getDataObjectMap().get( getDisplayedDataTime()); diff --git a/cave/com.raytheon.viz.grid/src/com/raytheon/viz/grid/rsc/general/D2DGribGridResource.java b/cave/com.raytheon.viz.grid/src/com/raytheon/viz/grid/rsc/general/D2DGribGridResource.java index 92cb89155f..eaab2ad8a9 100644 --- a/cave/com.raytheon.viz.grid/src/com/raytheon/viz/grid/rsc/general/D2DGribGridResource.java +++ b/cave/com.raytheon.viz.grid/src/com/raytheon/viz/grid/rsc/general/D2DGribGridResource.java @@ -53,6 +53,7 @@ import com.raytheon.viz.grid.rsc.GridNameGenerator; import com.raytheon.viz.grid.rsc.GridNameGenerator.IGridNameResource; import com.raytheon.viz.grid.rsc.GridNameGenerator.LegendParameters; import com.raytheon.viz.grid.rsc.GridResourceData; +import com.raytheon.viz.grid.xml.FieldDisplayTypesFactory; import com.vividsolutions.jts.geom.Coordinate; /** @@ -214,20 +215,30 @@ public class D2DGribGridResource extends GribGridResource @Override public LegendParameters getLegendParameters() { LegendParameters legendParams = new LegendParameters(); - legendParams.model = gribModel; List pdos = getCurrentPluginDataObjects(); if (pdos != null && !pdos.isEmpty()) { gribModel = ((GribRecord) pdos.get(0)).getModelInfo(); } + legendParams.model = gribModel; if (stylePreferences != null) { legendParams.unit = stylePreferences.getDisplayUnitLabel(); } - if (legendParams.unit == null) { - legendParams.unit = legendParams.model.getParameterUnit(); + + List displayTypes = null; + if (gribModel != null) { + if (legendParams.unit == null || legendParams.unit.isEmpty()) { + legendParams.unit = gribModel.getParameterUnit(); + } + displayTypes = FieldDisplayTypesFactory.getInstance() + .getDisplayTypes(gribModel.getParameterAbbreviation()); } DisplayType displayType = getDisplayType(); - if (displayType == DisplayType.STREAMLINE) { - legendParams.type = " Streamlines"; + if (displayTypes != null && !displayTypes.isEmpty() + && displayTypes.get(0).equals(displayType)) { + // The default type does not display in the legend + legendParams.type = ""; + } else if (displayType == DisplayType.STREAMLINE) { + legendParams.type = "Streamlines"; } else if (displayType == DisplayType.BARB) { legendParams.type = "Wind Barbs"; } else if (displayType == DisplayType.ARROW) { @@ -306,8 +317,59 @@ public class D2DGribGridResource extends GribGridResource @Override public boolean isLoadableAsImage() { - DisplayType displayType = getDisplayType(); - return displayType == DisplayType.CONTOUR; + if (super.isLoadableAsImage()) { + DisplayType displayType = getDisplayType(); + List displayTypes = FieldDisplayTypesFactory + .getInstance().getDisplayTypes( + gribModel.getParameterAbbreviation()); + if (displayTypes == null || displayTypes.isEmpty()) { + return displayType == DisplayType.CONTOUR; + } + return displayTypes.contains(DisplayType.IMAGE); + } + return false; + } + + @Override + public boolean isStreamlineVector() { + if (super.isStreamlineVector()) { + List displayTypes = FieldDisplayTypesFactory + .getInstance().getDisplayTypes( + gribModel.getParameterAbbreviation()); + if (displayTypes == null || displayTypes.isEmpty()) { + return true; + } + return displayTypes.contains(DisplayType.STREAMLINE); + } + return false; + } + + @Override + public boolean isArrowVector() { + if (super.isArrowVector()) { + List displayTypes = FieldDisplayTypesFactory + .getInstance().getDisplayTypes( + gribModel.getParameterAbbreviation()); + if (displayTypes == null || displayTypes.isEmpty()) { + return true; + } + return displayTypes.contains(DisplayType.ARROW); + } + return false; + } + + @Override + public boolean isWindVector() { + if (super.isWindVector()) { + List displayTypes = FieldDisplayTypesFactory + .getInstance().getDisplayTypes( + gribModel.getParameterAbbreviation()); + if (displayTypes == null || displayTypes.isEmpty()) { + return true; + } + return displayTypes.contains(DisplayType.BARB); + } + return false; } } diff --git a/cave/com.raytheon.viz.volumebrowser/src/com/raytheon/viz/volumebrowser/xml/FieldDisplayTypes.java b/cave/com.raytheon.viz.grid/src/com/raytheon/viz/grid/xml/FieldDisplayTypes.java similarity index 98% rename from cave/com.raytheon.viz.volumebrowser/src/com/raytheon/viz/volumebrowser/xml/FieldDisplayTypes.java rename to cave/com.raytheon.viz.grid/src/com/raytheon/viz/grid/xml/FieldDisplayTypes.java index 97c4382025..aacb40ff74 100644 --- a/cave/com.raytheon.viz.volumebrowser/src/com/raytheon/viz/volumebrowser/xml/FieldDisplayTypes.java +++ b/cave/com.raytheon.viz.grid/src/com/raytheon/viz/grid/xml/FieldDisplayTypes.java @@ -17,7 +17,7 @@ * See the AWIPS II Master Rights File ("Master Rights File.pdf") for * further licensing information. **/ -package com.raytheon.viz.volumebrowser.xml; +package com.raytheon.viz.grid.xml; import javax.xml.bind.annotation.XmlAccessType; import javax.xml.bind.annotation.XmlAccessorType; diff --git a/cave/com.raytheon.viz.volumebrowser/src/com/raytheon/viz/volumebrowser/util/FieldDisplayTypesFactory.java b/cave/com.raytheon.viz.grid/src/com/raytheon/viz/grid/xml/FieldDisplayTypesFactory.java similarity index 96% rename from cave/com.raytheon.viz.volumebrowser/src/com/raytheon/viz/volumebrowser/util/FieldDisplayTypesFactory.java rename to cave/com.raytheon.viz.grid/src/com/raytheon/viz/grid/xml/FieldDisplayTypesFactory.java index a62416ab5f..bb835841cf 100644 --- a/cave/com.raytheon.viz.volumebrowser/src/com/raytheon/viz/volumebrowser/util/FieldDisplayTypesFactory.java +++ b/cave/com.raytheon.viz.grid/src/com/raytheon/viz/grid/xml/FieldDisplayTypesFactory.java @@ -17,7 +17,7 @@ * See the AWIPS II Master Rights File ("Master Rights File.pdf") for * further licensing information. **/ -package com.raytheon.viz.volumebrowser.util; +package com.raytheon.viz.grid.xml; import java.io.File; import java.util.ArrayList; @@ -29,8 +29,6 @@ import javax.xml.bind.JAXB; import com.raytheon.uf.common.localization.PathManagerFactory; import com.raytheon.uf.viz.core.rsc.DisplayType; -import com.raytheon.viz.volumebrowser.xml.FieldDisplayTypes; -import com.raytheon.viz.volumebrowser.xml.FieldDisplayTypesFile; /** * TODO Add Description diff --git a/cave/com.raytheon.viz.volumebrowser/src/com/raytheon/viz/volumebrowser/xml/FieldDisplayTypesFile.java b/cave/com.raytheon.viz.grid/src/com/raytheon/viz/grid/xml/FieldDisplayTypesFile.java similarity index 97% rename from cave/com.raytheon.viz.volumebrowser/src/com/raytheon/viz/volumebrowser/xml/FieldDisplayTypesFile.java rename to cave/com.raytheon.viz.grid/src/com/raytheon/viz/grid/xml/FieldDisplayTypesFile.java index ceff5af561..3d37e07334 100644 --- a/cave/com.raytheon.viz.volumebrowser/src/com/raytheon/viz/volumebrowser/xml/FieldDisplayTypesFile.java +++ b/cave/com.raytheon.viz.grid/src/com/raytheon/viz/grid/xml/FieldDisplayTypesFile.java @@ -17,7 +17,7 @@ * See the AWIPS II Master Rights File ("Master Rights File.pdf") for * further licensing information. **/ -package com.raytheon.viz.volumebrowser.xml; +package com.raytheon.viz.grid.xml; import java.util.List; diff --git a/cave/com.raytheon.viz.grid/src/com/raytheon/viz/grid/xml/ValidType.java b/cave/com.raytheon.viz.grid/src/com/raytheon/viz/grid/xml/ValidType.java deleted file mode 100644 index fc8b92135f..0000000000 --- a/cave/com.raytheon.viz.grid/src/com/raytheon/viz/grid/xml/ValidType.java +++ /dev/null @@ -1,70 +0,0 @@ -/** - * 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.viz.grid.xml; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; - -import com.raytheon.uf.common.serialization.ISerializableObject; - -/** - * TODO Add Description - * - *
- * 
- * SOFTWARE HISTORY
- * Date         Ticket#    Engineer    Description
- * ------------ ---------- ----------- --------------------------
- * Jan 9, 2009            mschenke     Initial creation
- * 
- * 
- * - * @author mschenke - * @version 1.0 - */ -@XmlAccessorType(XmlAccessType.NONE) -public class ValidType implements ISerializableObject { - - @XmlElement - private String name; - - public ValidType() { - - } - - public String getName() { - return name; - } - - public void setName(String name) { - this.name = name; - } - - @Override - public boolean equals(Object obj) { - if (obj instanceof ValidType) { - if (obj == this || ((ValidType) obj).name.equals(name)) { - return true; - } - } - return false; - } -} diff --git a/cave/com.raytheon.viz.grid/src/com/raytheon/viz/grid/xml/ValidTypeFile.java b/cave/com.raytheon.viz.grid/src/com/raytheon/viz/grid/xml/ValidTypeFile.java deleted file mode 100644 index 98c55f18ce..0000000000 --- a/cave/com.raytheon.viz.grid/src/com/raytheon/viz/grid/xml/ValidTypeFile.java +++ /dev/null @@ -1,76 +0,0 @@ -/** - * 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.viz.grid.xml; - -import java.util.ArrayList; - -import javax.xml.bind.annotation.XmlAccessType; -import javax.xml.bind.annotation.XmlAccessorType; -import javax.xml.bind.annotation.XmlElement; -import javax.xml.bind.annotation.XmlElements; -import javax.xml.bind.annotation.XmlRootElement; - -import com.raytheon.uf.common.serialization.ISerializableObject; - -/** - * TODO Add Description - * - *
- * 
- * SOFTWARE HISTORY
- * Date         Ticket#    Engineer    Description
- * ------------ ---------- ----------- --------------------------
- * Jan 9, 2009            mschenke     Initial creation
- * 
- * 
- * - * @author mschenke - * @version 1.0 - */ - -@XmlRootElement(name = "validTypesFile") -@XmlAccessorType(XmlAccessType.NONE) -public class ValidTypeFile implements ISerializableObject { - - @XmlElements( { @XmlElement(name = "validType", type = ValidType.class) }) - private ArrayList validTypesFile; - - public ValidTypeFile() { - - } - - public ArrayList getValidTypesFile() { - return validTypesFile; - } - - public void setValidTypesFile(ArrayList validTypesFile) { - this.validTypesFile = validTypesFile; - } - - /** - * Checks if the given type is contained in the array - * - * @param type - * @return - */ - public boolean contains(ValidType type) { - return validTypesFile.contains(type); - } -} diff --git a/cave/com.raytheon.viz.hydro/localization/hydro/default-procedure.xml b/cave/com.raytheon.viz.hydro/localization/hydro/default-procedure.xml index 549f732bb8..594f862c39 100644 --- a/cave/com.raytheon.viz.hydro/localization/hydro/default-procedure.xml +++ b/cave/com.raytheon.viz.hydro/localization/hydro/default-procedure.xml @@ -24,106 +24,6 @@ - - - - - - - PLAN_VIEW - - - - - - - - - - - - PLAN_VIEW - - - - - - World - mapdata.world
- the_geom - name not in ('CANADA', 'MEXICO', 'UNITED STATES') -
-
- - - - - - - PLAN_VIEW - - - - - - State Boundaries - mapdata.states
- the_geom -
-
- - - - - - - PLAN_VIEW - - - - - - Canada - mapdata.canada
- the_geom -
-
- - - - - - - PLAN_VIEW - - - - - - Mexico - mapdata.mexico
- the_geom -
-
- - - - - - - PLAN_VIEW - - - - - - County Boundaries - mapdata.county
-
-
- State/County Boundaries -
-
12 diff --git a/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/perspective/HydroPerspectiveManager.java b/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/perspective/HydroPerspectiveManager.java index 22c312eafc..868a0598ef 100644 --- a/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/perspective/HydroPerspectiveManager.java +++ b/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/perspective/HydroPerspectiveManager.java @@ -24,8 +24,12 @@ import org.eclipse.jface.action.Separator; import org.eclipse.swt.widgets.Shell; import org.eclipse.ui.PlatformUI; +import com.raytheon.uf.common.ohd.AppsDefaults; import com.raytheon.uf.viz.core.IDisplayPane; import com.raytheon.uf.viz.core.IDisplayPaneContainer; +import com.raytheon.uf.viz.core.map.IMapDescriptor; +import com.raytheon.uf.viz.core.maps.MapManager; +import com.raytheon.uf.viz.core.maps.display.MapRenderableDisplay; import com.raytheon.uf.viz.core.rsc.sampling.actions.LatLonReadoutAction; import com.raytheon.uf.viz.core.rsc.sampling.actions.SampleAction; import com.raytheon.viz.hydro.gagedisplay.StationDisplay; @@ -54,91 +58,111 @@ import com.raytheon.viz.ui.perspectives.AbstractCAVEPerspectiveManager; */ public class HydroPerspectiveManager extends AbstractCAVEPerspectiveManager { - /** The Hydro Perspective Class */ - public static final String HYDRO_PERSPECTIVE = "com.raytheon.viz.hydro.HydroPerspective"; + /** The Hydro Perspective Class */ + public static final String HYDRO_PERSPECTIVE = "com.raytheon.viz.hydro.HydroPerspective"; - private static final SampleAction sampleAction = new SampleAction(); + private static final SampleAction sampleAction = new SampleAction(); - private static final LatLonReadoutAction readoutAction = new LatLonReadoutAction(); + private static final LatLonReadoutAction readoutAction = new LatLonReadoutAction(); - private static final UnloadAllProductsAction unloadAllAction = new UnloadAllProductsAction(); + private static final UnloadAllProductsAction unloadAllAction = new UnloadAllProductsAction(); - @Override - public void open() { - loadDefaultBundle(getBundleToLoad()); - StationDisplay.getInstance().getMultiPointResource(); - IDisplayPaneContainer currentEditor = EditorUtil - .getActiveVizContainer(); - SetProjection.setDefaultProjection(currentEditor, "hv"); - displayGages(); - } + @Override + public void open() { + loadDefaultBundle(getBundleToLoad()); + String[] maps; + + // Get the maps configured for display at startup + String displayMaps = AppsDefaults.getInstance().getToken("display_maps", "statesCounties"); - @Override - public void activate() { - if ((perspectiveEditors.size() == 0) && opened) { - opened = false; - super.activate(); - } else { - super.activate(); + if (displayMaps.contains(",")) { + maps = displayMaps.split(","); + } else { + maps = new String[1]; + maps[0] = displayMaps; + } + + IDisplayPaneContainer currentEditor = EditorUtil + .getActiveVizContainer(); + MapManager mapMgr = MapManager.getInstance((IMapDescriptor) currentEditor.getActiveDisplayPane() + .getDescriptor()); + + // Load the configured maps + for (String map : maps) { + mapMgr.loadMapByBundleName(map.trim()); } + + StationDisplay.getInstance().getMultiPointResource(); + SetProjection.setDefaultProjection(currentEditor, "hv"); + displayGages(); + } - PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell() - .layout(true, true); - } + @Override + public void activate() { + if ((perspectiveEditors.size() == 0) && opened) { + opened = false; + super.activate(); + } else { + super.activate(); + } - /** - * Hydro bundle to load - * - * @return - */ - protected String getBundleToLoad() { - return "hydro/default-procedure.xml"; - } + PlatformUI.getWorkbench().getActiveWorkbenchWindow().getShell() + .layout(true, true); + } - /** - * Hydro context id - * - * @return - */ - protected String getContextId() { - return "com.raytheon.viz.hydro.Hydro"; - } + /** + * Hydro bundle to load + * + * @return + */ + protected String getBundleToLoad() { + return "hydro/default-procedure.xml"; + } - private void displayGages() { - Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow() - .getShell(); - PointDataControlDlg dlg = PointDataControlDlg.getInstance(shell); - dlg.open(); - dlg.hide(); - } + /** + * Hydro context id + * + * @return + */ + protected String getContextId() { + return "com.raytheon.viz.hydro.Hydro"; + } - /* - * (non-Javadoc) - * - * @see - * com.raytheon.viz.ui.AbstractVizPerspective#addContextMenuItems(org.eclipse - * .jface.action.IMenuManager, com.raytheon.viz.core.IDisplayPaneContainer, - * com.raytheon.viz.core.IDisplayPane) - */ - @Override - public void addContextMenuItems(IMenuManager menuManager, - IDisplayPaneContainer container, IDisplayPane pane) { - super.addContextMenuItems(menuManager, container, pane); + private void displayGages() { + Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow() + .getShell(); + PointDataControlDlg dlg = PointDataControlDlg.getInstance(shell); + dlg.open(); + dlg.hide(); + } - sampleAction.setContainer(container); - unloadAllAction.setContainer(container); + /* + * (non-Javadoc) + * + * @see + * com.raytheon.viz.ui.AbstractVizPerspective#addContextMenuItems(org.eclipse + * .jface.action.IMenuManager, com.raytheon.viz.core.IDisplayPaneContainer, + * com.raytheon.viz.core.IDisplayPane) + */ + @Override + public void addContextMenuItems(IMenuManager menuManager, + IDisplayPaneContainer container, IDisplayPane pane) { + super.addContextMenuItems(menuManager, container, pane); - menuManager.add(new ZoomMenuAction(container)); - menuManager.add(new Separator()); - menuManager.add(sampleAction); + sampleAction.setContainer(container); + unloadAllAction.setContainer(container); - readoutAction.setContainer(container); - menuManager.add(readoutAction); - readoutAction.setSelectedRsc(null); + menuManager.add(new ZoomMenuAction(container)); + menuManager.add(new Separator()); + menuManager.add(sampleAction); - menuManager.add(new Separator()); - menuManager.add(unloadAllAction); + readoutAction.setContainer(container); + menuManager.add(readoutAction); + readoutAction.setSelectedRsc(null); - sampleAction.setSelectedRsc(null); - } + menuManager.add(new Separator()); + menuManager.add(unloadAllAction); + + sampleAction.setSelectedRsc(null); + } } diff --git a/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/pointprecipitation/PointPrecipDataManager.java b/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/pointprecipitation/PointPrecipDataManager.java index 6edfd95db9..a8d20ef3a0 100644 --- a/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/pointprecipitation/PointPrecipDataManager.java +++ b/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/pointprecipitation/PointPrecipDataManager.java @@ -590,7 +590,7 @@ public class PointPrecipDataManager extends HydroDataManager { ArrayList rs = runQuery(query); if ((rs != null) && (rs.size() > 0)) { Object[] oa = rs.get(0); - if (((String) oa[0]).equalsIgnoreCase("ALERT")) { + if (oa[0] != null && ((String) oa[0]).equalsIgnoreCase("ALERT")) { alert = true; } } diff --git a/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/timeseries/TabularTimeSeriesDlg.java b/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/timeseries/TabularTimeSeriesDlg.java index dde2a2b808..c535e8b2ff 100755 --- a/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/timeseries/TabularTimeSeriesDlg.java +++ b/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/timeseries/TabularTimeSeriesDlg.java @@ -122,7 +122,7 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog; * May 27 2011 9584 jpiatt Modified to not save updated forecast data * in rejecteddata table. * Sep 09 2011 9962 lbousaidi reload time series when there is update/insert - * and highlight the row that was updated. + * and highlight the row that was updated. * * * @@ -445,11 +445,11 @@ public class TabularTimeSeriesDlg extends CaveSWTDialog implements private final TabularTimeSeriesDlg self = this; private int pid = HydroConstants.MISSING_VALUE; - - private boolean updateFlag= false; - - private int indexSelected= 0; - + + private boolean updateFlag = false; + + private int indexSelected = 0; + private TimeSeriesDataJobManager tsDataJobManager = null; static { @@ -472,7 +472,8 @@ public class TabularTimeSeriesDlg extends CaveSWTDialog implements */ public TabularTimeSeriesDlg(Shell parent, Date beginningTime, Date endingTime, TimeSeriesDlg parentDialog) { - super(parent, SWT.DIALOG_TRIM, CAVE.DO_NOT_BLOCK | CAVE.INDEPENDENT_SHELL); + super(parent, SWT.DIALOG_TRIM, CAVE.DO_NOT_BLOCK + | CAVE.INDEPENDENT_SHELL); setText("Tabular Time Series"); this.beginningTime = beginningTime; @@ -677,6 +678,9 @@ public class TabularTimeSeriesDlg extends CaveSWTDialog implements @Override public void widgetSelected(SelectionEvent event) { scheduleDataRetrieval(); + updateSelectedLocInfoLabel(); + updateStationLabel(); + updateFloodStageLabel(); } }); } @@ -873,9 +877,9 @@ public class TabularTimeSeriesDlg extends CaveSWTDialog implements updateInsertBtn.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent event) { - updateFlag=true; + updateFlag = true; updateInsertValue(); - updateFlag=false; + updateFlag = false; } }); @@ -1084,8 +1088,8 @@ public class TabularTimeSeriesDlg extends CaveSWTDialog implements try { /* Get the unique time series defined from the parent info */ for (TabInfo ti : tabInfoList) { - ArrayList peList= ti.getInfoList(); - + ArrayList peList = ti.getInfoList(); + updateStationLabel(); ArrayList results; @@ -1145,10 +1149,12 @@ public class TabularTimeSeriesDlg extends CaveSWTDialog implements /* if NO basis times found */ if (entryNumber < MAX_TS_ON_LIST) { String str = String.format( - "%-5s %2s %4s %2s %s ", - row.getLid(), row.getPe().toUpperCase(), - row.getDur(), row.getTs().toUpperCase(), - row.getExt().toUpperCase()); + "%-5s %2s %4s %2s %s ", row + .getLid(), row.getPe() + .toUpperCase(), row + .getDur(), row.getTs() + .toUpperCase(), row + .getExt().toUpperCase()); modifiedTSList.add(str + "No Data"); topDataList.add(str + "No Data"); entryNumber++; @@ -1203,35 +1209,9 @@ public class TabularTimeSeriesDlg extends CaveSWTDialog implements } updateSelectedLocInfoLabel(); + updateFloodStageLabel(); - /* Find the flood stg/flow if a river station */ - ArrayList floodList = (ArrayList) dataManager - .getFloodStage(lid); - - /* Should only be one here, lid is primary key */ - if (floodList.size() > 0) { - Object[] oa = floodList.get(0); - String floodStage = null; - String floodFlow = null; - if (oa != null) { - if (oa[1] != null) { - floodStage = String.format("%.1f", oa[1]); - } - - if (oa[2] != null) { - floodFlow = String.format("%.0f", oa[2]); - } - } - selectedFloodLbl.setText("Flood Stg/Flow: " + floodStage + "/" - + floodFlow); - } else { - StringBuilder sb = new StringBuilder("Flood Stg/Flow: "); - sb.append("0.0/"); - sb.append("0"); - selectedFloodLbl.setText(sb.toString()); - } - - if (updateFlag) { + if (updateFlag) { topDataList.setSelection(indexSelected); } @@ -1452,8 +1432,8 @@ public class TabularTimeSeriesDlg extends CaveSWTDialog implements if (tabularDataList.size() != 0) { oldValue = td.getValue(); } - - indexSelected = topDataList.getSelectionIndex(); + + indexSelected = topDataList.getSelectionIndex(); String data = topDataList.getItem(indexSelected); String[] parts = data.split("\\s+"); ts = parts[3]; @@ -1536,7 +1516,7 @@ public class TabularTimeSeriesDlg extends CaveSWTDialog implements /* do the update */ String where; String sql; - where = createUpdDelWhereObs(dr, tablename); + where = createUpdDelWhereObs(dr); /* if toggle button ProductTime/ID is checked */ if (useProductTimeChk.getSelection()) { @@ -1798,11 +1778,11 @@ public class TabularTimeSeriesDlg extends CaveSWTDialog implements + " Error inserting max forecast record."); } } - } // end if fcst + } // end if fcst /* reload list of timeseries */ scheduleDataRetrieval(); - tabularLoadTimeseries(); + tabularLoadTimeseries(); } /** @@ -1834,13 +1814,22 @@ public class TabularTimeSeriesDlg extends CaveSWTDialog implements basistime = parts[5] + " " + parts[6]; } + String sql = "update " + tablename + " set value = " + + HydroConstants.MISSING_VALUE + + ", revision= 1, shef_qual_code = 'M' " + ", postingtime= '" + + HydroConstants.DATE_FORMAT.format(postTime) + "' "; + DataRecord dr = new DataRecord(); int[] selectionIndices = bottomListControl.getSelectionIndices(); + StringBuilder sb = new StringBuilder(); + ArrayList dataRecordList = new ArrayList(); + for (int i = 0; i < selectionIndices.length; i++) { TabularData td = tabularDataList.get(selectionIndices[i]); /* set the update structure with data which doesn't change */ + dr = new DataRecord(); dr.setLid(lid); dr.setPe(pe); dr.setDur(Integer.parseInt(parts[2])); @@ -1865,95 +1854,49 @@ public class TabularTimeSeriesDlg extends CaveSWTDialog implements dr.setRevision((short) 1); /* code to update an observation to MISSING */ - if (ts.toUpperCase().startsWith("R") || ts.toUpperCase().startsWith("P")) { - - /* already a record with same key, do an update */ - - String where = createUpdDelWhereObs(dr, tablename); - - String sql = "update " - + tablename - + " set value = " - + HydroConstants.MISSING_VALUE - + ", revision= " - + dr.getRevision() - + ", shef_qual_code = '" - + dr.getShefQualCode() - + "' " - + ", postingtime= '" - + HydroConstants.DATE_FORMAT - .format(dr.getPostingTime()) + "' "; - - int status; - try { - status = dataManager.update(sql + where); - if (status > 0) { - // Data updated successfully - /* Add data record to rejected data */ - status = dataManager.insertRejectedData(dr); - } - } catch (VizException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - + sb.append(sql); + String where = createUpdDelWhereObs(dr); + sb.append(where); } /* code to update a forecast to MISSING */ if (ts.toUpperCase().startsWith("F") || ts.toUpperCase().startsWith("C")) { - /* set the update structure with data which doesn't change */ - dr.setBasisTime(basistime); - /* already a record with same key, do an update */ - + sb.append(sql); String where = createUpdDelWhereFcst(td, dr); + sb.append(where); + } + dataRecordList.add(dr); + } - String sql = "update " - + tablename - + " set value = " - + HydroConstants.MISSING_VALUE - + ", revision= " - + dr.getRevision() - + ", shef_qual_code = '" - + dr.getShefQualCode() - + "' " - + ", postingtime= '" - + HydroConstants.DATE_FORMAT - .format(dr.getPostingTime()) + "' "; + try { + int status = dataManager.update(sb.toString()); + if (status > 0) { + /* + * Data updated successfully Add data record to rejected data + */ + status = dataManager.insertRejectedData(dataRecordList); + } + } catch (VizException e) { + statusHandler.handle(Priority.PROBLEM, "Data Query:" + + " Error updating records.", e); + } - int status; - try { - status = dataManager.update(sql + where); - if (status > 0) { - /* - * Data updated successfully Add data record to rejected - * data - */ - status = dataManager.insertRejectedData(dr); - } - } catch (VizException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } + /* call Load Max Forecast if update of H or Q PE's */ + if (ts.toUpperCase().startsWith("F") + || ts.toUpperCase().startsWith("C")) { + try { + LoadMaxFcst.loadMaxFcstItem(lid, pe, ts); + } catch (VizException e) { + statusHandler.handle(Priority.PROBLEM, "Data Query:" + + " Error loading Max Forecast Table.", e); } - /* call Load Max Forecast if update of H or Q PE's */ - - if (ts.toUpperCase().startsWith("F") - || ts.toUpperCase().startsWith("C")) { - try { - LoadMaxFcst.loadMaxFcstItem(lid, pe, ts); - } catch (VizException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - - } } scheduleDataRetrieval(); @@ -1980,6 +1923,8 @@ public class TabularTimeSeriesDlg extends CaveSWTDialog implements if (choice) { TimeSeriesDataManager dataManager = TimeSeriesDataManager .getInstance(); + ArrayList queryList = new ArrayList(); + ArrayList dataRecordList = new ArrayList(); String data = topDataList.getItem(topDataList.getSelectionIndex()); String[] parts = data.split("\\s+"); @@ -2016,18 +1961,8 @@ public class TabularTimeSeriesDlg extends CaveSWTDialog implements /********** This part is for OBSERVED or PROCCESSED data **********/ if (ts.toUpperCase().startsWith("R") || ts.toUpperCase().startsWith("P")) { - String where = createUpdDelWhereObs(dr, tablename); - - try { - dataManager.deleteRecord(tablename, where); - } catch (VizException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - MessageDialog.openError(shell, "Error Occurred", - "An error occurred while deleting the record.\n" - + e.getMessage()); - return; - } + String where = createUpdDelWhereObs(dr); + queryList.add("delete from " + tablename + " " + where); /* if precip then delete from curprecip table as well */ if (dr.getPe().startsWith("P") @@ -2035,53 +1970,15 @@ public class TabularTimeSeriesDlg extends CaveSWTDialog implements && !dr.getPe().endsWith("D") && !dr.getPe().endsWith("E") && !dr.getPe() .endsWith("L"))) { - try { if (dr.getPe().endsWith("P")) { - dataManager.deleteRecord("curpp", where); - } else { - dataManager.deleteRecord("curpc", where); + queryList.add("delete from curpp " + where); +// dataManager.deleteRecord("curpp", where); } - } catch (VizException e) { - e.printStackTrace(); - MessageDialog.openError(shell, "Error Occurred", - "An error occurred while deleting the record.\n" - + e.getMessage()); - return; - } } + dataRecordList.add(dr); /* copy the deleted record to RejectedData */ - try { - dataManager.insertRejectedData(dr); - } catch (VizException e) { - e.printStackTrace(); - MessageDialog.openError( - shell, - "Error Occurred", - "An error occurred inserting this record " - + "into the 'RejectedData Table'\n" - + e.getMessage()); - } - /* - * if height or discharge then calculate new RiverStatus as - * well - */ - if (pe.toUpperCase().startsWith("H") - || pe.toUpperCase().startsWith("Q")) { - String command = String - .format("load_obs_river('%s', '%s', '%s')", - lid, pe, ts); - - try { - dataManager.execFunction(command); - } catch (VizException e) { - e.printStackTrace(); - MessageDialog.openError(shell, "Error Occurred", - "An error occurred executing load_obs_river function\n " - + e.getMessage()); - } - } } /********** This part is for FORECAST data **********/ @@ -2089,42 +1986,50 @@ public class TabularTimeSeriesDlg extends CaveSWTDialog implements || ts.toUpperCase().startsWith("C")) { dr.setBasisTime(basistime); - + dataRecordList.add(dr); /* Delete all rows that have been selected */ String where = createUpdDelWhereFcst(td, dr); - try { - dataManager.deleteRecord(tablename, where); - } catch (VizException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - MessageDialog.openError(shell, "Error Occurred", - "An error occurred deleting this record " - + "from '" + tablename + " Table'\n" - + e.getMessage()); - } + queryList.add("delete from " + tablename + " " + where); /* copy the deleted record to RejectedData */ - try { - dataManager.insertRejectedData(dr); - } catch (VizException e) { - e.printStackTrace(); - MessageDialog.openError( - shell, - "Error Occurred", - "An error occurred inserting this record " - + "into the 'RejectedData Table'\n" - + e.getMessage()); - } + dataRecordList.add(dr); + } + } - if (pe.toUpperCase().startsWith("H") - || pe.toUpperCase().startsWith("Q")) { - try { - LoadMaxFcst.loadMaxFcstItem(lid, pe, ts); - } catch (VizException e) { - // TODO Auto-generated catch block - e.printStackTrace(); - } - } + // execute the queries + try { + dataManager.deleteRecords(queryList); + dataManager.insertRejectedData(dataRecordList); + } catch (VizException e1) { + statusHandler.handle(Priority.PROBLEM, "Data Query:" + + " Error Deleting records.", e1); + } + + /* + * if height or discharge then calculate new RiverStatus as + * well + */ + if (pe.toUpperCase().startsWith("H") + || pe.toUpperCase().startsWith("Q")) { + String command = String + .format("load_obs_river('%s', '%s', '%s')", + lid, pe, ts); + + try { + dataManager.execFunction(command); + } catch (VizException e) { + statusHandler.handle(Priority.PROBLEM, "Data Query:" + + " An error occurred executing load_obs_river function", e); + } + } + + if (pe.toUpperCase().startsWith("H") + || pe.toUpperCase().startsWith("Q")) { + try { + LoadMaxFcst.loadMaxFcstItem(lid, pe, ts); + } catch (VizException e) { + statusHandler.handle(Priority.PROBLEM, "Data Query:" + + " An error occurred executing loadMaxFcst function", e); } } } @@ -2202,7 +2107,7 @@ public class TabularTimeSeriesDlg extends CaveSWTDialog implements || ts.toUpperCase().startsWith("P")) { /* do the update */ - String where = createUpdDelWhereObs(dr, tablename); + String where = createUpdDelWhereObs(dr); String sql = "update " + tablename + " set quality_code= " @@ -2625,14 +2530,26 @@ public class TabularTimeSeriesDlg extends CaveSWTDialog implements * The DataRecord to update or delete * @return The Where clause used in the update or delete */ - private String createUpdDelWhereObs(DataRecord dr, String tablename) { + private String createUpdDelWhereObs(DataRecord dr) { StringBuilder sb = new StringBuilder(" where "); - sb.append("lid = '" + dr.getLid() + "' and "); - sb.append("pe = '" + dr.getPe().toUpperCase() + "' and "); - sb.append("obstime = '" + dbFormat.format(dr.getObsTime()) + "' and "); - sb.append("dur = " + dr.getDur() + " and "); - sb.append("ts = '" + dr.getTs().toUpperCase() + "' and "); - sb.append("extremum = '" + dr.getExt().toUpperCase() + "'"); + sb.append("lid = '"); + sb.append(dr.getLid()); + sb.append("' and "); + sb.append("pe = '"); + sb.append(dr.getPe().toUpperCase()); + sb.append("' and "); + sb.append("obstime = '"); + sb.append(dbFormat.format(dr.getObsTime())); + sb.append("' and "); + sb.append("dur = "); + sb.append(dr.getDur()); + sb.append(" and "); + sb.append("ts = '"); + sb.append(dr.getTs().toUpperCase()); + sb.append("' and "); + sb.append("extremum = '"); + sb.append(dr.getExt().toUpperCase()); + sb.append("';"); return sb.toString(); } @@ -2668,32 +2585,38 @@ public class TabularTimeSeriesDlg extends CaveSWTDialog implements */ private void updateStationLabel() { TimeSeriesDataManager dataManager = TimeSeriesDataManager.getInstance(); + String selectedLid = lid; + if (topDataList.getSelectionCount() > 0) { + String selection = topDataList.getItem(topDataList.getSelectionIndex()); + String[] parts = selection.split("\\s+", 2); + selectedLid = parts[0]; + } try { /* append the river name info */ - String[] sa = dataManager.getStnRiverName(lid); + String[] sa = dataManager.getStnRiverName(selectedLid); if ((sa != null) && (sa[0] != null) && (sa[1] != null)) { if (sa[0].equalsIgnoreCase(HydroConstants.UNDEFINED) && sa[1].equalsIgnoreCase(HydroConstants.UNDEFINED)) { - siteLabel = lid; + siteLabel = selectedLid; } else if (!sa[0].equals(HydroConstants.UNDEFINED) && !sa[1].equals(HydroConstants.UNDEFINED)) { - siteLabel = lid + " (" + sa[0] + " - " + sa[1] + ")"; + siteLabel = selectedLid + " (" + sa[0] + " - " + sa[1] + ")"; } else if (!sa[0].equals(HydroConstants.UNDEFINED) && sa[1].equals(HydroConstants.UNDEFINED)) { - siteLabel = lid + " (" + sa[0] + ")"; + siteLabel = selectedLid + " (" + sa[0] + ")"; } else { - siteLabel = lid; + siteLabel = selectedLid; } } else { - siteLabel = lid; + siteLabel = selectedLid; } } catch (VizException e) { e.printStackTrace(); - siteLabel = lid; + siteLabel = selectedLid; } - selectedLocNameLbl.setText(siteLabel); + selectedLocNameLbl.setText(siteLabel); } /** @@ -2713,6 +2636,46 @@ public class TabularTimeSeriesDlg extends CaveSWTDialog implements } } + + private void updateFloodStageLabel() { + TimeSeriesDataManager dataManager = TimeSeriesDataManager.getInstance(); + String selection = topDataList.getItem(topDataList.getSelectionIndex()); + String[] parts = selection.split("\\s+", 2); + String selectedLid = parts[0]; + + /* Find the flood stg/flow if a river station */ + ArrayList floodList = null; + try { + floodList = (ArrayList) dataManager + .getFloodStage(selectedLid); + } catch (VizException e) { + // TODO Auto-generated catch block + e.printStackTrace(); + } + + /* Should only be one here, lid is primary key */ + if (floodList != null && floodList.size() > 0) { + Object[] oa = floodList.get(0); + String floodStage = "0.0"; + String floodFlow = "0"; + if (oa != null) { + if (oa[1] != null) { + floodStage = String.format("%.1f", oa[1]); + } + + if (oa[2] != null) { + floodFlow = String.format("%.0f", oa[2]); + } + } + selectedFloodLbl.setText("Flood Stg/Flow: " + floodStage + "/" + + floodFlow); + } else { + StringBuilder sb = new StringBuilder("Flood Stg/Flow: "); + sb.append("0.0/"); + sb.append("0"); + selectedFloodLbl.setText(sb.toString()); + } + } /** * copy the current forecast time series in its entirety to a new type @@ -3117,10 +3080,10 @@ public class TabularTimeSeriesDlg extends CaveSWTDialog implements if ((productId == null) || (productId.length() == 0)) { showMessage(shell, SWT.ERROR, INVALID_PRODUCT_ID, "Product Id cannot be blank."); - // Apparently CCCCNNNXXX is valid so we'll accept it -// } else if (productId.equals("CCCCNNNXXX")) { -// showMessage(shell, SWT.ERROR, INVALID_PRODUCT_ID, -// INVALID_PRODUCT_ID + ": CCCCNNNXXX"); + // Apparently CCCCNNNXXX is valid so we'll accept it + // } else if (productId.equals("CCCCNNNXXX")) { + // showMessage(shell, SWT.ERROR, INVALID_PRODUCT_ID, + // INVALID_PRODUCT_ID + ": CCCCNNNXXX"); } else { retVal = true; } diff --git a/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/timeseries/TimeSeriesDataManager.java b/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/timeseries/TimeSeriesDataManager.java index d34e06deaa..282bb7f2f5 100644 --- a/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/timeseries/TimeSeriesDataManager.java +++ b/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/timeseries/TimeSeriesDataManager.java @@ -335,14 +335,14 @@ public class TimeSeriesDataManager extends HydroDataManager { * @throws ClassNotFoundException */ public ArrayList getGraphData(String tablename, String lid, - String pe, String ts, String dur, Date startTime, Date endTime) + String pe, String ts, String dur, String extremum, Date startTime, Date endTime) throws VizException, ClassNotFoundException { StringBuilder graphQuery = new StringBuilder( "select lid,obstime,value,product_id from "); graphQuery.append(tablename + " where lid = '" + lid + "' and pe = '" + pe + "' " + "and dur = '" + dur + "' "); - graphQuery.append("and ts = '" + ts + "' and obstime "); + graphQuery.append("and ts = '" + ts + "' and extremum = '" + extremum + "' and obstime "); graphQuery.append("between '" + HydroConstants.DATE_FORMAT.format(startTime) + "' "); graphQuery.append("and '" + HydroConstants.DATE_FORMAT.format(endTime) @@ -529,14 +529,15 @@ public class TimeSeriesDataManager extends HydroDataManager { sql.append(" order by obstime desc"); } - AppsDefaults ad = AppsDefaults.getInstance(); - boolean debug = ad.getBoolean(HydroConstants.DEBUG_HYDRO_DB_TOKEN, false); - if (debug) { - System.out.println(ad.getToken(HydroConstants.PGHOST) + ":" + - ad.getToken(HydroConstants.PGPORT) + ":" + - ad.getToken(HydroConstants.DB_NAME)); - System.out.println("Query: " + sql.toString()); - } + AppsDefaults ad = AppsDefaults.getInstance(); + boolean debug = ad.getBoolean(HydroConstants.DEBUG_HYDRO_DB_TOKEN, + false); + if (debug) { + System.out.println(ad.getToken(HydroConstants.PGHOST) + ":" + + ad.getToken(HydroConstants.PGPORT) + ":" + + ad.getToken(HydroConstants.DB_NAME)); + System.out.println("Query: " + sql.toString()); + } ArrayList tabularData = new ArrayList(); ArrayList results = (ArrayList) DirectDbQuery @@ -580,17 +581,18 @@ public class TimeSeriesDataManager extends HydroDataManager { return -1; } - String sql = "select count(*) from " + table + where; - - AppsDefaults ad = AppsDefaults.getInstance(); - boolean debug = ad.getBoolean(HydroConstants.DEBUG_HYDRO_DB_TOKEN, false); + String sql = "select count(*) from " + table + where; - if (debug) { - System.out.println(ad.getToken(HydroConstants.PGHOST) + ":" + - ad.getToken(HydroConstants.PGPORT) + ":" + - ad.getToken(HydroConstants.DB_NAME)); - System.out.println("Query: " + sql); - } + AppsDefaults ad = AppsDefaults.getInstance(); + boolean debug = ad.getBoolean(HydroConstants.DEBUG_HYDRO_DB_TOKEN, + false); + + if (debug) { + System.out.println(ad.getToken(HydroConstants.PGHOST) + ":" + + ad.getToken(HydroConstants.PGPORT) + ":" + + ad.getToken(HydroConstants.DB_NAME)); + System.out.println("Query: " + sql); + } List results = DirectDbQuery.executeQuery(sql.toString(), HydroConstants.IHFS, QueryLanguage.SQL); @@ -615,19 +617,37 @@ public class TimeSeriesDataManager extends HydroDataManager { throws VizException { String sql = "delete from " + tablename + " " + where; - AppsDefaults ad = AppsDefaults.getInstance(); - boolean debug = ad.getBoolean(HydroConstants.DEBUG_HYDRO_DB_TOKEN, false); + AppsDefaults ad = AppsDefaults.getInstance(); + boolean debug = ad.getBoolean(HydroConstants.DEBUG_HYDRO_DB_TOKEN, + false); - if (debug) { - System.out.println(ad.getToken(HydroConstants.PGHOST) + ":" + - ad.getToken(HydroConstants.PGPORT) + ":" + - ad.getToken(HydroConstants.DB_NAME)); - System.out.println("Query: " + sql); - } + if (debug) { + System.out.println(ad.getToken(HydroConstants.PGHOST) + ":" + + ad.getToken(HydroConstants.PGPORT) + ":" + + ad.getToken(HydroConstants.DB_NAME)); + System.out.println("Query: " + sql); + } DirectDbQuery.executeStatement(sql, HydroConstants.IHFS, QueryLanguage.SQL); } + /** + * Delete a list of items. + * + * @param queryList + * list of queries + * @throws VizException + */ + public void deleteRecords(ArrayList queryList) throws VizException { + StringBuilder sb = new StringBuilder(); + for (String query : queryList) { + sb.append(query); + } + + DirectDbQuery.executeStatement(sb.toString(), HydroConstants.IHFS, + QueryLanguage.SQL); + } + /** * Add a data record. * @@ -697,16 +717,17 @@ public class TimeSeriesDataManager extends HydroDataManager { sb.append("0, '" + dr.getProductId() + "')"); } - AppsDefaults ad = AppsDefaults.getInstance(); - boolean debug = ad.getBoolean(HydroConstants.DEBUG_HYDRO_DB_TOKEN, false); + AppsDefaults ad = AppsDefaults.getInstance(); + boolean debug = ad.getBoolean(HydroConstants.DEBUG_HYDRO_DB_TOKEN, + false); + + if (debug) { + System.out.println(ad.getToken(HydroConstants.PGHOST) + ":" + + ad.getToken(HydroConstants.PGPORT) + ":" + + ad.getToken(HydroConstants.DB_NAME)); + System.out.println("Query: " + sb.toString()); + } - if (debug) { - System.out.println(ad.getToken(HydroConstants.PGHOST) + ":" + - ad.getToken(HydroConstants.PGPORT) + ":" + - ad.getToken(HydroConstants.DB_NAME)); - System.out.println("Query: " + sb.toString()); - } - return DirectDbQuery.executeStatement(sb.toString(), HydroConstants.IHFS, QueryLanguage.SQL); } @@ -720,15 +741,16 @@ public class TimeSeriesDataManager extends HydroDataManager { * @throws VizException */ public int update(String sql) throws VizException { - AppsDefaults ad = AppsDefaults.getInstance(); - boolean debug = ad.getBoolean(HydroConstants.DEBUG_HYDRO_DB_TOKEN, false); + AppsDefaults ad = AppsDefaults.getInstance(); + boolean debug = ad.getBoolean(HydroConstants.DEBUG_HYDRO_DB_TOKEN, + false); - if (debug) { - System.out.println(ad.getToken(HydroConstants.PGHOST) + ":" + - ad.getToken(HydroConstants.PGPORT) + ":" + - ad.getToken(HydroConstants.DB_NAME)); - System.out.println("Query: " + sql); - } + if (debug) { + System.out.println(ad.getToken(HydroConstants.PGHOST) + ":" + + ad.getToken(HydroConstants.PGPORT) + ":" + + ad.getToken(HydroConstants.DB_NAME)); + System.out.println("Query: " + sql); + } return DirectDbQuery.executeStatement(sql, HydroConstants.IHFS, QueryLanguage.SQL); @@ -746,7 +768,6 @@ public class TimeSeriesDataManager extends HydroDataManager { Rejecteddata rd = new Rejecteddata(); RejecteddataId rdid = new RejecteddataId(); Date d = Calendar.getInstance(TimeZone.getTimeZone("GMT")).getTime(); - ; /* set basistime to obstime for observed data */ if (dr.getBasisTime() != null) { @@ -793,6 +814,88 @@ public class TimeSeriesDataManager extends HydroDataManager { return DirectDbQuery.saveOrUpdate(rd, HydroConstants.IHFS); } + /** + * Insert a list of items into the rejected table + * + * @param recordList + * List of DataRecord objects + * @return + * @throws VizException + */ + public int insertRejectedData(ArrayList recordList) + throws VizException { + StringBuilder sb = new StringBuilder(); + + Date d = Calendar.getInstance(TimeZone.getTimeZone("GMT")).getTime(); + for (DataRecord dr : recordList) { + sb.append("insert into rejecteddata(lid, pe, dur, ts, extremum, "); + sb.append("probability, validtime, basistime, postingtime, value, "); + sb.append("revision, shef_qual_code, product_id, producttime, quality_code, "); + sb.append("reject_type, userid) VALUES("); + + sb.append("'" + dr.getLid() + "', "); + sb.append("'" + dr.getPe() + "', "); + sb.append(dr.getDur() + ", "); + sb.append("'" + dr.getTs() + "', "); + sb.append("'" + dr.getExt() + "', "); + sb.append(-1 + ", "); + + /* set validtime for observed data */ + if (dr.getValidTime() != null) { + sb.append("'" + + HydroConstants.DATE_FORMAT.format(dr.getValidTime()) + + "', "); + } else { + sb.append("'" + + (HydroConstants.DATE_FORMAT.format(dr.getObsTime())) + + "', "); + } + + if (dr.getBasisTime() != null) { + try { + sb.append("'" + + (HydroConstants.DATE_FORMAT.parse(dr + .getBasisTime())) + "', "); + } catch (ParseException e) { + sb.append("'" + + (HydroConstants.DATE_FORMAT.format(dr + .getObsTime())) + "', "); + } + } else { + sb.append("'" + + (HydroConstants.DATE_FORMAT.format(dr.getObsTime())) + + "', "); + } + + sb.append("'" + HydroConstants.DATE_FORMAT.format(d) + "', "); + sb.append(dr.getValue() + ", "); + sb.append(dr.getRevision() + ", "); + sb.append("'" + dr.getShefQualCode() + "', "); + sb.append("'" + dr.getProductId() + "', "); + sb.append("'" + + HydroConstants.DATE_FORMAT.format(dr.getProductTime()) + + "', "); + sb.append(dr.getQualityCode() + ", "); + sb.append("'M', "); + sb.append("'" + LocalizationManager.getInstance().getCurrentUser() + + "');"); + } + + AppsDefaults ad = AppsDefaults.getInstance(); + boolean debug = ad.getBoolean(HydroConstants.DEBUG_HYDRO_DB_TOKEN, + false); + + if (debug) { + System.out.println(ad.getToken(HydroConstants.PGHOST) + ":" + + ad.getToken(HydroConstants.PGPORT) + ":" + + ad.getToken(HydroConstants.DB_NAME)); + System.out.println("Query: " + sb.toString()); + } + + return DirectDbQuery.executeStatement(sb.toString(), + HydroConstants.IHFS, QueryLanguage.SQL); + } + /** * Deletes a list of Observations. * @@ -822,15 +925,16 @@ public class TimeSeriesDataManager extends HydroDataManager { + dbFormat.format(data.getObsTime()) + "'"); } - AppsDefaults ad = AppsDefaults.getInstance(); - boolean debug = ad.getBoolean(HydroConstants.DEBUG_HYDRO_DB_TOKEN, false); + AppsDefaults ad = AppsDefaults.getInstance(); + boolean debug = ad.getBoolean(HydroConstants.DEBUG_HYDRO_DB_TOKEN, + false); - if (debug) { - System.out.println(ad.getToken(HydroConstants.PGHOST) + ":" + - ad.getToken(HydroConstants.PGPORT) + ":" + - ad.getToken(HydroConstants.DB_NAME)); - System.out.println("Query: " + sql); - } + if (debug) { + System.out.println(ad.getToken(HydroConstants.PGHOST) + ":" + + ad.getToken(HydroConstants.PGPORT) + ":" + + ad.getToken(HydroConstants.DB_NAME)); + System.out.println("Query: " + sql); + } status = DirectDbQuery.executeStatement(sql.toString(), HydroConstants.IHFS, QueryLanguage.SQL); @@ -891,15 +995,16 @@ public class TimeSeriesDataManager extends HydroDataManager { sql.addInt("revision", 0); sql.addString("postingtime", dateFormat.format(now)); - AppsDefaults ad = AppsDefaults.getInstance(); - boolean debug = ad.getBoolean(HydroConstants.DEBUG_HYDRO_DB_TOKEN, false); + AppsDefaults ad = AppsDefaults.getInstance(); + boolean debug = ad.getBoolean(HydroConstants.DEBUG_HYDRO_DB_TOKEN, + false); - if (debug) { - System.out.println(ad.getToken(HydroConstants.PGHOST) + ":" + - ad.getToken(HydroConstants.PGPORT) + ":" + - ad.getToken(HydroConstants.DB_NAME)); - System.out.println("Query: " + sql.toString()); - } + if (debug) { + System.out.println(ad.getToken(HydroConstants.PGHOST) + ":" + + ad.getToken(HydroConstants.PGPORT) + ":" + + ad.getToken(HydroConstants.DB_NAME)); + System.out.println("Query: " + sql.toString()); + } status = DirectDbQuery.executeStatement(sql.toString(), HydroConstants.IHFS, QueryLanguage.SQL); @@ -972,15 +1077,16 @@ public class TimeSeriesDataManager extends HydroDataManager { insertRejectedData(dr); } - AppsDefaults ad = AppsDefaults.getInstance(); - boolean debug = ad.getBoolean(HydroConstants.DEBUG_HYDRO_DB_TOKEN, false); + AppsDefaults ad = AppsDefaults.getInstance(); + boolean debug = ad.getBoolean(HydroConstants.DEBUG_HYDRO_DB_TOKEN, + false); - if (debug) { - System.out.println(ad.getToken(HydroConstants.PGHOST) + ":" + - ad.getToken(HydroConstants.PGPORT) + ":" + - ad.getToken(HydroConstants.DB_NAME)); - System.out.println("Query: " + sql); - } + if (debug) { + System.out.println(ad.getToken(HydroConstants.PGHOST) + ":" + + ad.getToken(HydroConstants.PGPORT) + ":" + + ad.getToken(HydroConstants.DB_NAME)); + System.out.println("Query: " + sql); + } DirectDbQuery.executeStatement(sql.toString(), HydroConstants.IHFS, QueryLanguage.SQL); @@ -1006,15 +1112,16 @@ public class TimeSeriesDataManager extends HydroDataManager { sql.append("select product_id, productTime from " + table); sql.append(where); - AppsDefaults ad = AppsDefaults.getInstance(); - boolean debug = ad.getBoolean(HydroConstants.DEBUG_HYDRO_DB_TOKEN, false); + AppsDefaults ad = AppsDefaults.getInstance(); + boolean debug = ad.getBoolean(HydroConstants.DEBUG_HYDRO_DB_TOKEN, + false); - if (debug) { - System.out.println(ad.getToken(HydroConstants.PGHOST) + ":" + - ad.getToken(HydroConstants.PGPORT) + ":" + - ad.getToken(HydroConstants.DB_NAME)); - System.out.println("Query: " + sql); - } + if (debug) { + System.out.println(ad.getToken(HydroConstants.PGHOST) + ":" + + ad.getToken(HydroConstants.PGPORT) + ":" + + ad.getToken(HydroConstants.DB_NAME)); + System.out.println("Query: " + sql); + } List rs = DirectDbQuery.executeQuery(sql.toString(), HydroConstants.IHFS, QueryLanguage.SQL); @@ -1050,15 +1157,16 @@ public class TimeSeriesDataManager extends HydroDataManager { query.append("revision, product_id, producttime, postingtime "); query.append("from " + table + " " + where); - AppsDefaults ad = AppsDefaults.getInstance(); - boolean debug = ad.getBoolean(HydroConstants.DEBUG_HYDRO_DB_TOKEN, false); + AppsDefaults ad = AppsDefaults.getInstance(); + boolean debug = ad.getBoolean(HydroConstants.DEBUG_HYDRO_DB_TOKEN, + false); - if (debug) { - System.out.println(ad.getToken(HydroConstants.PGHOST) + ":" + - ad.getToken(HydroConstants.PGPORT) + ":" + - ad.getToken(HydroConstants.DB_NAME)); - System.out.println("Query: " + query.toString()); - } + if (debug) { + System.out.println(ad.getToken(HydroConstants.PGHOST) + ":" + + ad.getToken(HydroConstants.PGPORT) + ":" + + ad.getToken(HydroConstants.DB_NAME)); + System.out.println("Query: " + query.toString()); + } List results = DirectDbQuery.executeQuery(query.toString(), HydroConstants.IHFS, QueryLanguage.SQL); diff --git a/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/timeseries/TimeSeriesDisplayCanvas.java b/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/timeseries/TimeSeriesDisplayCanvas.java index 7f49490541..5c74b85310 100644 --- a/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/timeseries/TimeSeriesDisplayCanvas.java +++ b/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/timeseries/TimeSeriesDisplayCanvas.java @@ -25,6 +25,7 @@ import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Calendar; import java.util.Date; +import java.util.HashSet; import java.util.List; import java.util.TimeZone; @@ -121,7 +122,8 @@ import com.raytheon.viz.hydrocommon.util.DbUtils; * 25 July 2011 10082 djingtao modify makeRegions() * 10 August 2011 10457 djingtao allow red rubberband box to be draw for setMissing in Edit * 27 March 20112 14527 wkwock Fix incomplete time series selection issue - * + * 24 April 2012 14669 wkwock Handle invalid color name + * 08 May 2012 14958 wkwock Fix overcrowded TS list * @author lvenable * @version 1.0 * @@ -346,8 +348,10 @@ public class TimeSeriesDisplayCanvas extends TimeSeriesGraphCanvas implements private Boolean inDataRetreival = Boolean.FALSE; private TimeSeriesDataJobManager tsDataJobManager = null; + + private boolean zoomed = false; - /** + /** * Constructor. * * @param parent @@ -539,8 +543,17 @@ public class TimeSeriesDisplayCanvas extends TimeSeriesGraphCanvas implements num_of_fcstTraces = 0; num_of_fcstTs = 0; + HashSet uniqueList = new HashSet (); + graphData.setTraces(new ArrayList()); for (int i = 0; i < clonedList.size(); i++) { if (clonedList.get(i).isForecast()) { + TraceData td=clonedList.get(i); + String traceKey = td.getLid()+td.getPe()+td.getTs()+td.getDur()+td.getExtremum(); + if (uniqueList.contains(traceKey)) + continue; + else { + uniqueList.add(traceKey); + } int return_fcst_num = getFcstData(clonedList.get(i)); @@ -560,6 +573,7 @@ public class TimeSeriesDisplayCanvas extends TimeSeriesGraphCanvas implements } } else { + graphData.addTrace(clonedList.get(i)); getData(clonedList.get(i)); validGraph.set(i, noDataAvailable); } @@ -581,7 +595,6 @@ public class TimeSeriesDisplayCanvas extends TimeSeriesGraphCanvas implements * Graphics Context. */ protected void drawCanvas(GC gc) { - gc.setFont(canvasFont); fontHeight = (gc.getFontMetrics().getHeight()); @@ -722,7 +735,7 @@ public class TimeSeriesDisplayCanvas extends TimeSeriesGraphCanvas implements gc.setBackground(this.white); } gc.drawString(NO_DATA_AVAILABLE, tmpX, tmpY); - gc.drawString(siteLabel +" fs=" + floodStage, GRAPHBORDER, + gc.drawString(siteLabel +" fs=" + floodStage, GRAPHBORDER - 15, GRAPHBORDER - fontHeight * 2); this.dialog.getParentDialog().enableGraphButton(); @@ -739,16 +752,22 @@ public class TimeSeriesDisplayCanvas extends TimeSeriesGraphCanvas implements setForegroundColor(gc, SWT.COLOR_CYAN); if (pointString != null) { - gc.drawString(pointString, GRAPHBORDER, fontHeight * 2); + gc.drawString(pointString, GRAPHBORDER_LEFT - 55, fontHeight * 2); } if (this.dialog.isInverseVideo()) { gc.setBackground(this.white); } - gc.drawString(siteLabel + " fs=" + floodStage, GRAPHBORDER, + gc.drawString(siteLabel + " fs=" + floodStage, GRAPHBORDER_LEFT - 10, GRAPHBORDER - fontHeight * 2); - int index = GRAPHBORDER; + int index = GRAPHBORDER_LEFT - 10; + // If labels run off the right of the canvas then need to stack them + boolean stackLabels = false; + int stackCount = 2; // This should start as 2 because the first stack will be above a line + int labelStartX = 0; + int labelStartY = 0; + for (int j = 0; j < traceArray.size(); j++) { TraceData td = traceArray.get(j); boolean traceValid = true; @@ -850,7 +869,7 @@ public class TimeSeriesDisplayCanvas extends TimeSeriesGraphCanvas implements && !dialog.isCancel()) { // if in edit mode traceArray.get(selectedTraceId).setSelected(true); gc.drawString("Active Trace: " + dataString, - (GRAPHBORDER * 2 + graphAreaWidth) / 2, + (GRAPHBORDER_LEFT + GRAPHBORDER_RIGHT + graphAreaWidth) / 2, GRAPHBORDER / 2); } @@ -877,13 +896,13 @@ public class TimeSeriesDisplayCanvas extends TimeSeriesGraphCanvas implements /* Top left point of bar */ int x = pointArray[i].getPixelX() + GRAPHBORDER;// - 20; - if ((x < 100) || (x > GRAPHBORDER + graphAreaWidth)) { + if ((x < GRAPHBORDER_LEFT) || (x > GRAPHBORDER_LEFT + graphAreaWidth)) { continue; } int x2 = x2pixel(graphData, pointArray[i].getX() .getTime() + 3600000) - + GRAPHBORDER;// - 20; + + GRAPHBORDER_LEFT;// - 20; int y = pointArray[i].getPixelY() + GRAPHBORDER; ia[0] = x; ia[1] = y; @@ -938,20 +957,41 @@ public class TimeSeriesDisplayCanvas extends TimeSeriesGraphCanvas implements setForegroundColor(td, j, gc); - if (graphData.getTraces().size() > 1) { - + if (graphData.getTraces().size() > 1) { if (traceValid) { if (td.isTraceOn()) { - gc.drawString(dataString, index, GRAPHBORDER - - fontHeight); - index += (dataString.length() + 2) * fontAveWidth; + if (stackLabels || ((dataString.length() * fontAveWidth) + 50 + index > canvasWidth)) { + int[] xy = getLabelLocation(index, dataString, stackCount); + stackCount++; + labelStartX = xy[0]; + labelStartY = xy[1]; + stackLabels = true; + } else { + labelStartX = index; + labelStartY = GRAPHBORDER - fontHeight; + } + gc.drawString(dataString, labelStartX, labelStartY); + if (!stackLabels) { + index += (dataString.length() + 2) * fontAveWidth; + } } } else { // setForegroundColor(td, 23, gc); setForegroundColor(gc, SWT.COLOR_WHITE); - gc.drawString(noDataString, index, GRAPHBORDER - - fontHeight); - index += (noDataString.length() + 2) * fontAveWidth; + if (stackLabels || ((dataString.length() * fontAveWidth) + 50 + index > canvasWidth)) { + int[] xy = getLabelLocation(index, dataString, stackCount); + stackCount++; + labelStartX = xy[0]; + labelStartY = xy[1]; + stackLabels = true; + } else { + labelStartX = index; + labelStartY = GRAPHBORDER - fontHeight; + } + gc.drawString(noDataString, labelStartX, labelStartY); + if (!stackLabels) { + index += (noDataString.length() + 2) * fontAveWidth; + } setForegroundColor(td, j, gc); } } else { @@ -971,7 +1011,7 @@ public class TimeSeriesDisplayCanvas extends TimeSeriesGraphCanvas implements .format(max / 1000) + " " + graphFormat.format(dateMax), - GRAPHBORDER + GRAPHBORDER_LEFT + (dataString.length() * fontAveWidth * j), GRAPHBORDER - fontHeight); @@ -983,7 +1023,7 @@ public class TimeSeriesDisplayCanvas extends TimeSeriesGraphCanvas implements + graphFormat.format(dateMin) + " max=" + twoDecimalFormat.format(max) + " " + graphFormat.format(dateMax), - GRAPHBORDER + GRAPHBORDER_LEFT + (dataString.length() * fontAveWidth * j), GRAPHBORDER - fontHeight); @@ -1004,7 +1044,7 @@ public class TimeSeriesDisplayCanvas extends TimeSeriesGraphCanvas implements + graphFormat.format(dateMin) + " max=" + twoDecimalFormat.format(max) + " " + graphFormat.format(dateMax), - GRAPHBORDER + GRAPHBORDER_LEFT + (dataString.length() * fontAveWidth * j), GRAPHBORDER - fontHeight); @@ -1018,10 +1058,17 @@ public class TimeSeriesDisplayCanvas extends TimeSeriesGraphCanvas implements if (!pe.equalsIgnoreCase("PP")) { /* Draw the floodstage lines if needed */ - if ((pe.toUpperCase().startsWith("H") || pe.toUpperCase() - .startsWith("Q")) && (isFloodLineDisplay())) { - displayFloodCatLines(gc, graphData); - } + if (groupMode) { + if ((pe.toUpperCase().startsWith("H") || pe.toUpperCase() + .startsWith("Q")) && (graphData.getShowcat())) { + displayFloodCatLines(gc, graphData); + } + } else { + if ((pe.toUpperCase().startsWith("H") || pe.toUpperCase() + .startsWith("Q")) && (isFloodLineDisplay())) { + displayFloodCatLines(gc, graphData); + } + } /* Draw points and lines */ if (pe.equalsIgnoreCase("PP")) { @@ -1046,7 +1093,7 @@ public class TimeSeriesDisplayCanvas extends TimeSeriesGraphCanvas implements drawXAxis(gc, graphData); /* Graph Area Rectangle */ - graphAreaRectangle = new Rectangle(GRAPHBORDER, GRAPHBORDER, + graphAreaRectangle = new Rectangle(GRAPHBORDER_LEFT, GRAPHBORDER, graphAreaWidth, graphAreaHeight); gc.drawRectangle(graphAreaRectangle); @@ -1068,6 +1115,15 @@ public class TimeSeriesDisplayCanvas extends TimeSeriesGraphCanvas implements this.dialog.getParentDialog().enableGraphButton(); this.dialog.getParentDialog().enableBothButton(); } + + private int[] getLabelLocation(int index, String dataString, int stackCount) { + int[] xy = new int[2]; + + xy[0] = canvasWidth - GRAPHBORDER_RIGHT - 75; + xy[1] = GRAPHBORDER - (stackCount * fontHeight); + + return xy; + } /** * Scales the data points. @@ -1079,7 +1135,8 @@ public class TimeSeriesDisplayCanvas extends TimeSeriesGraphCanvas implements // Scale the data to match the graph area double yLowest = Integer.MAX_VALUE; double yHighest = Integer.MIN_VALUE; - if (!dialog.isZoomSet()) { +// if (!dialog.isZoomSet()) { + if (!zoomed) { gd.setYmin(yLowest); gd.setYmax(yHighest); } @@ -1098,10 +1155,10 @@ public class TimeSeriesDisplayCanvas extends TimeSeriesGraphCanvas implements td = gd.getTraceData(i); if (td != null) { TimeSeriesPoint[] points = null; - if (dialog.isZoomSet() == false) { - points = td.getTsData(); + if (zoomed) { + points = td.getZoomedTsData(); } else { - points = td.getZoomedTsData(); + points = td.getTsData(); } if (points != null) { @@ -1167,7 +1224,7 @@ public class TimeSeriesDisplayCanvas extends TimeSeriesGraphCanvas implements .toArray(new TimeSeriesPoint[pointList.size()])); insertedPoint = null; } - if (!dialog.isZoomSet()) { + if (!zoomed) { TimeSeriesPoint[] pointArray = td.getTsData(); if (pointArray != null) { for (int j = 0; j < pointArray.length; j++) { @@ -1199,7 +1256,7 @@ public class TimeSeriesDisplayCanvas extends TimeSeriesGraphCanvas implements } } // end for - if (dialog.isZoomSet()) { + if (zoomed) { if (!dialog.isZoomAction() && dialog.isSelectZoom()) { if (rubberBandY1 > rubberBandY2) { swapPoints(rubberBandX1, rubberBandX2, rubberBandY1, @@ -1258,7 +1315,7 @@ public class TimeSeriesDisplayCanvas extends TimeSeriesGraphCanvas implements } /* Add the flood stages if selected */ - if (dialog.getBatchDataAndCategoriesMI().getSelection() && useFloodStage) { + if (dialog.getBatchDataAndCategoriesMI().getSelection() && useFloodStage && !zoomed) { // Get the stages double floodCatMinor = gd.getMinorStage(); double floodCatMajor = gd.getMajorStage(); @@ -1328,10 +1385,9 @@ public class TimeSeriesDisplayCanvas extends TimeSeriesGraphCanvas implements scalingManager.setMaxDataValue(gd.getYmax()); } - scalingManager.setZoomFlag(dialog.isZoomSet()); + scalingManager.setZoomFlag(zoomed); gd.setYmin(scalingManager.getMinScaleValue()); gd.setYmax(scalingManager.getMaxScaleValue()); - } private ForecastData createPoint(TraceData td, TimeSeriesPoint point) { @@ -1386,13 +1442,14 @@ public class TimeSeriesDisplayCanvas extends TimeSeriesGraphCanvas implements ts = td.getTs().toUpperCase(); pe = td.getPe().toUpperCase(); dur = td.getDur(); + String ext = td.getExtremum(); String tablename = DbUtils.getTableName(pe, ts); /* Get the data from IHFS and store in TimeSeriesPoint object */ try { List data = dataManager.getGraphData(tablename, lid, pe, - ts, dur, beginDate, endDate); + ts, dur, ext, beginDate, endDate); if ((data != null) && (data.size() > 0)) { for (int i = 0; i < data.size(); i++) { @@ -1534,20 +1591,22 @@ public class TimeSeriesDisplayCanvas extends TimeSeriesGraphCanvas implements } if (isRiverData) { - sb.append(" value=" + twoDecimalFormat.format(yValue) + " " - + units + " "); + sb.append(" value=" + twoDecimalFormat.format(yValue) + " " + + units + " "); double q = StageDischargeUtils.stage2discharge(lid, yValue); - units = CFS; - if (q > 10000) { - units = KCFS; - q = q / 1000; + if (q != HydroConstants.MISSING_VALUE) { + units = CFS; + if (q > 10000) { + units = KCFS; + q = q / 1000; + } + sb.append(String.format("%8.1f", q) + " " + units); } - sb.append(String.format("%10.1f", q) + " " + units); } else { units = INCH; sb.append(" value=" + twoDecimalFormat.format(yValue) + " " - + units + " "); + + units + " "); } return sb.toString(); @@ -1724,7 +1783,7 @@ public class TimeSeriesDisplayCanvas extends TimeSeriesGraphCanvas implements pointString = buildPointString(selectedX, e.y); GC gc = new GC(tsCanvas); Point extent = gc.stringExtent(pointString); - tsCanvas.redraw(GRAPHBORDER, fontHeight * 2, extent.x, + tsCanvas.redraw(GRAPHBORDER_LEFT, fontHeight * 2, extent.x, extent.y, true); redraw(); } else { @@ -1869,10 +1928,10 @@ public class TimeSeriesDisplayCanvas extends TimeSeriesGraphCanvas implements TraceData td = graphData.getTraceData(selectedTraceId); TimeSeriesPoint[] points = null; - if (dialog.isZoomSet() == false) { - points = td.getTsData(); + if (zoomed) { + points = td.getZoomedTsData(); } else { - points = td.getZoomedTsData(); + points = td.getTsData(); } for (int j = 0; j < points.length; j++) { @@ -1893,6 +1952,11 @@ public class TimeSeriesDisplayCanvas extends TimeSeriesGraphCanvas implements } else { setCursor(crossHairCursor); } + + if (dialog.isReset()) { + zoomed = false; + dialog.setReset(false); + } } } @@ -1912,6 +1976,7 @@ public class TimeSeriesDisplayCanvas extends TimeSeriesGraphCanvas implements if (dialog.isZoomAction()) { dialog.setZoom(true); + zoomed = true; dialog.setZoomAction(false); } else if (pointSelected) { int[] dataPts = graphData.getTraceData(selectedTraceId) @@ -2000,7 +2065,7 @@ public class TimeSeriesDisplayCanvas extends TimeSeriesGraphCanvas implements TimeSeriesPoint[] pa = null; TimeSeriesPoint tsp = null; - if (dialog.isZoomSet()) { + if (zoomed) { pa = td.getZoomedTsData(); tsp = pa[selectionIndex]; tsp.setY(pixel2y(graphData, value)); @@ -2053,7 +2118,7 @@ public class TimeSeriesDisplayCanvas extends TimeSeriesGraphCanvas implements pointList.clear(); listRegionList.clear(); - int dy = 10; + int dy = 15; for (TraceData td : traceList) { if (td.isTraceOn()) { @@ -2149,9 +2214,9 @@ public class TimeSeriesDisplayCanvas extends TimeSeriesGraphCanvas implements ArrayList al = new ArrayList(); for (int i = 0; i < pointArray.length; i++) { if (pointArray[i].getY() != HydroConstants.MISSING_VALUE) { - if (!dialog.isZoomSet()) { + if (!zoomed) { dataPtList - .add(GRAPHBORDER + .add(GRAPHBORDER_LEFT + x2pixel(graphData, pointArray[i].getX() .getTime())); pointArray[i].setPixelX(dataPtList.get(dataIndex)); @@ -2176,7 +2241,7 @@ public class TimeSeriesDisplayCanvas extends TimeSeriesGraphCanvas implements && ((pointArray[i].getY() > graphData.getYmin()) && (pointArray[i] .getY() < graphData.getYmax()))) { zoomedPointList.add(pointArray[i]); - al.add(GRAPHBORDER + al.add(GRAPHBORDER_LEFT + x2pixel(graphData, pointArray[i].getX() .getTime())); al.add(GRAPHBORDER @@ -2264,7 +2329,7 @@ public class TimeSeriesDisplayCanvas extends TimeSeriesGraphCanvas implements HydroUtils.getColor(traceIndex)); gc.setForeground(currentTraceColor); } else if (groupMode) { - if (td.getColorName() != null) { + if (td.getColorName() != null && HydroUtils.getColor(td.getColorName()) != null) { currentTraceColor = new Color(parentComp.getDisplay(), HydroUtils.getColor(td.getColorName())); } else { @@ -2630,4 +2695,12 @@ public class TimeSeriesDisplayCanvas extends TimeSeriesGraphCanvas implements public ArrayList getTraceArray() { return traceArray; } + + public boolean isZoomed() { + return zoomed; + } + + public void setZoomed(boolean zoomed) { + this.zoomed = zoomed; + } } diff --git a/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/timeseries/TimeSeriesDisplayDlg.java b/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/timeseries/TimeSeriesDisplayDlg.java index e2513261fb..7d4d277415 100644 --- a/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/timeseries/TimeSeriesDisplayDlg.java +++ b/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/timeseries/TimeSeriesDisplayDlg.java @@ -371,6 +371,14 @@ public class TimeSeriesDisplayDlg extends CaveSWTDialog { private TimeSeriesDlg parentDialog = null; private int showCatValue = 0; + + /** + * Zoom reset flag + * + * true when click the zoom reset menu, then false + * when a graph has been reset + */ + private boolean reset = false; /** * Constructor. @@ -960,7 +968,8 @@ public class TimeSeriesDisplayDlg extends CaveSWTDialog { setZoom(false); setZoomAction(false); setSelectZoom(false); - displayCanvas.redraw(); + reset = true; +// displayCanvas.redraw(); } }); } @@ -1255,7 +1264,14 @@ public class TimeSeriesDisplayDlg extends CaveSWTDialog { graphList.trimToSize(); Composite pageComp = new Composite(stackGridComp, SWT.NONE); - pageComp.setLayout(new GridLayout(6, true)); + GridLayout pageGL = new GridLayout(6, true); + pageGL.verticalSpacing = 1; + pageGL.horizontalSpacing = 1; + pageGL.marginHeight = 0; + pageGL.marginWidth = 0; + + pageComp.setLayout(pageGL); + GridData pageGridData = new GridData(SWT.FILL, SWT.FILL, true, true); pageComp.setLayoutData(pageGridData); @@ -1296,12 +1312,31 @@ public class TimeSeriesDisplayDlg extends CaveSWTDialog { dataAndCategoriesMI.setSelection(false); dataOnlyShowCatMI.setSelection(false); } else { - batchDataOnlyShowCatMI.setSelection(false); - batchDataOnlyMI.setSelection(false); - batchDataAndCategoriesMI.setSelection(true); - dataOnlyShowCatMI.setSelection(false); - dataOnlyMI.setSelection(false); - dataAndCategoriesMI.setSelection(true); + String showCat = AppsDefaults.getInstance().getToken("timeseries_showcat"); + int sc = Integer.parseInt(showCat); + System.out.println(showCat); + if (sc == 1) { + batchDataOnlyShowCatMI.setSelection(false); + batchDataOnlyMI.setSelection(true); + batchDataAndCategoriesMI.setSelection(false); + dataOnlyShowCatMI.setSelection(false); + dataOnlyMI.setSelection(true); + dataAndCategoriesMI.setSelection(false); + } else if (sc == 2) { + batchDataOnlyShowCatMI.setSelection(true); + batchDataOnlyMI.setSelection(false); + batchDataAndCategoriesMI.setSelection(false); + dataOnlyShowCatMI.setSelection(true); + dataOnlyMI.setSelection(false); + dataAndCategoriesMI.setSelection(false); + } else { + batchDataOnlyShowCatMI.setSelection(false); + batchDataOnlyMI.setSelection(false); + batchDataAndCategoriesMI.setSelection(true); + dataOnlyShowCatMI.setSelection(false); + dataOnlyMI.setSelection(false); + dataAndCategoriesMI.setSelection(true); + } } String traceMode = groupInfo.getTraceMode().trim(); @@ -2201,4 +2236,18 @@ public class TimeSeriesDisplayDlg extends CaveSWTDialog { return shell.getBounds(); } } + + /** + * @param reset the reset to set + */ + public void setReset(boolean reset) { + this.reset = reset; + } + + /** + * @return the reset + */ + public boolean isReset() { + return reset; + } } diff --git a/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/timeseries/TimeSeriesDlg.java b/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/timeseries/TimeSeriesDlg.java index 6e63d57c8b..030b646120 100644 --- a/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/timeseries/TimeSeriesDlg.java +++ b/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/timeseries/TimeSeriesDlg.java @@ -28,6 +28,7 @@ import java.util.ArrayList; import java.util.Calendar; import java.util.Date; import java.util.Formatter; +import java.util.HashMap; import java.util.Iterator; import java.util.LinkedHashMap; import java.util.ListIterator; @@ -169,6 +170,8 @@ public class TimeSeriesDlg extends CaveHydroSWTDialog { private static final String[] TS_LIST = { "RG", "RP", "RZ", "FF", "FX", "FZ" }; + + private final String[] TS_ORDER = { "R", "F", "P", "M", "C" }; /** * The TimeSeries Display Dialog. @@ -592,10 +595,20 @@ public class TimeSeriesDlg extends CaveHydroSWTDialog { this.standaloneMode = true; // Ensure That The Group Configuration File Exists. if (!groupConfigFile.exists()) { - statusHandler.handle(Priority.PROBLEM, - "Unable to locate group configuration file - " - + groupConfigFile.getAbsolutePath(), null); - this.groupConfigFilePath = null; + // if it does not, check localization for the file + IPathManager pm = PathManagerFactory.getPathManager(); + groupConfigFile = pm.getStaticFile(HydroConstants.GROUP_DEFINITION); + + if (!groupConfigFile.exists()) { + statusHandler.handle(Priority.PROBLEM, + "Unable to locate group configuration file - " + + groupConfigFile.getAbsolutePath(), null); + this.groupConfigFilePath = null; + } else { + this.groupConfigFilePath = groupConfigFile.getAbsolutePath(); + statusHandler.handle(Priority.PROBLEM, "Using standard AWIPS 2 group_definition.cfg file. " + + "Unable to locate specified group configuration file.", null); + } } else { this.groupConfigFilePath = groupConfigFile.getAbsolutePath(); } @@ -2372,57 +2385,69 @@ public class TimeSeriesDlg extends CaveHydroSWTDialog { LinkedHashMap> dataMap, boolean tsSelected) { if (dataMap.size() > 0) { + final String OTHER = "OTHER"; Set peSet = dataMap.keySet(); Iterator iter = peSet.iterator(); + Map> tsMap = new HashMap>(); + for (String ts: TS_ORDER) { + tsMap.put(ts, new ArrayList()); + } + tsMap.put(OTHER, new ArrayList()); + ArrayList list = null; + + String selectedTs = tsOrderCbo.getItem(tsOrderCbo + .getSelectionIndex()); while (iter.hasNext()) { String pe = iter.next(); list = dataMap.get(pe); - - // Get the selected TS first + + for (String ts: TS_ORDER) { + tsMap.get(ts).clear(); + } + + tsMap.get(OTHER).clear(); + + OUTER: for (SiteInfo si: list) { + for (String ts: TS_ORDER) { + if (si.getTs().startsWith(ts)) { + tsMap.get(ts).add(si); + continue OUTER; + } + } + + tsMap.get(OTHER).add(si); + } + if (tsSelected) { - for (int i = 0; i < list.size(); i++) { - if (list.get(i) - .getTs() - .equals(tsOrderCbo.getItem(tsOrderCbo - .getSelectionIndex()))) { - bottomDataList.add(formatDataLine(list.get(i))); - siteInfoList.add(list.get(i)); - // Remove this item since it was already used - list.remove(i); - // Must decrement i since all items in the list - // have been moved back one - i--; - } - } + ArrayList siList = tsMap.get(selectedTs.substring(0,1)); + for (SiteInfo si: siList) { + // Add the selected TS + if (si.getTs().equals(selectedTs)) { + bottomDataList.add(formatDataLine(si)); + siteInfoList.add(si); + } + } + } + + for (String ts: TS_ORDER) { + ArrayList siList = tsMap.get(ts); + for (SiteInfo si: siList) { + if (!siteInfoList.contains(si)) { + bottomDataList.add(formatDataLine(si)); + siteInfoList.add(si); + } + } } - - // Now get the rest of the listed ts records - for (int i = 0; i < TS_LIST.length; i++) { - for (int j = 0; j < list.size(); j++) { - if (list.get(j).getTs().equals(TS_LIST[i])) { - bottomDataList.add(formatDataLine(list.get(j))); - siteInfoList.add(list.get(j)); - // Remove this item since it was already used - list.remove(j); - // Must decrement j since all items in the list - // have been moved back one - j--; - } - } - } - - for (int i = 0; i < list.size(); i++) { - bottomDataList.add(formatDataLine(list.get(i))); - siteInfoList.add(list.get(i)); - list.remove(i); - i--; - } - + + ArrayList siList = tsMap.get(OTHER); + for (SiteInfo si: siList) { + bottomDataList.add(formatDataLine(si)); + siteInfoList.add(si); + } } } - } public void updateSelection(GageData gageData, boolean displayGraph) { diff --git a/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/timeseries/graph/TimeSeriesGraphCanvas.java b/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/timeseries/graph/TimeSeriesGraphCanvas.java index 1a0df8f72e..7461fd3279 100644 --- a/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/timeseries/graph/TimeSeriesGraphCanvas.java +++ b/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/timeseries/graph/TimeSeriesGraphCanvas.java @@ -87,14 +87,20 @@ public class TimeSeriesGraphCanvas extends Canvas { protected int canvasHeight = 475;// 675; /** - * Border around the graph in pixels. + * Border around the top and bottom of graph in pixels. */ - protected static final int GRAPHBORDER = 100; + protected static final int GRAPHBORDER = 75; + + /** Right side graph border in pixels. */ + protected static final int GRAPHBORDER_RIGHT = 70; + + /** Left side graph border in pixels. */ + protected static final int GRAPHBORDER_LEFT = 60; /** * Graph Area Width in pixels. */ - protected int graphAreaWidth = canvasWidth - GRAPHBORDER * 2; + protected int graphAreaWidth = canvasWidth - GRAPHBORDER_LEFT - GRAPHBORDER_RIGHT; /** * Graph Area Height in pixels. @@ -195,7 +201,7 @@ public class TimeSeriesGraphCanvas extends Canvas { protected int bottomBorder; - protected int leftBorder = GRAPHBORDER; + protected int leftBorder = GRAPHBORDER_LEFT; protected int rightBorder; @@ -232,7 +238,7 @@ public class TimeSeriesGraphCanvas extends Canvas { protected void drawYAxis(GC gc, GraphData gd, String label) { /* xoffset for left axis, xoffset2 for right axis */ int xoffset = 40; - int xoffset2 = 20; + int xoffset2 = 10; int swtColor = SWT.COLOR_WHITE; if (this.parentDialog.isInverseVideo()) { swtColor = SWT.COLOR_BLACK; @@ -484,6 +490,11 @@ public class TimeSeriesGraphCanvas extends Canvas { } daysCount = daysSkip; } + + // Check canvas width. if small then need to skip extra days + if (this.canvasWidth < 600) { + daysSkip++; + } int x = -999; int dy = 5; @@ -498,15 +509,16 @@ public class TimeSeriesGraphCanvas extends Canvas { dy = 5; Calendar c = Calendar.getInstance(TimeZone.getTimeZone("GMT")); c.setTime(d); - if (c.get(Calendar.HOUR_OF_DAY) == 0) { + int hour = c.get(Calendar.HOUR_OF_DAY); + if (hour == 0) { + dy = 12; if (daysCount++ % daysSkip == 0) { - dy = 12; - gc.drawText(c.get(Calendar.HOUR_OF_DAY) + "", x - + GRAPHBORDER - dx, bottomBorder + 22); + gc.drawText("00", x + + GRAPHBORDER_LEFT - dx, bottomBorder + 22); gc.drawText( c.get(Calendar.MONTH) + 1 + "/" + c.get(Calendar.DAY_OF_MONTH), x - + GRAPHBORDER - 8, bottomBorder + 40); + + GRAPHBORDER_LEFT - 8, bottomBorder + 40); if (displayGridLines) { gc.setLineStyle(SWT.LINE_DOT); @@ -514,20 +526,28 @@ public class TimeSeriesGraphCanvas extends Canvas { bottomBorder); gc.setLineStyle(SWT.LINE_SOLID); } + } else { + if (ndays < 8) { + gc.drawText("00", x + + GRAPHBORDER_LEFT - dx, bottomBorder + 22); + } } } else { - if (c.get(Calendar.HOUR_OF_DAY) % majorTicks == 0) { + if (hour % majorTicks == 0) { /* ******************** */ /* Hour annotation */ /* ******************** */ dy = 10; if (ndays < 4) { - gc.drawText(c.get(Calendar.HOUR_OF_DAY) + "", x - + leftBorder - dx, bottomBorder + 22); + if (hour < 10) { + gc.drawText("0" + hour, x + leftBorder - dx, bottomBorder + 22); + } else { + gc.drawText(c.get(Calendar.HOUR_OF_DAY) + "", x + + leftBorder - dx, bottomBorder + 22); + } } else { - int hour = c.get(Calendar.HOUR_OF_DAY); if (hour == 12) { - gc.drawText(c.get(Calendar.HOUR_OF_DAY) + "", x + gc.drawText(hour + "", x + leftBorder - dx, bottomBorder + 22); } } @@ -539,15 +559,15 @@ public class TimeSeriesGraphCanvas extends Canvas { /* ******************************** */ if ((c.get(Calendar.HOUR_OF_DAY) % minorTicks) == 0) { // Don't draw minor ticks for short time periods - if ((ndays > 10) && (dy == 10)) { - int[] tickArray = { x + leftBorder, bottomBorder, - x + leftBorder, bottomBorder + dy }; - gc.drawPolyline(tickArray); - } else { +// if ((ndays > 10) && (dy == 10)) { +// int[] tickArray = { x + leftBorder, bottomBorder, +// x + leftBorder, bottomBorder + dy }; +// gc.drawPolyline(tickArray); +// } else { int[] tickArray = { x + leftBorder, bottomBorder, x + leftBorder, bottomBorder + dy }; gc.drawPolyline(tickArray); - } +// } } } @@ -561,9 +581,9 @@ public class TimeSeriesGraphCanvas extends Canvas { Date d = SimulatedTime.getSystemTime().getTime(); if ((d.getTime() > gd.getXMin().getTime()) && (d.getTime() < gd.getXMax().getTime())) { - int curTimeLoc = GRAPHBORDER + x2pixel(gd, d.getTime()); + int curTimeLoc = GRAPHBORDER_LEFT + x2pixel(gd, d.getTime()); if ((curTimeLoc < (canvasWidth - GRAPHBORDER)) - && (curTimeLoc > GRAPHBORDER)) { + && (curTimeLoc > GRAPHBORDER_LEFT)) { int[] curTimeLine = { curTimeLoc, topBorder, curTimeLoc, bottomBorder }; gc.setLineStyle(SWT.LINE_DOT); @@ -647,7 +667,7 @@ public class TimeSeriesGraphCanvas extends Canvas { long xMax = gd.getXMax().getTime(); long xDiff = xMax - xMin; long millisPerPixel = xDiff / graphAreaWidth; - long millisTime = (xpix - GRAPHBORDER) * millisPerPixel + xMin; + long millisTime = (xpix - GRAPHBORDER_LEFT) * millisPerPixel + xMin; Calendar cal = Calendar.getInstance(TimeZone.getTimeZone("GMT")); cal.setTimeInMillis(millisTime); @@ -707,7 +727,7 @@ public class TimeSeriesGraphCanvas extends Canvas { char[] ca = label.toCharArray(); for (int i = 0; i < ca.length; i++) { - gc.drawText(Character.toString(ca[i]), 15, 10 * i + yoffset, true); + gc.drawText(Character.toString(ca[i]), 1, 10 * i + yoffset, true); } } @@ -746,8 +766,8 @@ public class TimeSeriesGraphCanvas extends Canvas { yoffset = ((graphAreaHeight + GRAPHBORDER * 2) - 10 * label.length()) / 2; for (int i = 0; i < ca.length; i++) { - gc.drawText(Character.toString(ca[i]), graphAreaWidth + GRAPHBORDER - * 2 - 20, 10 * i + yoffset, true); + gc.drawText(Character.toString(ca[i]), graphAreaWidth + GRAPHBORDER_LEFT + + GRAPHBORDER_RIGHT - 20, 10 * i + yoffset, true); } } @@ -761,11 +781,11 @@ public class TimeSeriesGraphCanvas extends Canvas { canvasHeight = rect.height / 2 * verticalSpan; canvasWidth = rect.width / 6 * horizontalSpan; - graphAreaWidth = canvasWidth - GRAPHBORDER * 2; + graphAreaWidth = canvasWidth - GRAPHBORDER_LEFT - GRAPHBORDER_RIGHT; graphAreaHeight = canvasHeight - GRAPHBORDER * 2; lowerAxis = canvasHeight - GRAPHBORDER; bottomBorder = lowerAxis; - rightBorder = canvasWidth - GRAPHBORDER; + rightBorder = canvasWidth - GRAPHBORDER_RIGHT; } /** @@ -818,7 +838,7 @@ public class TimeSeriesGraphCanvas extends Canvas { if ((y <= (graphData.getY() + graphData.getH())) && (y >= graphData.getY())) { - gc.drawLine(GRAPHBORDER, y + GRAPHBORDER, GRAPHBORDER + gc.drawLine(GRAPHBORDER_LEFT, y + GRAPHBORDER, GRAPHBORDER_LEFT + graphAreaWidth, y + GRAPHBORDER); } } @@ -840,7 +860,7 @@ public class TimeSeriesGraphCanvas extends Canvas { if ((y <= (graphData.getY() + graphData.getH())) && (y >= graphData.getY())) { - gc.drawLine(GRAPHBORDER, y + GRAPHBORDER, GRAPHBORDER + gc.drawLine(GRAPHBORDER_LEFT, y + GRAPHBORDER, GRAPHBORDER_LEFT + graphAreaWidth, y + GRAPHBORDER); } } @@ -862,7 +882,7 @@ public class TimeSeriesGraphCanvas extends Canvas { if ((y <= (graphData.getY() + graphData.getH())) && (y >= graphData.getY())) { - gc.drawLine(GRAPHBORDER, y + GRAPHBORDER, GRAPHBORDER + gc.drawLine(GRAPHBORDER_LEFT, y + GRAPHBORDER, GRAPHBORDER_LEFT + graphAreaWidth, y + GRAPHBORDER); } } @@ -886,7 +906,7 @@ public class TimeSeriesGraphCanvas extends Canvas { if ((y <= (graphData.getY() + graphData.getH())) && (y >= graphData.getY())) { - gc.drawLine(GRAPHBORDER, y + GRAPHBORDER, GRAPHBORDER + gc.drawLine(GRAPHBORDER_LEFT, y + GRAPHBORDER, GRAPHBORDER_LEFT + graphAreaWidth, y + GRAPHBORDER); } } @@ -907,7 +927,7 @@ public class TimeSeriesGraphCanvas extends Canvas { if ((y <= (graphData.getY() + graphData.getH())) && (y >= graphData.getY())) { - gc.drawLine(GRAPHBORDER, y + GRAPHBORDER, GRAPHBORDER + gc.drawLine(GRAPHBORDER_LEFT, y + GRAPHBORDER, GRAPHBORDER_LEFT + graphAreaWidth, y + GRAPHBORDER); } } @@ -1033,14 +1053,14 @@ public class TimeSeriesGraphCanvas extends Canvas { // pointArray[i + 1].setPixely(secondaryY2pixel(graphData, // pointArray[i + 1].getY())); - int x = pointArray[i].getPixelX() + GRAPHBORDER; + int x = pointArray[i].getPixelX() + GRAPHBORDER_LEFT; - if ((x < 100) || (x > GRAPHBORDER + graphAreaWidth)) { + if ((x < 100) || (x > GRAPHBORDER_LEFT + graphAreaWidth)) { continue; } int x2 = x2pixel(graphData, - pointArray[i].getX().getTime() + 3600000) + GRAPHBORDER; + pointArray[i].getX().getTime() + 3600000) + GRAPHBORDER_LEFT; double change = pointArray[i + 1].getY() - pointArray[i].getY(); diff --git a/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/util/HydroUtils.java b/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/util/HydroUtils.java index 78f6017e03..ab5f96d17f 100644 --- a/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/util/HydroUtils.java +++ b/cave/com.raytheon.viz.hydro/src/com/raytheon/viz/hydro/util/HydroUtils.java @@ -39,6 +39,7 @@ import com.raytheon.uf.viz.core.RGBColors; * Using the RGB class instead of the list from A1. * I ran across a group config file using a color not in * the list which caused errors. + * May 08, 2012 14958 wkwock prevent go over the list in getGroupModeColor * * * @@ -68,7 +69,7 @@ public class HydroUtils { initializeGroupModeColorList(); } - return TS_GROUP_COLOR_LIST.get(index); + return TS_GROUP_COLOR_LIST.get(index % TS_GROUP_COLOR_LIST.size()); //not to go over the list } private static void initializeGroupModeColorList() { diff --git a/cave/com.raytheon.viz.hydrobase/src/com/raytheon/viz/hydrobase/HydroBaseDlg.java b/cave/com.raytheon.viz.hydrobase/src/com/raytheon/viz/hydrobase/HydroBaseDlg.java index c1e050b67f..953a6fc8c3 100644 --- a/cave/com.raytheon.viz.hydrobase/src/com/raytheon/viz/hydrobase/HydroBaseDlg.java +++ b/cave/com.raytheon.viz.hydrobase/src/com/raytheon/viz/hydrobase/HydroBaseDlg.java @@ -52,6 +52,7 @@ import org.eclipse.swt.widgets.Text; import com.raytheon.uf.common.localization.IPathManager; import com.raytheon.uf.common.localization.LocalizationFile; import com.raytheon.uf.common.localization.PathManagerFactory; +import com.raytheon.uf.common.localization.exception.LocalizationException; import com.raytheon.uf.common.status.IUFStatusHandler; import com.raytheon.uf.common.status.UFStatus; import com.raytheon.uf.common.status.UFStatus.Priority; @@ -1026,8 +1027,8 @@ public class HydroBaseDlg extends CaveSWTDialog implements IGetSortType, if (file != null) { ILocalizationService service = LocalizationPerspectiveUtils .changeToLocalizationPerspective(); - service.openFile(file); service.selectFile(file); + service.openFile(file); } else { MessageBox mb = new MessageBox(getParent(), SWT.ICON_ERROR | SWT.OK); diff --git a/cave/com.raytheon.viz.hydrobase/src/com/raytheon/viz/hydrobase/dialogs/RiverGageDlg.java b/cave/com.raytheon.viz.hydrobase/src/com/raytheon/viz/hydrobase/dialogs/RiverGageDlg.java index 7ace06db77..5e8c1deebe 100644 --- a/cave/com.raytheon.viz.hydrobase/src/com/raytheon/viz/hydrobase/dialogs/RiverGageDlg.java +++ b/cave/com.raytheon.viz.hydrobase/src/com/raytheon/viz/hydrobase/dialogs/RiverGageDlg.java @@ -57,6 +57,7 @@ import com.raytheon.viz.hydrocommon.datamanager.DataTrashCanDataManager; import com.raytheon.viz.hydrocommon.datamanager.HydroDBDataManager; import com.raytheon.viz.hydrocommon.util.HydroDataUtils; import com.raytheon.viz.hydrocommon.util.StnClassSyncUtil; +import com.raytheon.viz.hydrocommon.whfslib.GeoUtil; import com.raytheon.viz.ui.dialogs.CaveSWTDialog; /** @@ -289,6 +290,12 @@ public class RiverGageDlg extends CaveSWTDialog implements * Value for no Forecast Group assignment */ private final String NO_FCST_GROUP_SELECTED = "(Not a Forecast Point)"; + + /** Original latitude value */ + private String origLat; + + /** Original longitude value */ + private String origLon; /** * States for the dialog. @@ -936,11 +943,14 @@ public class RiverGageDlg extends CaveSWTDialog implements .setText((riverGageData.getLatitude() != HydroConstants.MISSING_VALUE) ? String.valueOf(riverGageData.getLatitude()) : ""); + origLat = latitudeTF.getText(); + longitudeTF .setText((riverGageData.getLongitude() != HydroConstants.MISSING_VALUE) ? String.valueOf(riverGageData.getLongitude()) : ""); - + origLon = longitudeTF.getText(); + // Drainage Area drainageAreaTF.setText(HydroDataUtils .getDisplayString(riverGageData.getDrainageArea())); @@ -1150,52 +1160,60 @@ public class RiverGageDlg extends CaveSWTDialog implements // Latitude String latTxt = latitudeTF.getText(); - double lat = HydroConstants.MISSING_VALUE; - if (!latTxt.equals("")) { - boolean invalidLat = false; - - try { - lat = Double.valueOf(latTxt); - } catch (Exception e) { - invalidLat = true; - } - - if ((lat < -90) || (lat > 90) || invalidLat) { - MessageBox mb = new MessageBox(shell, SWT.ICON_ERROR | SWT.OK); - mb.setText("Invalid Value"); - mb - .setMessage("Please enter a VALID (-90 to 90) Latitude\nin the form: DD MM SS"); - mb.open(); - - return successful; - } + if (!latTxt.equals(origLat)) { + double lat = HydroConstants.MISSING_VALUE; + if (!latTxt.equals("")) { + boolean invalidLat = false; + + try { + lat = GeoUtil.getInstance().cvt_spaced_format(latTxt, 0); + } catch (Exception e) { + invalidLat = true; + } + + if ((lat < -90) || (lat > 90) || invalidLat) { + MessageBox mb = new MessageBox(shell, SWT.ICON_ERROR | SWT.OK); + mb.setText("Invalid Value"); + mb + .setMessage("Please enter a VALID (-90 to 90) Latitude\nin the form: DD MM SS"); + mb.open(); + + return successful; + } + } + newData.setLatitude(lat); + } else { + newData.setLatitude(this.riverGageData.getLatitude()); } - newData.setLatitude(lat); - + // Longitude String lonTxt = longitudeTF.getText(); - double lon = HydroConstants.MISSING_VALUE; - if (!lonTxt.equals("")) { - boolean invalidLon = false; - - try { - lon=Double.valueOf(lonTxt); - } catch (Exception e) { - invalidLon = true; - e.printStackTrace(); - } - - if ((lon > 180) || (lon < -180) || invalidLon) { - MessageBox mb = new MessageBox(shell, SWT.ICON_ERROR | SWT.OK); - mb.setText("Invalid Value"); - mb - .setMessage("Please enter a VALID (-180 to 180) Longitude\nin the form: DD MM SS"); - mb.open(); - - return successful; - } + if (!lonTxt.equals(origLon)) { + double lon = HydroConstants.MISSING_VALUE; + if (!lonTxt.equals("")) { + boolean invalidLon = false; + + try { + lon = GeoUtil.getInstance().cvt_spaced_format(lonTxt, 0); + } catch (Exception e) { + invalidLon = true; + e.printStackTrace(); + } + + if ((lon > 180) || (lon < -180) || invalidLon) { + MessageBox mb = new MessageBox(shell, SWT.ICON_ERROR | SWT.OK); + mb.setText("Invalid Value"); + mb + .setMessage("Please enter a VALID (-180 to 180) Longitude\nin the form: DD MM SS"); + mb.open(); + + return successful; + } + } + newData.setLongitude(lon); + } else { + newData.setLongitude(riverGageData.getLongitude()); } - newData.setLongitude(lon); // Remarks newData.setRemark(remarksTF.getText()); diff --git a/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/colorscalemgr/ColorManager.java b/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/colorscalemgr/ColorManager.java index bf0d798ecc..57dc480f70 100644 --- a/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/colorscalemgr/ColorManager.java +++ b/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/colorscalemgr/ColorManager.java @@ -149,10 +149,11 @@ public abstract class ColorManager { Map.Entry entry = i.next(); if (description.equals(entry.getValue() .getColor_use_display_string())) { - rval = entry.getValue().getColor_use_db_name(); + return entry.getValue().getColor_use_db_name(); } else if (description.equals(entry.getValue() .getColor_use_db_name())) { - rval = entry.getValue().getColor_use_db_name(); + // if passing in the data type name then just return it + return description; } } @@ -195,9 +196,15 @@ public abstract class ColorManager { if (dataType.equals(entry.getValue().getColor_use_db_name())) { if (entry.getValue().getColor_use_display_string() == null) { rval = entry.getValue().getColor_use_db_name(); + break; } else { rval = entry.getValue().getColor_use_display_string(); + break; } + } else if (dataType.equals(entry.getValue().getColor_use_display_string())) { + // if the display string is passed in just return it + rval = dataType; + break; } } diff --git a/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/colorscalemgr/ColorScaleMgrDlg.java b/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/colorscalemgr/ColorScaleMgrDlg.java index 4fb2b916e9..23e8d74b79 100644 --- a/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/colorscalemgr/ColorScaleMgrDlg.java +++ b/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/colorscalemgr/ColorScaleMgrDlg.java @@ -747,6 +747,15 @@ public class ColorScaleMgrDlg extends CaveSWTDialog { changeBtn.addSelectionListener(new SelectionAdapter() { @Override public void widgetSelected(SelectionEvent event) { + if (valueTF.getText() == null || valueTF.getText().equals("")) { + MessageBox mb = new MessageBox(shell, SWT.ICON_WARNING + | SWT.OK); + mb.setText("Choose a value"); + mb.setMessage("Please enter a value for the color."); + mb.open(); + + return; + } String source = getSource(); changeColor(currentColor.getRGB(), source); updateColorValueLabelBar(); @@ -1407,8 +1416,9 @@ public class ColorScaleMgrDlg extends CaveSWTDialog { durationCbo.add("0"); } else { // HERE is the NULL Pointer + String dataType = colorManager.getDataTypeName(dataTypeCbo.getText()); Set durations = editColorData.getColorDataTypeSets( - sourceKey).getDurations(dataTypeCbo.getText()); + sourceKey).getDurations(colorManager.getDescription(dataType)); Iterator i = durations.iterator(); while (i.hasNext()) { addDuration(i.next()); @@ -1635,7 +1645,6 @@ public class ColorScaleMgrDlg extends CaveSWTDialog { * Populate the data type combo box. */ private void populateDataTypeCombo() { - String source = getSource(); ColorDataTypeSets sourceKeys = editColorData .getColorDataTypeSets(source); @@ -1780,7 +1789,7 @@ public class ColorScaleMgrDlg extends CaveSWTDialog { // Right now last data will be only data to show up // Need to incorporate duration into key for dataTypeSets dataTypeSets.addDataTypeColorSets( - duration + "_" + dataType, colorScaleSets); + duration + "_" + colorManager.getDescription(dataType), colorScaleSets); } catch (VizException e) { e.printStackTrace(); } @@ -1819,7 +1828,6 @@ public class ColorScaleMgrDlg extends CaveSWTDialog { * Creates the default color data */ private void createDefaultData() { - ArrayList defaultDataTypes = colorManager.getDefaultDataTypes(); editColorData = new EditColorData(); @@ -1869,7 +1877,7 @@ public class ColorScaleMgrDlg extends CaveSWTDialog { Iterator i = dataTypes.iterator(); while (i.hasNext()) { String dt = i.next(); - dataTypeCbo.add(dt); + dataTypeCbo.add(colorManager.getDescription(dt)); } if (dataTypeCbo.getItemCount() == 0) { diff --git a/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/data/RPFFcstPointData.java b/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/data/RPFFcstPointData.java index df3310617a..c6154fef2b 100644 --- a/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/data/RPFFcstPointData.java +++ b/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/data/RPFFcstPointData.java @@ -36,6 +36,7 @@ import com.raytheon.viz.hydrocommon.datamanager.HydroDBDataManager; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * Dec 19, 2008 1787 askripsky Initial creation + * Mar 08, 2012 14600 wkwock Delete one lid instead of one group * * * @@ -378,7 +379,7 @@ public class RPFFcstPointData extends HydroDBData implements IHydroDBData { @Override public String getDeleteStatement() { - return "DELETE FROM rpffcstpoint WHERE group_id=" + return "DELETE FROM rpffcstpoint WHERE lid="+getDBString(lid)+" and group_id=" + getDBString(groupID); } diff --git a/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/datamanager/RiverDataManager.java b/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/datamanager/RiverDataManager.java index 428551db96..64d9492796 100644 --- a/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/datamanager/RiverDataManager.java +++ b/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/datamanager/RiverDataManager.java @@ -668,7 +668,9 @@ public class RiverDataManager { sp.setId(spid); // Check for missing data values - if (spid.getPrimaryPe().startsWith("H")) { + if (spid.getPrimaryPe() == null) { + continue; + } else if (spid.getPrimaryPe().startsWith("H")) { if ((spid.getFs() == null) || (spid.getWstg() == null)) { continue; } diff --git a/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/textreport/E19AReport.java b/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/textreport/E19AReport.java index 93b9f5fdcd..7e5b0569ff 100644 --- a/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/textreport/E19AReport.java +++ b/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/textreport/E19AReport.java @@ -24,6 +24,7 @@ import java.util.Date; import java.util.TimeZone; import com.raytheon.viz.hydrocommon.HydroConstants; +import com.raytheon.viz.hydrocommon.textreport.TextReportData.Gage; import com.raytheon.viz.hydrocommon.whfslib.GeoUtil; /** @@ -36,6 +37,7 @@ import com.raytheon.viz.hydrocommon.whfslib.GeoUtil; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * Sep 18, 2009 2260 mpduff Initial creation + * Apr 25, 2012 14499 wkwock Refine format, query, etc * * * @@ -113,7 +115,7 @@ public class E19AReport extends E19Report { buffer.append("\n"); buffer.append(" NATIONAL OCEANIC AND ATMOSPHERIC ADMINISTRATION\n"); buffer.append(" NATIONAL WEATHER SERVICE\n\n"); - buffer.append(" REPORT ON RIVER GAGE STATION\n\n"); + buffer.append(" REPORT ON RIVER GAGE STATION\n\n"); buffer.append("------------------------------------ SITE ------------------------------------\n\n"); buffer.append(String.format(" LID: %-11s %10s PROXIMITY: %s\n", lid, " ", data.getDescrip().getProximity())); buffer.append(String.format(" NAME: %s\n STREAM: %s\n", locData.getLocation().getName(), data.getRiverstat().getStream())); @@ -179,8 +181,8 @@ public class E19AReport extends E19Report { } String pool = null; - if (data.getRiverstat().getFs() != HydroConstants.MISSING_VALUE) { - pool = String.format("%8.2f", data.getRiverstat().getBf()); + if (data.getRiverstat().getPool() != HydroConstants.MISSING_VALUE) { + pool = String.format("%8.2f", data.getRiverstat().getPool()); } else { pool = " "; } @@ -239,7 +241,7 @@ public class E19AReport extends E19Report { if ((dataO.getObserver().getLastname() != null) && (dataO.getObserver().getLastname().length() > 0)) { - name.concat(dataO.getObserver().getLastname()); + name += dataO.getObserver().getLastname(); } buffer.append(String.format(" %-40s\n", name)); @@ -272,8 +274,10 @@ public class E19AReport extends E19Report { buffer.append(String.format(" DCP ID: %-8s%10sDCP OWNER: %s\n\n", dataDcpTelem.getDcp().getGoes(), " ", dataDcpTelem.getDcp().getOwner())); TextReportData dataG = TextReportDataManager.getInstance().getGageQueryList(lid); buffer.append(" LATEST GAGE TYPE START DATE OWNER OF GAGE\n"); - if (dataG.getGage().getBegin() != null) { - buffer.append(String.format(" %-11s %10s %-11s\n", dataG.getGage().getType(), sdf.format(dataG.getGage().getBegin()), dataG.getGage().getOwner())); + + if (dataG.getGageList() != null && dataG.getGageList().size() > 0) { + Gage gage=dataG.getGageList().get(dataG.getGageList().size()-1); + buffer.append(String.format(" %-11s %10s %-11s\n", gage.getType(), sdf.format(gage.getBegin()), gage.getOwner())); } buffer.append("\n"); diff --git a/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/textreport/E19Report.java b/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/textreport/E19Report.java index e3592e63d7..a19a09f4f2 100644 --- a/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/textreport/E19Report.java +++ b/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/textreport/E19Report.java @@ -45,6 +45,7 @@ import com.raytheon.viz.hydrocommon.whfslib.GeoUtil; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * Sep 18, 2009 2260 mpduff Initial creation + * Apr 25, 2012 14499 wkwock Refine format, query, etc * * * @@ -194,7 +195,7 @@ public class E19Report extends TextReport { TextReportData data = TextReportDataManager.getInstance().getDataForReports(lid, 0); buffer.append(TextReportConstants.E19_HDR_COVER); buffer.append("\n\n"); - buffer.append(" U.S. DEPARTMENT OF COMMERCE\n"); + buffer.append(" U.S. DEPARTMENT OF COMMERCE\n"); buffer.append(" NATIONAL OCEANIC AND ATMOSPHERIC ADMINISTRATION\n"); buffer.append(" NATIONAL WEATHER SERVICE\n\n"); buffer.append(" REPORT ON RIVER GAGE STATION\n\n"); @@ -232,26 +233,26 @@ public class E19Report extends TextReport { } buffer.append("\nABBREVIATIONS:\n\n"); - buffer.append(" BM - bench mark EPA - Environmental Protection Agency\n"); - buffer.append(" DS - downstream IBWC - International Boundary and Water Comm.\n"); - buffer.append(" US - upstream MSRC - Mississippi River Commission\n"); - buffer.append(" HW - high water MORC - Missouri River Commission\n"); - buffer.append(" LW - low water NOAA - National Oceanic and Atmospheric Admin.\n"); - buffer.append(" RB - right bank NOS - National Ocean Survey\n"); - buffer.append(" LB - left bank NWS - National Weather Service\n"); - buffer.append(" MGL - mean gulf level TVA - Tennessee Valley Authority\n"); - buffer.append(" MLW - mean low water USACE - U.S. Army Corps of Engineers\n"); - buffer.append(" MSL - mean sea level USBR - U.S. Bureau of Reclamation\n"); - buffer.append(" MLT - mean low tide USGS - U.S. Geological Survey\n"); - buffer.append(" MT - mean tide USWB - U.S. Weather Bureau\n"); - buffer.append(" WQ - water quality NGVD - National Geodetic Vertical Datum\n"); - buffer.append(" RM - reference mark NAD - North American Datum\n"); + buffer.append(" BM - bench mark EPA - Environmental Protection Agency\n"); + buffer.append(" DS - downstream IBWC - International Boundary and Water Comm.\n"); + buffer.append(" US - upstream MSRC - Mississippi River Commission\n"); + buffer.append(" HW - high water MORC - Missouri River Commission\n"); + buffer.append(" LW - low water NOAA - National Oceanic and Atmospheric Admin.\n"); + buffer.append(" RB - right bank NOS - National Ocean Survey\n"); + buffer.append(" LB - left bank NWS - National Weather Service\n"); + buffer.append(" MGL - mean gulf level TVA - Tennessee Valley Authority\n"); + buffer.append(" MLW - mean low water USACE - U.S. Army Corps of Engineers\n"); + buffer.append(" MSL - mean sea level USBR - U.S. Bureau of Reclamation\n"); + buffer.append(" MLT - mean low tide USGS - U.S. Geological Survey\n"); + buffer.append(" MT - mean tide USWB - U.S. Weather Bureau\n"); + buffer.append(" WQ - water quality NGVD - National Geodetic Vertical Datum\n"); + buffer.append(" RM - reference mark NAD - North American Datum\n"); buffer.append(" RP - reference point\n"); buffer.append("\n\n\n"); - buffer.append(String.format(" LOCATION IDENTIFICATION: %s\n", lid)); - buffer.append(String.format(" NWS INDEX NUMBER: %s\n", locData.getLocation().getSn())); - buffer.append(String.format(" USGS NUMBER: %s\n", locData.getRiverstat().getGsno())); + buffer.append(String.format(" LOCATION IDENTIFICATION: %s\n", lid)); + buffer.append(String.format(" NWS INDEX NUMBER: %s\n", locData.getLocation().getSn())); + buffer.append(String.format(" USGS NUMBER: %s\n", data.getRiverstat().getGsno())); return buffer.toString(); } @@ -270,7 +271,7 @@ public class E19Report extends TextReport { buffer.append(TextReportConstants.E19_HDR_MAPPAGE); buffer.append("\n\n"); - buffer.append(String.format("%20s: %-10s SOURCE: %s\n", "LATITUDE", GeoUtil.getInstance().cvt_latlon_from_double(data.getRiverstat().getLat()), data.getRiverstat().getRsource())); + buffer.append(String.format("%20s: %-10s SOURCE: %s\n", "LATITUDE", GeoUtil.getInstance().cvt_latlon_from_double(data.getRiverstat().getLat()), data.getRiverstat().getRsource())); buffer.append(String.format("%20s: %-10s", "LONGITUDE", GeoUtil.getInstance().cvt_latlon_from_double(data.getRiverstat().getLon()))); // try to place FOOTER at the bottom @@ -301,8 +302,8 @@ public class E19Report extends TextReport { TextReportData dataRivStat = TextReportDataManager.getInstance().getDataForReports(lid,0); String tmp = null; - if (data.getRiverstat().getZd() != HydroConstants.MISSING_VALUE) { - tmp = String.format("%8.3f", data.getRiverstat().getZd()); + if (dataRivStat.getRiverstat().getZd() != HydroConstants.MISSING_VALUE) { + tmp = String.format("%8.3f", dataRivStat.getRiverstat().getZd()); } else { tmp = " "; } @@ -378,13 +379,14 @@ public class E19Report extends TextReport { // Remove the new line from the 1st line of remark lines[0] = lines[0].replace("\n", ""); - buffer.append(String.format(" %-7s %-74s %s %s\n", bm.getBnum(), lines[0], gageZero, elevation)); + buffer.append(String.format(" %-7s %-74s %s %s\n", bm.getBnum(), lines[0], gageZero, elevation)); for (int i = 1; i < lines.length; i++) { if (lines[i].length() > 1) { // Skip blank lines buffer.append(indent + lines[i]); } } + buffer.append("\n"); } else if (needed > avail) { // try to place FOOTER at the bottom buffer.append(advanceToFooter(0, buffer.toString())); @@ -420,6 +422,7 @@ public class E19Report extends TextReport { private String E19Gages() { StringBuilder buffer = new StringBuilder(); int numCols = 60; + int leftMargin = 68; String[] crit1 = null; String[] crit2 = null; @@ -475,14 +478,14 @@ public class E19Report extends TextReport { if (crit2Size > 0) { buffer.append(String.format(" %-20s", crit2[index])); crit2Size--; + buffer.append("\n"); } index++; - buffer.append("\n"); } String cost = " "; if (data.getTelem().getCost() > 0) { - cost = String.format("%-7.2lf", data.getTelem().getCost()); + cost = String.format("%-7.2f", data.getTelem().getCost()); } buffer.append(String.format(" %18s PAYOR/COST OF LINE: %s / $ %s\n\n", " ", data.getTelem().getPayor(), cost)); @@ -490,8 +493,8 @@ public class E19Report extends TextReport { int count1 = countNewlines(buffer.toString()); // Do column header. - buffer.append(" GAGE TYPE OWNER MAINTENANCE BEGAN ENDED GAGE LOCATION/REMARKS\n"); - buffer.append(" ----------- ----------- ----------- ---------- ---------- -----------------------------------------------------------\n"); + buffer.append(" GAGE TYPE OWNER MAINTENANCE BEGAN ENDED GAGE LOCATION/REMARKS\n"); + buffer.append(" ----------- ----------- ----------- ---------- ---------- ------------------------------------------------------------\n"); int count2 = countNewlines(buffer.toString()) - count1; int loop = 0; @@ -503,7 +506,7 @@ public class E19Report extends TextReport { ArrayList gageList = dataGage.getGageList(); String indent = ""; - for (int i = 0; i < numCols + 4; i++) { + for (int i = 0; i < leftMargin; i++) { indent = indent.concat(" "); } @@ -530,7 +533,7 @@ public class E19Report extends TextReport { endDate = sdf.format(gage.getEnd()); } - buffer.append(String.format(" %-11s %-11s %-11s %10s %10s %-23s\n", + buffer.append(String.format(" %-11s %-11s %-11s %10s %10s %-23s\n", gage.getType(), gage.getOwner(), gage.getMaint(), beginDate, endDate, remarkLine)); @@ -812,7 +815,6 @@ public class E19Report extends TextReport { if (lines != null) { needed = lines.length - 1; } - if (needed <= avail) { // Formatting for Line 1. if ((lines != null) && (lines[0] != null)) { tmp1 = lines[0]; @@ -868,7 +870,8 @@ public class E19Report extends TextReport { } } avail = avail - needed; - } else if (needed > avail) { + + if (needed > avail) { // try to place FOOTER at the bottom buffer.append(advanceToFooter(loop, buffer.toString())); @@ -951,19 +954,23 @@ public class E19Report extends TextReport { tmp1 = " "; } + tmp2=" "; if (lw.getDate() != null) { tmp2 = sdf.format(lw.getDate()); } + tmp3=" "; if (lw.getStage() != HydroConstants.MISSING_VALUE) { tmp3 = String.format("%7.2f", lw.getStage()); } + tmp4=" "; if (lw.getQ() != HydroConstants.MISSING_VALUE) { tmp4 = String.format("%6d", lw.getQ()); } + System.out.println("tmp4=["+tmp4+"]"); - buffer.append(String.format(" %10s %s %s %-45s\n", + buffer.append(String.format(" %10s %s %s %-45s\n", tmp2, tmp3, tmp4, tmp1)); // Formatting for all additional lines. @@ -1051,96 +1058,96 @@ public class E19Report extends TextReport { String[] lines = TextUtil.wordWrap(data.getDescrip().getBed(), numCols, 0); buffer.append(lines[0] + "\n"); for (int i = 1; i < lines.length; i++) { - if (lines[i].length() > 1) { - tmp1.concat(indent + lines[i] + "\n"); - } + if ((i!=(lines.length-1)) && (!lines[i].trim().equalsIgnoreCase(""))) { + buffer.append(" " + lines[i] + "\n"); + } } } - buffer.append("\n\n"); + buffer.append("\n"); buffer.append(" REACH: "); if (data.getDescrip().getReach() != null) { String[] lines = TextUtil.wordWrap(data.getDescrip().getReach(), numCols, 0); buffer.append(lines[0] + "\n"); for (int i = 1; i < lines.length; i++) { - if (lines[i].length() > 1) { - tmp1.concat(indent + lines[i] + "\n"); - } + if ((i!=(lines.length-1)) && (!lines[i].trim().equalsIgnoreCase(""))) { + buffer.append(" " + lines[i] + "\n"); + } } } else { buffer.append("\n"); } - buffer.append("\n\n"); + buffer.append("\n"); buffer.append(" REGULATION: "); if (data.getDescrip().getRes() != null) { String[] lines = TextUtil.wordWrap(data.getDescrip().getRes(), numCols, 0); buffer.append(lines[0] + "\n"); for (int i = 1; i < lines.length; i++) { - if (lines[i].length() > 1) { - tmp1.concat(indent + lines[i] + "\n"); - } + if ((i!=(lines.length-1)) && (!lines[i].trim().equalsIgnoreCase(""))) { + buffer.append(" " + lines[i] + "\n"); + } } } else { buffer.append("\n"); } - buffer.append("\n\n"); + buffer.append("\n"); buffer.append(" DIVERSION: "); if (data.getDescrip().getDivert() != null) { String[] lines = TextUtil.wordWrap(data.getDescrip().getDivert(), numCols, 0); buffer.append(lines[0] + "\n"); for (int i = 1; i < lines.length; i++) { - if (lines[i].length() > 1) { - tmp1.concat(indent + lines[i] + "\n"); - } + if ((i!=(lines.length-1)) && (!lines[i].trim().equalsIgnoreCase(""))) { + buffer.append(" " + lines[i] + "\n"); + } } } else { buffer.append("\n"); } - buffer.append("\n\n"); + buffer.append("\n"); buffer.append(" WINTER: "); if (data.getDescrip().getIce() != null) { String[] lines = TextUtil.wordWrap(data.getDescrip().getIce(), numCols, 0); buffer.append(lines[0] + "\n"); for (int i = 1; i < lines.length; i++) { - if (lines[i].length() > 1) { - tmp1.concat(indent + lines[i] + "\n"); - } + if ((i!=(lines.length-1)) && (!lines[i].trim().equalsIgnoreCase(""))) { + buffer.append(" " + lines[i] + "\n"); + } } } else { buffer.append("\n"); } - buffer.append("\n\n"); + buffer.append("\n"); buffer.append(" TOPOGRAPHY: "); if (data.getDescrip().getTopo() != null) { String[] lines = TextUtil.wordWrap(data.getDescrip().getTopo(), numCols, 0); buffer.append(lines[0] + "\n"); for (int i = 1; i < lines.length; i++) { - if (lines[i].length() > 1) { - tmp1.concat(indent + lines[i] + "\n"); - } + if ((i!=(lines.length-1)) && (!lines[i].trim().equalsIgnoreCase(""))) { + buffer.append(" " + lines[i] + "\n"); + } } } else { buffer.append("\n"); } - buffer.append("\n\n"); + buffer.append("\n"); buffer.append(" REMARKS: "); if (data.getDescrip().getRemark() != null) { String[] lines = TextUtil.wordWrap(data.getDescrip().getRemark(), numCols, 0); buffer.append(lines[0] + "\n"); for (int i = 1; i < lines.length; i++) { - if (lines[i].length() > 1) { - tmp1.concat(indent + lines[i] + "\n"); - } + if ((i!=(lines.length-1)) && (!lines[i].trim().equalsIgnoreCase(""))) { + buffer.append(" " + lines[i] + "\n"); + } } } else { buffer.append("\n"); } - buffer.append("\n\n"); + buffer.append("\n"); // try to place FOOTER at the bottom buffer.append(advanceToFooter(0, buffer.toString())); @@ -1259,7 +1266,7 @@ public class E19Report extends TextReport { String tmp2 = " "; String tmp3 = " "; - int flood_filler = 95; // so flood section is space-buffered + int flood_filler = 100; // so flood section is space-buffered int crest_filler = 20; // so crest section is space-buffered int linesAvailable = 0; // ensures correct num of lines/page @@ -1301,7 +1308,7 @@ public class E19Report extends TextReport { crestList = data.getStaffData().getCrestList(); } - if ((data.getStaffData().getCrestList() != null) || (data.getStaffData().getFloodList() != null)) { + if ((crestList != null && !crestList.isEmpty()) || (floodList != null && !floodList.isEmpty())) { // find the min and max stage values found in the Flood and Crest tables if (floodList != null) { for (Flood flood: floodList) { @@ -1367,6 +1374,7 @@ public class E19Report extends TextReport { int crestIndex = 0; int lineIndex = 0; String[] lines = null; + String thisLineStr=null; for (currentTick = 0; currentTick < lines_per_page; currentTick++) { if (linesNeeded <= linesAvailable) { @@ -1376,26 +1384,34 @@ public class E19Report extends TextReport { if ( (floodList.size() > floodIndex) && (floodList.get(floodIndex) != null) &&(currentStage <= floodList.get(floodIndex).getStage())) { // get one line at a time from record if (lines == null) { - lines = TextUtil.wordWrap(record.toString(), numCols, 0); + lines = TextUtil.wordWrap(floodList.get(floodIndex).getDamage(), numCols, 0); lineIndex = 0; + + tmp1=" "; + if (floodList.get(floodIndex).getStage() != HydroConstants.MISSING_VALUE) { + tmp1 = String.format("%7.2f", floodList.get(floodIndex).getStage()); + } + + thisLineStr=" " + tmp1 + " - " + lines[lineIndex]; + }else { + thisLineStr=" " + lines[lineIndex]; } - int spaces = flood_filler - lines[lineIndex].length(); + + int spaces = flood_filler - thisLineStr.length(); record.setLength(0); // Fill in the beginning of the line with spaces - StringBuilder line = new StringBuilder(); + StringBuilder remainSpace = new StringBuilder(); for (int i = 0; i < spaces; i++) { - line.append(" "); + remainSpace.append(" "); } - line.append(lines[lineIndex]); - buffer.append(line.toString()); + buffer.append(thisLineStr); + buffer.append(remainSpace.toString()); lineIndex++; if (lineIndex == lines.length - 1) { // No more lines in this record floodIndex++; // Get the next record - lineIndex = 0; - lines = null; if ((floodList.size() > floodIndex) && (floodList.get(floodIndex) != null)) { @@ -1406,7 +1422,10 @@ public class E19Report extends TextReport { lines = TextUtil.wordWrap(record.toString(), numCols, 0); linesNeeded = countNewlines(record.toString()); } - } + } + + lines=null; + lineIndex = 0; } } else { // no flood information on this line for (int i = 0; i < flood_filler; i++) { @@ -1454,9 +1473,32 @@ public class E19Report extends TextReport { } // for currentTick } + data = TextReportDataManager.getInstance().getDataForReports(lid, 0); + buffer.append("\n\n"); + buffer.append(" REACH: "); + if (data.getDescrip()!=null) { + buffer.append(String.format("%-80s", data.getDescrip().getReach())); + } else { + buffer.append(String.format("%-80s", "")); + } + + if (data.getRiverstat()!=null) { + buffer.append(String.format(" ELEVATION ZERO: %7.2f\n\n", data.getRiverstat().getZd())); + } else { + buffer.append(String.format(" ELEVATION ZERO: %7.2f\n\n", 0.)); + } + + buffer.append("\n"); + buffer.append(advanceToFooter(0,buffer.toString())); + Date d = Calendar.getInstance(TimeZone.getTimeZone("GMT")).getTime(); + String footer = createFooter(data, E19_RREVISE_TYPE, sdf.format(d), + "NWS FORM E-19", E19_STAFFGAGE, "STAFF", null, E19_STANDARD_LEFT_MARGIN); + + buffer.append(footer + "\n\n"); + return buffer.toString(); } - + /** * Get the contacts page * @@ -1496,22 +1538,26 @@ public class E19Report extends TextReport { tmp2 = String.format(" %-60s\n", contact.getEmail()); // Do remark. + tmp3 = ""; if (contact.getRemark() != null) { String[] lines = TextUtil.wordWrap(contact.getRemark(), numCols, 0); - tmp3 = ""; for (String s: lines) { - tmp3 = tmp3.concat(String.format(" %-48s\n", s.trim())); + if (s.trim().length()>0){ + tmp3 = tmp3.concat(" " + s+"\n"); + } else { + tmp3 = tmp3.concat("\n"); + } } - tmp3.concat("\n"); } int needed = (countNewlines(tmp3) + 1) + 1 + 1; - if (needed <= avail) { - buffer.append(tmp1); - buffer.append(tmp2); - buffer.append(tmp3); - } else if (needed > avail) { + buffer.append(tmp1); + buffer.append(tmp2); + buffer.append(tmp3); + avail -= needed; + + if (needed > avail) { // try to place FOOTER at the bottom buffer.append(advanceToFooter(loop, buffer.toString())); @@ -1564,7 +1610,7 @@ public class E19Report extends TextReport { where = " where lid = '" + lid + "' and datcrst >= '" + date + "'"; } - where.concat(" order by stage desc "); + where += " order by stage desc "; /* Create the return string and return. */ ArrayList rs = TextReportDataManager.getInstance().getCrest(query + where); @@ -1630,8 +1676,9 @@ public class E19Report extends TextReport { } buffer.append(optHeader); } - - String tmp = String.format("%s %s %s, %s", data.getRiverstat().getStream(), data.getDescrip().getProximity(), locData.getLocation().getName(), locData.getLocation().getState()); + + TextReportData dataRivStat = TextReportDataManager.getInstance().getDataForReports(lid,0); + String tmp = String.format("%s %s %s, %s", dataRivStat.getRiverstat().getStream(), dataRivStat.getDescrip().getProximity(), locData.getLocation().getName(), locData.getLocation().getState()); String date = null; if (reviseType == E19_LREVISE_TYPE) { @@ -1639,8 +1686,8 @@ public class E19Report extends TextReport { date = sdf.format(locData.getLocation().getLrevise()); } } else { /* revise_type == E19_RREVISE_TYPE */ - if (data.getRiverstat().getRrevise() != null) { - date = sdf.format(data.getRiverstat().getRrevise()); + if (dataRivStat.getRiverstat().getRrevise() != null) { + date = sdf.format(dataRivStat.getRiverstat().getRrevise()); } } diff --git a/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/textreport/TextReport.java b/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/textreport/TextReport.java index deca617393..d11f56741b 100644 --- a/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/textreport/TextReport.java +++ b/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/textreport/TextReport.java @@ -35,6 +35,7 @@ import com.raytheon.uf.common.ohd.AppsDefaults; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * Sep 18, 2009 2260 mpduff Initial creation + * Apr 10, 2012 14499 wkwock correct algorithm in countNewlines * * * @@ -88,15 +89,19 @@ public abstract class TextReport { * The number of lines in the String */ protected int countNewlines(String s) { - String[] lines = null; - + int newLineCount = 0; if ((s != null) && (s.length() > 0)) { - lines = s.split("\\n"); + byte bStr[]=s.getBytes(); + for (byte b : bStr) { + if (b=='\n') { + newLineCount++; + } + } } else { return 0; } - return lines.length; + return newLineCount; } /** diff --git a/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/textreport/TextReportDataManager.java b/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/textreport/TextReportDataManager.java index 48e3b185ce..959177258c 100644 --- a/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/textreport/TextReportDataManager.java +++ b/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/textreport/TextReportDataManager.java @@ -47,6 +47,7 @@ import com.raytheon.viz.hydrocommon.textreport.TextReportData.StaffGageData; * Sep 18, 2009 2260 mpduff Initial creation * Nov 09, 2010 5416 lbousaid changed gageQuery * Dec 08, 2011 11728 lbousaidi changed the routines that retrieve data + * Apr 25, 2012 14499 wkwock Refine format, query, etc * * * @@ -260,7 +261,7 @@ public class TextReportDataManager extends HydroDataManager { } private TextReportData getObsList(String lid) { - String observerQuery = "select dos, gn, a1, a2, a3, hphone, phone, recip, city, state, zip, comm, email, rprt, spons, ornr, rate, tsk from Observer where lid = '" + String observerQuery = "select dos, gn, a1, a2, a3, hphone, phone,firstname,lastname, recip, city, state, zip, comm, email, rprt, spons, ornr, rate, tsk from Observer where lid = '" + lid + "'"; ArrayList rs = runQuery(observerQuery); TextReportData data = new TextReportData(); @@ -275,6 +276,8 @@ public class TextReportDataManager extends HydroDataManager { data.getObserver().setA3((String) oa[++i]); data.getObserver().setHphone((String) oa[++i]); data.getObserver().setPhone((String) oa[++i]); + data.getObserver().setFirstname((String) oa[++i]); + data.getObserver().setLastname((String) oa[++i]); data.getObserver().setRecip((String) oa[++i]); data.getObserver().setCity((String) oa[++i]); data.getObserver().setState((String) oa[++i]); @@ -384,7 +387,7 @@ public class TextReportDataManager extends HydroDataManager { private TextReportData getRefList(String lid) { String referQuery = "select reference from refer where lid = '" + lid - + "'"; + + "' ORDER BY reference"; ArrayList rs = runQuery(referQuery); TextReportData data = new TextReportData(); @@ -454,7 +457,7 @@ public class TextReportDataManager extends HydroDataManager { } String datumQuery = "select ddate, elev from datum where lid = '" + lid - + "' order by ddate desc"; + + "' order by ddate asc"; rs = runQuery(datumQuery); ArrayList datumList = new ArrayList(); @@ -479,13 +482,13 @@ public class TextReportDataManager extends HydroDataManager { TextReportData data = new TextReportData(); //String crestQuery = "select datcrst, cremark, hw, jam, olddatum, q, stage, suppress, timcrst, prelim from crest where lid = '" - // + lid + "' order by datcrst desc"; + // + lid + "' order by datcrst"; - String where = "where lid = '" + lid + "' order by datcrst desc"; + String where = "where lid = '" + lid + "' order by datcrst, timcrst"; ArrayList crestList = getCrestList(where); data.setCrestList(crestList); - where = "where lid = '" + lid + "'"; + where = "where lid = '" + lid + "' order by stage"; ArrayList floodList = getFloodList(where); data.setFloodList(floodList); @@ -495,7 +498,7 @@ public class TextReportDataManager extends HydroDataManager { private TextReportData getLowWaterList(String lid) { TextReportData data = new TextReportData(); String lwQuery = "select lwdat, q, stage, lwrem from lowwater where lid = '" - + lid + "' order by lwdat desc"; + + lid + "' order by lwdat"; ArrayList rs = runQuery(lwQuery); int i = 0; @@ -535,7 +538,7 @@ public class TextReportDataManager extends HydroDataManager { sgd.setCrestList(staffCrestList); sgd.setFloodList(staffFloodList); data.setStaffData(sgd); - + return data; } public TextReportData getStaffGageData(String lid) { @@ -547,7 +550,7 @@ public class TextReportDataManager extends HydroDataManager { private TextReportData getContactList(String lid) { TextReportData data = new TextReportData(); String contactsQuery = "select contact, phone, email, remark, priority from contacts where lid = '" - + lid + "' order by priority desc"; + + lid + "' order by priority"; ArrayList rs = runQuery(contactsQuery); int i = 0; diff --git a/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/util/DbUtils.java b/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/util/DbUtils.java index 654b698047..2a68c14007 100644 --- a/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/util/DbUtils.java +++ b/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/util/DbUtils.java @@ -22,6 +22,7 @@ package com.raytheon.viz.hydrocommon.util; import java.util.HashMap; import java.util.Map; import java.util.Set; +import java.util.concurrent.ConcurrentHashMap; import com.raytheon.uf.common.ohd.AppsDefaults; @@ -43,9 +44,9 @@ import com.raytheon.uf.common.ohd.AppsDefaults; public class DbUtils { private static final String SHEF_PROCOBS = "shef_procobs"; - private static Map tableMap = null; + private static ConcurrentHashMap tableMap = null; - private static Map fcstTableMap = null; + private static ConcurrentHashMap fcstTableMap = null; public static String getTableName(String pe, String ts) { populateMaps(); @@ -149,7 +150,7 @@ public class DbUtils { private static void populateMaps() { if (tableMap == null) { - tableMap = new HashMap(); + tableMap = new ConcurrentHashMap(); tableMap.put("a", "Agricultural"); tableMap.put("e", "Evaporation"); tableMap.put("f", "Fishcount"); @@ -175,7 +176,7 @@ public class DbUtils { } if (fcstTableMap == null) { - fcstTableMap = new HashMap(); + fcstTableMap = new ConcurrentHashMap(); fcstTableMap.put("h", "Fcstheight"); fcstTableMap.put("p", "Fcstprecip"); fcstTableMap.put("q", "Fcstdischarge"); diff --git a/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/util/MPEColors.java b/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/util/MPEColors.java index d2e847a21d..c3c56b0d30 100644 --- a/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/util/MPEColors.java +++ b/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/util/MPEColors.java @@ -319,7 +319,7 @@ public class MPEColors { pColorSetGroup.add(pColorUseSet); - /* Multi-sensor Mosaic */ + /* Multi-sensor Mosaic or Multi-sensor Precip */ pColorUseSet = new NamedColorUseSet("MMOSAIC", "Multisensor Mosaic", precip_levels, precip_colors, "GRAY30", "GRAY10", 3600); diff --git a/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/whfslib/colorthreshold/GetColorValues.java b/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/whfslib/colorthreshold/GetColorValues.java index 3ae69372a4..c2f49f8805 100644 --- a/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/whfslib/colorthreshold/GetColorValues.java +++ b/cave/com.raytheon.viz.hydrocommon/src/com/raytheon/viz/hydrocommon/whfslib/colorthreshold/GetColorValues.java @@ -193,7 +193,8 @@ public class GetColorValues { closest_duration = get_closest_multihour_duration(user_id, application_name, coloruse_name, duration, threshold_unit); - if (closest_duration != NO_DURATION_FOUND) { + // does the closest one match? + if (closest_duration != NO_DURATION_FOUND && duration == closest_duration) { cvHead = getColorValueTableEntries(user_id, application_name, coloruse_name, closest_duration, threshold_unit); } diff --git a/cave/com.raytheon.viz.localization/src/com/raytheon/uf/viz/localization/Activator.java b/cave/com.raytheon.viz.localization/src/com/raytheon/uf/viz/localization/Activator.java index 256b0058b6..ad182b0902 100644 --- a/cave/com.raytheon.viz.localization/src/com/raytheon/uf/viz/localization/Activator.java +++ b/cave/com.raytheon.viz.localization/src/com/raytheon/uf/viz/localization/Activator.java @@ -97,6 +97,7 @@ public class Activator extends AbstractUIPlugin implements BundleActivator { */ @Override public void stop(BundleContext context) throws Exception { + ResourcesPlugin.getWorkspace().save(true, null); plugin = null; super.stop(context); } diff --git a/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/MPEDisplayManager.java b/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/MPEDisplayManager.java index 733f54fa84..4c06832a89 100644 --- a/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/MPEDisplayManager.java +++ b/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/MPEDisplayManager.java @@ -41,6 +41,7 @@ import org.eclipse.jface.dialogs.MessageDialog; import org.eclipse.swt.SWT; import org.eclipse.swt.graphics.Cursor; import org.eclipse.swt.widgets.Display; +import org.eclipse.swt.widgets.MessageBox; import org.eclipse.swt.widgets.Shell; import org.eclipse.ui.IEditorPart; import org.eclipse.ui.IWorkbenchWindow; @@ -414,7 +415,7 @@ public class MPEDisplayManager { .getInstance().getCurrentWindow() .getService(ICommandService.class)) .getCommand("com.raytheon.viz.mpe.ui.actions.toggleGageColor"); - dataSaved = true; +// dataSaved = true; currentDate = MPEDataManager.getInstance().getLatestDate(); displayFieldType = DisplayFieldData.mMosaic; displayMode = EnumSet.noneOf(DisplayMode.class); @@ -520,6 +521,9 @@ public class MPEDisplayManager { if (!okToProceed()) { return; } + } else { + // if saved, then reset to false since it isn't saved for the next time + setDataSaved(false); } currentDate = newDate; @@ -660,7 +664,8 @@ public class MPEDisplayManager { List pColorSet = GetColorValues.get_colorvalues(user_id, app_name, displayFieldType.getCv_use(), - displayFieldType.getCv_duration(), "E", pColorSetGroup); + accum_interval * 60 * 60, "E", pColorSetGroup); +// displayFieldType.getCv_duration(), "E", pColorSetGroup); switch (displayFieldType) { case rMosaic: @@ -807,7 +812,7 @@ public class MPEDisplayManager { } } displayedResource = null; - dataSaved = true; +// dataSaved = true; } /** @@ -1280,6 +1285,15 @@ public class MPEDisplayManager { private void save_merged_RFCW(String fileName, String processFlag) { XmrgFile xmrg = ((XmrgResource) displayedResource).getXmrgFile(); + if (xmrg == null) { + Shell shell = PlatformUI.getWorkbench().getActiveWorkbenchWindow() + .getShell(); + MessageBox box = new MessageBox(shell, SWT.ERROR); + box.setText("Cannot Save"); + box.setMessage("No Data Available, cannot save"); + box.open(); + return; + } xmrg.setData(((XmrgResource) displayedResource).getData()); short[] data = xmrg.getData(); diff --git a/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/actions/ChooseHour.java b/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/actions/ChooseHour.java index 81520f2a28..a6912a6c9f 100644 --- a/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/actions/ChooseHour.java +++ b/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/actions/ChooseHour.java @@ -100,8 +100,10 @@ public class ChooseHour extends AbstractHandler { cal.add(Calendar.HOUR_OF_DAY, increment); Date newDate = cal.getTime(); dm.setCurrentDate(newDate); - XmrgResource xmrgRsc = (XmrgResource) dm.getDisplayedResource(); - xmrgRsc.updateXmrg(false); + if (dm.getDisplayedResource() != null) { + XmrgResource xmrgRsc = (XmrgResource) dm.getDisplayedResource(); + xmrgRsc.updateXmrg(false); + } } return null; diff --git a/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/dialogs/ChooseDataPeriodDialog.java b/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/dialogs/ChooseDataPeriodDialog.java index e4be8ddd68..07a39824d4 100644 --- a/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/dialogs/ChooseDataPeriodDialog.java +++ b/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/dialogs/ChooseDataPeriodDialog.java @@ -293,9 +293,12 @@ public class ChooseDataPeriodDialog extends CaveJFACEDialog { close(); displayMgr.setHrFirstTime(false); displayMgr.setCurrentDate(cal.getTime()); - XmrgResource xmrgRsc = (XmrgResource) displayMgr - .getDisplayedResource(); - xmrgRsc.updateXmrg(false); + + if (displayMgr.getDisplayedResource() != null) { + XmrgResource xmrgRsc = (XmrgResource) displayMgr + .getDisplayedResource(); + xmrgRsc.updateXmrg(false); + } } }); diff --git a/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/dialogs/Display7x7Dialog.java b/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/dialogs/Display7x7Dialog.java index 05dcd68812..36ec0aeaec 100644 --- a/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/dialogs/Display7x7Dialog.java +++ b/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/dialogs/Display7x7Dialog.java @@ -478,8 +478,17 @@ public class Display7x7Dialog extends CaveSWTDialog { } else { gageVal = String.format("%.2f", workingGage.getGval()) + " in."; - scaleVal = ((int) (100 * workingGage.getGval())); - scaleValLab = String.format("%4.2f", (scaleVal / 100.0f)); + if (workingGage.getGval() == 0) { + scaleVal = (0); + scaleValLab = String.format("%4.2f", 0.0); + } else { + scaleVal = ((int) (100 * workingGage.getGval() - 0.01)); + if (scaleVal == 0) { + scaleValLab = String.format("%4.2f", 0.0); + } else { + scaleValLab = String.format("%4.2f", (scaleVal / 100.0f)); + } + } } } } diff --git a/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/dialogs/MultiHourPrecipAccDialog.java b/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/dialogs/MultiHourPrecipAccDialog.java index aaf08754d4..9964842eed 100644 --- a/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/dialogs/MultiHourPrecipAccDialog.java +++ b/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/dialogs/MultiHourPrecipAccDialog.java @@ -503,6 +503,7 @@ public class MultiHourPrecipAccDialog extends Dialog { public void widgetSelected(SelectionEvent e) { retval = 1; displayMgr.clearMPEData(); + MPEDisplayManager.getCurrent().setAccum_interval(accum_interval); MPEDisplayManager.getCurrent().setCurrentDate(cal.getTime()); displayMgr.setAccum_interval(accum_interval); displayMgr.setOtherDispType(DisplayFieldData.multiHour); diff --git a/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/dialogs/gagetable/GageTableDataManager.java b/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/dialogs/gagetable/GageTableDataManager.java index 178512e7e5..56b86def44 100644 --- a/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/dialogs/gagetable/GageTableDataManager.java +++ b/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/dialogs/gagetable/GageTableDataManager.java @@ -941,10 +941,12 @@ public class GageTableDataManager { return returnValue; } - x = x - extent.x; - y = y - extent.y; - short value = data[y][x]; - + int gridX = x - extent.x; + // int gridY = y - extent.y; + // Needed to flip the grid + int gridY = extent.height - (y - extent.y) - 1; + short value = data[gridY][gridX]; + // Any value < 0 is considered missing if ((value == -899.0) || (value == -999.0) || (value < 0)) { returnValue = -999.0; @@ -980,6 +982,7 @@ public class GageTableDataManager { * Reload the data. */ public void reloadData() { + getTableData(); getTableRowData(); } diff --git a/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/rsc/XmrgResource.java b/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/rsc/XmrgResource.java index b6c7c4304d..cc067ccfb3 100644 --- a/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/rsc/XmrgResource.java +++ b/cave/com.raytheon.viz.mpe.ui/src/com/raytheon/viz/mpe/ui/rsc/XmrgResource.java @@ -557,32 +557,37 @@ public class XmrgResource extends int y = extent.height - 1 - (p.y - extent.y); short s = data[(y * subGrid.getNx()) + x]; - - String tmps = "TEMP"; - int tempsval = dataType.getCv_use().indexOf(tmps); - float f = 0; - if (s < 0) { - if (s == -9999 || s == -999 || s == -99 - || (s == -9 && tempsval == -1)) { - f = s; - } else if (s == -8888 || s == -899) { - f = s; - } else { - f = (float) parameters.getDataToDisplayConverter() - .convert(s); - } + + String cv_use = dataType.getCv_use(); + if (cv_use.equalsIgnoreCase("INDEX")) { + values.put("Value", parameters.getLabels().get(s + 1).getText()); } else { - if (s < 30 && s > 24) { - s = 26; - } else if (s > 0 && s <= 24) { - s = 0; - } - f = (float) parameters.getDataToDisplayConverter().convert( - s); + String tmps = "TEMP"; + int tempsval = dataType.getCv_use().indexOf(tmps); + float f = 0; + if (s < 0) { + if (s == -9999 || s == -999 || s == -99 + || (s == -9 && tempsval == -1)) { + f = s; + } else if (s == -8888 || s == -899) { + f = s; + } else { + f = (float) parameters.getDataToDisplayConverter() + .convert(s); + } + } else { + if (s < 30 && s > 24) { + s = 26; + } else if (s > 0 && s <= 24) { + s = 0; + } + f = (float) parameters.getDataToDisplayConverter().convert( + s); + } + float aa = (float) ((Math.floor((int) (f * 100))) / 100.0); + String da = String.format("%2.2f", aa); + values.put("Value", da); } - float aa = (float) ((Math.floor((int) (f * 100))) / 100.0); - String da = String.format("%2.2f", aa); - values.put("Value", da); } ISpatialQuery query = SpatialQueryFactory.create(); @@ -679,6 +684,10 @@ public class XmrgResource extends buf.rewind(); cbuf.rewind(); Rectangle extent = xmrg.getHrapExtent(); + if (extent == null) { + xmrg = null; + return; + } if ((extent.x == 0) && (extent.y == 0)) { Rectangle coord = HRAPCoordinates.getHRAPCoordinates(); if ((extent.width == coord.width) diff --git a/cave/com.raytheon.viz.pointdata/localization/pointdata/ForecastPointDataRetrieve.py b/cave/com.raytheon.viz.pointdata/localization/pointdata/ForecastPointDataRetrieve.py new file mode 100644 index 0000000000..7db469ad23 --- /dev/null +++ b/cave/com.raytheon.viz.pointdata/localization/pointdata/ForecastPointDataRetrieve.py @@ -0,0 +1,79 @@ +## +# 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. +## + + +import PointDataView, PointDataContainer, NoDataException, PointDataRetrieve + +# +# Python module to request forecast time point data. Split out of +# PointDataContainer.py. +# +# +# SOFTWARE HISTORY +# +# Date Ticket# Engineer Description +# ------------ ---------- ----------- -------------------------- +# 25Apr2012 14688 rferrel Initial Creation. +# +# +# + +class ForecastPointDataRetrieve(PointDataRetrieve.PointDataRetrieve): + + def __init__(self, pluginName, site, parameters, keyId='forecastHr', refTime=None, constraint={}, maxSize=99): + super(ForecastPointDataRetrieve, self).__init__(pluginName, site, parameters, keyId, refTime, constraint, maxSize) + + def _query(self, parameters, maxSize): + times = self.__queryForecastTimes() + self.__javaPdc = self.__requestForecastData(times, parameters) + pdvDict = self._organizeData(self.__javaPdc) + self.pdc = PointDataContainer.PointDataContainer(pdvDict, self.__javaPdc, self.refTime) + + def __queryForecastTimes(self): + from com.raytheon.uf.viz.core.catalog import CatalogQuery + return CatalogQuery.performQuery('dataTime.fcstTime', self._buildConstraints(self.refTime)) + + def __requestForecastData(self, availableHours, parameters): + from com.raytheon.viz.pointdata import PointDataRequest + from com.raytheon.uf.common.time import DataTime + from java.lang import String + import jep + dts = jep.jarray(len(availableHours), DataTime) + for i in range(len(availableHours)): + dts[i] = DataTime(self.refTime, int(availableHours[i])) + constraints = self._buildConstraints(None) #times are explicitly set so we don't need to constrain those + params = jep.jarray(len(parameters), String) + for i in range(len(parameters)): + params[i] = String(parameters[i]) + if self.site: + stations = jep.jarray(1, String) + stations[0] = String(self.site) + else: + stations = None + return PointDataRequest.requestPointData(dts, + self.pluginName, params, stations, + constraints) + +def retrieve(pluginName, site, parameters, keyId='forecastHr', refTime=None, constraint={}, maxSize=99): + ret = ForecastPointDataRetrieve(pluginName, site, parameters, keyId, refTime, constraint, maxSize) + return ret.pdc + + + \ No newline at end of file diff --git a/cave/com.raytheon.viz.pointdata/localization/pointdata/HoursRefTimePointDataRetrieve.py b/cave/com.raytheon.viz.pointdata/localization/pointdata/HoursRefTimePointDataRetrieve.py new file mode 100644 index 0000000000..7d474ad789 --- /dev/null +++ b/cave/com.raytheon.viz.pointdata/localization/pointdata/HoursRefTimePointDataRetrieve.py @@ -0,0 +1,72 @@ +## +# 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. +## + + +import PointDataView, PointDataContainer, NoDataException, RefTimePointDataRetrieve + +# +# Python module to request reference time point data. Split out of +# PointDataContainer.py. +# +# +# SOFTWARE HISTORY +# +# Date Ticket# Engineer Description +# ------------ ---------- ----------- -------------------------- +# 25Apr2012 14688 rferrel Initial Creation. +# +# +# + +class HoursRefTimePointDataRetrieve(RefTimePointDataRetrieve.RefTimePointDataRetrieve): + + def __init__(self, pluginName, site, parameters, keyId='forecastHr', refTime=None, constraint={}, maxSize=99): + super(HoursRefTimePointDataRetrieve, self).__init__(pluginName, site, parameters, keyId, refTime, constraint, maxSize) + + def _createJarray(self, availableTimes, numHours): + from java.util import Date + from com.raytheon.uf.common.time import DataTime + import jep, time + #Get a DataTime numHours from current time + stTime = long(time.time()) * 1000 + stTime -= numHours * (60 * 60 * 1000) + stDateTime = DataTime(Date(stTime)) + length = len(availableTimes) + xdts = [] + for i in range(length) : + d = DataTime(availableTimes[length-1-i]) + if d.greaterThan(stDateTime) : + xdts.append(d) + else : + break + sz = len(xdts) + dts = jep.jarray(sz, DataTime) + i = 0 + for d in xdts: + dts[i] = d + i += 1 + return dts + +def retrieve(pluginName, site, parameters, keyId='forecastHr', refTime=None, constraint={}, maxSize=99): + ret = HoursRefTimePointDataRetrieve(pluginName, site, parameters, keyId, refTime, constraint, maxSize) + return ret.pdc + + + \ No newline at end of file diff --git a/cave/com.raytheon.viz.pointdata/localization/pointdata/PointDataRetrieve.py b/cave/com.raytheon.viz.pointdata/localization/pointdata/PointDataRetrieve.py index 51aec0372d..702bdfc40e 100644 --- a/cave/com.raytheon.viz.pointdata/localization/pointdata/PointDataRetrieve.py +++ b/cave/com.raytheon.viz.pointdata/localization/pointdata/PointDataRetrieve.py @@ -31,13 +31,13 @@ import PointDataView, PointDataContainer, NoDataException # Date Ticket# Engineer Description # ------------ ---------- ----------- -------------------------- # 05/11/11 njensen Initial Creation. +# 25Apr2012 14688 rferrel Made into an abstract class. # # # -class PointDataRetrieve: - - def __init__(self, pluginName, site, parameters, keyId='forecastHr', refTime=None, constraint={}, forecast=True, maxSize=99): +class PointDataRetrieve(object): + def __init__(self, pluginName, site, parameters, keyId='forecastHr', refTime=None, constraint={}, maxSize=99): """Initializes a python PointDataContainer which wraps the Java PointDataContainer capabilities. @pluginName the name of the type of data, e.g. bufrmos @site the name of the station, e.g. KOMA @@ -65,31 +65,17 @@ class PointDataRetrieve: if not parameters.__contains__(keyId): parameters.append(keyId) self.__keyId = keyId - self.__initialize(parameters, forecast, int(maxSize)) + self._query(parameters, int(maxSize)) - def __initialize(self, parameters, forecast, maxSize): - if forecast: - times = self.__queryForecastTimes() - self.__javaPdc = self.__requestForecastData(times, parameters) - else: - times = self.__queryRefTimes() - self.__javaPdc = self.__requestData(times, parameters, maxSize) - pdvDict = self.__organizeData(self.__javaPdc) - self.pdc = PointDataContainer.PointDataContainer(pdvDict, self.__javaPdc, self.refTime) - - def __queryForecastTimes(self): - from com.raytheon.uf.viz.core.catalog import CatalogQuery - return CatalogQuery.performQuery('dataTime.fcstTime', self.__buildConstraints(self.refTime)) - - def __queryRefTimes(self): - from com.raytheon.uf.viz.core.catalog import CatalogQuery - return CatalogQuery.performQuery('dataTime.refTime', self.__buildConstraints(None)) + # Abstract method must be implemented by sub-class. + def _query(self, parameters, maxSize): + raise NoDataException.NoDataException('_query not implemented') def __queryNewestRefTime(self): from com.raytheon.uf.viz.core.catalog import CatalogQuery from java.util import Arrays from com.raytheon.uf.common.time import DataTime - results = CatalogQuery.performQuery('dataTime.refTime', self.__buildConstraints(None)) + results = CatalogQuery.performQuery('dataTime.refTime', self._buildConstraints(None)) Arrays.sort(results) if len(results) == 0: if self.site: @@ -99,7 +85,7 @@ class PointDataRetrieve: dt = DataTime(results[len(results)-1]) return dt.getRefTime().getTime() / 1000 - def __buildConstraints(self, refTime): + def _buildConstraints(self, refTime): from java.util import HashMap from com.raytheon.uf.common.dataquery.requests import RequestConstraint queryTerms = HashMap() @@ -114,54 +100,7 @@ class PointDataRetrieve: queryTerms.put(k, RequestConstraint(self.constraint[k])) return queryTerms - def __requestForecastData(self, availableHours, parameters): - from com.raytheon.viz.pointdata import PointDataRequest - from com.raytheon.uf.common.time import DataTime - from java.lang import String - import jep - dts = jep.jarray(len(availableHours), DataTime) - for i in range(len(availableHours)): - dts[i] = DataTime(self.refTime, int(availableHours[i])) - constraints = self.__buildConstraints(None) #times are explicitly set so we don't need to constrain those - params = jep.jarray(len(parameters), String) - for i in range(len(parameters)): - params[i] = String(parameters[i]) - if self.site: - stations = jep.jarray(1, String) - stations[0] = String(self.site) - else: - stations = None - return PointDataRequest.requestPointData(dts, - self.pluginName, params, stations, - constraints) - - def __requestData(self, availableTimes, parameters, maxSize): - from com.raytheon.viz.pointdata import PointDataRequest - from com.raytheon.uf.common.time import DataTime - from java.lang import String - import jep - length = len(availableTimes) - if maxSize > length: - sz = length - else: - sz = maxSize - dts = jep.jarray(sz, DataTime) - for i in range(sz): - dts[i] = DataTime(availableTimes[length-1-i]) - constraints = self.__buildConstraints(None) #times are explicitly set so we don't need to constrain those - params = jep.jarray(len(parameters), String) - for i in range(len(parameters)): - params[i] = String(parameters[i]) - if self.site: - stations = jep.jarray(1, String) - stations[0] = String(self.site) - else: - stations = None - return PointDataRequest.requestPointData(dts, - self.pluginName, params, stations, - constraints) - - def __organizeData(self, container): + def _organizeData(self, container): import PointDataView organizedData = {} for i in range(container.getCurrentSz()): @@ -169,10 +108,3 @@ class PointDataRetrieve: fcstHr = pdv[self.__keyId] organizedData[fcstHr] = pdv return organizedData - -def retrieve(pluginName, site, parameters, keyId='forecastHr', refTime=None, constraint={}, forecast=True, maxSize=99): - ret = PointDataRetrieve(pluginName, site, parameters, keyId, refTime, constraint, forecast, maxSize) - return ret.pdc - - - \ No newline at end of file diff --git a/cave/com.raytheon.viz.pointdata/localization/pointdata/RefTimePointDataRetrieve.py b/cave/com.raytheon.viz.pointdata/localization/pointdata/RefTimePointDataRetrieve.py new file mode 100644 index 0000000000..d11b54d4cd --- /dev/null +++ b/cave/com.raytheon.viz.pointdata/localization/pointdata/RefTimePointDataRetrieve.py @@ -0,0 +1,91 @@ +## +# 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. +## + + +import PointDataView, PointDataContainer, NoDataException, PointDataRetrieve + +# +# Python module to request reference time point data. Split out of +# PointDataContainer.py. +# +# +# SOFTWARE HISTORY +# +# Date Ticket# Engineer Description +# ------------ ---------- ----------- -------------------------- +# 25Apr2012 14688 rferrel Initial Creation. +# +# +# + +class RefTimePointDataRetrieve(PointDataRetrieve.PointDataRetrieve): + + def __init__(self, pluginName, site, parameters, keyId='forecastHr', refTime=None, constraint={}, maxSize=99): + super(RefTimePointDataRetrieve, self).__init__(pluginName, site, parameters, keyId, refTime, constraint, maxSize) + + def _query(self, parameters, maxSize): + times = self.__queryRefTimes() + self.__javaPdc = self.__requestData(times, parameters, maxSize) + pdvDict = self._organizeData(self.__javaPdc) + self.pdc = PointDataContainer.PointDataContainer(pdvDict, self.__javaPdc, self.refTime) + + def __queryRefTimes(self): + from com.raytheon.uf.viz.core.catalog import CatalogQuery + return CatalogQuery.performQuery('dataTime.refTime', self._buildConstraints(None)) + + def __requestData(self, availableTimes, parameters, maxSize): + from com.raytheon.viz.pointdata import PointDataRequest + from java.lang import String + import jep + dts = self._createJarray(availableTimes, maxSize) + constraints = self._buildConstraints(None) #times are explicitly set so we don't need to constrain those + params = jep.jarray(len(parameters), String) + for i in range(len(parameters)): + params[i] = String(parameters[i]) + if self.site: + stations = jep.jarray(1, String) + stations[0] = String(self.site) + else: + stations = None + return PointDataRequest.requestPointData(dts, + self.pluginName, params, stations, + constraints) + + def _createJarray(self, availableTimes, maxSize): + from com.raytheon.uf.common.time import DataTime + import jep + length = len(availableTimes) + if maxSize > length: + sz = length + else: + sz = maxSize + dts = jep.jarray(sz, DataTime) + for i in range(sz): + dts[i] = DataTime(availableTimes[length-1-i]) + + return dts + + +def retrieve(pluginName, site, parameters, keyId='forecastHr', refTime=None, constraint={}, maxSize=99): + ret = RefTimePointDataRetrieve(pluginName, site, parameters, keyId, refTime, constraint, maxSize) + return ret.pdc + + + \ No newline at end of file diff --git a/cave/com.raytheon.viz.pointdata/src/com/raytheon/viz/pointdata/rsc/PlotResource.java b/cave/com.raytheon.viz.pointdata/src/com/raytheon/viz/pointdata/rsc/PlotResource.java index f787cc7d71..d0feff35d4 100644 --- a/cave/com.raytheon.viz.pointdata/src/com/raytheon/viz/pointdata/rsc/PlotResource.java +++ b/cave/com.raytheon.viz.pointdata/src/com/raytheon/viz/pointdata/rsc/PlotResource.java @@ -376,6 +376,8 @@ public class PlotResource extends .getGridRange().getHigh(0), 0, descriptor.getGridGeometry() .getGridRange().getHigh(1)); hasInited = true; + getCapability(MagnificationCapability.class); + getCapability(DensityCapability.class); } } diff --git a/cave/com.raytheon.viz.product.awips/awips.product b/cave/com.raytheon.viz.product.awips/awips.product index 48e99691ae..3cc36a42e4 100644 --- a/cave/com.raytheon.viz.product.awips/awips.product +++ b/cave/com.raytheon.viz.product.awips/awips.product @@ -16,7 +16,7 @@ -data @user.home/caveData -user @user.home/caveData -clean -consoleLog - -Xincgc -Xmx1024M -Dosgi.instance.area.readOnly=true + -Xincgc -Xmx1280M -Dosgi.instance.area.readOnly=true -Dosgi.hook.configurators.exclude=org.eclipse.core.runtime.internal.adaptor.EclipseLogHook,org.eclipse.core.runtime.internal.adaptor.EclipseErrorHandler -XX:+UnlockDiagnosticVMOptions -XX:+UnsyncloadClass -Dorg.eclipse.update.reconcile=false -XX:MaxPermSize=128m -Dorg.eclipse.ui/KEY_CONFIGURATION_ID=com.raytheon.viz.ui.awips.scheme -Dawips.mode=pypies -Dqpid.dest_syntax=BURL -Dcom.sun.management.jmxremote -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -XX:OnOutOfMemoryError="capture -t no -p $pid &" -Dfile.encoding=UTF-8 diff --git a/cave/com.raytheon.viz.product.awips/plugin_customization.ini b/cave/com.raytheon.viz.product.awips/plugin_customization.ini index d6e7d7bf5a..3bc0187d48 100644 --- a/cave/com.raytheon.viz.product.awips/plugin_customization.ini +++ b/cave/com.raytheon.viz.product.awips/plugin_customization.ini @@ -1,4 +1,6 @@ org.eclipse.ui/SHOW_PROGRESS_ON_STARTUP = true org.eclipse.ui/presentationFactoryId=com.raytheon.viz.ui.personalities.awips.VizPresentationFactory org.eclipse.ui/KEY_CONFIGURATION_ID=com.raytheon.viz.ui.awips.scheme -org.eclipse.ui.editors/lineNumberRuler=true \ No newline at end of file +org.eclipse.ui.editors/lineNumberRuler=true +org.eclipse.core.resources/snapshots.operations=2147483647 +org.eclipse.core.resources/description.snapshotinterval=2147483647 \ No newline at end of file diff --git a/cave/com.raytheon.viz.radar/localization/menus/radar/baseTerminalReflectivityMotion.xml b/cave/com.raytheon.viz.radar/localization/menus/radar/baseTerminalReflectivityMotion.xml index fb23a1802a..6c36c917d4 100644 --- a/cave/com.raytheon.viz.radar/localization/menus/radar/baseTerminalReflectivityMotion.xml +++ b/cave/com.raytheon.viz.radar/localization/menus/radar/baseTerminalReflectivityMotion.xml @@ -34,7 +34,7 @@ - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + - + diff --git a/cave/com.raytheon.viz.radar/localization/styleRules/radarImageryStyleRules.xml b/cave/com.raytheon.viz.radar/localization/styleRules/radarImageryStyleRules.xml index 8f29532b8b..38cc86c1b0 100644 --- a/cave/com.raytheon.viz.radar/localization/styleRules/radarImageryStyleRules.xml +++ b/cave/com.raytheon.viz.radar/localization/styleRules/radarImageryStyleRules.xml @@ -400,6 +400,10 @@ kg/m^2 + + + 4 + Radar/OSF/Digital VIL diff --git a/cave/com.raytheon.viz.radar/src/com/raytheon/viz/radar/interrogators/RadarDefaultInterrogator.java b/cave/com.raytheon.viz.radar/src/com/raytheon/viz/radar/interrogators/RadarDefaultInterrogator.java index cffd819e89..568179dd52 100644 --- a/cave/com.raytheon.viz.radar/src/com/raytheon/viz/radar/interrogators/RadarDefaultInterrogator.java +++ b/cave/com.raytheon.viz.radar/src/com/raytheon/viz/radar/interrogators/RadarDefaultInterrogator.java @@ -124,6 +124,7 @@ public class RadarDefaultInterrogator implements IRadarInterrogator { units = UnitFormat.getUCUMInstance().format(dispUnit); } if (dataValue == 0) { + dataMap.put("numericValue", null); dataValueString = "NO DATA"; } else if (th0 instanceof Float) { double f0 = (Float) th0; diff --git a/cave/com.raytheon.viz.radar/src/com/raytheon/viz/radar/interrogators/RadarVILInterrogator.java b/cave/com.raytheon.viz.radar/src/com/raytheon/viz/radar/interrogators/RadarVILInterrogator.java index 975e5cbc63..c822db39b2 100644 --- a/cave/com.raytheon.viz.radar/src/com/raytheon/viz/radar/interrogators/RadarVILInterrogator.java +++ b/cave/com.raytheon.viz.radar/src/com/raytheon/viz/radar/interrogators/RadarVILInterrogator.java @@ -27,8 +27,8 @@ import com.raytheon.uf.common.dataplugin.radar.RadarRecord; import com.raytheon.uf.viz.core.drawables.ColorMapParameters; /** - * For the VIL product, extending radarResource but having a separate - * interrogate function + * Use DigitalVILUnit object for conversion, this class will be removed in the + * future. * *
  * 
@@ -42,7 +42,7 @@ import com.raytheon.uf.viz.core.drawables.ColorMapParameters;
  * @author mnash
  * @version 1.0
  */
-
+@Deprecated
 public class RadarVILInterrogator extends RadarRasterInterrogator implements
         IRadarInterrogator {
 
diff --git a/cave/com.raytheon.viz.radar/src/com/raytheon/viz/radar/rsc/RadarProductFactory.java b/cave/com.raytheon.viz.radar/src/com/raytheon/viz/radar/rsc/RadarProductFactory.java
index 5706e5543c..15cec62b99 100644
--- a/cave/com.raytheon.viz.radar/src/com/raytheon/viz/radar/rsc/RadarProductFactory.java
+++ b/cave/com.raytheon.viz.radar/src/com/raytheon/viz/radar/rsc/RadarProductFactory.java
@@ -28,8 +28,6 @@ import com.raytheon.uf.common.status.UFStatus.Priority;
 import com.raytheon.uf.viz.core.exception.VizException;
 import com.raytheon.uf.viz.core.map.MapDescriptor;
 import com.raytheon.uf.viz.core.rsc.LoadProperties;
-import com.raytheon.uf.viz.core.status.StatusConstants;
-import com.raytheon.viz.radar.Activator;
 import com.raytheon.viz.radar.interrogators.IRadarInterrogator;
 import com.raytheon.viz.radar.interrogators.RadarDMDInterrogator;
 import com.raytheon.viz.radar.interrogators.RadarDefaultInterrogator;
@@ -38,7 +36,6 @@ import com.raytheon.viz.radar.interrogators.RadarGraphicInterrogator;
 import com.raytheon.viz.radar.interrogators.RadarPrecipInterrogator;
 import com.raytheon.viz.radar.interrogators.RadarRadialInterrogator;
 import com.raytheon.viz.radar.interrogators.RadarRasterInterrogator;
-import com.raytheon.viz.radar.interrogators.RadarVILInterrogator;
 import com.raytheon.viz.radar.interrogators.RadarVelocityInterrogator;
 import com.raytheon.viz.radar.interrogators.RadarXsectInterrogator;
 import com.raytheon.viz.radar.rsc.graphic.RadarGraphicsResource;
@@ -68,7 +65,8 @@ import com.raytheon.viz.radar.ui.xy.RadarXsectXYResource;
  */
 
 public class RadarProductFactory {
-    private static final transient IUFStatusHandler statusHandler = UFStatus.getHandler(RadarProductFactory.class);
+    private static final transient IUFStatusHandler statusHandler = UFStatus
+            .getHandler(RadarProductFactory.class);
 
     private static final List velocities = Arrays.asList(183, 182,
             154, 99, 56, 55, 27, 26, 25, 24, 23, 22);
@@ -86,8 +84,6 @@ public class RadarProductFactory {
             interrogator = new RadarXsectInterrogator();
         } else if (precips.contains(productCode)) {
             interrogator = new RadarPrecipInterrogator();
-        } else if (productCode == 134) {
-            interrogator = new RadarVILInterrogator();
         } else if (productCode == 135) {
             interrogator = new RadarEETInterrogator();
         } else if ("Radial".equals(format)) {
@@ -142,8 +138,8 @@ public class RadarProductFactory {
                         interrogator);
             }
         } else if ("Text".equals(format)) {
-            statusHandler.handle(Priority.EVENTA, format
-                            + " product #" + productCode);
+            statusHandler.handle(Priority.EVENTA, format + " product #"
+                    + productCode);
         } else {
             resource = new AbstractRadarResource(rrd, loadProps,
                     interrogator);
diff --git a/cave/com.raytheon.viz.radar/src/com/raytheon/viz/radar/rsc/mosaic/RadarMosaicRenderer.java b/cave/com.raytheon.viz.radar/src/com/raytheon/viz/radar/rsc/mosaic/RadarMosaicRenderer.java
index e44bb780f5..e1f58c89e1 100644
--- a/cave/com.raytheon.viz.radar/src/com/raytheon/viz/radar/rsc/mosaic/RadarMosaicRenderer.java
+++ b/cave/com.raytheon.viz.radar/src/com/raytheon/viz/radar/rsc/mosaic/RadarMosaicRenderer.java
@@ -149,6 +149,7 @@ public class RadarMosaicRenderer implements IRadarMosaicRenderer,
                 writeTo.setImagesToMosaic(images
                         .toArray(new DrawableImage[images.size()]));
                 lastExtent = paintProps.getView().getExtent().clone();
+                writeTo.setImageExtent(lastExtent);
 
                 Coordinate ul = new Coordinate(lastExtent.getMinX(),
                         lastExtent.getMaxY());
@@ -180,7 +181,8 @@ public class RadarMosaicRenderer implements IRadarMosaicRenderer,
         writeTo = target.getExtension(IRadarMosaicImageExtension.class)
                 .initializeRaster(
                         new int[] { paintProps.getCanvasBounds().width,
-                                paintProps.getCanvasBounds().height }, params);
+                                paintProps.getCanvasBounds().height },
+                        paintProps.getView().getExtent(), params);
     }
 
     @Override
diff --git a/cave/com.raytheon.viz.radar/src/com/raytheon/viz/radar/rsc/mosaic/ext/IRadarMosaicImageExtension.java b/cave/com.raytheon.viz.radar/src/com/raytheon/viz/radar/rsc/mosaic/ext/IRadarMosaicImageExtension.java
index fe0ef14d81..c0d3a883f7 100644
--- a/cave/com.raytheon.viz.radar/src/com/raytheon/viz/radar/rsc/mosaic/ext/IRadarMosaicImageExtension.java
+++ b/cave/com.raytheon.viz.radar/src/com/raytheon/viz/radar/rsc/mosaic/ext/IRadarMosaicImageExtension.java
@@ -20,8 +20,9 @@
 package com.raytheon.viz.radar.rsc.mosaic.ext;
 
 import com.raytheon.uf.viz.core.DrawableImage;
+import com.raytheon.uf.viz.core.IExtent;
 import com.raytheon.uf.viz.core.drawables.ColorMapParameters;
-import com.raytheon.uf.viz.core.drawables.IImage;
+import com.raytheon.uf.viz.core.drawables.IColormappedImage;
 import com.raytheon.uf.viz.core.drawables.ext.IImagingExtension;
 import com.raytheon.uf.viz.core.exception.VizException;
 
@@ -44,13 +45,24 @@ import com.raytheon.uf.viz.core.exception.VizException;
 
 public interface IRadarMosaicImageExtension extends IImagingExtension {
 
-    public static interface IMosaicImage extends IImage {
+    public static interface IMosaicImage extends IColormappedImage {
 
         public void setImagesToMosaic(DrawableImage... images);
 
+        public void setImageExtent(IExtent imageExtent);
+
     }
 
+    /**
+     * Creates a mosaic image with the given imageBounds and imageExtent
+     * 
+     * @param imageBounds
+     * @param imageExtent
+     * @param params
+     * @return
+     * @throws VizException
+     */
     public IMosaicImage initializeRaster(int[] imageBounds,
-            ColorMapParameters params) throws VizException;
+            IExtent imageExtent, ColorMapParameters params) throws VizException;
 
 }
diff --git a/cave/com.raytheon.viz.radar/src/com/raytheon/viz/radar/units/DigitalVilUnit.java b/cave/com.raytheon.viz.radar/src/com/raytheon/viz/radar/units/DigitalVilUnit.java
new file mode 100644
index 0000000000..aba9bfd98d
--- /dev/null
+++ b/cave/com.raytheon.viz.radar/src/com/raytheon/viz/radar/units/DigitalVilUnit.java
@@ -0,0 +1,158 @@
+package com.raytheon.viz.radar.units;
+
+import javax.measure.converter.UnitConverter;
+import javax.measure.quantity.Quantity;
+import javax.measure.unit.DerivedUnit;
+import javax.measure.unit.ProductUnit;
+import javax.measure.unit.SI;
+import javax.measure.unit.Unit;
+
+public class DigitalVilUnit extends DerivedUnit {
+
+    private static final long serialVersionUID = 1L;
+
+    private final float linearScale;
+
+    private final float linearOffset;
+
+    private final short logStart;
+
+    private final float logScale;
+
+    private final float logOffset;
+
+    public DigitalVilUnit(short[] thresholds) {
+        linearScale = vilShortToFloat(thresholds[0]);
+        linearOffset = vilShortToFloat(thresholds[1]);
+        logStart = thresholds[2];
+        logScale = vilShortToFloat(thresholds[3]);
+        logOffset = vilShortToFloat(thresholds[4]);
+    }
+
+    @Override
+    public Unit getStandardUnit() {
+        return new ProductUnit(SI.KILOGRAM.divide(SI.SQUARE_METRE));
+    }
+
+    @Override
+    public UnitConverter toStandardUnit() {
+        return new VilToStdConverter(this);
+    }
+
+    @Override
+    public int hashCode() {
+        final int prime = 31;
+        int result = 1;
+        result = prime * result + Float.floatToIntBits(linearOffset);
+        result = prime * result + Float.floatToIntBits(linearScale);
+        result = prime * result + Float.floatToIntBits(logOffset);
+        result = prime * result + Float.floatToIntBits(logScale);
+        result = prime * result + logStart;
+        return result;
+    }
+
+    @Override
+    public boolean equals(Object obj) {
+        if (this == obj)
+            return true;
+        if (obj == null)
+            return false;
+        if (getClass() != obj.getClass())
+            return false;
+        DigitalVilUnit other = (DigitalVilUnit) obj;
+        if (Float.floatToIntBits(linearOffset) != Float
+                .floatToIntBits(other.linearOffset))
+            return false;
+        if (Float.floatToIntBits(linearScale) != Float
+                .floatToIntBits(other.linearScale))
+            return false;
+        if (Float.floatToIntBits(logOffset) != Float
+                .floatToIntBits(other.logOffset))
+            return false;
+        if (Float.floatToIntBits(logScale) != Float
+                .floatToIntBits(other.logScale))
+            return false;
+        if (logStart != other.logStart)
+            return false;
+        return true;
+    }
+
+    public static float vilShortToFloat(short x) {
+        int s = (x >> 15) & 0x1;
+        int e = (x >> 10) & 0x1f;
+        int f = x & 0x3ff;
+
+        float value;
+        if (e == 0) {
+            value = (float) (Math.pow(-1, s) * 2 * (f / Math.pow(2, 10)));
+        } else {
+            value = (float) ((Math.pow(-1, s) * Math.pow(2, e - 16) * (1 + f
+                    / Math.pow(2, 10))));
+        }
+        return value;
+    }
+
+    private static class VilToStdConverter extends UnitConverter {
+
+        private static final long serialVersionUID = 1L;
+
+        private final DigitalVilUnit vilUnit;
+
+        public VilToStdConverter(DigitalVilUnit vilUnit) {
+            this.vilUnit = vilUnit;
+        }
+
+        @Override
+        public UnitConverter inverse() {
+            return new StdToVilConverter(vilUnit);
+        }
+
+        @Override
+        public double convert(double x) {
+            if (x < vilUnit.logStart) {
+                return (x - vilUnit.linearOffset) / vilUnit.linearScale;
+            } else {
+                return Math.exp((x - vilUnit.logOffset) / vilUnit.logScale);
+            }
+        }
+
+        @Override
+        public boolean isLinear() {
+            return false;
+        }
+
+    }
+
+    private static class StdToVilConverter extends UnitConverter {
+
+        private static final long serialVersionUID = 1L;
+
+        private final DigitalVilUnit vilUnit;
+
+        public StdToVilConverter(DigitalVilUnit vilUnit) {
+            this.vilUnit = vilUnit;
+        }
+
+        @Override
+        public UnitConverter inverse() {
+            return new VilToStdConverter(vilUnit);
+        }
+
+        @Override
+        public double convert(double x) {
+            if (x < inverse().convert(vilUnit.logStart)) {
+                return Math.round(x * vilUnit.linearScale
+                        + vilUnit.linearOffset);
+            } else {
+                return Math.round(vilUnit.logScale * Math.log(x)
+                        + vilUnit.logOffset);
+            }
+        }
+
+        @Override
+        public boolean isLinear() {
+            return false;
+        }
+
+    }
+}
diff --git a/cave/com.raytheon.viz.radar/src/com/raytheon/viz/radar/util/DataUtilities.java b/cave/com.raytheon.viz.radar/src/com/raytheon/viz/radar/util/DataUtilities.java
index 79969abf55..cb67153f69 100644
--- a/cave/com.raytheon.viz.radar/src/com/raytheon/viz/radar/util/DataUtilities.java
+++ b/cave/com.raytheon.viz.radar/src/com/raytheon/viz/radar/util/DataUtilities.java
@@ -30,14 +30,13 @@ import com.raytheon.uf.common.dataplugin.radar.level3.DataLevelThreshold;
 import com.raytheon.uf.common.status.IUFStatusHandler;
 import com.raytheon.uf.common.status.UFStatus;
 import com.raytheon.uf.common.status.UFStatus.Priority;
-import com.raytheon.uf.viz.core.status.StatusConstants;
 import com.raytheon.uf.viz.core.style.ParamLevelMatchCriteria;
 import com.raytheon.uf.viz.core.style.StyleManager;
 import com.raytheon.uf.viz.core.style.StyleRule;
 import com.raytheon.uf.viz.core.style.VizStyleException;
 import com.raytheon.viz.core.style.image.ImagePreferences;
 import com.raytheon.viz.core.units.PiecewisePixel;
-import com.raytheon.viz.radar.Activator;
+import com.raytheon.viz.radar.units.DigitalVilUnit;
 
 /**
  * TODO Add Description
@@ -56,7 +55,9 @@ import com.raytheon.viz.radar.Activator;
  */
 
 public class DataUtilities {
-    private static final transient IUFStatusHandler statusHandler = UFStatus.getHandler(DataUtilities.class);
+    private static final transient IUFStatusHandler statusHandler = UFStatus
+            .getHandler(DataUtilities.class);
+
     /**
      * Returns dataUnit with scale/offset accounted for.
      * 
@@ -155,6 +156,9 @@ public class DataUtilities {
             } else {
                 rval = new PiecewisePixel(record.getUnitObject(), pix, std);
             }
+        } else if (record.getProductCode() == 134) {
+            // Digital Vil is all messy in the spec.
+            rval = new DigitalVilUnit(record.getThresholds());
         } else if (record.getThreshold(5) == 0) {
             // The offset and scale are set as ints
             double offset = record.getThreshold(0);
diff --git a/cave/com.raytheon.viz.redbook/src/com/raytheon/viz/redbook/rsc/RedbookResource.java b/cave/com.raytheon.viz.redbook/src/com/raytheon/viz/redbook/rsc/RedbookResource.java
index 2add27c515..af465d02dd 100644
--- a/cave/com.raytheon.viz.redbook/src/com/raytheon/viz/redbook/rsc/RedbookResource.java
+++ b/cave/com.raytheon.viz.redbook/src/com/raytheon/viz/redbook/rsc/RedbookResource.java
@@ -149,9 +149,17 @@ public class RedbookResource extends
                                 + "Unable to load redbook mapping file", e);
                 return;
             }
-            RedbookWMOMap.Info info = map.mapping.get(wmo.getConstraintValue());
-            if (info != null && info.name != null)
-                this.humanReadableName = info.name;
+            for (String wmoStr : wmo.getConstraintValue().split(",")) {
+                wmoStr = wmoStr.trim();
+                if (wmoStr.isEmpty()) {
+                    continue;
+                }
+                RedbookWMOMap.Info info = map.mapping.get(wmoStr);
+                if (info != null && info.name != null) {
+                    this.humanReadableName = info.name;
+                    break;
+                }
+            }
         }
     }
 
diff --git a/cave/com.raytheon.viz.texteditor/src/com/raytheon/viz/texteditor/dialogs/AWIPSHeaderBlockDlg.java b/cave/com.raytheon.viz.texteditor/src/com/raytheon/viz/texteditor/dialogs/AWIPSHeaderBlockDlg.java
index 0d74cb925e..7bf7c1d750 100644
--- a/cave/com.raytheon.viz.texteditor/src/com/raytheon/viz/texteditor/dialogs/AWIPSHeaderBlockDlg.java
+++ b/cave/com.raytheon.viz.texteditor/src/com/raytheon/viz/texteditor/dialogs/AWIPSHeaderBlockDlg.java
@@ -86,6 +86,7 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog;
  * 06/28/2010   4639        cjeanbap    Allow user to create a new text product.
  * 
  * 01/26/2012   14468       D.Friedman  Fix initial BBB field selection.
+ * 05/30/2012   15046       D.Friedman  Always set addressee field to ALL.
  * 
* * @author lvenable @@ -448,7 +449,7 @@ public class AWIPSHeaderBlockDlg extends CaveSWTDialog implements addresseeTF.setTextLimit(4); addresseeTF.setLayoutData(rd); // Set the "default" addressee to "ALL". - addresseeTF.setText(parentEditor.getAddressee()); + addresseeTF.setText("ALL"); // When the number of characters enter reaches the max limit and // the caret position is at the end then switch focus to the next @@ -459,16 +460,8 @@ public class AWIPSHeaderBlockDlg extends CaveSWTDialog implements .getTextLimit()) { wmoTtaaiiTF.setFocus(); } - - // If the user changes the text in the addressee text field - // then "untoggle" the toggle buttons. - if (addresseeTF.getText().compareTo("000") != 0 - && addresseeTF.getText().compareTo("DEF") != 0 - && addresseeTF.getText().compareTo("ALL") != 0) { - zerosBtn.setSelection(false); - defBtn.setSelection(false); - allBtn.setSelection(false); - } + + handleAddresseeModified(); } }); @@ -518,6 +511,7 @@ public class AWIPSHeaderBlockDlg extends CaveSWTDialog implements addresseeTF.setText("ALL"); } }); + handleAddresseeModified(); Label sepLbl = new Label(shell, SWT.SEPARATOR | SWT.HORIZONTAL); sepLbl.setLayoutData(new GridData(GridData.FILL_HORIZONTAL)); @@ -945,4 +939,16 @@ public class AWIPSHeaderBlockDlg extends CaveSWTDialog implements } }); } + + private void handleAddresseeModified() { + // If the user changes the text in the addressee text field + // then update the toggle buttons. + String addressee = addresseeTF.getText(); + if (zerosBtn != null) + zerosBtn.setSelection("000".equals(addressee)); + if (defBtn != null) + defBtn.setSelection("DEF".equals(addressee)); + if (allBtn != null) + allBtn.setSelection("ALL".equals(addressee)); + } } diff --git a/cave/com.raytheon.viz.texteditor/src/com/raytheon/viz/texteditor/dialogs/TextEditorDialog.java b/cave/com.raytheon.viz.texteditor/src/com/raytheon/viz/texteditor/dialogs/TextEditorDialog.java index c253d58b81..84693ba7ad 100644 --- a/cave/com.raytheon.viz.texteditor/src/com/raytheon/viz/texteditor/dialogs/TextEditorDialog.java +++ b/cave/com.raytheon.viz.texteditor/src/com/raytheon/viz/texteditor/dialogs/TextEditorDialog.java @@ -275,6 +275,9 @@ import com.raytheon.viz.ui.dialogs.SWTMessageBox; * 11Nov2011 11552 rferrel Product no longer needs to be a RESEND in order to be sent. * 14Nov2011 11203 rferrel Header included when exporting a file while in edit mode. * 08Mar2012 14553 mhuang Add blank line between product header and body. + * 23Apr2012 14783 rferrel Allow line wrap at white space or hyphen. + * 24Apr2012 14548 rferrel Merging lines for wrap places a space beween words when needed. + * 27Apr2012 14902 rferrel No longer have blank line between AWIPS ID and UGC line. * * * @author lvenable @@ -336,6 +339,12 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener, private static final Pattern datePtrn = Pattern .compile("((\\d{1,2}\\d{2})(\\s(AM|PM)\\s(\\w{3})\\s\\w{3}\\s\\w{3}\\s{1,}\\d{1,2}\\s\\d{4}))"); + private static final Pattern noSeparatorPattern = Pattern + .compile("[^-\\s]"); + + private static final Pattern UGC_FIRST_LINE_PATTERN = Pattern + .compile("^[A-Z][A-Z0-9][CZ]\\d{3}[->].*-\\s*$"); + public static final String SAVED_SESSION_DIR = Activator.PLUGIN_ID + "/savedSession/"; @@ -595,11 +604,6 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener, private Integer otherCharWrapCol; - /** - * Num of blanks to add/remove to start of text. - */ - private int numberOfBlankLines; - /** * Font size sub-menu. */ @@ -3417,6 +3421,22 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener, }); + // TODO - Use this to convert tabs to spaces and extra spaces in the + // middle of a line to a single space? + // textEditor.addVerifyListener(new VerifyListener() { + // + // @Override + // public void verifyText(VerifyEvent e) { + // // TODO Auto-generated method stub + // if (performingWrap) { + // return; + // } + // System.out.println("start: " + e.start + ", end: " + e.end + // + " text:'" + e.text + "'"); + // + // } + // }); + sizeTextEditor(); textEditor.addVerifyKeyListener(new VerifyKeyListener() { @@ -4388,9 +4408,9 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener, if (!Boolean.TRUE.equals(wgcd.getReturnValue())) { return; } - + // DR14553 (make upper case in product) - String body = textEditor.getText().toUpperCase(); + String body = textEditor.getText().toUpperCase(); if (result) { removeOptionalFields(); @@ -4398,8 +4418,8 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener, /* update the vtec string in the message */ // DR14553 (make upper case in product) if (!resend) { - body = VtecUtil.getVtec( - removeSoftReturns(textEditor.getText().toUpperCase()), true); + body = VtecUtil.getVtec(removeSoftReturns(textEditor + .getText().toUpperCase()), true); } updateTextEditor(body); if ((inEditMode || resend) && saveEditedProduct(false, resend)) { @@ -4495,8 +4515,22 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener, } else if (textEditor.getCharCount() == 0) { return headerTF.getText(); } - return headerTF.getText() + "\n" - + textEditor.getText().toUpperCase().trim(); + StringBuilder body = new StringBuilder(); + body.append(headerTF.getText()).append("\n"); + String line = null; + for (int i = 0; i < textEditor.getLineCount(); ++i) { + line = textEditor.getLine(i).trim(); + if (line.length() > 0) { + break; + } + } + if (!UGC_FIRST_LINE_PATTERN.matcher(line).matches()) { + // DR_14902 Only add blank line when not a UGC line. + body.append("\n"); + } + body.append(textEditor.getText().trim()); + + return body.toString(); } /** @@ -4522,10 +4556,7 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener, replaceWorkProductId(); originalText = combineOriginalMessage(); if (warnGenFlag == true) { - originalText = headerTF.getText() + "\n"; - for (int i = 0; i < numberOfBlankLines; i++) - originalText += "\n"; - originalText += removeSoftReturns(textEditor.getText()); + originalText = removeSoftReturns(originalText); } } } @@ -4582,10 +4613,7 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener, : combineOriginalMessage(); if (warnGenFlag == true && resend == false) { - productText = headerTF.getText() + "\n"; - for (int i = 0; i < numberOfBlankLines; i++) - productText += "\n"; - productText += removeSoftReturns(textEditor.getText()); + productText = removeSoftReturns(productText); } if (!isAutoSave) { @@ -4623,27 +4651,6 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener, + statusBarLabel.getText().substring(startIndex); } - // DR_14553: Add blank line between product header and body if it - // does not exist in curren product - String[] results = productText.split("\n"); - int numLines = results.length; - String wmoHead = results[0]; - String awipsId = results[1]; - String thirdLine = results[2].trim(); - char[] charLine = thirdLine.toCharArray(); - int thirdLineSize = charLine.length; - String body = ""; - String line = ""; - if (thirdLineSize != 0) { - String header = wmoHead + "\n" + awipsId + "\n\n"; - body = header; - for (int i = 2; i< numLines; ++i) { - line = results[i]; - line += "\n"; - body = body.concat(line); - } - productText = body; - } storedProduct.setProduct(productText.trim()); /* @@ -5014,7 +5021,7 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener, // consists of the rest of the text product beyond the line(s) // of text in the header. try { - numberOfBlankLines = -1; + int numberOfBlankLines = -1; String line = null; do { numberOfBlankLines++; @@ -6552,6 +6559,9 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener, return rval; } + // Allow the verify listener on the text editor to ignore wrapping. + // private boolean performingWrap = false; + /** * rewrap the paragraph(s) starting from the line containing the character * at the offset start and ending in the pargraph with the line containing @@ -6567,6 +6577,7 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener, if (this.standardWrapRegex == null) { recompileRegex(); } + // performingWrap = true; int lineNumber = textEditor.getLineAtOffset(start); endWrapLine = textEditor.getLineAtOffset(end); rewrapInternal(lineNumber); @@ -6584,6 +6595,7 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener, // but make sure current caret position is visible. textEditor.setCaretOffset(caret); textEditor.showSelection(); + // performingWrap = false; } /** @@ -6621,7 +6633,7 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener, } if (inLocations && paragraphStartLineNumber == lineNumber) { - // Keep LOCATIONS frist line short & don't paste more to it. + // Keep LOCATIONS first line short & don't paste more to it. if (line.indexOf("...") == line.lastIndexOf("...")) { return; } @@ -6743,7 +6755,19 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener, deleteLen += padding.length(); } String beforeReplace = textEditor.getText(); - textEditor.replaceTextRange(newlinePosition, deleteLen, ""); + String endLine = textEditor.getText(newlinePosition - 1, + newlinePosition - 1); + String startNextLine = textEditor.getText(newlinePosition + + deleteLen, newlinePosition + deleteLen); + String wordSpace = ""; + if (noSeparatorPattern.matcher(endLine).matches() + && noSeparatorPattern.matcher(startNextLine) + .matches()) { + // Put a space between words when merging the lines. + wordSpace = " "; + } + textEditor.replaceTextRange(newlinePosition, deleteLen, + wordSpace); String afterReplace = textEditor.getText(); // if the textEditor (StyledText) did not make the change @@ -6953,7 +6977,7 @@ public class TextEditorDialog extends CaveSWTDialog implements VerifyListener, */ private void recompileRegex() { this.standardWrapRegex = Pattern.compile("( |..).{1," - + (charWrapCol - 3) + "}\\s"); + + (charWrapCol - 3) + "}(\\s|-)"); this.locationsFirstRegex = Pattern.compile("^\\* LOCATIONS [^\\.]{1," + (charWrapCol - 13) + "}\\s"); this.locationsBodyRegex = Pattern.compile("(( |..).{1," diff --git a/cave/com.raytheon.viz.ui.tools.nav/plugin.xml b/cave/com.raytheon.viz.ui.tools.nav/plugin.xml index e699792a30..7edf58a88f 100644 --- a/cave/com.raytheon.viz.ui.tools.nav/plugin.xml +++ b/cave/com.raytheon.viz.ui.tools.nav/plugin.xml @@ -57,24 +57,6 @@ - - - - - - - - - - - - @@ -109,19 +86,5 @@ class="com.raytheon.viz.ui.tools.nav.ZoomTool" commandId="com.raytheon.viz.ui.tools.nav.ZoomTool"> - - - - - - diff --git a/cave/com.raytheon.viz.ui.tools.nav/src/com/raytheon/viz/ui/tools/nav/PropertyTester3D.java b/cave/com.raytheon.viz.ui.tools.nav/src/com/raytheon/viz/ui/tools/nav/PropertyTester3D.java deleted file mode 100644 index 84dc691600..0000000000 --- a/cave/com.raytheon.viz.ui.tools.nav/src/com/raytheon/viz/ui/tools/nav/PropertyTester3D.java +++ /dev/null @@ -1,73 +0,0 @@ -/** - * 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.viz.ui.tools.nav; - -import org.eclipse.core.expressions.PropertyTester; - -import com.raytheon.uf.viz.core.IDisplayPaneContainer; -import com.raytheon.uf.viz.core.drawables.IDescriptor; -import com.raytheon.viz.core.CorePlugin; -import com.raytheon.viz.core.preferences.PreferenceConstants; -import com.raytheon.viz.ui.EditorUtil; - -/** - * @author randerso - * - */ -public class PropertyTester3D extends PropertyTester { - - /** - * - */ - public PropertyTester3D() { - // TODO Auto-generated constructor stub - } - - /* - * (non-Javadoc) - * - * @see org.eclipse.core.expressions.IPropertyTester#test(java.lang.Object, - * java.lang.String, java.lang.Object[], java.lang.Object) - */ - @Override - public boolean test(Object receiver, String property, Object[] args, - Object expectedValue) { - Boolean result = false; - if ("is3DEnabled".equals(property)) { - result = CorePlugin.getDefault().getPreferenceStore() - .getBoolean(PreferenceConstants.P_ENABLE_3D); - } else if ("in3DMode".equals(property)) { - IDisplayPaneContainer container = EditorUtil - .getActiveVizContainer(); - if (container != null) { - IDescriptor descriptor = container.getActiveDisplayPane() - .getDescriptor(); - result = (descriptor.getGridGeometry() - .getCoordinateReferenceSystem().getCoordinateSystem() - .getDimension() == 3); - } - } - return result.equals(expectedValue); - } - -} diff --git a/cave/com.raytheon.viz.ui.tools.nav/src/com/raytheon/viz/ui/tools/nav/ShiftRollYaw.java b/cave/com.raytheon.viz.ui.tools.nav/src/com/raytheon/viz/ui/tools/nav/ShiftRollYaw.java deleted file mode 100644 index 03b2e3b42c..0000000000 --- a/cave/com.raytheon.viz.ui.tools.nav/src/com/raytheon/viz/ui/tools/nav/ShiftRollYaw.java +++ /dev/null @@ -1,187 +0,0 @@ -/** - * 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.viz.ui.tools.nav; - -import com.raytheon.uf.viz.core.IView; -import com.raytheon.uf.viz.core.IView.POVShiftType; -import com.raytheon.uf.viz.core.drawables.IDescriptor; -import com.raytheon.uf.viz.core.map.IMapDescriptor; -import com.raytheon.viz.ui.input.InputAdapter; -import com.raytheon.viz.ui.tools.AbstractModalTool; - -/** - * Activate panning support in the editor - * - *
- * SOFTWARE HISTORY
- * Date       	Ticket#		Engineer	Description
- * ------------	----------	-----------	--------------------------
- * 7/1/06                   chammack    Initial Creation.
- * 
- * 
- * - * @author chammack - * @version 1 - */ -public class ShiftRollYaw extends AbstractModalTool { - - /** The mouse handler */ - private final PanHandler thePanHandler; - - /** - * Constructor - * - */ - public ShiftRollYaw() { - super(); - thePanHandler = new PanHandler(); - } - - @Override - protected void activateTool() { - editor.registerMouseHandler(thePanHandler); - } - - /* - * (non-Javadoc) - * - * @see com.raytheon.viz.ui.tools.AbstractModalTool#deactivateTool() - */ - @Override - public void deactivateTool() { - if (editor != null) - editor.unregisterMouseHandler(thePanHandler); - } - - public class PanHandler extends InputAdapter { - - float theLastMouseX = 0; - - float theLastMouseY = 0; - - double[] lookatCoord = new double[] { 0.0, 0.0, 0.0 }; - - private boolean fDown = false; - - /* - * (non-Javadoc) - * - * @see com.raytheon.viz.ui.input.IInputHandler#handleMouseDown(int, - * int, int) - */ - @Override - public boolean handleMouseDown(int aX, int aY, int button) { - if (button != 1 && button != 2) - return false; - - IDescriptor id = editor.getActiveDisplayPane().getDescriptor(); - if (!(id instanceof IMapDescriptor)) { - return false; - } - - // if (button == 2) { - // float deltaY = theLastMouseY - aY; - // - // double[] lookatCoord = ((IMapDescriptor) id) - // .getMapCoords(editor.getActiveDisplayPane().getTarget() - // .createRayFromMouse(new double[] { aX, aY })); - // - // // editor.getActiveDisplayPane().setLookAt(lookatCoord); - // } - - theLastMouseX = aX; - theLastMouseY = aY; - - return true; - } - - /* - * (non-Javadoc) - * - * @see com.raytheon.viz.ui.input.IInputHandler#handleMouseDownMove(int, - * int, int) - */ - @Override - public boolean handleMouseDownMove(int aX, int aY, int button) { - - IDescriptor id = editor.getActiveDisplayPane().getDescriptor(); - if (!(id instanceof IMapDescriptor)) { - return false; - } - - POVShiftType type = IView.POVShiftType.BOTH; - if (button == 2) { - type = IView.POVShiftType.EYE; - } - - if (fDown) { - type = IView.POVShiftType.FOCUS; - - } - editor.getActiveDisplayPane().shiftPOV( - new double[] { theLastMouseX, theLastMouseY }, - new double[] { aX, aY }, type); - - theLastMouseX = aX; - theLastMouseY = aY; - return true; - } - - /* - * (non-Javadoc) - * - * @see com.raytheon.viz.ui.mouse.IMouseHandler#handleDoubleClick(int, - * int) - */ - public boolean handleDoubleClick(int x, int y) { - editor.getActiveDisplayPane().setLookAt(new double[] { x, y }); - return true; - - } - - /* - * (non-Javadoc) - * - * @see com.raytheon.viz.ui.input.IInputHandler#handleKeyDown(int) - */ - public boolean handleKeyDown(int keyCode) { - if ((char) keyCode == 'f') { - this.fDown = true; - } - return false; - } - - /* - * (non-Javadoc) - * - * @see com.raytheon.viz.ui.input.IInputHandler#handleKeyUp(int) - */ - public boolean handleKeyUp(int keyCode) { - - if ((char) keyCode == 'f') { - this.fDown = false; - } - return false; - } - - } - -} diff --git a/cave/com.raytheon.viz.ui/src/com/raytheon/viz/ui/DetachedViewListener.java b/cave/com.raytheon.viz.ui/src/com/raytheon/viz/ui/DetachedViewListener.java index 9d0a3331e6..ec638da690 100644 --- a/cave/com.raytheon.viz.ui/src/com/raytheon/viz/ui/DetachedViewListener.java +++ b/cave/com.raytheon.viz.ui/src/com/raytheon/viz/ui/DetachedViewListener.java @@ -71,8 +71,10 @@ public class DetachedViewListener implements Listener, IWindowListener, // We switched shells, add and or remove shell listeners. // Don't add or remove listeners from the windowShell if (activeShell != windowShell) { - activeShell.removeListener(SWT.Activate, this); - activeShell.removeListener(SWT.Deactivate, this); + if (!activeShell.isDisposed()) { + activeShell.removeListener(SWT.Activate, this); + activeShell.removeListener(SWT.Deactivate, this); + } } activeShell = partShell; if (partShell != windowShell) { diff --git a/cave/com.raytheon.viz.ui/src/com/raytheon/viz/ui/actions/AbstractDropDownMenuHandler.java b/cave/com.raytheon.viz.ui/src/com/raytheon/viz/ui/actions/AbstractDropDownMenuHandler.java new file mode 100644 index 0000000000..ee71edd299 --- /dev/null +++ b/cave/com.raytheon.viz.ui/src/com/raytheon/viz/ui/actions/AbstractDropDownMenuHandler.java @@ -0,0 +1,89 @@ +/** + * 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.viz.ui.actions; + +import org.eclipse.core.commands.AbstractHandler; +import org.eclipse.core.commands.ExecutionEvent; +import org.eclipse.core.commands.ExecutionException; +import org.eclipse.jface.action.IMenuListener; +import org.eclipse.jface.action.IMenuManager; +import org.eclipse.jface.action.MenuManager; +import org.eclipse.swt.graphics.Point; +import org.eclipse.swt.widgets.Event; +import org.eclipse.swt.widgets.Menu; +import org.eclipse.swt.widgets.ToolItem; +import org.eclipse.ui.PlatformUI; +import org.eclipse.ui.menus.CommandContributionItem; +import org.eclipse.ui.menus.IMenuService; + +/** + * + * A handler for toolitems that drop down a menu when the item is clicked. + * + *
+ * 
+ * SOFTWARE HISTORY
+ * 
+ * Date         Ticket#    Engineer    Description
+ * ------------ ---------- ----------- --------------------------
+ * Apr 3, 2012            bsteffen     Initial creation
+ * 
+ * 
+ * + * @author bsteffen + * @version 1.0 + */ +public abstract class AbstractDropDownMenuHandler extends AbstractHandler { + + @Override + public Object execute(ExecutionEvent event) throws ExecutionException { + // This function has been unfortunately adapted from + // CommandContributionItem.openDropDownMenu + if (event.getTrigger() instanceof Event) { + Event e = (Event) event.getTrigger(); + if (e.widget instanceof ToolItem) { + ToolItem ti = (ToolItem) e.widget; + if (ti.getData() instanceof CommandContributionItem) { + CommandContributionItem cci = (CommandContributionItem) ti + .getData(); + final String id = cci.getId(); + final MenuManager menuManager = new MenuManager(); + + Menu menu = menuManager.createContextMenu(ti.getParent()); + menuManager.addMenuListener(new IMenuListener() { + public void menuAboutToShow(IMenuManager manager) { + ((IMenuService) PlatformUI.getWorkbench() + .getService(IMenuService.class)) + .populateContributionManager(menuManager, + "menu:" + id); + } + }); + + // position the menu below the drop down item + Point point = ti.getParent().toDisplay( + new Point(ti.getBounds().x, ti.getBounds().height)); + menu.setLocation(point.x, point.y); + menu.setVisible(true); + } + } + } + return null; + } +} diff --git a/cave/com.raytheon.viz.ui/src/com/raytheon/viz/ui/actions/AbstractGlobalsButtonHandler.java b/cave/com.raytheon.viz.ui/src/com/raytheon/viz/ui/actions/AbstractGlobalsButtonHandler.java index de4494aa9c..24aedf5726 100644 --- a/cave/com.raytheon.viz.ui/src/com/raytheon/viz/ui/actions/AbstractGlobalsButtonHandler.java +++ b/cave/com.raytheon.viz.ui/src/com/raytheon/viz/ui/actions/AbstractGlobalsButtonHandler.java @@ -21,9 +21,6 @@ package com.raytheon.viz.ui.actions; import java.util.Map; -import org.eclipse.core.commands.AbstractHandler; -import org.eclipse.core.commands.ExecutionEvent; -import org.eclipse.core.commands.ExecutionException; import org.eclipse.ui.IWorkbenchWindow; import org.eclipse.ui.commands.IElementUpdater; import org.eclipse.ui.menus.UIElement; @@ -48,8 +45,9 @@ import com.raytheon.viz.ui.UiUtil; * @author mschenke * @version 1.0 */ -public abstract class AbstractGlobalsButtonHandler extends AbstractHandler - implements IGlobalChangedListener, IElementUpdater { +public abstract class AbstractGlobalsButtonHandler extends + AbstractDropDownMenuHandler implements IGlobalChangedListener, + IElementUpdater { private UIElement lastElement; @@ -62,19 +60,6 @@ public abstract class AbstractGlobalsButtonHandler extends AbstractHandler VizGlobalsManager.addListener(globalsId, this); } - /* - * (non-Javadoc) - * - * @see - * org.eclipse.core.commands.IHandler#execute(org.eclipse.core.commands. - * ExecutionEvent) - */ - @Override - public Object execute(ExecutionEvent event) throws ExecutionException { - // Default execute does nothing - return null; - } - /* * (non-Javadoc) * diff --git a/cave/com.raytheon.viz.ui/src/com/raytheon/viz/ui/dialogs/ColormapComp.java b/cave/com.raytheon.viz.ui/src/com/raytheon/viz/ui/dialogs/ColormapComp.java index a61bffb80e..bbeb3deda3 100644 --- a/cave/com.raytheon.viz.ui/src/com/raytheon/viz/ui/dialogs/ColormapComp.java +++ b/cave/com.raytheon.viz.ui/src/com/raytheon/viz/ui/dialogs/ColormapComp.java @@ -219,18 +219,9 @@ public class ColormapComp { LocalizationFile[] files = ColorMapLoader.listColorMapFiles(); for (LocalizationFile file : files) { - String level = null; - String context = null; List actualItems = new ArrayList(); - if (file.getContext().getLocalizationLevel().isSystemLevel() == false) { - level = file.getContext().getLocalizationLevel().name(); - context = file.getContext().getContextName(); - actualItems.add(level); - actualItems.add(context); - } - String[] split = ColorMapLoader.shortenName(file).split("[/\\\\]"); // Win32 Menu lastParent = cmapPopupMenu; diff --git a/cave/com.raytheon.viz.ui/src/com/raytheon/viz/ui/panes/VizDisplayPane.java b/cave/com.raytheon.viz.ui/src/com/raytheon/viz/ui/panes/VizDisplayPane.java index a64ec118e1..34767a7438 100644 --- a/cave/com.raytheon.viz.ui/src/com/raytheon/viz/ui/panes/VizDisplayPane.java +++ b/cave/com.raytheon.viz.ui/src/com/raytheon/viz/ui/panes/VizDisplayPane.java @@ -60,7 +60,6 @@ import com.raytheon.uf.viz.core.IDisplayPaneContainer; import com.raytheon.uf.viz.core.IExtent; import com.raytheon.uf.viz.core.IGraphicsTarget; import com.raytheon.uf.viz.core.IRenderableDisplayChangedListener.DisplayChangeType; -import com.raytheon.uf.viz.core.IView.POVShiftType; import com.raytheon.uf.viz.core.PixelExtent; import com.raytheon.uf.viz.core.VizApp; import com.raytheon.uf.viz.core.drawables.IDescriptor; @@ -586,17 +585,6 @@ public class VizDisplayPane implements IDisplayPane { this.target.setNeedsRefresh(true); } - /* - * (non-Javadoc) - * - * @see com.raytheon.viz.core.gl.IDisplayPane#shiftPOV(double, double) - */ - public void shiftPOV(double[] start, double[] end, POVShiftType type) { - if (renderableDisplay.shiftPOV(start, end, type, this.target)) { - this.target.setNeedsRefresh(true); - } - } - /* * (non-Javadoc) * @@ -885,16 +873,6 @@ public class VizDisplayPane implements IDisplayPane { return this.canvas.getDisplay(); } - /* - * (non-Javadoc) - * - * @see com.raytheon.viz.core.IDisplayPane#setLookAt(double[]) - */ - @Override - public void setLookAt(double[] point) { - renderableDisplay.setFocalPoint(point, this.target); - } - /** * Scale this pane's display to the display bounds. */ diff --git a/cave/com.raytheon.viz.volumebrowser/src/com/raytheon/viz/volumebrowser/datacatalog/AbstractDataCatalog.java b/cave/com.raytheon.viz.volumebrowser/src/com/raytheon/viz/volumebrowser/datacatalog/AbstractDataCatalog.java index 2e7b82fb44..59fb910d24 100644 --- a/cave/com.raytheon.viz.volumebrowser/src/com/raytheon/viz/volumebrowser/datacatalog/AbstractDataCatalog.java +++ b/cave/com.raytheon.viz.volumebrowser/src/com/raytheon/viz/volumebrowser/datacatalog/AbstractDataCatalog.java @@ -25,6 +25,7 @@ import java.util.Collection; import java.util.Collections; import java.util.HashMap; import java.util.HashSet; +import java.util.List; import java.util.Set; import com.raytheon.uf.common.dataplugin.level.Level; @@ -306,9 +307,15 @@ public abstract class AbstractDataCatalog implements IDataCatalog { name.append(String.format(" %s %s", catalogEntry.getSelectedData() .getPlanesText(), catalogEntry.getSelectedData() .getFieldsText())); - - String displayTypeAbbreviation = DisplayType - .getAbbreviation(displayType); + List displayTypes = catalogEntry.getSelectedData() + .getDisplayTypes(); + String displayTypeAbbreviation = null; + if (displayTypes == null || displayTypes.isEmpty() + || !displayTypes.get(0).equals(displayType)) { + // If this is the first display type in the list then it is the + // default and should not show up in the legend. + displayTypeAbbreviation = DisplayType.getAbbreviation(displayType); + } if (displayTypeAbbreviation != null && displayTypeAbbreviation.length() > 0) { name.append(" " + displayTypeAbbreviation); @@ -389,12 +396,12 @@ public abstract class AbstractDataCatalog implements IDataCatalog { styleType = StyleManager.StyleType.IMAGERY; } - if (displayType.equals(DisplayType.BARB) - || displayType.equals(DisplayType.DUALARROW) - || displayType.equals(DisplayType.ARROW)) { + if (displayType.equals(DisplayType.BARB) + || displayType.equals(DisplayType.DUALARROW) + || displayType.equals(DisplayType.ARROW)) { styleType = StyleManager.StyleType.ARROW; } - + if (catalogEntry.getDialogSettings().getViewSelection() == ViewMenu.TIMESERIES || catalogEntry.getDialogSettings().getViewSelection() == ViewMenu.VARVSHGT) { styleType = StyleManager.StyleType.GRAPH; diff --git a/cave/com.raytheon.viz.volumebrowser/src/com/raytheon/viz/volumebrowser/datacatalog/GribDataCatalog.java b/cave/com.raytheon.viz.volumebrowser/src/com/raytheon/viz/volumebrowser/datacatalog/GribDataCatalog.java index 9006de54e8..8d593b40c0 100644 --- a/cave/com.raytheon.viz.volumebrowser/src/com/raytheon/viz/volumebrowser/datacatalog/GribDataCatalog.java +++ b/cave/com.raytheon.viz.volumebrowser/src/com/raytheon/viz/volumebrowser/datacatalog/GribDataCatalog.java @@ -60,7 +60,7 @@ import com.raytheon.viz.grid.rsc.GribSkewTLoadProperties; import com.raytheon.viz.grid.rsc.GridNameGenerator; import com.raytheon.viz.grid.rsc.GridResourceData; import com.raytheon.viz.grid.util.CoverageUtils; -import com.raytheon.viz.volumebrowser.util.FieldDisplayTypesFactory; +import com.raytheon.viz.grid.xml.FieldDisplayTypesFactory; import com.raytheon.viz.volumebrowser.vbui.MenuItemManager; import com.raytheon.viz.volumebrowser.vbui.SelectedData; import com.raytheon.viz.volumebrowser.vbui.VBMenuBarItemsMgr.SpaceTimeMenu; diff --git a/cave/com.raytheon.viz.volumebrowser/src/com/raytheon/viz/volumebrowser/datacatalog/ModelSoundingCatalog.java b/cave/com.raytheon.viz.volumebrowser/src/com/raytheon/viz/volumebrowser/datacatalog/ModelSoundingCatalog.java index 19fc783632..31e1987eb4 100644 --- a/cave/com.raytheon.viz.volumebrowser/src/com/raytheon/viz/volumebrowser/datacatalog/ModelSoundingCatalog.java +++ b/cave/com.raytheon.viz.volumebrowser/src/com/raytheon/viz/volumebrowser/datacatalog/ModelSoundingCatalog.java @@ -20,18 +20,26 @@ package com.raytheon.viz.volumebrowser.datacatalog; import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.Map.Entry; import com.raytheon.uf.common.dataquery.requests.DbQueryRequest; import com.raytheon.uf.common.dataquery.requests.RequestConstraint; import com.raytheon.uf.common.dataquery.responses.DbQueryResponse; +import com.raytheon.uf.common.pointdata.spatial.SurfaceObsLocation; import com.raytheon.uf.common.status.UFStatus.Priority; import com.raytheon.uf.viz.core.exception.VizException; import com.raytheon.uf.viz.core.requests.ThriftClient; +import com.raytheon.viz.pointdata.StaticPlotInfoPV; +import com.raytheon.viz.pointdata.StaticPlotInfoPV.SPIEntry; import com.raytheon.viz.volumebrowser.vbui.SelectedData; import com.raytheon.viz.volumebrowser.vbui.VBMenuBarItemsMgr.ViewMenu; +import com.raytheon.viz.volumebrowser.xml.VbSource; +import com.raytheon.viz.volumebrowser.xml.VbSourceList; /** * Catalog for model sounding data @@ -169,26 +177,83 @@ public class ModelSoundingCatalog extends PointDataCatalog { if (typeMap == null) { long t0 = System.currentTimeMillis(); typeMap = new HashMap(); - DbQueryRequest request = new DbQueryRequest(); - request.setDistinct(true); - Map constraints = new HashMap(); - constraints.put("pluginName", new RequestConstraint(pluginName)); - request.addRequestField(typeKey); - request.setConstraints(constraints); try { - DbQueryResponse response = (DbQueryResponse) ThriftClient - .sendRequest(request); - for (Map result : response.getResults()) { - String type = String.valueOf(result.get(typeKey)); - typeMap.put(pluginName + type, type); + // The code in this try block is an optimization for the current + // version of postgres. Currently there are only two types, GFS + // and ETA, if you query for all distinct types it can take as + // long as 12 seconds. If you query for the types one at a time + // then it takes less than 100ms for each of the two queries. + DbQueryRequest request = new DbQueryRequest(); + request.setDistinct(true); + request.setLimit(1); + request.addConstraint("pluginName", new RequestConstraint( + pluginName)); + request.addRequestField(typeKey); + for (VbSource source : VbSourceList.getInstance().getEntries()) { + if (source.getKey().startsWith(pluginName)) { + String type = source.getKey().replace(pluginName, ""); + request.addConstraint(typeKey, new RequestConstraint( + type)); + DbQueryResponse response = (DbQueryResponse) ThriftClient + .sendRequest(request); + if (!response.getResults().isEmpty()) { + typeMap.put(source.getKey(), type); + } + } } } catch (VizException e) { - statusHandler.handle(Priority.PROBLEM, e.getLocalizedMessage(), - e); + // If something went wrong try to just query for all distinct + // types. + DbQueryRequest request = new DbQueryRequest(); + request.setDistinct(true); + request.addConstraint("pluginName", new RequestConstraint( + pluginName)); + request.addRequestField(typeKey); + try { + DbQueryResponse response = (DbQueryResponse) ThriftClient + .sendRequest(request); + for (Map result : response.getResults()) { + String type = String.valueOf(result.get(typeKey)); + typeMap.put(pluginName + type, type); + } + } catch (VizException e1) { + statusHandler.handle(Priority.PROBLEM, + e1.getLocalizedMessage(), e1); + } } System.out.println("Time to populate typeMap = " + (System.currentTimeMillis() - t0) + "ms"); } return typeMap; } + + @Override + protected SurfaceObsLocation[] getStationLocations(String sourceKey) { + if (availableStations.containsKey(sourceKey)) { + return availableStations.get(sourceKey); + } + if (!Arrays.asList(getPlugins(null)).contains(getPlugin(sourceKey))) { + availableStations.put(sourceKey, null); + return null; + } + StaticPlotInfoPV spipv = StaticPlotInfoPV + .readStaticPlotInfoPV("basemaps/modelBufr.spi"); + if (spipv == null) { + return super.getStationLocations(sourceKey); + } + List locs = new ArrayList(); + for (Entry entry : spipv.getSpiList().entrySet()) { + SurfaceObsLocation loc = new SurfaceObsLocation(); + loc.setStationId(entry.getKey()); + loc.setLatitude(entry.getValue().latlon.y); + loc.setLongitude(entry.getValue().latlon.x); + locs.add(loc); + } + Collections.sort(locs, locComparator); + SurfaceObsLocation[] result = locs.toArray(new SurfaceObsLocation[0]); + availableStations.put(sourceKey, result); + return result; + + } + } diff --git a/cave/com.raytheon.viz.volumebrowser/src/com/raytheon/viz/volumebrowser/datacatalog/PointDataCatalog.java b/cave/com.raytheon.viz.volumebrowser/src/com/raytheon/viz/volumebrowser/datacatalog/PointDataCatalog.java index d0f3ded83e..906e4ff64d 100644 --- a/cave/com.raytheon.viz.volumebrowser/src/com/raytheon/viz/volumebrowser/datacatalog/PointDataCatalog.java +++ b/cave/com.raytheon.viz.volumebrowser/src/com/raytheon/viz/volumebrowser/datacatalog/PointDataCatalog.java @@ -79,6 +79,15 @@ public class PointDataCatalog extends AbstractInventoryDataCatalog { protected static final transient IUFStatusHandler statusHandler = UFStatus .getHandler(PointDataCatalog.class); + protected static final Comparator locComparator = new Comparator() { + + @Override + public int compare(SurfaceObsLocation o1, SurfaceObsLocation o2) { + return Double.compare(o1.getLatitude(), o2.getLatitude()); + } + + }; + protected Map availableStations = new HashMap(); @Override @@ -180,16 +189,7 @@ public class PointDataCatalog extends AbstractInventoryDataCatalog { target.setLatitude(coordinate.y); target.setLongitude(coordinate.x); int index = Arrays.binarySearch(availableStations, target, - new Comparator() { - - @Override - public int compare(SurfaceObsLocation o1, - SurfaceObsLocation o2) { - return Double.compare(o1.getLatitude(), - o2.getLongitude()); - } - - }); + locComparator); if (index < 1) { index = -index; } diff --git a/cave/com.raytheon.viz.volumebrowser/src/com/raytheon/viz/volumebrowser/vbui/DataListsProdTableComp.java b/cave/com.raytheon.viz.volumebrowser/src/com/raytheon/viz/volumebrowser/vbui/DataListsProdTableComp.java index a1b88d3c06..fe13e9b9e4 100644 --- a/cave/com.raytheon.viz.volumebrowser/src/com/raytheon/viz/volumebrowser/vbui/DataListsProdTableComp.java +++ b/cave/com.raytheon.viz.volumebrowser/src/com/raytheon/viz/volumebrowser/vbui/DataListsProdTableComp.java @@ -87,7 +87,7 @@ import com.raytheon.viz.volumebrowser.xml.VbSourceList; * @version 1.0 */ public class DataListsProdTableComp extends Composite implements - IDataMenuAction, IDataListProdTable { + IDataMenuAction { private static final transient IUFStatusHandler statusHandler = UFStatus .getHandler(DataListsProdTableComp.class); @@ -173,8 +173,6 @@ public class DataListsProdTableComp extends Composite implements private final DataSelection data; - private final boolean performAutoSelect = true; - public boolean hasSelectedIndexes() { if (list != null && list.getSelectedIndexes() != null) { return list.getSelectedIndexes().length > 0; @@ -550,7 +548,6 @@ public class DataListsProdTableComp extends Composite implements * Clear the Fields list and re-enable the menu items. Also clear the * products table. */ - @Override public void clearFieldsList(boolean updateMenu) { currentDataSelection = DataSelection.FIELDS; fieldControl.list.clearList(); @@ -565,7 +562,6 @@ public class DataListsProdTableComp extends Composite implements * Clear the Planes list and re-enable the menu items. Also clear the * products table. */ - @Override public void clearPlanesList(boolean updateMenu) { currentDataSelection = DataSelection.PLANES; planeControl.list.clearList(); @@ -580,7 +576,6 @@ public class DataListsProdTableComp extends Composite implements * Deselect all of the items in the Sources, Fields, and Planes lists. Also * clear the products table. */ - @Override public void deselectAllListItems() { sourceControl.list.deselectAll(); fieldControl.list.deselectAll(); @@ -591,7 +586,6 @@ public class DataListsProdTableComp extends Composite implements /** * Select all of the items in the Sources, Fields, and Planes lists. */ - @Override public void selectAllListItems() { sourceControl.list.selectAll(); fieldControl.list.selectAll(); @@ -918,41 +912,6 @@ public class DataListsProdTableComp extends Composite implements return currentDataSelection; } - /** - * Pack the table. - */ - @Override - public void packTable() { - prodTable.packTable(); - } - - /** - * Resize the table columns. - */ - @Override - public void resizeTableColumns() { - prodTable.resizeTableColumns(); - } - - /** - * Clear the product table. - */ - @Override - public void clearProductTable() { - prodTable.clearProductTable(); - } - - /** - * Remove a product from the product table. - * - * @param key - * Key to remove the product from the product table. - */ - @Override - public void removeProduct(String key) { - prodTable.removeProduct(key); - } - /** * Add product to the products table. */ @@ -961,16 +920,8 @@ public class DataListsProdTableComp extends Composite implements final ArrayList selectedDataArray = getSelectedData(); if (selectedDataArray.isEmpty() == false) { - for (final SelectedData selectedData : selectedDataArray) { - getDisplay().asyncExec(new Runnable() { - - @Override - public void run() { - prodTable.addProduct(selectedData); - - } - - }); + for (SelectedData selectedData : selectedDataArray) { + prodTable.addProduct(selectedData); } } @@ -1005,24 +956,16 @@ public class DataListsProdTableComp extends Composite implements uniqueKey = createUniqueKey(sourcesSelIdx[i], fieldsSelIdx[j], planesSelIdx[k]); - /* - * If the product table does not contain the product key - * then we need to add the information to the selected data - * array. - */ - if (prodTable.containsProduct(uniqueKey) == false) { - selData = new SelectedData( - sourceControl.list - .getItemText(sourcesSelIdx[i]), - sourceControl.list.getKey(sourcesSelIdx[i]), - fieldControl.list.getItemText(fieldsSelIdx[j]), - fieldControl.list.getKey(fieldsSelIdx[j]), - planeControl.list.getItemText(planesSelIdx[k]), - planeControl.list.getKey(planesSelIdx[k]), - uniqueKey); + selData = new SelectedData( + sourceControl.list.getItemText(sourcesSelIdx[i]), + sourceControl.list.getKey(sourcesSelIdx[i]), + fieldControl.list.getItemText(fieldsSelIdx[j]), + fieldControl.list.getKey(fieldsSelIdx[j]), + planeControl.list.getItemText(planesSelIdx[k]), + planeControl.list.getKey(planesSelIdx[k]), + uniqueKey); - selectedData.add(selData); - } + selectedData.add(selData); } } } @@ -1096,17 +1039,6 @@ public class DataListsProdTableComp extends Composite implements } } - /** - * Check if the product table contains a product that matched a key. - * - * @param key - * Unique key used to check for existing products. - */ - @Override - public boolean containsProduct(String key) { - return prodTable.containsProduct(key); - } - /** * Refreshes the menus to indicate which menus are available based on the * currently selected menus and data that is available @@ -1220,13 +1152,8 @@ public class DataListsProdTableComp extends Composite implements markAvailableData(plane, planeControl); } - /** - * - * @return a list of currently selected products, an empty list if nothing - * is selected. - */ - public List getSelectedProducts() { - return prodTable.getSelectedData(); + public ProductTableComp getProductTable() { + return prodTable; } } diff --git a/cave/com.raytheon.viz.volumebrowser/src/com/raytheon/viz/volumebrowser/vbui/IDataListProdTable.java b/cave/com.raytheon.viz.volumebrowser/src/com/raytheon/viz/volumebrowser/vbui/IDataListProdTable.java deleted file mode 100644 index f3c11ad3ab..0000000000 --- a/cave/com.raytheon.viz.volumebrowser/src/com/raytheon/viz/volumebrowser/vbui/IDataListProdTable.java +++ /dev/null @@ -1,81 +0,0 @@ -/** - * 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.viz.volumebrowser.vbui; - -import com.raytheon.viz.volumebrowser.vbui.VBMenuBarItemsMgr.SpaceTimeMenu; -import com.raytheon.viz.volumebrowser.vbui.VBMenuBarItemsMgr.ViewMenu; - -/** - * - * Interface for using the DataListsProdTableComp class. - * - *
- * 
- * SOFTWARE HISTORY
- * Date         Ticket#    Engineer    Description
- * ------------ ---------- ----------- --------------------------
- * May 27, 2009 #2161      lvenable     Initial creation
- * 
- * 
- * - * @author lvenable - * @version 1.0 - */ -public interface IDataListProdTable extends IProductTable { - /** - * Clear all of the lists. - */ - void clearAllLists(); - - /** - * Clear the Sources list. - */ - void clearSourcesList(boolean updateMenu); - - /** - * Clear the Fields list. - */ - void clearFieldsList(boolean updateMenu); - - /** - * Clear the planes list. - */ - void clearPlanesList(boolean updateMenu); - - /** - * Deselect all list items. - */ - void deselectAllListItems(); - - /** - * Select all list items. - */ - void selectAllListItems(); - - /** - * Update the toolbar menus. - * - * @param settings - * The selected "setting". - * @param spaceTime - * Space or Time. - */ - void updateToolbarMenus(ViewMenu settings, SpaceTimeMenu spaceTime); -} diff --git a/cave/com.raytheon.viz.volumebrowser/src/com/raytheon/viz/volumebrowser/vbui/IProductTable.java b/cave/com.raytheon.viz.volumebrowser/src/com/raytheon/viz/volumebrowser/vbui/IProductTable.java deleted file mode 100644 index fbe042dfd8..0000000000 --- a/cave/com.raytheon.viz.volumebrowser/src/com/raytheon/viz/volumebrowser/vbui/IProductTable.java +++ /dev/null @@ -1,68 +0,0 @@ -/** - * 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.viz.volumebrowser.vbui; - -/** - * - * Use to interface with Product table. - * - *
- *
- * SOFTWARE HISTORY
- *
- * Date         Ticket#    Engineer    Description
- * ------------ ---------- ----------- --------------------------
- * May 27, 2009 #2161      lvenable     Initial creation
- *
- * 
- * - * @author lvenable - * @version 1.0 - */ -public interface IProductTable -{ - /** - * Resize the product table columns. - */ - void resizeTableColumns(); - - /** - * Clear the product table. - */ - void clearProductTable(); - - /** - * Pack the product table. - */ - void packTable(); - - /** - * Remove a specific product from the product table. - * @param key Unique key. - */ - void removeProduct(String key); - - /** - * Check if the product table contains a specific product. - * @param key Unique product key. - * @return True if the product is available, false otherwise. - */ - boolean containsProduct(String key); -} diff --git a/cave/com.raytheon.viz.volumebrowser/src/com/raytheon/viz/volumebrowser/vbui/IProductTableAction.java b/cave/com.raytheon.viz.volumebrowser/src/com/raytheon/viz/volumebrowser/vbui/IProductTableAction.java deleted file mode 100644 index 42894b2753..0000000000 --- a/cave/com.raytheon.viz.volumebrowser/src/com/raytheon/viz/volumebrowser/vbui/IProductTableAction.java +++ /dev/null @@ -1,50 +0,0 @@ -/** - * 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.viz.volumebrowser.vbui; - -import java.util.HashMap; - -import com.raytheon.uf.common.dataquery.requests.RequestConstraint; - -/** - * - * Interface ised to add products to the product table. - * - *
- *
- * SOFTWARE HISTORY
- *
- * Date         Ticket#    Engineer    Description
- * ------------ ---------- ----------- --------------------------
- * May 27, 2009 #2161      lvenable     Initial creation
- *
- * 
- * - * @author lvenable - * @version 1.0 - */ -public interface IProductTableAction -{ - /** - * Add product. - * @param selectedData Selected data from the Sources, Fields, and Planes lists. - */ - void addProduct(SelectedData selectedData); -} diff --git a/cave/com.raytheon.viz.volumebrowser/src/com/raytheon/viz/volumebrowser/vbui/ProductTableComp.java b/cave/com.raytheon.viz.volumebrowser/src/com/raytheon/viz/volumebrowser/vbui/ProductTableComp.java index 9fa6646035..50680b3d83 100644 --- a/cave/com.raytheon.viz.volumebrowser/src/com/raytheon/viz/volumebrowser/vbui/ProductTableComp.java +++ b/cave/com.raytheon.viz.volumebrowser/src/com/raytheon/viz/volumebrowser/vbui/ProductTableComp.java @@ -21,10 +21,14 @@ package com.raytheon.viz.volumebrowser.vbui; import java.util.ArrayList; import java.util.Arrays; -import java.util.HashMap; +import java.util.HashSet; import java.util.List; +import java.util.Set; import org.eclipse.core.commands.ExecutionException; +import org.eclipse.core.runtime.IProgressMonitor; +import org.eclipse.core.runtime.IStatus; +import org.eclipse.core.runtime.Status; import org.eclipse.core.runtime.jobs.IJobChangeEvent; import org.eclipse.core.runtime.jobs.Job; import org.eclipse.core.runtime.jobs.JobChangeAdapter; @@ -54,6 +58,7 @@ import org.eclipse.ui.IEditorPart; import com.raytheon.uf.viz.core.DescriptorMap; import com.raytheon.uf.viz.core.IDisplayPane; +import com.raytheon.uf.viz.core.VizApp; import com.raytheon.uf.viz.core.drawables.AbstractRenderableDisplay; import com.raytheon.uf.viz.core.drawables.ResourcePair; import com.raytheon.uf.viz.core.exception.VizException; @@ -113,8 +118,22 @@ import com.vividsolutions.jts.geom.LineString; * @author lvenable * @version 1.0 */ -public class ProductTableComp extends Composite implements IProductTable, - IProductTableAction { +public class ProductTableComp extends Composite { + + /** + * Set the number of columns in the table. + */ + private static final int prodSelTableColumnCount = 3; + + /** + * Width of the "Times" table column. + */ + private static final int timesColWidth = 100; + + /** + * Width of the "Inventory" column. + */ + private static final int inventoryColWidth = 150; /** * Product selection table containing the product generated by the Source, @@ -128,32 +147,11 @@ public class ProductTableComp extends Composite implements IProductTable, */ private boolean[] prodSelIdxArray = new boolean[0]; - /** - * This is used to get the mouse coordinate when right-clicking on the - * table. - */ - private final Point tableMousePt = new Point(0, 0); - /** * Popup menu that appears when right-clicking on a table item. */ private Menu popupMenu; - /** - * Set the number of columns in the table. - */ - private final int prodSelTableColumnCount = 3; - - /** - * Width of the "Times" table column. - */ - private final int timesColWidth = 100; - - /** - * Width of the "Inventory" column. - */ - private final int inventoryColWidth = 150; - /** * Label displaying the total product available. */ @@ -179,16 +177,11 @@ public class ProductTableComp extends Composite implements IProductTable, */ private Font tiFont; - /** - * Parent composite. - */ - private final Composite parentComp; - /** * The product key is a unique string that is used to identify if a product * is already in the table. */ - private HashMap productKeyMap; + private Set productKeySet; /** * Array of Product Table Data. @@ -204,8 +197,6 @@ public class ProductTableComp extends Composite implements IProductTable, public ProductTableComp(Composite parentComp) { super(parentComp, 0); - this.parentComp = parentComp; - initializeComponents(); } @@ -289,7 +280,7 @@ public class ProductTableComp extends Composite implements IProductTable, private void initializeData() { tiFont = new Font(this.getDisplay(), "Fixed", 10, SWT.BOLD); - productKeyMap = new HashMap(); + productKeySet = new HashSet(); tableDataArray = new ArrayList(); } @@ -331,9 +322,8 @@ public class ProductTableComp extends Composite implements IProductTable, // The the table item associated with the mouse position // when the mouse // is right clicked. - tableMousePt.x = me.x; - tableMousePt.y = me.y; - TableItem item = prodSelTable.getItem(tableMousePt); + TableItem item = prodSelTable + .getItem(new Point(me.x, me.y)); // Check if there is a table item where the mouse button was // clicked. @@ -370,9 +360,8 @@ public class ProductTableComp extends Composite implements IProductTable, // The the table item associated with the mouse position // when the mouse // is right clicked. - tableMousePt.x = me.x; - tableMousePt.y = me.y; - TableItem item = prodSelTable.getItem(tableMousePt); + TableItem item = prodSelTable + .getItem(new Point(me.x, me.y)); // Check if there is a table item where the mouse button was // clicked. @@ -760,8 +749,7 @@ public class ProductTableComp extends Composite implements IProductTable, private void displayInventotyForProduct(TableItem tableItem) { ProductTableData tableData = getProductData(tableItem); - InventoryDlg inventoryDlg = new InventoryDlg(parentComp.getShell(), - tableData); + InventoryDlg inventoryDlg = new InventoryDlg(getShell(), tableData); inventoryDlg.open(); } @@ -1123,7 +1111,6 @@ public class ProductTableComp extends Composite implements IProductTable, * Resize the table columns. This will maintain sizes for the Times and * Inventory columns. The products column will adjust in size. */ - @Override public void resizeTableColumns() { Rectangle tableBounds = prodSelTable.getBounds(); @@ -1136,22 +1123,22 @@ public class ProductTableComp extends Composite implements IProductTable, /** * Clear the products table. */ - @Override public void clearProductTable() { - productKeyMap.clear(); - tableDataArray.clear(); - prodSelTable.removeAll(); + synchronized (productKeySet) { + productKeySet.clear(); + tableDataArray.clear(); + prodSelTable.removeAll(); - prodSelIdxArray = new boolean[0]; + prodSelIdxArray = new boolean[0]; - updateLoadButtonAndProductLabels(); + updateLoadButtonAndProductLabels(); + } } /** * Pack the table. This will resize the table to fit as the display changes * size due to menu changes. */ - @Override public void packTable() { prodSelTable.pack(); } @@ -1162,35 +1149,11 @@ public class ProductTableComp extends Composite implements IProductTable, * @param key * Product key used to identify the product to be deleted. */ - @Override public void removeProduct(String key) { removeProductFromDataArray(key); updateLoadButtonAndProductLabels(); } - /** - * Remove products from the table that match the specified keys. - * - * @param productsKeys - * Array of product keys. - */ - public void removeProducts(String[] productsKeys) { - for (String key : productsKeys) { - removeProductFromDataArray(key); - } - } - - /** - * Check if the table contains a specified product. - * - * @param key - * Product key used to identify the product. - * @return True if the product is in the table, false otherwise. - */ - public boolean containsProduct(String key) { - return productKeyMap.containsKey(key); - } - /** * Remove a product from the table data array. * @@ -1198,74 +1161,89 @@ public class ProductTableComp extends Composite implements IProductTable, * Product key used to identify the product. */ private void removeProductFromDataArray(String key) { - productKeyMap.remove(key); + synchronized (productKeySet) { - for (int i = 0; i < tableDataArray.size(); i++) { - if (tableDataArray.get(i).hasUniqueKey(key) == true) { - tableDataArray.remove(i); - prodSelTable.remove(i); - updateRemovedProductIndex(); - break; + productKeySet.remove(key); + + for (int i = 0; i < tableDataArray.size(); i++) { + if (tableDataArray.get(i).hasUniqueKey(key) == true) { + tableDataArray.remove(i); + prodSelTable.remove(i); + updateRemovedProductIndex(); + break; + } } } } protected void addProduct(final ProductTableData tblData) { - tableDataArray.add(tblData); - - productKeyMap.put(tblData.getSelectedData().getUniqueKey(), null); - - final TableItem ti = new TableItem(prodSelTable, SWT.NONE); - - ti.setText(0, tblData.getTime()); - ti.setText(1, tblData.getName()); - ti.setFont(2, tiFont); - ti.setText(2, tblData.getProductInventory().getInventoryStatusString()); - - ti.addDisposeListener(new DisposeListener() { - - @Override - public void widgetDisposed(DisposeEvent e) { - tblData.getProductInventory().cancelUpdateJob(); + synchronized (productKeySet) { + String uniqueKey = tblData.getSelectedData().getUniqueKey(); + if (!productKeySet.contains(uniqueKey)) { + return; } - - }); - - final Runnable updateInventoryStrings = new Runnable() { - /* - * (non-Javadoc) - * - * @see java.lang.Runnable#run() - */ - @Override - public void run() { - try { - ti.setText(0, tblData.getProductInventory() - .getLatestForecastTime()); - ti.setText(2, tblData.getProductInventory() - .getInventoryStatusString()); - updateScrollBar(); - } catch (SWTException e) { - if (!e.getMessage().contains("Widget is disposed")) { - throw e; - } + for (ProductTableData existing : tableDataArray) { + if (existing.getSelectedData().getUniqueKey() + .equals(tblData.getSelectedData().getUniqueKey())) { + // Do not add if it is already in the table + return; } } - }; + tableDataArray.add(tblData); - tblData.getProductInventory().addJobChangeListener( - new JobChangeAdapter() { - @Override - public void done(IJobChangeEvent event) { - getDisplay().asyncExec(updateInventoryStrings); + final TableItem ti = new TableItem(prodSelTable, SWT.NONE); + + ti.setText(0, tblData.getTime()); + ti.setText(1, tblData.getName()); + ti.setFont(2, tiFont); + ti.setText(2, tblData.getProductInventory() + .getInventoryStatusString()); + + ti.addDisposeListener(new DisposeListener() { + + @Override + public void widgetDisposed(DisposeEvent e) { + tblData.getProductInventory().cancelUpdateJob(); + } + + }); + + final Runnable updateInventoryStrings = new Runnable() { + /* + * (non-Javadoc) + * + * @see java.lang.Runnable#run() + */ + @Override + public void run() { + try { + ti.setText(0, tblData.getProductInventory() + .getLatestForecastTime()); + ti.setText(2, tblData.getProductInventory() + .getInventoryStatusString()); + updateScrollBar(); + } catch (SWTException e) { + if (!e.getMessage().contains("Widget is disposed")) { + throw e; + } } - }); + } + }; - updateInventoryStrings.run(); + tblData.getProductInventory().addJobChangeListener( + new JobChangeAdapter() { + @Override + public void done(IJobChangeEvent event) { + getDisplay().asyncExec(updateInventoryStrings); + } + }); - ti.setData(tblData); + updateInventoryStrings.run(); - selectNewTableItem(); + ti.setData(tblData); + + selectNewTableItem(); + } } /** @@ -1276,16 +1254,32 @@ public class ProductTableComp extends Composite implements IProductTable, * @param selectedData * Data that contains Sources, Fields, and Planes information. */ - @Override - public void addProduct(SelectedData selectedData) { - - IDataCatalogEntry catalogEntry = DataCatalogManager - .getDataCatalogManager().getDataCatalogEntry(selectedData); - if (catalogEntry == null) { - return; + public void addProduct(final SelectedData selectedData) { + synchronized (productKeySet) { + if (productKeySet.contains(selectedData.getUniqueKey())) { + return; + } + productKeySet.add(selectedData.getUniqueKey()); } + new Job("Loading Product...") { + @Override + protected IStatus run(IProgressMonitor monitor) { + final IDataCatalogEntry catalogEntry = DataCatalogManager + .getDataCatalogManager().getDataCatalogEntry( + selectedData); + if (catalogEntry != null) { + VizApp.runAsync(new Runnable() { - addProduct(new ProductTableData(catalogEntry)); + @Override + public void run() { + addProduct(new ProductTableData(catalogEntry)); + } + }); + } + return Status.OK_STATUS; + } + + }.schedule(); } diff --git a/cave/com.raytheon.viz.volumebrowser/src/com/raytheon/viz/volumebrowser/vbui/SelectedData.java b/cave/com.raytheon.viz.volumebrowser/src/com/raytheon/viz/volumebrowser/vbui/SelectedData.java index 25ec358cc0..bc47831b61 100644 --- a/cave/com.raytheon.viz.volumebrowser/src/com/raytheon/viz/volumebrowser/vbui/SelectedData.java +++ b/cave/com.raytheon.viz.volumebrowser/src/com/raytheon/viz/volumebrowser/vbui/SelectedData.java @@ -22,7 +22,7 @@ package com.raytheon.viz.volumebrowser.vbui; import java.util.List; import com.raytheon.uf.viz.core.rsc.DisplayType; -import com.raytheon.viz.volumebrowser.util.FieldDisplayTypesFactory; +import com.raytheon.viz.grid.xml.FieldDisplayTypesFactory; /** * diff --git a/cave/com.raytheon.viz.volumebrowser/src/com/raytheon/viz/volumebrowser/vbui/VolumeBrowserDlg.java b/cave/com.raytheon.viz.volumebrowser/src/com/raytheon/viz/volumebrowser/vbui/VolumeBrowserDlg.java index 913925b2e7..590051bde8 100644 --- a/cave/com.raytheon.viz.volumebrowser/src/com/raytheon/viz/volumebrowser/vbui/VolumeBrowserDlg.java +++ b/cave/com.raytheon.viz.volumebrowser/src/com/raytheon/viz/volumebrowser/vbui/VolumeBrowserDlg.java @@ -168,7 +168,7 @@ public class VolumeBrowserDlg extends CaveSWTDialog implements shell.addControlListener(new ControlAdapter() { @Override public void controlResized(ControlEvent e) { - listTableComp.resizeTableColumns(); + getProductTable().resizeTableColumns(); } }); @@ -196,7 +196,7 @@ public class VolumeBrowserDlg extends CaveSWTDialog implements @Override protected void preOpened() { // Resize the product table columns. - listTableComp.resizeTableColumns(); + getProductTable().resizeTableColumns(); // Set the shell's minimum size so the controls cannot be hidden. shell.setMinimumSize(shell.getSize()); @@ -255,8 +255,8 @@ public class VolumeBrowserDlg extends CaveSWTDialog implements @Override public void widgetSelected(SelectionEvent event) { - List selectedProducts = (listTableComp) - .getSelectedProducts(); + List selectedProducts = getProductTable() + .getSelectedData(); new CloneDialog(new Shell(SWT.MODELESS), selectedProducts) .open(); } @@ -560,7 +560,7 @@ public class VolumeBrowserDlg extends CaveSWTDialog implements /* * Clear the Times/Product Selection/Inventory lists. */ - listTableComp.clearProductTable(); + getProductTable().clearProductTable(); } /** @@ -575,7 +575,7 @@ public class VolumeBrowserDlg extends CaveSWTDialog implements /* * Clear the Times/Product Selection/Inventory lists. */ - listTableComp.clearProductTable(); + getProductTable().clearProductTable(); } /** @@ -590,7 +590,7 @@ public class VolumeBrowserDlg extends CaveSWTDialog implements /* * Clear the Times/Product Selection/Inventory lists. */ - listTableComp.clearProductTable(); + getProductTable().clearProductTable(); } /** @@ -605,7 +605,7 @@ public class VolumeBrowserDlg extends CaveSWTDialog implements /* * Clear the Times/Product Selection/Inventory lists. */ - listTableComp.clearProductTable(); + getProductTable().clearProductTable(); } /** @@ -613,7 +613,7 @@ public class VolumeBrowserDlg extends CaveSWTDialog implements * selection table. */ private void selectNone() { - listTableComp.clearProductTable(); + getProductTable().clearProductTable(); listTableComp.deselectAllListItems(); listTableComp.updateMenuInventory(); @@ -822,9 +822,9 @@ public class VolumeBrowserDlg extends CaveSWTDialog implements MenuItem mi = (MenuItem) event.getSource(); updateMenu(mi); dialogSettings.setPointsSelection(mi); - VbUtil.getDataListsProdTableComp().clearProductTable(); - VbUtil.getDataListsProdTableComp().addProductsToTable(); - VbUtil.getDataListsProdTableComp().updateMenuInventory(); + getProductTable().clearProductTable(); + listTableComp.addProductsToTable(); + listTableComp.updateMenuInventory(); } }); } @@ -871,12 +871,12 @@ public class VolumeBrowserDlg extends CaveSWTDialog implements if (packShellFlag == true) { - listTableComp.packTable(); + getProductTable().packTable(); shell.layout(); shell.pack(); - listTableComp.resizeTableColumns(); + getProductTable().resizeTableColumns(); shell.setMinimumSize(shell.getSize()); } @@ -895,6 +895,10 @@ public class VolumeBrowserDlg extends CaveSWTDialog implements return listTableComp; } + protected ProductTableComp getProductTable() { + return getListTableComp().getProductTable(); + } + @Override public void updateValue(IWorkbenchWindow window, Object value) { LoadMode mode = (LoadMode) value; diff --git a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gis/Area.java b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gis/Area.java index 369370bcaa..951197ee00 100644 --- a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gis/Area.java +++ b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gis/Area.java @@ -49,7 +49,6 @@ import com.raytheon.uf.viz.core.exception.VizException; import com.raytheon.viz.warngen.gui.WarngenLayer; import com.raytheon.viz.warngen.suppress.SuppressMap; import com.raytheon.viz.warngen.util.Abbreviation; -import com.vividsolutions.jts.geom.Coordinate; import com.vividsolutions.jts.geom.Geometry; /** @@ -70,6 +69,8 @@ import com.vividsolutions.jts.geom.Geometry; * Apr 11, 2012 #14691 Qinglu lin Extra code were added to handle marine warnings as * MarineZones shapefiles have no FE_AREA. * Apr 13, 2012 #14691 Qinglu lin Added code for two more fe_area: er and nr. + * May 4, 2012 #14887 Qinglu lin Changed 0.25 to 0.60 for DEFAULT_PORTION_TOLERANCE; + * added code to pass a Envelope calculatePortion(). * * * @@ -84,7 +85,7 @@ public class Area { * If an area greater than this percentage of the area is covered, no * direction is included */ - public static final double DEFAULT_PORTION_TOLERANCE = 0.25; + public static final double DEFAULT_PORTION_TOLERANCE = 0.60; private Area() { @@ -215,11 +216,8 @@ public class Area { double tolerCheck = regionGeom.getArea() * DEFAULT_PORTION_TOLERANCE; if (areaIntersection < tolerCheck) { - Coordinate centroidOfIntersection = intersection.getCentroid() - .getCoordinate(); area.partOfArea = GisUtil.asStringList(GisUtil - .calculatePortion(regionGeom, centroidOfIntersection, - area.suppress)); + .calculatePortion(regionGeom, intersection, area.suppress)); } // Search the parent region diff --git a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gis/GisUtil.java b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gis/GisUtil.java index b78c9f4afb..94f2df9d37 100644 --- a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gis/GisUtil.java +++ b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gis/GisUtil.java @@ -56,6 +56,8 @@ import com.vividsolutions.jts.geom.Polygon; * they're in Eastern Hemisphere; invoke * it in convertCoords(). * Feb 29, 2012 #13596 Qinglu Lin Added restoreAlaskaLon(). + * May 9, 2012 #14887 Qinglu Lin Change 0.1 to 0.16875f for PORTION_OF_CENTER; + * 0.10 to 0.0625 for EXTREME_DELTA; Added/modified code. * * * @author chammack @@ -63,13 +65,29 @@ import com.vividsolutions.jts.geom.Polygon; */ public class GisUtil { - private static final float PORTION_OF_CENTER = 0.1f; - + private static final float PORTION_OF_CENTER = 0.16875f; + private static final float DIRECTION_DELTA = 15; - private static final float EXTREME_DELTA = 0.10f; + private static final float EXTREME_DELTA = 0.0625f; private static final double CONTAINS_PERCENTAGE = 0.1; + + // When both xDirection and yDirection are Direction.CENTRAL, for a rectangle + // polygon, MIN1 is the maximum value of either distanceX or distanceY + // for EnumSet.of(xDirection,yDirection) to be returned. + private static final float MIN1 = 0.01f; + + // When both xDirection and yDirection are Direction.CENTRAL, for a right triangle + // polygon, MIN2 is the maximum value of both distanceX and distanceY + // for EnumSet.of(xDirection,yDirection) to be returned. + private static final float MIN2 = 0.045f; + + // When yDirection is NORTH or SOUTH, in order to add CENTRAL to retval, required + // minimum ratio of width of intersection envelope to that of county envelope; + // when xDirection is EAST or WEST, in order to add CENTRAL to retval, required + // minimum ratio of height of intersection envelope to that of county envelope; + private static final float RATIO = 0.5f; public static enum Direction { CENTRAL, NORTH, SOUTH, EAST, WEST, EXTREME @@ -117,15 +135,18 @@ public class GisUtil { } public static EnumSet calculatePortion(Geometry geom, - Coordinate point) { - return calculatePortion(geom, point, SuppressMap.NONE); + Geometry geom2) { + return calculatePortion(geom, geom2, SuppressMap.NONE); } public static EnumSet calculatePortion(Geometry geom, - Coordinate point, String suppressType) { + Geometry intersection, String suppressType) { Direction xDirection = null; Direction yDirection = null; + Coordinate point = intersection.getCentroid().getCoordinate(); + Envelope env = intersection.getEnvelopeInternal(); + Coordinate centroid = geom.getCentroid().getCoordinate(); Envelope envelope = geom.getEnvelopeInternal(); double approximateWidth = envelope.getWidth(); @@ -134,21 +155,28 @@ public class GisUtil { double distanceX = Math.abs(centroid.x - point.x); double distanceY = Math.abs(centroid.y - point.y); - double centerThresholdX = (approximateWidth * PORTION_OF_CENTER); - double centerThresholdY = (approximateHeight * PORTION_OF_CENTER); - double extremaThresholdX = (approximateWidth * EXTREME_DELTA); - double extremaThresholdY = (approximateHeight * EXTREME_DELTA); + double centerThresholdX = approximateWidth * PORTION_OF_CENTER; + double centerThresholdY = approximateHeight * PORTION_OF_CENTER; + double extremaThresholdX = approximateWidth * EXTREME_DELTA; + double extremaThresholdY = approximateHeight * EXTREME_DELTA; - if ((distanceX < centerThresholdX)) { - xDirection = Direction.CENTRAL; - } - if ((distanceY < centerThresholdY)) { - yDirection = Direction.CENTRAL; + if (distanceX < centerThresholdX) { + xDirection = Direction.CENTRAL; + if (distanceY < centerThresholdY) + yDirection = Direction.CENTRAL; } - if (xDirection != null && yDirection != null) - return EnumSet.of(xDirection, yDirection); - + if (xDirection != null && yDirection != null) { + // Both xDirection equals Direction.CENTRAL and yDirection equals Direction.CENTRAL + // calculated above is not always correct for returning EnumSet.of(xDirection,yDirection). + // The following 'if statement' filters out some cases. + if (distanceX < MIN1 || distanceY < MIN1 || (distanceX < MIN2 && distanceY < MIN2)) + return EnumSet.of(xDirection,yDirection); + } + + xDirection = null; + yDirection = null; + GeodeticCalculator gc = new GeodeticCalculator(); gc.setStartingGeographicPoint(centroid.x, centroid.y); gc.setDestinationGeographicPoint(point.x, point.y); @@ -190,7 +218,6 @@ public class GisUtil { break; } } - } EnumSet retVal = EnumSet.noneOf(Direction.class); @@ -202,6 +229,28 @@ public class GisUtil { && !suppressType.equals(SuppressMap.ALL)) retVal.add(yDirection); + if (xDirection != null && + (xDirection.equals(Direction.WEST) || xDirection.equals(Direction.EAST))) { + if ( env.getHeight() < RATIO*approximateHeight) { + retVal.add(Direction.CENTRAL); + } + } + + if (yDirection != null && + (yDirection.equals(Direction.NORTH) || yDirection.equals(Direction.SOUTH))) { + if ( env.getWidth() < RATIO*approximateWidth) { + retVal.add(Direction.CENTRAL); + } + } + + if ((retVal.contains(Direction.NORTH) && retVal.contains(Direction.WEST)) || + (retVal.contains(Direction.NORTH) && retVal.contains(Direction.EAST)) || + (retVal.contains(Direction.SOUTH) && retVal.contains(Direction.WEST)) || + (retVal.contains(Direction.SOUTH) && retVal.contains(Direction.EAST)) ) { + if (retVal.contains(Direction.CENTRAL)) + retVal.remove(Direction.CENTRAL); + } + if (isExtreme && !suppressType.equals(SuppressMap.ALL)) retVal.add(Direction.EXTREME); diff --git a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gis/PolygonUtil.java b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gis/PolygonUtil.java index b4a6f23720..a49215bf1f 100644 --- a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gis/PolygonUtil.java +++ b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gis/PolygonUtil.java @@ -144,6 +144,7 @@ public class PolygonUtil { Coordinate[] coords = contour; coords = Arrays.copyOf(coords, coords.length + 1); coords[coords.length - 1] = new Coordinate(coords[0]); + truncate(coords, 2); rval = gf.createPolygon(gf.createLinearRing(coords), null); } // Convert back to lat/lon @@ -401,6 +402,7 @@ public class PolygonUtil { GeometryFactory gf = new GeometryFactory(); points.add(new Coordinate(points.get(0))); + truncate(points, 2); Polygon rval = gf.createPolygon(gf.createLinearRing(points .toArray(new Coordinate[points.size()])), null); @@ -928,4 +930,27 @@ public class PolygonUtil { } } } + + public static void truncate(Listcoordinates, int decimalPlaces) { + for (Coordinate coordinate : coordinates) { + truncate(coordinate, decimalPlaces); + } + } + + public static void truncate(Coordinate[] coordinates, int decimalPlaces) { + for (Coordinate coordinate : coordinates) { + truncate(coordinate, decimalPlaces); + } + } + + public static void truncate(Coordinate coordinate, int decimalPlaces) { + double x = coordinate.x * Math.pow(10, decimalPlaces); + double y = coordinate.y * Math.pow(10, decimalPlaces); + + x = x >= 0 ? Math.floor(x) : Math.ceil(x); + y = y >= 0 ? Math.floor(y) : Math.ceil(y); + + coordinate.x = x / Math.pow(10, decimalPlaces); + coordinate.y = y / Math.pow(10, decimalPlaces); + } } diff --git a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gui/WarngenDialog.java b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gui/WarngenDialog.java index 28304d18e7..83bf0e2251 100644 --- a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gui/WarngenDialog.java +++ b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gui/WarngenDialog.java @@ -82,6 +82,7 @@ import com.raytheon.viz.ui.dialogs.CaveSWTDialog; import com.raytheon.viz.warngen.Activator; import com.raytheon.viz.warngen.WarngenConstants; import com.raytheon.viz.warngen.comm.WarningSender; +import com.raytheon.viz.warngen.gis.PolygonUtil; import com.raytheon.viz.warngen.template.TemplateRunner; import com.raytheon.viz.warngen.util.CurrentWarnings; import com.raytheon.viz.warngen.util.CurrentWarnings.IWarningsArrivedListener; @@ -1313,6 +1314,7 @@ public class WarngenDialog extends CaveSWTDialog implements damBreakInstruct = "Lat/Lon pair for dam break threat area is less than three"; } else { coordinates.add(coordinates.get(0)); + PolygonUtil.truncate(coordinates, 2); warngenLayer.createDamThreatArea(coordinates .toArray(new Coordinate[coordinates.size()])); setPolygonLocked(true); diff --git a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gui/WarngenLayer.java b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gui/WarngenLayer.java index 5d2dd07340..a122f318d1 100644 --- a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gui/WarngenLayer.java +++ b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gui/WarngenLayer.java @@ -30,6 +30,7 @@ import java.util.HashSet; import java.util.Iterator; import java.util.List; import java.util.Map; +import java.util.Map.Entry; import java.util.Set; import java.util.TimeZone; import java.util.regex.Matcher; @@ -56,6 +57,7 @@ import com.raytheon.uf.common.dataplugin.warning.config.AreaSourceConfiguration; import com.raytheon.uf.common.dataplugin.warning.config.AreaSourceConfiguration.AreaType; import com.raytheon.uf.common.dataplugin.warning.config.BulletActionGroup; import com.raytheon.uf.common.dataplugin.warning.config.DialogConfiguration; +import com.raytheon.uf.common.dataplugin.warning.config.GridSpacing; import com.raytheon.uf.common.dataplugin.warning.config.WarngenConfiguration; import com.raytheon.uf.common.dataplugin.warning.gis.GeospatialData; import com.raytheon.uf.common.dataplugin.warning.gis.GeospatialFactory; @@ -84,7 +86,6 @@ import com.raytheon.uf.viz.core.drawables.PaintProperties; import com.raytheon.uf.viz.core.drawables.ResourcePair; import com.raytheon.uf.viz.core.exception.VizException; import com.raytheon.uf.viz.core.localization.LocalizationManager; -import com.raytheon.uf.viz.core.map.IMapDescriptor; import com.raytheon.uf.viz.core.map.MapDescriptor; import com.raytheon.uf.viz.core.maps.MapManager; import com.raytheon.uf.viz.core.rsc.LoadProperties; @@ -204,7 +205,7 @@ public class WarngenLayer extends AbstractStormTrackResource { private boolean boxEditable = true; - private List loadedCustomMaps; + private Map> loadedCustomMaps; protected Mode lastMode = null; @@ -242,7 +243,7 @@ public class WarngenLayer extends AbstractStormTrackResource { super(resourceData, loadProperties, descriptor); displayState.displayType = DisplayType.POINT; getCapability(ColorableCapability.class).setColor(WHITE); - loadedCustomMaps = new ArrayList(); + loadedCustomMaps = new HashMap>(); try { dialogConfig = DialogConfiguration @@ -367,8 +368,11 @@ public class WarngenLayer extends AbstractStormTrackResource { @Override protected void disposeInternal() { - for (String map : loadedCustomMaps) { - MapManager.getInstance(descriptor).unloadMap(map); + for (Entry> entry : loadedCustomMaps + .entrySet()) { + for (String map : entry.getValue()) { + MapManager.getInstance(entry.getKey()).unloadMap(map); + } } loadedCustomMaps.clear(); @@ -671,7 +675,6 @@ public class WarngenLayer extends AbstractStormTrackResource { */ private void init(WarngenConfiguration config) { long t0 = System.currentTimeMillis(); - String[] maps = config.getMaps(); boolean validAreaSource = false; for (AreaSourceConfiguration as : config.getAreaSources()) { @@ -741,20 +744,27 @@ public class WarngenLayer extends AbstractStormTrackResource { locals).getEnvelopeInternal(); IExtent localExtent = new PixelExtent(env.getMinX(), env.getMaxX(), env.getMinY(), env.getMaxY()); - - // TODO: Make configurable? - int nx = 400; - int ny = 400; - // Boolean to change the aspect ratio of the extent to - // match + + int nx = 600; + int ny = 600; + // Boolean to change the aspect ratio of the extent to match boolean keepAspectRatio = true; + + GridSpacing gridSpacing = dialogConfig.getGridSpacing(); + + if (gridSpacing != null && gridSpacing.getNx() != null && gridSpacing != null) { + nx = gridSpacing.getNx(); + ny = gridSpacing.getNy(); + keepAspectRatio = gridSpacing.isKeepAspectRatio(); + } + double xinc, yinc; + double width = localExtent.getWidth(); + double height = localExtent.getHeight(); if (!keepAspectRatio) { - xinc = (localExtent.getWidth() / nx); - yinc = (localExtent.getHeight() / ny); + xinc = (width / nx); + yinc = (height / ny); } else { - double width = localExtent.getWidth(); - double height = localExtent.getHeight(); if (width > height) { ny = (int) ((height * nx) / width); } else if (height > width) { @@ -784,46 +794,43 @@ public class WarngenLayer extends AbstractStormTrackResource { String areaSource = config.getGeospatialConfig().getAreaSource(); geoData = siteMap.get(areaSource + "." + site); }// end synchronize + loadCustomMaps(descriptor, config); + this.configuration = config; + System.out.println("Time to init warngen config: " + + (System.currentTimeMillis() - t0)); + } + protected void loadCustomMaps(MapDescriptor descriptor, + WarngenConfiguration config) { + if (config == null || descriptor == null) { + return; + } long t1 = System.currentTimeMillis(); - List temp = new ArrayList(); - for (String s : loadedCustomMaps) { - if (maps != null && maps.length > 0) { - for (String s2 : maps) { - if (s.equalsIgnoreCase(s2)) { - temp.add(s); - } - } + MapManager mapManager = MapManager.getInstance(descriptor); + List maps = Arrays.asList(config.getMaps()); + Set loadedCustomMaps = this.loadedCustomMaps.get(descriptor); + if (loadedCustomMaps == null) { + loadedCustomMaps = new HashSet(); + this.loadedCustomMaps.put(descriptor, loadedCustomMaps); + } + Iterator it = loadedCustomMaps.iterator(); + while (it.hasNext()) { + String map = it.next(); + if (!maps.contains(map)) { + it.remove(); + mapManager.unloadMap(map); } } - for (String s : loadedCustomMaps) { - if (!temp.contains(s)) { - MapManager.getInstance(descriptor).unloadMap(s); - } - } - loadedCustomMaps.clear(); - for (String s : temp) { - loadedCustomMaps.add(s); - } - if (maps != null && maps.length > 0) { - if (descriptor instanceof IMapDescriptor) { - MapManager mapManager = MapManager.getInstance(descriptor); - for (String map : maps) { - if (!loadedCustomMaps.contains(map)) { - if (! mapManager.isMapLoaded(map)) { - mapManager.loadMapByName(map); - loadedCustomMaps.add(map); - } - } + for (String map : maps) { + if (!loadedCustomMaps.contains(map)) { + if (!mapManager.isMapLoaded(map)) { + mapManager.loadMapByName(map); + loadedCustomMaps.add(map); } - } } System.out.println("Time to load custom maps: " + (System.currentTimeMillis() - t1)); - this.configuration = config; - System.out.println("Time to init warngen config: " - + (System.currentTimeMillis() - t0)); } public GeospatialData[] getGeodataFeatures(String key) { @@ -1054,17 +1061,30 @@ public class WarngenLayer extends AbstractStormTrackResource { dialog = new WarngenDialog(PlatformUI.getWorkbench() .getActiveWorkbenchWindow().getShell(), this); dialog.open(); + addDialogDisposeListener(descriptor); + } else { + showDialog(true); + } + } + + public void addDialogDisposeListener(final MapDescriptor descriptor) { + if (dialog != null) { dialog.getShell().addDisposeListener(new DisposeListener() { @Override public void widgetDisposed(DisposeEvent e) { descriptor.getResourceList().removeRsc(WarngenLayer.this); } }); - } else { - showDialog(true); } } + @Override + public void setDescriptor(MapDescriptor descriptor) { + super.setDescriptor(descriptor); + addDialogDisposeListener(descriptor); + loadCustomMaps(descriptor, configuration); + } + /** * Show the WarnGen dialog and move it to the front. */ @@ -1115,7 +1135,14 @@ public class WarngenLayer extends AbstractStormTrackResource { Geometry intersection = null; try { // Get intersection between county and hatched boundary - intersection = GeometryUtil.intersection(hatchedArea, prepGeom); + try { + intersection = GeometryUtil.intersection(hatchedArea, + prepGeom); + } catch (TopologyException e) { + // side location conflict using a prepared geom + // need the actual geom for this case + intersection = GeometryUtil.intersection(hatchedArea, geom); + } if (intersection.isEmpty()) { continue; } @@ -1225,37 +1252,37 @@ public class WarngenLayer extends AbstractStormTrackResource { } } if (newHatchedArea == null) { - boolean initialWarning = false; - String[] followUps = this.getConfiguration().getFollowUps(); - if (followUps.length == 0) - initialWarning = true; - else - for (String followup : followUps) { - if (followup.equals("NEW")) { - initialWarning = true; - break; - } - } - if (initialWarning) - state.clear2(); // not to hatch polygon for initial warning + boolean initialWarning = false; + String[] followUps = this.getConfiguration().getFollowUps(); + if (followUps.length == 0) + initialWarning = true; + else + for (String followup : followUps) { + if (followup.equals("NEW")) { + initialWarning = true; + break; + } + } + if (initialWarning) + state.clear2(); // not to hatch polygon for initial warning else { - // Snap back for follow-ups - state.setWarningPolygon((Polygon) state - .getMarkedWarningPolygon().clone()); - newHatchedArea = latLonToLocal((Geometry) state - .getMarkedWarningArea().clone()); - state.resetMarked(); - updateWarnedAreas(snapHatchedAreaToPolygon, true); + // Snap back for follow-ups + state.setWarningPolygon((Polygon) state + .getMarkedWarningPolygon().clone()); + newHatchedArea = latLonToLocal((Geometry) state + .getMarkedWarningArea().clone()); + state.resetMarked(); + updateWarnedAreas(snapHatchedAreaToPolygon, true); } } else { - newHatchedArea = localToLatLon(newHatchedArea); - state.setWarningArea(newHatchedArea); - state.mark(newHatchedArea); - newHatchedArea = buildArea(getPolygon()); - // add "W" strings - if (determineInclusion) { - populateStrings(); - } + newHatchedArea = localToLatLon(newHatchedArea); + state.setWarningArea(newHatchedArea); + state.mark(newHatchedArea); + newHatchedArea = buildArea(getPolygon()); + // add "W" strings + if (determineInclusion) { + populateStrings(); + } } // Apply new hatched area @@ -1314,6 +1341,8 @@ public class WarngenLayer extends AbstractStormTrackResource { c[2] = new Coordinate(p3.getX(), p3.getY()); c[3] = new Coordinate(p4.getX(), p4.getY()); c[4] = c[0]; + + PolygonUtil.truncate(c, 2); LinearRing lr = gf.createLinearRing(c); state.setWarningPolygon(gf.createPolygon(lr, null)); @@ -1477,6 +1506,7 @@ public class WarngenLayer extends AbstractStormTrackResource { Coordinate[] c = new Coordinate[linearRing.size()]; c = linearRing.toArray(c); + PolygonUtil.truncate(c, 2); LinearRing lr = gf.createLinearRing(c); state.setWarningPolygon(gf.createPolygon(lr, null)); @@ -1519,6 +1549,8 @@ public class WarngenLayer extends AbstractStormTrackResource { c[2] = new Coordinate(p3.getX(), p3.getY()); c[3] = new Coordinate(p4.getX(), p4.getY()); c[4] = c[0]; + + PolygonUtil.truncate(c, 2); LinearRing lr = gf.createLinearRing(c); state.setWarningPolygon(gf.createPolygon(lr, null)); @@ -1702,11 +1734,19 @@ public class WarngenLayer extends AbstractStormTrackResource { Matcher m = tmlPtrn.matcher(rawMessage); if (m.find()) { - int hour = Integer.parseInt(m.group(1)); - int minute = Integer.parseInt(m.group(2)); + Calendar issueTime = warnRecord.getIssueTime(); + int day = issueTime.get(Calendar.DAY_OF_MONTH); + int tmlHour = Integer.parseInt(m.group(1)); + // This is for the case when the warning text was created, + // but actually issued the next day. + if (tmlHour > issueTime.get(Calendar.HOUR_OF_DAY)) { + day--; + } + int tmlMinute = Integer.parseInt(m.group(2)); frameTime = Calendar.getInstance(TimeZone.getTimeZone("GMT")); - frameTime.set(Calendar.HOUR_OF_DAY, hour); - frameTime.set(Calendar.MINUTE, minute); + frameTime.set(Calendar.DAY_OF_MONTH, day); + frameTime.set(Calendar.HOUR_OF_DAY, tmlHour); + frameTime.set(Calendar.MINUTE, tmlMinute); } else { frameTime = warnRecord.getIssueTime(); } @@ -2208,6 +2248,7 @@ public class WarngenLayer extends AbstractStormTrackResource { @Override public void project(CoordinateReferenceSystem crs) throws VizException { displayState.geomChanged = true; + drawShadedPoly(state.getWarningArea()); issueRefresh(); } diff --git a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gui/WarngenUIManager.java b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gui/WarngenUIManager.java index 5353cfb49b..bec48e778f 100644 --- a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gui/WarngenUIManager.java +++ b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gui/WarngenUIManager.java @@ -42,6 +42,7 @@ import com.raytheon.viz.ui.VizWorkbenchManager; import com.raytheon.viz.ui.cmenu.AbstractRightClickAction; import com.raytheon.viz.ui.input.InputAdapter; import com.raytheon.viz.warngen.Activator; +import com.raytheon.viz.warngen.gis.PolygonUtil; import com.vividsolutions.jts.geom.Coordinate; import com.vividsolutions.jts.geom.GeometryFactory; import com.vividsolutions.jts.geom.LineSegment; @@ -249,6 +250,15 @@ public class WarngenUIManager extends InputAdapter { if (moveType != null || pointDeleted || pointCreated) { try { + if (moveType == MoveType.ALL_POINTS) { + WarngenUIState state = warngenLayer.getWarngenState(); + Coordinate[] coordinates = state.getWarningPolygon().getCoordinates(); + PolygonUtil.truncate(coordinates, 2); + + GeometryFactory gf = new GeometryFactory(); + LinearRing lr = gf.createLinearRing(coordinates); + state.setWarningPolygon(gf.createPolygon(lr, null)); + } warngenLayer.updateWarnedAreas(true, true); } catch (VizException e) { e.printStackTrace(); @@ -322,6 +332,7 @@ public class WarngenUIManager extends InputAdapter { int insertionPoint = 0; Coordinate[] coords = state.getWarningPolygon().getCoordinates(); Coordinate mouse = container.translateClick(x, y); + PolygonUtil.truncate(mouse, 2); for (int i = 1; i < coords.length; i++) { LineSegment segment = new LineSegment(coords[i - 1], coords[i]); double distance = segment.distance(mouse); @@ -366,6 +377,7 @@ public class WarngenUIManager extends InputAdapter { break; } case SINGLE_POINT: { + PolygonUtil.truncate(c2, 2); if (warngenLayer.isModifiedVertexNeedsToBeUpdated()) { int i = StormTrackUIManager.getCoordinateIndex(warngenLayer, state.getWarningPolygon().getCoordinates(), c2); @@ -429,6 +441,11 @@ public class WarngenUIManager extends InputAdapter { LinearRing lr = gf.createLinearRing(coordList .toArray(new Coordinate[coordList.size()])); Polygon newPoly = gf.createPolygon(lr, null); + + if (newPoly.isValid() == false) { + return; + } + warngenLayer.getWarngenState().setWarningPolygon(newPoly); try { warngenLayer.updateWarnedAreas(true, true); @@ -520,6 +537,7 @@ public class WarngenUIManager extends InputAdapter { } Coordinate c = new Coordinate(lastMouseX, lastMouseY); + PolygonUtil.truncate(c, 2); Polygon poly = warngenLayer.getPolygon(); if (StormTrackUIManager.getCoordinateIndex(warngenLayer, @@ -550,7 +568,7 @@ public class WarngenUIManager extends InputAdapter { Coordinate coLinearCoord = container.translateClick( coLinearPoint.getX(), coLinearPoint.getY()); - + PolygonUtil.truncate(coLinearCoord, 2); Coordinate[] coords2 = new Coordinate[coords.length + 1]; int k = 0; for (k = 0; k < i; k++) { diff --git a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/template/TemplateRunner.java b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/template/TemplateRunner.java index da9396ec25..05a6dada34 100644 --- a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/template/TemplateRunner.java +++ b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/template/TemplateRunner.java @@ -27,9 +27,12 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.Calendar; import java.util.Date; +import java.util.HashSet; import java.util.Hashtable; +import java.util.Iterator; import java.util.Map; import java.util.Properties; +import java.util.Set; import java.util.regex.Matcher; import java.util.regex.Pattern; @@ -105,6 +108,7 @@ import com.vividsolutions.jts.io.WKTReader; * ------------ ---------- ----------- -------------------------- * Mar 31, 2011 njensen Initial creation * Oct 31, 2011 Qinglu Lin Call convertAlaskaLons() for eventLocation. + * May 9, 2012 14887 Qinglu Lin Changed one argument passed to calculatePortion(). * * * @@ -236,16 +240,26 @@ public class TemplateRunner { } if (areas != null && areas.length > 0) { - String OneLetterTimeZone = areas[0].getTimezone(); - context.put("localtimezone", OneLetterTimeZone); - + Set timeZones = new HashSet(); for (AffectedAreas area : areas) { - if (area.getTimezone() != null - && !area.getTimezone().equals(OneLetterTimeZone)) { - context.put("secondtimezone", area.getTimezone()); - break; + if (area.getTimezone() != null) { + // Handles counties that span two counties + for (String oneLetterTimeZone : area.getTimezone().split("")) { + if (oneLetterTimeZone.length() != 0) { + timeZones.add(oneLetterTimeZone); + } + } } } + + Iterator iterator = timeZones.iterator(); + while (iterator.hasNext()) { + if (context.get("localtimezone") == null) { + context.put("localtimezone", iterator.next()); + } else if (context.get("secondtimezone") == null) { + context.put("secondtimezone", iterator.next()); + } + } } // CAN and EXP products follow different rules as followups @@ -693,8 +707,7 @@ public class TemplateRunner { .get("Name").toString()); watch.setPartOfParentRegion(GisUtil.asStringList(GisUtil - .calculatePortion(parentGeom, atr.getGeometry() - .getCentroid().getCoordinate()))); + .calculatePortion(parentGeom, atr.getGeometry()))); rval.addWaw(watch); } } diff --git a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/util/WarningTextHandler.java b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/util/WarningTextHandler.java index 95660cc9d4..981021324f 100644 --- a/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/util/WarningTextHandler.java +++ b/cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/util/WarningTextHandler.java @@ -49,6 +49,7 @@ import com.raytheon.viz.warngen.gis.AffectedAreasComparator; * Dec 2, 2010 jsanchez Initial creation * Aug 29, 2011 10719 rferrel applyLocks no longer allows removal of * required blank lines. + * May 10, 2012 14681 Qinglu Lin Updated regex string for Pattern listOfAreaNamePtrn, etc. * * * @@ -79,11 +80,6 @@ public class WarningTextHandler { + ",}|.{1," + (MAX_WIDTH - 3) + "})(" + LOCK_START + "|" + LOCK_END + "|-|\\s+|(\\.\\.\\.)|$)"); - private static final Pattern locationsWrapRE = Pattern.compile("(.{1," - + (MAX_WIDTH - 2) + "} TO )|(.{1," + (MAX_WIDTH - 20) - + "}\\.\\.\\.\\s{0,1}AND\\s.{1,20}\\.)|(.{1," + (MAX_WIDTH - 5) - + "}\\.\\.\\.)|(.{1," + MAX_WIDTH + "}(\\s+|$))"); - /** Strictly wraps only after hyphens */ private static final Pattern hyphenWrapRE = Pattern.compile("(.{1," + (MAX_WIDTH - 1) + "}-)"); @@ -122,8 +118,7 @@ public class WarningTextHandler { private static Pattern immediateCausePtrn = null; /** ex. SARPY NE-DOUGLAS NE-WASHINGTON NE- */ - private static final Pattern listOfAreaNamePtrn = Pattern - .compile("(((\\w{1,}\\s{1}){1,}\\w{2}-){0,}((\\w{1,}\\s{1}){1,}\\w{2}-))"); + private static final Pattern listOfAreaNamePtrn = Pattern.compile("(\\s\\w{2}-)"); private static final Pattern secondBulletPtrn = Pattern.compile("\\*(|\\s" + TEST_MSG2 + ")\\sUNTIL\\s\\d{3,4}\\s(AM|PM)\\s\\w{3,4}"); @@ -132,11 +127,11 @@ public class WarningTextHandler { + TEST_MSG2 + ")(.*)"); private static final Pattern latLonPtrn = Pattern - .compile("LAT...LON+(\\s\\d{3,4}\\s\\d{3,5}){1,}"); + .compile("^LAT...LON+(\\s\\d{3,4}\\s\\d{3,5}){1,}"); private static final Pattern subLatLonPtrn = Pattern - .compile("\\s{1,}\\d{3,4}\\s\\d{3,5}(|(\\s\\d{3,4}\\s\\d{3,5}){1,})"); - + .compile("^((?!TIME...MOT... LOC))\\s{1,}\\d{3,4}\\s\\d{3,5}(|(\\s\\d{3,4}\\s\\d{3,5}){1,})"); + private static final Pattern tmlPtrn = Pattern .compile("TIME...MOT...LOC \\d{3,4}Z\\s\\d{1,3}DEG\\s\\d{1,3}KT((\\s\\d{3,4}\\s\\d{3,5}){1,})"); @@ -270,9 +265,16 @@ public class WarningTextHandler { boolean startLines = true; + // Set before to false if the line is beyond "THE NATIONAL WEATHER SERVICE IN" line. + boolean before = true; + for (int lineIndex = 0; lineIndex < seperatedLines.length; ++lineIndex) { String line = seperatedLines[lineIndex]; + if (line.contains("THE NATIONAL WEATHER SERVICE IN") || line.contains("OTHER LOCATIONS IMPACTED")) { + before = false; + } + // This prevents blank line(s) after the header from being locked. if (startLines && lineIndex > 1) { startLines = line.trim().length() == 0; @@ -316,10 +318,14 @@ public class WarningTextHandler { continue; } - m = listOfAreaNamePtrn.matcher(line); - if (m.matches()) { - sb.append(LOCK_START + line + "\n" + LOCK_END); - continue; + if (before) { + m = listOfAreaNamePtrn.matcher(line); + if (m.find()) { + if (!(line.contains("!**") || line.contains("**!") || line.contains("OTHER LOCATIONS"))) { + sb.append(LOCK_START + line + "\n" + LOCK_END); + continue; + } + } } // Locking Date in the MND header @@ -635,7 +641,9 @@ public class WarningTextHandler { } if (inLocations) { - m = locationsWrapRE.matcher(v); + sb.append("\n"); + sb.append(wrapLocations(v)); + continue; } else { m = ugcPtrn.matcher(v); if (m.find()) { @@ -674,6 +682,33 @@ public class WarningTextHandler { return sb.toString(); } + + private static String wrapLocations(String locationsLine) { + StringBuffer sb = new StringBuffer(); + + String line = " "; + String[] locations = locationsLine.split("\\.\\.\\."); + + for (int i = 0; i < locations.length; i++) { + String location = locations[i]; + int size = (i == locations.length - 1)? location.length() : location.length() + 3; + + if (line.length() + size >= MAX_WIDTH - 2) { + sb.append(line + "\n"); + line = " "; + } + + if (i == locations.length - 1) { + line += location; + } else { + line += location + "..."; + } + } + + sb.append(line + "\n"); + + return sb.toString(); + } private static String removeExtraLines(String originalMessage) { StringBuffer sb = new StringBuffer(); diff --git a/cave/com.raytheon.viz.warnings/src/com/raytheon/viz/warnings/rsc/AbstractWarningResource.java b/cave/com.raytheon.viz.warnings/src/com/raytheon/viz/warnings/rsc/AbstractWarningResource.java index da22ea3ddd..6375017a29 100644 --- a/cave/com.raytheon.viz.warnings/src/com/raytheon/viz/warnings/rsc/AbstractWarningResource.java +++ b/cave/com.raytheon.viz.warnings/src/com/raytheon/viz/warnings/rsc/AbstractWarningResource.java @@ -68,6 +68,10 @@ import com.vividsolutions.jts.geom.prep.PreparedGeometryFactory; * Aug 5, 2011 njensen Refactored maps * Aug 22, 2011 10631 njensen Major refactor * 2012-04-16 DR 14866 D. Friedman Fix sampling error + * May 3, 2012 DR 14741 porricel Updated matchesFrame function + * to make SVS warning updates and + * original warning display properly + * in a given display frame * * * @@ -227,6 +231,8 @@ public abstract class AbstractWarningResource extends AbstractWWAResource * cancel. **/ protected boolean altered = false; + + protected Date timeAltered; /** * was the alter a partial cancel? if it was then a matching CON should @@ -595,6 +601,9 @@ public abstract class AbstractWarningResource extends AbstractWWAResource Date centerTime = new Date(entry.record.getStartTime() .getTimeInMillis() + (diff / 2)); Date frameTime = framePeriod.getStart(); + + Date frameStart = framePeriod.getStart(); + Date refTime = entry.record.getDataTime().getRefTime(); if (lastFrame) { // use current system time to determine what to display @@ -610,9 +619,18 @@ public abstract class AbstractWarningResource extends AbstractWWAResource // check if the warning is cancelled WarningAction action = WarningAction.valueOf(entry.record.getAct()); if (action == WarningAction.CAN - && entry.record.getDataTime().getRefTime().equals(paintTime)) { + && refTime.equals(paintTime)) { return false; - } else if (entry.record.getDataTime().getRefTime().equals(paintTime) + // If this entry has been altered/updated, display its pre-altered version + // only in the frames prior to the time it was altered + } else if (entry.altered){ + if (frameStart.getTime() >= refTime.getTime() && + frameStart.getTime() < (entry.timeAltered.getTime())) + return true; + if (frameStart.getTime() >= (entry.timeAltered.getTime())) + return false; + + } else if (refTime.equals(paintTime) || recordPeriod.contains(frameTime) || (framePeriod.contains(centerTime) && (!lastFrame || !entry.altered))) { return true; diff --git a/cave/com.raytheon.viz.warnings/src/com/raytheon/viz/warnings/rsc/WarningsResource.java b/cave/com.raytheon.viz.warnings/src/com/raytheon/viz/warnings/rsc/WarningsResource.java index e1e1bcc73b..520aa7cb7e 100644 --- a/cave/com.raytheon.viz.warnings/src/com/raytheon/viz/warnings/rsc/WarningsResource.java +++ b/cave/com.raytheon.viz.warnings/src/com/raytheon/viz/warnings/rsc/WarningsResource.java @@ -53,6 +53,8 @@ import com.vividsolutions.jts.geom.Geometry; * ------------ ---------- ----------- -------------------------- * Sep 1, 2010 jsanchez Initial creation * Aug 22, 2011 10631 njensen Major refactor + * May 3, 2012 DR 14741 porricel Stop setting end time of orig. + * warning to start time of update. * * * @@ -88,13 +90,20 @@ public class WarningsResource extends AbstractWarningResource { && rec.getEtn().equals(warnrec.getEtn())) { if (!entry.altered) { - // if it's a con, can, exp, or ext set the - // original - // one's end time to this one's start time - entry.record.setEndTime((Calendar) warnrec - .getStartTime().clone()); + // if it's a con, can, exp, or ext mark the + // original one as altered entry.altered = true; - + //make note of alteration time without + //changing end time + entry.timeAltered = warnrec.getStartTime().getTime(); + + //if cancellation, set end time to start time + //of this action + if(act == WarningAction.CAN) { + entry.record.setEndTime((Calendar) warnrec + .getStartTime().clone()); + } + if (!rec.getCountyheader().equals( warnrec.getCountyheader()) && act == WarningAction.CAN) { diff --git a/cots/org.apache.http/META-INF/MANIFEST.MF b/cots/org.apache.http/META-INF/MANIFEST.MF index 67284eac5d..c315bcca1b 100644 --- a/cots/org.apache.http/META-INF/MANIFEST.MF +++ b/cots/org.apache.http/META-INF/MANIFEST.MF @@ -20,6 +20,7 @@ Export-Package: org.apache.http, org.apache.http.entity, org.apache.http.impl.client, org.apache.http.impl.conn.tsccm, + org.apache.http.message, org.apache.http.params, org.apache.http.protocol, org.apache.http.util diff --git a/cots/org.jboss.cache/.classpath b/cots/org.jboss.cache/.classpath deleted file mode 100644 index b4254f4398..0000000000 --- a/cots/org.jboss.cache/.classpath +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - - - - - diff --git a/cots/org.jboss.cache/META-INF/MANIFEST.MF b/cots/org.jboss.cache/META-INF/MANIFEST.MF deleted file mode 100644 index 8440f18075..0000000000 --- a/cots/org.jboss.cache/META-INF/MANIFEST.MF +++ /dev/null @@ -1,55 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: Cache Plug-in -Bundle-SymbolicName: org.jboss.cache -Bundle-Version: 1.0.0.qualifier -Bundle-ClassPath: jbosscache-core.jar, - jboss-common-core.jar, - jboss-logging-spi.jar, - jgroups_2.8.1GA.jar -Bundle-Vendor: JBoss -Export-Package: org.jboss.cache, - org.jboss.cache.annotations, - org.jboss.cache.batch, - org.jboss.cache.buddyreplication, - org.jboss.cache.cluster, - org.jboss.cache.commands, - org.jboss.cache.commands.legacy, - org.jboss.cache.commands.legacy.read, - org.jboss.cache.commands.legacy.write, - org.jboss.cache.commands.read, - org.jboss.cache.commands.remote, - org.jboss.cache.commands.tx, - org.jboss.cache.commands.write, - org.jboss.cache.config, - org.jboss.cache.config.parsing, - org.jboss.cache.config.parsing.element, - org.jboss.cache.eviction, - org.jboss.cache.factories, - org.jboss.cache.factories.annotations, - org.jboss.cache.factories.context, - org.jboss.cache.interceptors, - org.jboss.cache.interceptors.base, - org.jboss.cache.invocation, - org.jboss.cache.io, - org.jboss.cache.jmx, - org.jboss.cache.jmx.annotations, - org.jboss.cache.loader, - org.jboss.cache.loader.bdbje, - org.jboss.cache.loader.jdbm, - org.jboss.cache.loader.s3, - org.jboss.cache.loader.tcp, - org.jboss.cache.lock, - org.jboss.cache.marshall, - org.jboss.cache.mvcc, - org.jboss.cache.notifications, - org.jboss.cache.notifications.annotation, - org.jboss.cache.notifications.event, - org.jboss.cache.optimistic, - org.jboss.cache.remoting.jgroups, - org.jboss.cache.statetransfer, - org.jboss.cache.transaction, - org.jboss.cache.util, - org.jboss.cache.util.concurrent, - org.jboss.cache.util.concurrent.locks, - org.jboss.cache.util.reflect diff --git a/cots/org.jboss.cache/build.properties b/cots/org.jboss.cache/build.properties deleted file mode 100644 index 9b214fe4fe..0000000000 --- a/cots/org.jboss.cache/build.properties +++ /dev/null @@ -1,5 +0,0 @@ -bin.includes = META-INF/,\ - jbosscache-core.jar,\ - jboss-common-core.jar,\ - jboss-logging-spi.jar,\ - jgroups_2.8.1GA.jar diff --git a/cots/org.jboss.cache/jboss-common-core.jar b/cots/org.jboss.cache/jboss-common-core.jar deleted file mode 100644 index cf20897ccc..0000000000 Binary files a/cots/org.jboss.cache/jboss-common-core.jar and /dev/null differ diff --git a/cots/org.jboss.cache/jboss-logging-spi.jar b/cots/org.jboss.cache/jboss-logging-spi.jar deleted file mode 100644 index f6806f3a8d..0000000000 Binary files a/cots/org.jboss.cache/jboss-logging-spi.jar and /dev/null differ diff --git a/cots/org.jboss.cache/jbosscache-core.jar b/cots/org.jboss.cache/jbosscache-core.jar deleted file mode 100644 index 44e5750b7e..0000000000 Binary files a/cots/org.jboss.cache/jbosscache-core.jar and /dev/null differ diff --git a/cots/org.jboss.cache/jgroups_2.8.1GA.jar b/cots/org.jboss.cache/jgroups_2.8.1GA.jar deleted file mode 100644 index 43bc5e3deb..0000000000 Binary files a/cots/org.jboss.cache/jgroups_2.8.1GA.jar and /dev/null differ diff --git a/deltaScripts/12.5.1/addgfelockindex.sh b/deltaScripts/12.5.1/addgfelockindex.sh new file mode 100644 index 0000000000..e83bae3d17 --- /dev/null +++ b/deltaScripts/12.5.1/addgfelockindex.sh @@ -0,0 +1,28 @@ +#!/bin/bash +# This script will add an index to the gfelocktable table +# +# This needs to be performed with build 12.5.1. +# + +PSQL="/awips2/psql/bin/psql" +SQL_COMMAND="CREATE INDEX lock_parmid_idx ON gfelocktable USING btree (parmid);" + +if [ ! -f ${PSQL} ]; then +echo "ERROR: The PSQL executable does not exist - ${PSQL}." +echo "FATAL: Update Failed!" +exit 1 +fi + +echo "" +echo "Press Enter to perform the updates Ctrl-C to quit." +read done + +${PSQL} -U awips -d metadata -c "${SQL_COMMAND}" +if [ $? -ne 0 ]; then +echo "FATAL: Update Failed!" +exit 1 +fi + +echo "INFO: The update was successfully applied." + +exit 0 \ No newline at end of file diff --git a/deltaScripts/12.5.1/drop_gfe_tables.sh b/deltaScripts/12.5.1/drop_gfe_tables.sh new file mode 100644 index 0000000000..6e311e3f46 --- /dev/null +++ b/deltaScripts/12.5.1/drop_gfe_tables.sh @@ -0,0 +1,28 @@ +#!/bin/bash +# This script will drop some GFE tables so they will be recreated +# +# This needs to be performed with build 12.5.1 +# + +PSQL="/awips2/psql/bin/psql" +SQL_COMMAND="DROP TABLE IF EXISTS smartinit, gfe_iscsend CASCADE; DELETE FROM plugin_info WHERE name='com.raytheon.edex.plugin.gfe';" + +if [ ! -f ${PSQL} ]; then +echo "ERROR: The PSQL executable does not exist - ${PSQL}." +echo "FATAL: Update Failed!" +exit 1 +fi + +echo "" +echo "Press Enter to perform the updates Ctrl-C to quit." +read done + +${PSQL} -U awips -d metadata -c "${SQL_COMMAND}" +if [ $? -ne 0 ]; then +echo "FATAL: Update Failed!" +exit 1 +fi + +echo "INFO: The update was successfully applied." + +exit 0 diff --git a/dim.txt b/dim.txt new file mode 100644 index 0000000000..56a9ad9886 --- /dev/null +++ b/dim.txt @@ -0,0 +1,39 @@ +-rw-r--r-- 1 dmsys dmtool 94518 May 17 14:24 cave/com.raytheon.uf.viz.monitor.ffmp/src/com/raytheon/uf/viz/monitor/ffmp/FFMPMonitor.java +-rw-r--r-- 1 dmsys dmtool 95993 May 17 18:10 /home/dmsys/work/ffmp_fixes/cave/com.raytheon.uf.viz.monitor.ffmp/src/com/raytheon/uf/viz/monitor/ffmp/FFMPMonitor.java + +-rw-r--r-- 1 dmsys dmtool 7156 May 17 14:24 cave/com.raytheon.uf.viz.monitor.ffmp/src/com/raytheon/uf/viz/monitor/ffmp/ui/dialogs/FFMPTableCellData.java +-rw-r--r-- 1 dmsys dmtool 7016 May 17 18:10 /home/dmsys/work/ffmp_fixes/cave/com.raytheon.uf.viz.monitor.ffmp/src/com/raytheon/uf/viz/monitor/ffmp/ui/dialogs/FFMPTableCellData.java + +-rw-r--r-- 1 dmsys dmtool 71285 May 17 14:24 cave/com.raytheon.uf.viz.monitor.ffmp/src/com/raytheon/uf/viz/monitor/ffmp/ui/dialogs/FfmpBasinTableDlg.java +-rw-r--r-- 1 dmsys dmtool 71722 May 17 18:10 /home/dmsys/work/ffmp_fixes/cave/com.raytheon.uf.viz.monitor.ffmp/src/com/raytheon/uf/viz/monitor/ffmp/ui/dialogs/FfmpBasinTableDlg.java + +-rw-r--r-- 1 dmsys dmtool 9851 May 17 14:24 cave/com.raytheon.uf.viz.monitor.ffmp/src/com/raytheon/uf/viz/monitor/ffmp/ui/rsc/FFMPColorUtils.java +-rw-r--r-- 1 dmsys dmtool 10752 May 17 18:10 /home/dmsys/work/ffmp_fixes/cave/com.raytheon.uf.viz.monitor.ffmp/src/com/raytheon/uf/viz/monitor/ffmp/ui/rsc/FFMPColorUtils.java + +-rw-r--r-- 1 dmsys dmtool 40157 May 17 14:24 cave/com.raytheon.uf.viz.monitor.ffmp/src/com/raytheon/uf/viz/monitor/ffmp/ui/rsc/FFMPDataGenerator.java +-rw-r--r-- 1 dmsys dmtool 40273 May 17 18:11 /home/dmsys/work/ffmp_fixes/cave/com.raytheon.uf.viz.monitor.ffmp/src/com/raytheon/uf/viz/monitor/ffmp/ui/rsc/FFMPDataGenerator.java + +-rw-r--r-- 1 dmsys dmtool 18611 May 17 14:24 cave/com.raytheon.uf.viz.monitor.ffmp/src/com/raytheon/uf/viz/monitor/ffmp/ui/rsc/FFMPDataLoader.java +-rw-r--r-- 1 dmsys dmtool 19531 May 17 18:11 /home/dmsys/work/ffmp_fixes/cave/com.raytheon.uf.viz.monitor.ffmp/src/com/raytheon/uf/viz/monitor/ffmp/ui/rsc/FFMPDataLoader.java + +-rw-r--r-- 1 dmsys dmtool 147202 May 17 14:24 cave/com.raytheon.uf.viz.monitor.ffmp/src/com/raytheon/uf/viz/monitor/ffmp/ui/rsc/FFMPResource.java +-rw-r--r-- 1 dmsys dmtool 147364 May 17 18:11 /home/dmsys/work/ffmp_fixes/cave/com.raytheon.uf.viz.monitor.ffmp/src/com/raytheon/uf/viz/monitor/ffmp/ui/rsc/FFMPResource.java + +-rw-r--r-- 1 dmsys dmtool 14664 May 17 14:24 edexOsgi/com.raytheon.uf.common.dataplugin.ffmp/src/com/raytheon/uf/common/dataplugin/ffmp/FFMPDataContainer.java +-rw-r--r-- 1 dmsys dmtool 15108 May 17 18:11 /home/dmsys/work/ffmp_fixes/edexOsgi/com.raytheon.uf.common.dataplugin.ffmp/src/com/raytheon/uf/common/dataplugin/ffmp/FFMPDataContainer.java + +-rw-r--r-- 1 dmsys dmtool 26923 May 17 14:24 edexOsgi/com.raytheon.uf.common.dataplugin.ffmp/src/com/raytheon/uf/common/dataplugin/ffmp/FFMPRecord.java +-rw-r--r-- 1 dmsys dmtool 27099 May 17 18:11 /home/dmsys/work/ffmp_fixes/edexOsgi/com.raytheon.uf.common.dataplugin.ffmp/src/com/raytheon/uf/common/dataplugin/ffmp/FFMPRecord.java + +-rw-r--r-- 1 dmsys dmtool 61981 May 17 14:24 edexOsgi/com.raytheon.uf.common.monitor/src/com/raytheon/uf/common/monitor/scan/ScanUtils.java +-rw-r--r-- 1 dmsys dmtool 61329 May 17 18:11 /home/dmsys/work/ffmp_fixes/edexOsgi/com.raytheon.uf.common.monitor/src/com/raytheon/uf/common/monitor/scan/ScanUtils.java + +-rw-r--r-- 1 dmsys dmtool 17730 May 17 14:24 edexOsgi/com.raytheon.uf.edex.plugin.ffmp/src/com/raytheon/uf/edex/plugin/ffmp/FFMPURIFilter.java +-rw-r--r-- 1 dmsys dmtool 21327 May 17 18:11 /home/dmsys/work/ffmp_fixes/edexOsgi/com.raytheon.uf.edex.plugin.ffmp/src/com/raytheon/uf/edex/plugin/ffmp/FFMPURIFilter.java + +-rw-r--r-- 1 dmsys dmtool 65982 May 17 14:24 edexOsgi/com.raytheon.uf.edex.plugin.ffmp/src/com/raytheon/uf/edex/plugin/ffmp/common/FFMPProcessor.java +-rw-r--r-- 1 dmsys dmtool 65837 May 17 18:11 /home/dmsys/work/ffmp_fixes/edexOsgi/com.raytheon.uf.edex.plugin.ffmp/src/com/raytheon/uf/edex/plugin/ffmp/common/FFMPProcessor.java + +-rw-r--r-- 1 dmsys dmtool 36163 May 17 14:24 edexOsgi/com.raytheon.uf.edex.plugin.ffmp/src/com/raytheon/uf/edex/plugin/ffmp/common/FFTI.java +-rw-r--r-- 1 dmsys dmtool 36591 May 17 18:11 /home/dmsys/work/ffmp_fixes/edexOsgi/com.raytheon.uf.edex.plugin.ffmp/src/com/raytheon/uf/edex/plugin/ffmp/common/FFTI.java + diff --git a/edexOsgi/build.edex/esb/conf/spring/project.properties b/edexOsgi/build.edex/esb/conf/spring/project.properties index 7cb747f4ff..8c9c61e54a 100644 --- a/edexOsgi/build.edex/esb/conf/spring/project.properties +++ b/edexOsgi/build.edex/esb/conf/spring/project.properties @@ -17,11 +17,29 @@ rpggenvdata.envdata.cron=0+0+*+*+*+? rpggenvdata.biastable.cron=0+26,46+*+*+*+? metartohmdb.cron=0+14+*+*+*+? distribution.cron=0/5+*+*+*+*+? -purge.cron=0+30+*+*+*+? -purge.outgoing.cron=0+30+*+*+*+? -purge.logs.cron=0+30+0+*+*+? mpelightningsrv.cron=0+0/30+*+*+*+? qc.cron=0+2,7,12,17,22,27,32,37,42,47,52,57+*+*+*+? acarssounding.cron=00+10,30,50+*+*+*+? gfe.cron=0+15+*+*+*+? -repack.cron=0+20+*+*+*+? \ No newline at end of file +repack.cron=0+20+*+*+*+? + +###purge configuration +# Interval at which the purge job kicks off +purge.cron=0+0/1+*+*+*+? +# Interval at which the outgoing files are purged +purge.outgoing.cron=0+30+*+*+*+? +# Interval at which the logs are purged +purge.logs.cron=0+30+0+*+*+? + +# Master switch to enable and disable purging +purge.enabled=true +# The number of simultaneous purge jobs allowed on a cluster +purge.clusterlimit=6 +# The number of simultaneous purge jobs allowed on given server +purge.serverlimit=2 +# The running time (in minutes) of a job before it is assumed to be hung +purge.deadjobage=20 +# The frequency (in minutes) of how often a plugin may be purged +purge.frequency=60 +# How many consecutive times to allow a purger to fail before it is considered a fatal failure +purge.fatalfailurecount=3 \ No newline at end of file diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/arealFloodAdvisory.vm b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/arealFloodAdvisory.vm index 492ed4c1f8..57cd016faa 100644 --- a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/arealFloodAdvisory.vm +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/arealFloodAdvisory.vm @@ -7,6 +7,7 @@ ## Mike Dangelo 1-25-2012 at CRH TIM ## ## Evan Bookbinder 2-24-2012 ## ## Phil Kurimski 2-28-2012 for OB 12.2.1-3 ## +## Evan Bookbinder 4-25-2012 for OB 12.3.1 (MND) ## #if(${action} == "EXT") #set($starttime = "000000T0000Z") @@ -65,6 +66,7 @@ ## ${WMOId} ${vtecOffice} 000000 ${BBBId} FLS${siteId} + #if(${productClass}=="T") TEST...FLOOD ADVISORY...TEST #else diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/arealFloodAdvisory.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/arealFloodAdvisory.xml index a94cae4b68..ab1c53e225 100644 --- a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/arealFloodAdvisory.xml +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/arealFloodAdvisory.xml @@ -207,6 +207,7 @@ NAME STATE FE_AREA + TIME_ZONE countyTypes.txt FIPS NAME diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/arealFloodAdvisoryFollowup.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/arealFloodAdvisoryFollowup.xml index 231d017250..134c25f2d8 100644 --- a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/arealFloodAdvisoryFollowup.xml +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/arealFloodAdvisoryFollowup.xml @@ -168,6 +168,7 @@ NAME STATE FE_AREA + TIME_ZONE countyTypes.txt FIPS NAME diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/arealFloodAdvisoryFollowup_Zones.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/arealFloodAdvisoryFollowup_Zones.xml index 9ef695da9c..5fa4770733 100644 --- a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/arealFloodAdvisoryFollowup_Zones.xml +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/arealFloodAdvisoryFollowup_Zones.xml @@ -200,6 +200,7 @@ NAME STATE FE_AREA + TIME_ZONE countyTypes.txt NAME diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/arealFloodAdvisory_Zones.vm b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/arealFloodAdvisory_Zones.vm index dd8ec52358..1531f39034 100644 --- a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/arealFloodAdvisory_Zones.vm +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/arealFloodAdvisory_Zones.vm @@ -5,6 +5,7 @@ ## Mary-Beth Schreck, Ed Plumb, Aaron Jacobs 9-22-2011 at Alaska TIM ## Mike Dangelo 01-26-2012 at CRH TIM ## Phil Kurimski 2-29-2012 +## Evan Bookbinder 4-25-2012 for OB 12.3.1 (MND) ## #if(${action} == "EXT") #set($starttime = "000000T0000Z") @@ -64,6 +65,7 @@ ## ${WMOId} ${vtecOffice} 000000 ${BBBId} FLS${siteId} + #if(${productClass}=="T") TEST...FLOOD ADVISORY...TEST #else diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/arealFloodAdvisory_Zones.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/arealFloodAdvisory_Zones.xml index 07185126ab..32ff00e343 100644 --- a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/arealFloodAdvisory_Zones.xml +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/arealFloodAdvisory_Zones.xml @@ -252,6 +252,7 @@ NAME STATE FE_AREA + TIME_ZONE countyTypes.txt NAME diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/arealFloodWarning.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/arealFloodWarning.xml index d18790cbec..80a438edf9 100644 --- a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/arealFloodWarning.xml +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/arealFloodWarning.xml @@ -238,6 +238,7 @@ NAME STATE FE_AREA + TIME_ZONE countyTypes.txt FIPS NAME diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/arealFloodWarningFollowup.vm b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/arealFloodWarningFollowup.vm index b10f0d77ba..05e3e928e3 100644 --- a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/arealFloodWarningFollowup.vm +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/arealFloodWarningFollowup.vm @@ -6,6 +6,7 @@ ## EDITED BY MIKE DANGELO 1-25-2012 at CRH TIM ## ## EDITED BY EVAN BOOKBINDER 2-24-2012 ## ## EDITED BY PHIL KURIMSKI 2-28-2012 ## +## EDITED BY MIKE REGA 5-02-2012 DR 14885 MND blank line ## #################################### SET SOME VARs ################################### #set ($hycType = "") #set ($floodReason = "") @@ -39,6 +40,7 @@ ###################################################################################### ${WMOId} ${vtecOffice} 000000 ${BBBId} FLS${siteId} + #if(${productClass}=="T") TEST...FLOOD STATEMENT...TEST #else diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/arealFloodWarningFollowup.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/arealFloodWarningFollowup.xml index 145045990e..1433fd1a7b 100644 --- a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/arealFloodWarningFollowup.xml +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/arealFloodWarningFollowup.xml @@ -183,6 +183,7 @@ NAME STATE FE_AREA + TIME_ZONE countyTypes.txt NAME diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/arealFloodWarningFollowup_Zones.vm b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/arealFloodWarningFollowup_Zones.vm index 386f919496..1a4d11a435 100644 --- a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/arealFloodWarningFollowup_Zones.vm +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/arealFloodWarningFollowup_Zones.vm @@ -3,6 +3,7 @@ ####################################################################### ## Created BY MIKE DANGELO 9-19-2011 at Alaska TIM for zones coding ## ## Edited by Phil kurimski 2-29-2012 +## Edited by Mike Rega 5-02-2012 DR 14885-MND blank line #################################### SET SOME VARs ################################### #set ($hycType = "") #set ($floodReason = "") @@ -63,6 +64,7 @@ ###################################################################################### ${WMOId} ${vtecOffice} 000000 ${BBBId} FLS${siteId} + #if(${productClass}=="T") TEST...FLOOD STATEMENT...TEST #else diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/arealFloodWarningFollowup_Zones.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/arealFloodWarningFollowup_Zones.xml index efe8e417bd..ee0d6b7eec 100644 --- a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/arealFloodWarningFollowup_Zones.xml +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/arealFloodWarningFollowup_Zones.xml @@ -217,6 +217,7 @@ NAME STATE FE_AREA + TIME_ZONE countyTypes.txt NAME diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/arealFloodWarning_Zones.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/arealFloodWarning_Zones.xml index ebd55fe99d..1301279c46 100644 --- a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/arealFloodWarning_Zones.xml +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/arealFloodWarning_Zones.xml @@ -260,6 +260,7 @@ NAME STATE FE_AREA + TIME_ZONE countyTypes.txt NAME diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/config.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/config.xml index a0c7b00bec..1a24461016 100644 --- a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/config.xml +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/config.xml @@ -26,4 +26,10 @@ severeThunderstormWarning Tornado/tornadoWarning,Severe Thunderstorm/severeThunderstormWarning,Severe Weather Statement/severeWeatherStatement,Significant Weather Advisory/significantWeatherAdvisory,Flash Flood Warning/flashFloodWarning Flash Flood Statement/flashFloodWarningFollowup,Non-Convective FFW (incl. Dam Break)/nonConvectiveFlashFloodWarning,Non-Convective Flash Flood Statement/nonConvectiveFlashFloodWarningFollowup,Areal Flood Warning/arealFloodWarning,Areal Flood Warning Followup/arealFloodWarningFollowup,Areal Flood Advisory/arealFloodAdvisory,Areal Flood Advisory Followup/arealFloodAdvisoryFollowup,Special Weather Statement/specialWeatherStatement,Short Term Forecast/shortTermForecast + + + 600 + 600 + true + diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/customTemplate.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/customTemplate.xml index c96e01abc3..5a5af277f5 100644 --- a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/customTemplate.xml +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/customTemplate.xml @@ -100,6 +100,7 @@ NAME STATE FE_AREA + TIME_ZONE countyTypes.txt FIPS NAME diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/extremeWindWarning.vm b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/extremeWindWarning.vm index 9e77b4dc75..329120f96b 100644 --- a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/extremeWindWarning.vm +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/extremeWindWarning.vm @@ -17,11 +17,10 @@ ${ugcline} BULLETIN - EAS ACTIVATION REQUESTED #if(${productClass}=="T") -TEST...EXTREME WIND WARNING...TEST## +TEST...EXTREME WIND WARNING...TEST #else -EXTREME WIND WARNING## +EXTREME WIND WARNING #end - NATIONAL WEATHER SERVICE ${officeShort} #backupText(${backupSite}) ${dateUtil.format(${now}, ${timeFormat.header}, ${localtimezone})} diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/extremeWindWarning.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/extremeWindWarning.xml index 9fd918e725..4fd50c9bad 100644 --- a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/extremeWindWarning.xml +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/extremeWindWarning.xml @@ -113,6 +113,7 @@ NAME STATE FE_AREA + TIME_ZONE countyTypes.txt FIPS NAME diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/extremeWindWarningFollowup.vm b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/extremeWindWarningFollowup.vm index 2c1a5be9bb..5c04f8e1c5 100644 --- a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/extremeWindWarningFollowup.vm +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/extremeWindWarningFollowup.vm @@ -1,6 +1,7 @@ ################################################# ## EWW SVS ## ## MODIFIED EVAN BOOKBINDER 09-16-2011 OB11.0.8-8 +## Evan Bookbinder 4-25-2012 for OB 12.3.1 (corText) ################################################ ## ### CREATE PHRASING DEPENDING ON WHETHER WE ISSUE EXP PRIOR TO EXPIRATION TIME OR NOT @@ -12,19 +13,12 @@ #set($expcanHLTag = "IS CANCELLED") #end ############# -## EWW COR ## -############# -#if(${specialCorText}) -${WMOId} ${vtecOffice} 000000 ${BBBId} -SVS${siteId} -${specialCorText} -#else -############# ## EWW CAN ## ############# #if(${action}=="CAN") ${WMOId} ${vtecOffice} 000000 ${BBBId} SVS${siteId} + #if(${productClass}=="T") TEST...SEVERE WEATHER STATEMENT...TEST #else @@ -127,6 +121,7 @@ THIS IS A TEST MESSAGE. ## ## ${WMOId} ${vtecOffice} 000000 ${BBBId} SVS${siteId} + #if(${productClass}=="T") TEST...SEVERE WEATHER STATEMENT...TEST #else @@ -283,6 +278,7 @@ THE SAFEST PLACE TO BE DURING A MAJOR LANDFALLING HURRICANE IS IN A REINFORCED I ## ${WMOId} ${vtecOffice} 000000 ${BBBId} SVS${siteId} + #if(${productClass}=="T") TEST...SEVERE WEATHER STATEMENT...TEST #else @@ -439,8 +435,7 @@ THE SAFEST PLACE TO BE DURING A MAJOR LANDFALLING HURRICANE IS IN A REINFORCED I ${WMOId} ${vtecOffice} 000000 ${BBBId} SVS${siteId} -SEVERE WEATHER STATEMENT## - +SEVERE WEATHER STATEMENT NATIONAL WEATHER SERVICE ${officeShort} #backupText(${backupSite}) ${dateUtil.format(${now}, ${timeFormat.header}, ${localtimezone})} @@ -497,4 +492,3 @@ ${mathUtil.round(${movementInKnots})}KT ## $$ !**NAME/INITIALS**! -#end diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/extremeWindWarningFollowup.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/extremeWindWarningFollowup.xml index 9a99fb309d..8ff99803bc 100644 --- a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/extremeWindWarningFollowup.xml +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/extremeWindWarningFollowup.xml @@ -123,6 +123,7 @@ NAME STATE FE_AREA + TIME_ZONE countyTypes.txt FIPS NAME diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/ffwfaw.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/ffwfaw.xml index fc06317912..7b9258cdb7 100644 --- a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/ffwfaw.xml +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/ffwfaw.xml @@ -257,6 +257,7 @@ NAME STATE FE_AREA + TIME_ZONE countyTypes.txt FIPS diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/fireWarning.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/fireWarning.xml index 6e6ffe3f74..372555f6f7 100644 --- a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/fireWarning.xml +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/fireWarning.xml @@ -1,6 +1,8 @@ @@ -92,6 +94,8 @@ COUNTYNAME NAME STATE + FE_AREA + TIME_ZONE countyTypes.txt FIPS diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/flashFloodWarning.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/flashFloodWarning.xml index 31f40e99ac..d27ccefda8 100644 --- a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/flashFloodWarning.xml +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/flashFloodWarning.xml @@ -219,6 +219,7 @@ NAME STATE FE_AREA + TIME_ZONE countyTypes.txt FIPS diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/flashFloodWarningFollowup.vm b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/flashFloodWarningFollowup.vm index 82f0cbd285..6e3c297201 100644 --- a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/flashFloodWarningFollowup.vm +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/flashFloodWarningFollowup.vm @@ -8,6 +8,7 @@ ## Modified by MIKE DANGELO 2-23-2012 ## Modified by EVAN BOOKBINDER 2-24-2012 ## Modified by Phil Kurimski 2-29-2012 +## Modified by Mike Rega 05-02-2012 - DR 14885 MND blank line #################################### SET SOME VARs ################################### #set ($hycType = "") #set ($snowMelt = "") @@ -23,6 +24,7 @@ ###################################################################################### ${WMOId} ${vtecOffice} 000000 ${BBBId} FFS${siteId} + #if(${productClass}=="T") TEST...FLASH FLOOD STATEMENT...TEST #else diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/flashFloodWarningFollowup.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/flashFloodWarningFollowup.xml index bae885e23f..29ee6edb61 100644 --- a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/flashFloodWarningFollowup.xml +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/flashFloodWarningFollowup.xml @@ -178,6 +178,7 @@ NAME STATE FE_AREA + TIME_ZONE countyTypes.txt FIPS diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/flashFloodWarningFollowup_Zones.vm b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/flashFloodWarningFollowup_Zones.vm index 344d8c3de2..93b2024927 100644 --- a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/flashFloodWarningFollowup_Zones.vm +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/flashFloodWarningFollowup_Zones.vm @@ -6,6 +6,7 @@ ## done in August. ## Edited by Mike Dangelo 01-26-2012 at CRH TIM ## Edited by Phil Kurimski 2-29-2012 +## Edited by Mike Rega 5-02-2012 DR 14885 MND blank line #################################### SET SOME VARs ################################### #set ($hycType = "") #set ($snowMelt = "") @@ -21,6 +22,7 @@ ###################################################################################### ${WMOId} ${vtecOffice} 000000 ${BBBId} FFS${siteId} + #if(${productClass}=="T") TEST...FLASH FLOOD STATEMENT...TEST #else diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/flashFloodWarningFollowup_Zones.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/flashFloodWarningFollowup_Zones.xml index 6fb1a163a6..46917cccdd 100644 --- a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/flashFloodWarningFollowup_Zones.xml +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/flashFloodWarningFollowup_Zones.xml @@ -183,6 +183,7 @@ NAME STATE FE_AREA + TIME_ZONE countyTypes.txt STATE_ZONE diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/flashFloodWarning_Zones.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/flashFloodWarning_Zones.xml index 693ea1ad18..bf0b1034e5 100644 --- a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/flashFloodWarning_Zones.xml +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/flashFloodWarning_Zones.xml @@ -216,6 +216,7 @@ NAME STATE FE_AREA + TIME_ZONE countyTypes.txt STATE_ZONE diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/impactSevereThunderstormWarning.vm b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/impactSevereThunderstormWarning.vm index 283e35be4b..628fb62734 100644 --- a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/impactSevereThunderstormWarning.vm +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/impactSevereThunderstormWarning.vm @@ -4,6 +4,7 @@ ## CREATED BY PHIL KURIMSKI - WFO DTX ## ## VERSION AWIPS II 1.0 -- 2-21-2012 OB12.1.1-1 ## ## VERSION AWIPS II 1.1 -- 2-29-2012 OB12.2.1-4 ## +## VERSION AWIPS II 1.2 -- 4-20-2012 ## ################################################################ ## ##SET SOME INITIAL VARIABLES @@ -18,12 +19,12 @@ #set ($report = "A LINE OF SEVERE THUNDERSTORMS WAS REPORTED") #set($reportType1 = "LINE OF SEVERE THUNDERSTORMS") #set($reportType2 = "THESE STORMS WERE") - #set($reportType3 = "A LINE OF SEVERE THUNDERSTORMS ARE") + #set($reportType3 = "A LINE OF SEVERE THUNDERSTORMS WAS LOCATED") #else #set ($report = "A SEVERE THUNDERSTORM WAS REPORTED") #set($reportType1 = "SEVERE THUNDERSTORM") #set($reportType2 = "THIS STORM WAS") - #set($reportType3 = "A SEVERE THUNDERSTORM IS") + #set($reportType3 = "A SEVERE THUNDERSTORM WAS LOCATED") #end ###################################################### ## Check to see if the SVR Tornado Tag was selected ## @@ -71,14 +72,14 @@ #set ($windHazard = "60 MPH WIND GUSTS") #set ($windSpeed = 60) #set ($windTag = "60MPH") - #set ($windImpact = "LARGE TREE LIMBS BROKEN OFF PARTIALLY BLOCKING ROADS...DAMAGING BUILDINGS...HOMES AND DOWNING POWER LINES.") + #set ($windImpact = "MINOR TREE DAMAGE...WITH LIMBS UP TO ONE INCH IN DIAMETER BROKEN.") #end #if(${list.contains($bullets, "70mphWind")}) #set ($windThreat = "DESTRUCTIVE WINDS IN EXCESS OF 70 MPH") #set ($windHazard = "70 MPH WIND GUSTS") #set ($windSpeed = 70) #set ($windTag = "70MPH") - #set ($windImpact = "TREES TO BE UPROOTED BLOCKING ROADS...DAMAGING BUILDINGS...HOMES AND DOWNING POWER LINES.") + #set ($windImpact = "TREE BRANCHES UP TO THREE INCHES IN DIAMETER BROKEN. POSSIBLE MINOR DAMAGE TO SHINGLE ROOFS AND METAL OUTBUILDINGS.") #end #if(${list.contains($bullets, "80mphWind")}) #set ($windThreat = "DESTRUCTIVE WINDS IN EXCESS OF 80 MPH") @@ -86,8 +87,7 @@ #set ($windSpeed = 80) #set ($windTag = "80MPH") #set ($pdssvr = "THIS IS A VERY DANGEROUS STORM.") - #set ($extensive = "EXTENSIVE ") - #set ($windImpact = "TREES TO BE UPROOTED BLOCKING ROADS...DAMAGING BUILDINGS...HOMES AND DOWNING POWER LINES.") + #set ($windImpact = "LARGE TREE BRANCHES MAY BE BROKEN...POSSIBLY BLOCKING ROADS AND DOWNING POWER LINES. SUBSTANTIAL ROOF COVERING DAMAGE LIKELY. METAL OUTBUILDINGS DAMAGED. SIGNIFICANT FLYING DEBRIS WILL BE DANGEROUS FOR ANYONE EXPOSED TO THE ELEMENTS.") #end #if(${list.contains($bullets, "90mphWind")}) #set ($windThreat = "EXTREME DAMAGING WINDS IN EXCESS OF 90 MPH") @@ -95,8 +95,7 @@ #set ($windSpeed = 90) #set ($windTag = "90MPH") #set ($pdssvr = "THIS IS A VERY DANGEROUS STORM.") - #set ($extensive = "EXTENSIVE ") - #set ($windImpact ="TREES TO BE UPROOTED BLOCKING ROADS...DAMAGING BUILDINGS...HOMES AND DOWNING POWER LINES.") + #set ($windImpact ="MOBILE HOMES MAY SUFFER MAJOR ROOF FAILURE. SUBSTANTIAL ROOF AND WINDOW DAMAGE TO SINGLE FAMILY HOMES. SOME TREES UPROOTED POSSIBLY BLOCKING ROADS AND KNOCKING DOWN POWER LINES. SIGNIFICANT FLYING AND FALLING DEBRIS MAY PROVE DEADLY FOR ANYONE EXPOSED TO THE ELEMENTS.") #end #if(${list.contains($bullets, "100mphWind")}) #set ($windThreat = "EXTREME DAMAGING WINDS IN EXCESS OF 100 MPH") @@ -104,15 +103,14 @@ #set ($windSpeed = 100) #set ($windTag = "100MPH") #set ($pdssvr = "THIS IS A VERY DANGEROUS STORM.") - #set ($extensive = "EXTENSIVE ") - #set ($windImpact ="TREES TO BE UPROOTED BLOCKING ROADS...DAMAGING BUILDINGS...HOMES AND DOWNING POWER LINES.") + #set ($windImpact ="SIGNIFICANT ROOF AND WINDOW LOSS OF SINGLE FAMILY HOMES. COMPLETE DESTRUCTION OF MOBILE HOMES AND METAL BARNS AND OUTBUILDINGS LIKELY. NUMEROUS TREES UPROOTED AND SOME TREE TRUNKS SNAPPED. SUBSTANTIAL POWER OUTAGES LIKELY. SIGNIFICANT FLYING AND FALLING DEBRIS WILL PROVE DEADLY TO THOSE WHO DO NOT SEEK SHELTER.") #end ################################################### ## HANDLE HAIL POSSIBILITIES ###################### ################################################### #set ($hailSize = 0) #set ($smallHail = "") -#set ($hailImpact = "DAMAGE TO ROOFS AND WINDOWS.") +#set ($hailImpact = "") #set ($hailTag = "<.75IN") #if(${list.contains($bullets, "pennyHail")}) #set ($hailThreat = "PENNY SIZE") @@ -121,6 +119,7 @@ #set ($hailLead = "") #set ($hailSize = 0.75) #set ($hailTag = "0.75IN") + #set ($hailImpact = "MINOR DAMAGE TO VEHICLES...ROOFS AND WINDOWS.") #end #if(${list.contains($bullets, "nickelHail")}) #set ($hailThreat = "NICKEL SIZE") @@ -129,6 +128,7 @@ #set ($hailLead = "") #set ($hailSize = 0.88) #set ($hailTag = "0.88IN") + #set ($hailImpact = "MINOR DAMAGE TO VEHICLES...ROOFS AND WINDOWS.") #end #if(${list.contains($bullets, "quarterHail")}) #set ($hailThreat = "QUARTER SIZE") @@ -137,6 +137,7 @@ #set ($hailLead = "") #set ($hailSize = 1.00) #set ($hailTag = "1.00IN") + #set ($hailImpact = "MINOR DAMAGE TO VEHICLES...ROOFS AND WINDOWS.") #end #if(${list.contains($bullets, "halfdollarHail")}) #set ($hailThreat = "HALF DOLLAR SIZE") @@ -145,6 +146,7 @@ #set ($hailLead = "") #set ($hailSize = 1.25) #set ($hailTag = "1.25IN") + #set ($hailImpact = "MINOR DAMAGE TO VEHICLES...ROOFS AND WINDOWS.") #end #if(${list.contains($bullets, "pingpongHail")}) #set ($hailThreat = "PING PONG BALL SIZE") @@ -153,6 +155,7 @@ #set ($hailTrail = "") #set ($hailSize = 1.50) #set ($hailTag = "1.50IN") + #set ($hailImpact = "DAMAGE TO VEHICLES...ROOFS AND WINDOWS.") #end #if(${list.contains($bullets, "golfballHail")}) #set ($hailThreat = "GOLF BALL SIZE") @@ -189,8 +192,7 @@ #set ($hailSize = 2.75) #set ($hailTag = "2.75IN") #set ($pdssvr = "THIS IS A VERY DANGEROUS STORM.") - #set ($extensive = "EXTENSIVE ") - #set ($hailImpact = "DAMAGE TO ROOFS...WINDOWS AND VEHICLES.") + #set ($hailImpact = "EXTENSIVE DAMAGE TO ROOFS...WINDOWS AND VEHICLES.") #end #if(${list.contains($bullets, "threeinchHail")}) #set ($hailThreat = "THREE INCHES IN DIAMETER") @@ -200,8 +202,7 @@ #set ($hailSize = 3.00) #set ($hailTag = "3.00IN") #set ($pdssvr = "THIS IS A VERY DANGEROUS STORM.") - #set ($extensive = "EXTENSIVE ") - #set ($hailImpact = "DAMAGE TO ROOFS...WINDOWS AND VEHICLES.") + #set ($hailImpact = "EXTENSIVE DAMAGE TO ROOFS...WINDOWS AND VEHICLES.") #end #if(${list.contains($bullets, "grapefruitHail")}) #set ($hailThreat = "GRAPEFRUIT SIZE") @@ -211,8 +212,7 @@ #set ($hailSize = 4.00) #set ($hailTag = "4.00IN") #set ($pdssvr = "THIS IS A VERY DANGEROUS STORM.") - #set ($extensive = "EXTENSIVE ") - #set ($hailImpact = "DAMAGE TO ROOFS...WINDOWS AND VEHICLES.") + #set ($hailImpact = "EXTENSIVE DAMAGE TO ROOFS...WINDOWS AND VEHICLES.") #end #if(${list.contains($bullets, "softballHail")}) #set ($hailThreat = "SOFTBALL SIZE") @@ -222,8 +222,7 @@ #set ($hailSize = 4.25) #set ($hailTag = "4.25IN") #set ($pdssvr = "THIS IS A VERY DANGEROUS STORM.") - #set ($extensive = "EXTENSIVE ") - #set ($hailImpact = "DAMAGE TO ROOFS...WINDOWS AND VEHICLES.") + #set ($hailImpact = "EXTENSIVE DAMAGE TO ROOFS...WINDOWS AND VEHICLES.") #end ################################################################### ### CHANGE MND EAS INSTRUCTIONS FOR REALLY SEVERE STORMS ########## @@ -245,36 +244,56 @@ #if (${hailSize} < 1) #set ($hailwind = " ${reportAuthSVR} ${windThreat}") #set ($smallHail = "${hailThreat}${hailTrail} MAY ALSO ACCOMPANY THE DAMAGING WINDS.") - #set ($impact = "${extensive}${hailImpact} ${windImpact}") +## #set ($impact = "${hailImpact} ${windImpact}") #set ($hazard = "${windHazard} AND ${hailHazard}.") + #* #if(${list.contains($bullets, "svrTorTag")}) #set ($hazard = "${windHazard}...${hailHazard} AND POSSIBLE TORNADO.") #end + *# #else #set ($hailwind = " ${reportAuthSVR} ${hailLead}${hailThreat}${hailTrail} AND ${windThreat}") - #set ($impact = "${extensive}${hailImpact} ${windImpact}") +## #set ($impact = "${hailImpact} ${windImpact}") #set ($hazard = "${hailHazard} AND ${windHazard}.") + #* #if(${list.contains($bullets, "svrTorTag")}) #set ($hazard = "${hailHazard}...${windHazard} AND POSSIBLE TORNADO.") #end + *# #end #set ($windhailTag = "WIND...HAIL ${windTag} ${hailTag}") #elseif(${hailSize} > 0) #set ($hailwind = " ${reportAuthSVR} ${hailLead}${hailThreat}${hailTrail}") #set ($windhailTag = "WIND...HAIL <50MPH ${hailTag}") - #set ($impact = "${extensive}${hailImpact}") +## #set ($impact = "${hailImpact}") #set ($hazard = "${hailHazard}.") + #* #if(${list.contains($bullets, "svrTorTag")}) #set ($hazard = "${hailHazard} AND POSSIBLE TORNADO.") #end + *# #elseif(${windSpeed} > 0) #set ($hailwind = " ${reportAuthSVR} ${windThreat}") #set ($windhailTag = "WIND...HAIL ${windTag} <.75IN") - #set ($impact = "${extensive}${hailImpact} ${windImpact}") +## #set ($impact = "${hailImpact} ${windImpact}") #set ($hazard = "${windHazard}.") + #* #if(${list.contains($bullets, "svrTorTag")}) #set ($hazard = "${windHazard} AND POSSIBLE TORNADO.") #end + *# +#end +###################################################################### +## Setup wind/hail impact statement based on wind speed and hail size +###################################################################### +#if (${hailSize} < 1 && ${windSpeed} < 58) + #set ($impact = "!**YOU DID NOT SELECT ANY SEVERE WIND OR HAIL THREATS. PLEASE CLOSE THIS WINDOW AND RE-GENERATE THIS WARNING!**!") +#elseif(${hailSize} > 0 && ${windSpeed} < 80 && ${hailSize} < 2.75) + #set ($impact = "${hailImpact} ${windImpact}") +#elseif(${hailSize} > 2.50 && ${windSpeed} < 80) + #set ($impact = "${hailImpact}") +#elseif(${windSpeed} >= 80) + #set ($impact = "${windImpact}") #end ################################################################ ######### ~*~*~*~*~*~* BEGIN OUTPUT ~*~*~*~*~*~*~ ############## @@ -445,6 +464,16 @@ PRECAUTIONARY/PREPAREDNESS ACTIONS... #end ## #if(${list.contains($bullets, "torWatchRemainsInEffectCTA")}) +#if(${list.contains($bullets, "svrTorTag")}) +REMAIN ALERT FOR A POSSIBLE TORNADO! TORNADOES CAN DEVELOP QUICKLY FROM SEVERE THUNDERSTORMS. IF YOU SPOT A TORNADO GO AT ONCE INTO THE BASEMENT OR SMALL CENTRAL ROOM IN A STURDY STRUCTURE. + +#else +A TORNADO WATCH REMAINS IN EFFECT FOR THE WARNED AREA. TORNADOES CAN DEVELOP QUICKLY FROM SEVERE THUNDERSTORMS. ALTHOUGH ONE IS NOT IMMEDIATELY LIKELY...IF A TORNADO IS SPOTTED...ACT QUICKLY AND MOVE TO A PLACE OF SAFETY INSIDE A STURDY STRUCTURE...SUCH AS A BASEMENT OR SMALL INTERIOR ROOM. + +#end +#end +## +#if(${list.contains($bullets, "torPossibleTagCTA")}) REMAIN ALERT FOR A POSSIBLE TORNADO! TORNADOES CAN DEVELOP QUICKLY FROM SEVERE THUNDERSTORMS. IF YOU SPOT A TORNADO GO AT ONCE INTO THE BASEMENT OR SMALL CENTRAL ROOM IN A STURDY STRUCTURE. #end @@ -452,20 +481,10 @@ REMAIN ALERT FOR A POSSIBLE TORNADO! TORNADOES CAN DEVELOP QUICKLY FROM SEVERE T #if(${list.contains($bullets, "genericCTA")}) FOR YOUR PROTECTION MOVE TO AN INTERIOR ROOM ON THE LOWEST FLOOR OF A BUILDING. -#end -## -#if(${list.contains($bullets, "canProduceTornadoesCTA")}) -UNDER CURRENT CONDITIONS TORNADO DEVELOPMENT IS NOT LIKELY...BUT TORNADOES CAN DEVELOP QUICKLY FROM SEVERE THUNDERSTORMS. ALTHOUGH ONE IS NOT IMMEDIATELY LIKELY...IF A TORNADO IS SPOTTED...ACT QUICKLY AND MOVE TO A PLACE OF SAFETY IN A STURDY STRUCTURE...SUCH AS A BASEMENT OR SMALL INTERIOR ROOM. - #end ## #if(${list.contains($bullets, "largeHailCTA")}) -PREPARE IMMEDIATELY FOR LARGE HAIL AND DEADLY CLOUD TO GROUND LIGHTNING. PEOPLE OUTSIDE SHOULD MOVE TO A SHELTER...INSIDE A STRONG BUILDING AND AWAY FROM WINDOWS. - -#end -## -#if(${list.contains($bullets, "veryLargeHailCTA")}) -PREPARE IMMEDIATELY FOR LARGE DESTRUCTIVE HAIL CAPABLE OF PRODUCING SIGNIFICANT DAMAGE. PEOPLE OUTSIDE SHOULD MOVE TO A SHELTER...INSIDE A STRONG BUILDING AND AWAY FROM WINDOWS. +PREPARE IMMEDIATELY FOR LARGE HAIL AND DEADLY CLOUD TO GROUND LIGHTNING. SEEK SHELTER INSIDE A WELL-BUILT STRUCTURE. STAY AWAY FROM WINDOWS. #end ## @@ -486,20 +505,60 @@ THIS STORM IS PRODUCING LARGE HAIL. SEEK SHELTER NOW INSIDE A STURDY STRUCTURE A ## #if(${list.contains($bullets, "historyWindCTA")}) #if(${stormType} == "line") -THIS IS A VERY DANGEROUS SITUATION. THESE STORMS ARE PRODUCING WIDESPREAD WIND DAMAGE ACROSS !** ENTER LOCATION **!. SEEK SHELTER NOW INSIDE A STURDY STRUCTURE AND STAY AWAY FROM WINDOWS. +THIS IS A DANGEROUS SITUATION. THESE STORMS ARE PRODUCING WIDESPREAD WIND DAMAGE ACROSS !** ENTER LOCATION **!. SEEK SHELTER NOW INSIDE A STURDY STRUCTURE AND STAY AWAY FROM WINDOWS. #else -THIS IS A VERY DANGEROUS SITUATION. THIS STORM IS PRODUCING WIDESPREAD WIND DAMAGE ACROSS !** ENTER LOCATION **!. SEEK SHELTER NOW INSIDE A STURDY STRUCTURE AND STAY AWAY FROM WINDOWS. +THIS IS A DANGEROUS SITUATION. THIS STORM IS PRODUCING WIDESPREAD WIND DAMAGE ACROSS !** ENTER LOCATION **!. SEEK SHELTER NOW INSIDE A STURDY STRUCTURE AND STAY AWAY FROM WINDOWS. + +#end +#end +## +#if(${list.contains($bullets, "veryLargeHailCTA")}) +#if(${stormType} == "line") +THESE ARE DANGEROUS STORMS. PREPARE IMMEDIATELY FOR LARGE DESTRUCTIVE HAIL CAPABLE OF PRODUCING SIGNIFICANT DAMAGE. PEOPLE OUTSIDE SHOULD MOVE TO A SHELTER...INSIDE A STRONG BUILDING AND AWAY FROM WINDOWS. + +#else +THIS IS A DANGEROUS STORM. PREPARE IMMEDIATELY FOR LARGE DESTRUCTIVE HAIL CAPABLE OF PRODUCING SIGNIFICANT DAMAGE. PEOPLE OUTSIDE SHOULD MOVE TO A SHELTER...INSIDE A STRONG BUILDING AND AWAY FROM WINDOWS. + +#end +#end +## +#if(${list.contains($bullets, "extremeWindsCTA")}) +#if(${stormType} == "line") +THIS IS AN EXTREMELY DANGEROUS SITUATION WITH TORNADO LIKE WIND SPEEDS EXPECTED. MOBILE HOMES AND HIGH PROFILE VEHICLES ARE ESPECIALLY SUSCEPTIBLE TO WINDS OF THIS MAGNITUDE AND MAY BE OVERTURNED. FOR YOUR PROTECTION MOVE TO AN INTERIOR ROOM ON THE LOWEST FLOOR OF A BUILDING. THESE STORMS HAVE THE POTENTIAL TO CAUSE SERIOUS INJURY AND SIGNIFICANT PROPERTY DAMAGE. + +#else +THIS IS AN EXTREMELY DANGEROUS SITUATION WITH TORNADO LIKE WIND SPEEDS EXPECTED. MOBILE HOMES AND HIGH PROFILE VEHICLES ARE ESPECIALLY SUSCEPTIBLE TO WINDS OF THIS MAGNITUDE AND MAY BE OVERTURNED. FOR YOUR PROTECTION MOVE TO AN INTERIOR ROOM ON THE LOWEST FLOOR OF A BUILDING. THIS STORM HAS THE POTENTIAL TO CAUSE SERIOUS INJURY AND SIGNIFICANT PROPERTY DAMAGE. + +#end +#end +## +#if(${list.contains($bullets, "deadlyStormCTA")}) +#if(${stormType} == "line") +THESE ARE POTENTIALLY DEADLY STORMS. SEEK SHELTER IN AN INTERIOR ROOM ON THE LOWEST FLOOR OF A WELL-BUILT STRUCTURE. ABANDON VEHICLES IN SEARCH OF A MORE SUBSTANTIAL PERMANENT STRUCTURE. STAY AWAY FROM WINDOWS. + +#else +THIS IS A POTENTIALLY DEADLY STORM. SEEK SHELTER IN AN INTERIOR ROOM ON THE LOWEST FLOOR OF A WELL-BUILT STRUCTURE. ABANDON VEHICLES IN SEARCH OF A MORE SUBSTANTIAL PERMANENT STRUCTURE. STAY AWAY FROM WINDOWS. + +#end +#end +## +#if(${list.contains($bullets, "widespreadWindCTA")}) +#if(${stormType} == "line") +THIS IS AN EXTREMELY DANGEROUS SITUATION. THESE STORMS ARE PRODUCING WIDESPREAD WIND DAMAGE ACROSS !** ENTER LOCATION **!. SEEK SHELTER NOW INSIDE A STURDY STRUCTURE AND STAY AWAY FROM WINDOWS. + +#else +THIS IS AN EXTREMELY DANGEROUS SITUATION. THIS STORM IS PRODUCING WIDESPREAD WIND DAMAGE ACROSS !** ENTER LOCATION **!. SEEK SHELTER NOW INSIDE A STURDY STRUCTURE AND STAY AWAY FROM WINDOWS. #end #end ## #if(${list.contains($bullets, "historyWindHailCTA")}) #if(${stormType} == "line") -THIS IS A VERY DANGEROUS SITUATION. THESE STORMS ARE PRODUCING DESTRUCTIVE WINDS AND LARGE DAMAGING HAIL. SEEK SHELTER NOW INSIDE A STURDY STRUCTURE AND STAY AWAY FROM WINDOWS. +THESE STORMS ARE PRODUCING DESTRUCTIVE WINDS AND LARGE DAMAGING HAIL. SEEK SHELTER NOW INSIDE A STURDY STRUCTURE AND STAY AWAY FROM WINDOWS. #else -THIS IS A VERY DANGEROUS SITUATION. THIS STORM IS PRODUCING DESTRUCTIVE WINDS AND LARGE DAMAGING HAIL. SEEK SHELTER NOW INSIDE A STURDY STRUCTURE AND STAY AWAY FROM WINDOWS. +THIS STORM IS PRODUCING DESTRUCTIVE WINDS AND LARGE DAMAGING HAIL. SEEK SHELTER NOW INSIDE A STURDY STRUCTURE AND STAY AWAY FROM WINDOWS. #end #end @@ -507,6 +566,18 @@ THIS IS A VERY DANGEROUS SITUATION. THIS STORM IS PRODUCING DESTRUCTIVE WINDS AN #if(${list.contains($bullets, "lawEnforcementCTA")}) TO REPORT SEVERE WEATHER CONTACT YOUR NEAREST LAW ENFORCEMENT AGENCY. THEY WILL SEND YOUR REPORT TO THE NATIONAL WEATHER SERVICE OFFICE IN ${officeLoc}. +#end +################################ +## SPECIAL CASE CALLS TO ACTION +################################ +#if(${list.contains($bullets, "gustFrontOutflowCTA")}) +#if(${stormType} == "line") +WIND DAMAGE WITH THESE STORMS WILL OCCUR BEFORE ANY RAIN OR LIGHTNING. DO NOT WAIT FOR THE SOUND OF THUNDER BEFORE TAKING COVER. SEEK SHELTER IMMEDIATELY INSIDE A STURDY STRUCTURE AND STAY AWAY FROM WINDOWS. + +#else +WIND DAMAGE WITH THIS STORM WILL OCCUR BEFORE ANY RAIN OR LIGHTNING. DO NOT WAIT FOR THE SOUND OF THUNDER BEFORE TAKING COVER. SEEK SHELTER IMMEDIATELY INSIDE A STURDY STRUCTURE AND STAY AWAY FROM WINDOWS. + +#end #end ## #if(${list.contains($bullets, "squallLineCTA")}) @@ -520,29 +591,17 @@ INTENSE SQUALL LINES CAN SOMETIMES PRODUCE BRIEF TORNADOES AND WIDESPREAD SIGNIF #end ## #if(${list.contains($bullets, "superCellsCTA")}) -THIS IS A SUPERCELL THUNDERSTORM. THEY ARE CAPABLE OF PRODUCING ALL TYPES OF SEVERE WEATHER...INCLUDING EXTREMELY LARGE HAIL...DESTRUCTIVE STRAIGHT LINE WINDS...AND TORNADOES. MOVE QUICKLY TO A SAFE SHELTER...SUCH AS AN INTERIOR ROOM...A BATHROOM OR CLOSET OR BASEMENT. - -#end -## -#if(${list.contains($bullets, "gustFrontOutflowCTA")}) #if(${stormType} == "line") -WIND DAMAGE WITH THESE STORMS WILL OCCUR BEFORE ANY RAIN OR LIGHTNING. DO NOT WAIT FOR THE SOUND OF THUNDER BEFORE TAKING COVER. SEEK SHELTER IMMEDIATELY INSIDE A STURDY STRUCTURE AND STAY AWAY FROM WINDOWS. +THESE THUNDERSTORMS ARE CAPABLE OF PRODUCING ALL TYPES OF SEVERE WEATHER...INCLUDING EXTREMELY LARGE HAIL...DESTRUCTIVE STRAIGHT LINE WINDS...AND TORNADOES. MOVE QUICKLY TO A SAFE SHELTER...SUCH AS AN INTERIOR ROOM...A BATHROOM OR CLOSET OR BASEMENT. #else -WIND DAMAGE WITH THIS STORM WILL OCCUR BEFORE ANY RAIN OR LIGHTNING. DO NOT WAIT FOR THE SOUND OF THUNDER BEFORE TAKING COVER. SEEK SHELTER IMMEDIATELY INSIDE A STURDY STRUCTURE AND STAY AWAY FROM WINDOWS. - -#end -#end -## -#if(${list.contains($bullets, "extremeWindsCTA")}) -#if(${stormType} == "line") -THIS IS AN EXTREMELY DANGEROUS SITUATION WITH TORNADO LIKE WIND SPEEDS EXPECTED. MOBILE HOMES AND HIGH PROFILE VEHICLES ARE ESPECIALLY SUSCEPTIBLE TO WINDS OF THIS MAGNITUDE AND MAY BE OVERTURNED. FOR YOUR PROTECTION MOVE IMMEDIATELY TO A SAFE SHELTER OR TO AN INTERIOR ROOM ON THE LOWEST FLOOR OF A BUILDING. THESE STORMS HAVE THE POTENTIAL TO CAUSE SERIOUS INJURY AND SIGNIFICANT PROPERTY DAMAGE. - -#else -THIS IS AN EXTREMELY DANGEROUS SITUATION WITH TORNADO LIKE WIND SPEEDS EXPECTED. MOBILE HOMES AND HIGH PROFILE VEHICLES ARE ESPECIALLY SUSCEPTIBLE TO WINDS OF THIS MAGNITUDE AND MAY BE OVERTURNED. FOR YOUR PROTECTION MOVE IMMEDIATELY TO A SAFE SHELTER OR TO AN INTERIOR ROOM ON THE LOWEST FLOOR OF A BUILDING. THIS STORM HAS THE POTENTIAL TO CAUSE SERIOUS INJURY AND SIGNIFICANT PROPERTY DAMAGE. +THIS THUNDERSTORM IS CAPABLE OF PRODUCING ALL TYPES OF SEVERE WEATHER...INCLUDING EXTREMELY LARGE HAIL...DESTRUCTIVE STRAIGHT LINE WINDS...AND TORNADOES. MOVE QUICKLY TO A SAFE SHELTER...SUCH AS AN INTERIOR ROOM...A BATHROOM OR CLOSET OR BASEMENT. #end #end +################################ +## MISCELLANEOUS CALLS TO ACTION +################################ ## #if(${list.contains($bullets, "lightningCTA")}) #if(${stormType} == "line") diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/impactSevereThunderstormWarning.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/impactSevereThunderstormWarning.xml index d04fcfdef0..9337f2c19f 100644 --- a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/impactSevereThunderstormWarning.xml +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/impactSevereThunderstormWarning.xml @@ -2,6 +2,9 @@ @@ -108,22 +111,25 @@ - - - - - - - - - + + + + + + + + + + + + - - - - + + + + @@ -171,22 +177,25 @@ - - - - - - - - - + + + + + + + + + + + + - - - - + + + + @@ -208,6 +217,8 @@ NAME STATE + FE_AREA + TIME_ZONE countyTypes.txt FIPS diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/impactSevereWeatherStatement.vm b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/impactSevereWeatherStatement.vm index 569217dd5a..6c45a08e53 100644 --- a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/impactSevereWeatherStatement.vm +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/impactSevereWeatherStatement.vm @@ -4,6 +4,7 @@ ## CREATED BY PHIL KURIMSKI - WFO DTX ## ## VERSION AWIPS II 1.0 -- 2-21-2012 OB12.1.1-1 ## ## VERSION AWIPS II 1.1 -- 2-29-2012 OB12.2.1-4 ## +## VERSION AWIPS II 1.2 -- 4-20-2012 ## ################################################################ ## ################################################################### @@ -23,6 +24,7 @@ #set ($torimpact = "") #set ($svrimpact = "") #set ($confirmed = "") +#set ($preAmbleTOR = "") ############################################ ## CREATE INITIAL SET OF VARIABLES ## ############################################ @@ -45,8 +47,9 @@ #set ($torTag = "RADAR INDICATED") #set ($torThreat = "") #set ($torHazard = "POTENTIAL TORNADO") + #set ($torGround = "ON THE GROUND") #set ($source = "RADAR INDICATED ROTATION.") - #set ($torimpact = "EXTENSIVE DAMAGE TO ROOFS AND WINDOWS. TREES TO BE UPROOTED BLOCKING ROADS...DAMAGING BUILDINGS...HOMES AND DOWNING POWER LINES.") + #set ($torimpact = "SIGNIFICANT HOUSE AND BUILDING DAMAGE POSSIBLE. MOBILE HOMES COMPLETELY DESTROYED IF HIT. SOME TREES UPROOTED OR SNAPPED. VEHICLES WILL LIKELY BE THROWN BY TORNADIC WINDS.") #if(${stormType} == "line") #set ($reportType = "A TORNADO WAS REPORTED") #set($reportType1 = "LINE OF TORNADO PRODUCING STORMS") @@ -70,6 +73,7 @@ ###################################### ${WMOId} ${vtecOffice} 000000 ${BBBId} SVS${siteId} + #if(${productClass}=="T") TEST...SEVERE WEATHER STATEMENT...TEST #else @@ -345,6 +349,7 @@ ${dateUtil.format(${now}, ${timeFormat.header}, ${localtimezone})} #set($reportAuthSVR = "") ############### BASIS SECTION #################### #if(${list.contains($bullets, "dopplerTOR")}) +#set ($torGround = "DEVELOPING") #if(${stormType} == "line") #set($reportType = "A LINE OF SEVERE THUNDERSTORMS CAPABLE OF PRODUCING TORNADOES") #set($reportType2 = "THESE DANGEROUS STORMS WERE") @@ -356,85 +361,78 @@ ${dateUtil.format(${now}, ${timeFormat.header}, ${localtimezone})} #end #elseif(${list.contains($bullets, "dopplerSquallTOR")}) #set ($reportType = "A SEVERE SQUALL LINE CAPABLE OF PRODUCING BOTH TORNADOES AND EXTENSIVE STRAIGHT LINE WIND DAMAGE") - #set ($torTag = "OBSERVED") - #set ($torHazard = "DAMAGING TORNADO") - #set ($source = "STORM SPOTTERS CONFIRMED TORNADO.") - #set ($torimpact = "EXTENSIVE DAMAGE TO HOMES AND BUILDINGS. TREES TO BE UPROOTED BLOCKING ROADS...DAMAGING BUILDINGS...HOMES AND DOWNING POWER LINES.") #set($reportType2 = "THESE DANGEROUS STORMS WERE") #set($pathcastLead = "THESE DANGEROUS STORMS") #elseif(${list.contains($bullets, "confirmedDopplerTOR")}) #set ($torTag = "OBSERVED") #set ($torHazard = "DAMAGING TORNADO") #set ($confirmed = "CONFIRMED ") - #set ($source = "STORM SPOTTERS CONFIRMED TORNADO.") - #set ($torimpact = "EXTENSIVE DAMAGE TO HOMES AND BUILDINGS. TREES TO BE UPROOTED BLOCKING ROADS...DAMAGING BUILDINGS...HOMES AND DOWNING POWER LINES.") + #set ($source = "RADAR CONFIRMED TORNADO.") #if(${stormType} == "line") #set($reportType2 = "THESE TORNADIC STORMS WERE") - #set ($reportType = "A TORNADO PRODUCING STORM IS LOCATED") + #set ($reportType = "A LINE OF TORNADO PRODUCING STORMS WAS LOCATED") #else #set($reportType2 = "THIS TORNADO") - #set ($reportType = "A TORNADO PRODUCING STORMS ARE LOCATED") + #set ($reportType = "A CONFIRMED TORNADO WAS LOCATED") #end - #set($preAmbleTOR = "TO REPEAT...A TORNADO HAS BEEN SIGHTED! TO PROTECT YOUR LIFE...") + #set($preAmbleTOR = "TO REPEAT...A TORNADO IS ON THE GROUND. ") #elseif(${list.contains($bullets, "confirmedLargeTOR")}) #set($reportType = "NATIONAL WEATHER SERVICE DOPPLER RADAR AND STORM SPOTTERS WERE TRACKING A LARGE AND EXTREMELY DANGEROUS TORNADO") #set($preAmbleTOR = "TO REPEAT...A LARGE...EXTREMELY DANGEROUS AND POTENTIALLY DEADLY TORNADO IS ON THE GROUND! TO PROTECT YOUR LIFE...") #elseif(${list.contains($bullets, "spotterTOR")}) - #set($preAmbleTOR = "TO REPEAT...A TORNADO HAS BEEN SIGHTED! TO PROTECT YOUR LIFE...") + #set($preAmbleTOR = "TO REPEAT...A TORNADO IS ON THE GROUND. ") #set ($torTag = "OBSERVED") #set ($torHazard = "DAMAGING TORNADO") #set ($confirmed = "CONFIRMED ") #set ($source = "WEATHER SPOTTERS CONFIRMED TORNADO.") - #set ($torimpact = "EXTENSIVE DAMAGE TO HOMES AND BUILDINGS. TREES TO BE UPROOTED BLOCKING ROADS...DAMAGING BUILDINGS...HOMES AND DOWNING POWER LINES.") #if(${stormType} == "line") - #set ($reportType = "A LINE OF TORNADO PRODUCING STORMS ARE LOCATED") + #set ($reportType = "A LINE OF TORNADO PRODUCING STORMS") #else - #set ($reportType = "A CONFIRMED TORNADO IS LOCATED") + #set ($reportType = "A CONFIRMED TORNADO") #end #elseif(${list.contains($bullets, "lawEnforcementTOR")}) - #set($preAmbleTOR = "TO REPEAT...A TORNADO HAS BEEN SIGHTED! TO PROTECT YOUR LIFE...") + #set($preAmbleTOR = "TO REPEAT...A TORNADO IS ON THE GROUND. ") #set ($torTag = "OBSERVED") #set ($torHazard = "DAMAGING TORNADO") #set ($confirmed = "CONFIRMED ") #set ($source = "LAW ENFORCEMENT CONFIRMED TORNADO.") - #set ($torimpact = "EXTENSIVE DAMAGE TO HOMES AND BUILDINGS. TREES TO BE UPROOTED BLOCKING ROADS...DAMAGING BUILDINGS...HOMES AND DOWNING POWER LINES.") #if(${stormType} == "line") - #set ($reportType = "A LINE OF TORNADO PRODUCING STORMS ARE LOCATED") + #set ($reportType = "A LINE OF TORNADO PRODUCING STORMS") #else - #set ($reportType = "A CONFIRMED TORNADO IS LOCATED") + #set ($reportType = "A CONFIRMED TORNADO WAS LOCATED") #end #elseif(${list.contains($bullets, "emergencyManagementTOR")}) #set($reportType = "EMERGENCY MANAGEMENT REPORTED A ${reportType1}") - #set($preAmbleTOR = "TO REPEAT...A TORNADO HAS BEEN SIGHTED! TO PROTECT YOUR LIFE...") + #set($preAmbleTOR = "TO REPEAT...A TORNADO IS ON THE GROUND. ") #set ($torTag = "OBSERVED") #set ($torHazard = "DAMAGING TORNADO") #set ($confirmed = "CONFIRMED ") #set ($source = "EMERGENCY MANAGEMENT CONFIRMED TORNADO.") - #set ($torimpact = "EXTENSIVE DAMAGE TO HOMES AND BUILDINGS. TREES TO BE UPROOTED BLOCKING ROADS...DAMAGING BUILDINGS...HOMES AND DOWNING POWER LINES.") #if(${stormType} == "line") - #set ($reportType = "A LINE OF TORNADO PRODUCING STORMS ARE LOCATED") + #set ($reportType = "A LINE OF TORNADO PRODUCING STORMS") #else - #set ($reportType = "A CONFIRMED TORNADO IS LOCATED") + #set ($reportType = "A CONFIRMED TORNADO") #end #elseif(${list.contains($bullets, "publicTOR")}) - #set($preAmbleTOR = "TO REPEAT...A TORNADO HAS BEEN SIGHTED! TO PROTECT YOUR LIFE...") + #set($preAmbleTOR = "TO REPEAT...A TORNADO IS ON THE GROUND. ") #set ($torTag = "OBSERVED") #set ($torHazard = "DAMAGING TORNADO") #set ($confirmed = "CONFIRMED ") #set ($source = "PUBLIC CONFIRMED TORNADO.") - #set ($torimpact = "EXTENSIVE DAMAGE TO HOMES AND BUILDINGS. TREES TO BE UPROOTED BLOCKING ROADS...DAMAGING BUILDINGS...HOMES AND DOWNING POWER LINES.") #if(${stormType} == "line") - #set ($reportType = "A LINE OF TORNADO PRODUCING STORMS ARE LOCATED") + #set ($reportType = "A LINE OF TORNADO PRODUCING STORMS") #else - #set ($reportType = "A CONFIRMED TORNADO IS LOCATED") + #set ($reportType = "A CONFIRMED TORNADO") #end #elseif(${list.contains($bullets, "spotterFunnelCloud")}) - #set($reportType = "TRAINED WEATHER SPOTTERS REPORTED A FUNNEL CLOUD") #set ($source = "WEATHER SPOTTERS REPORTED FUNNEL CLOUD.") + #set ($torGround = "DEVELOPING") #if(${stormType} == "line") + #set($reportType = "A LINE OF SEVERE THUNDERSTORMS CAPABLE OF PRODUCING A TORNADO") #set($reportType2 = "A TORNADO MAY DEVELOP AT ANY TIME. THESE DANGEROUS STORMS WERE") #set($pathcastLead = "THESE DANGEROUS STORMS") #else + #set($reportType = "A SEVERE THUNDERSTORM CAPABLE OF PRODUCING A TORNADO") #set($reportType2 = "A TORNADO MAY DEVELOP AT ANY TIME. THIS DANGEROUS STORM WAS") #set($pathcastLead = "THIS DANGEROUS STORM") #end @@ -469,7 +467,7 @@ ${dateUtil.format(${now}, ${timeFormat.header}, ${localtimezone})} #set ($torHazard = "DAMAGING TORNADO") #set ($torThreat = "TORNADO DAMAGE THREAT...SIGNIFICANT") #set ($pdstor = "THIS IS A PARTICULARLY DANGEROUS SITUATION.") - #set ($torimpact = "EXTENSIVE DAMAGE TO HOMES AND BUILDINGS. TREES TO BE UPROOTED BLOCKING ROADS...DAMAGING BUILDINGS...HOMES AND DOWNING POWER LINES.") + #set ($torimpact = "MAJOR HOUSE AND BUILDING DAMAGE LIKELY AND COMPLETE DESTRUCTION POSSIBLE. NUMEROUS TREES SNAPPED. MAJOR POWER OUTAGES IN PATH OF TORNADO HIGHLY LIKELY. SOME ROADS POSSIBLY BLOCKED BY TORNADO DEBRIS. COMPLETE DESTRUCTION OF VEHICLES LIKELY.") #if(${stormType} == "line") #set ($pathcastLead = "THESE TORNADIC STORMS") #set ($moveLead = " DOPPLER RADAR SHOWED THESE TORNADIC STORMS MOVING") @@ -477,7 +475,7 @@ ${dateUtil.format(${now}, ${timeFormat.header}, ${localtimezone})} #set ($pathcastLead = "THE TORNADO") #set ($moveLead = " DOPPLER RADAR SHOWED THIS TORNADO MOVING") #end - #set ($preAmble = "TO REPEAT...A LARGE...EXTREMELY DANGEROUS AND POTENTIALLY DEADLY TORNADO IS ON THE GROUND. TAKE IMMEDIATE ACTION TO PROTECT YOUR LIFE.") + #set ($preAmbleTOR = "TO REPEAT...A LARGE...EXTREMELY DANGEROUS AND POTENTIALLY DEADLY TORNADO IS ${torGround}. TO PROTECT YOUR LIFE...") #end ############################################################################ ## IF A TORNADO EMERGENCY IS SELECTED THE FOLLOWING WILL OVERRIDE CERTAIN @@ -485,11 +483,12 @@ ${dateUtil.format(${now}, ${timeFormat.header}, ${localtimezone})} ############################################################################ #if(${list.contains($bullets, "torEmergency")}) #set ($reportType = "TORNADO EMERGENCY FOR !** LOCATION **!. A CONFIRMED LARGE AND DESTRUCTIVE TORNADO") + #set ($ctaSelected = "YES") #set ($torTag = "OBSERVED") #set ($torHazard = "DEADLY TORNADO") #set ($torThreat = "TORNADO DAMAGE THREAT...CATASTROPHIC") #set ($pdstor = "THIS IS A PARTICULARLY DANGEROUS SITUATION.") - #set ($torimpact = "LIFE THREATENING SITUATION. EXTENSIVE DAMAGE TO HOMES AND BUILDINGS...UPROOTED TREES AND DEBRIS WILL RESTRICT ACCESS INTO MANY AREAS.") + #set ($torimpact = "THIS IS A LIFE THREATENING SITUATION. YOU COULD BE KILLED IF NOT UNDERGROUND OR IN A TORNADO SHELTER. COMPLETE DESTRUCTION OF ENTIRE NEIGHBORHOODS IS LIKELY. MANY WELL BUILT HOMES AND BUSINESSES WILL BE COMPLETELY SWEPT FROM THEIR FOUNDATIONS. DEBRIS WILL BLOCK MOST ROADWAYS. MASS DEVASTATION IS HIGHLY LIKELY MAKING THE AREA UNRECOGNIZABLE TO SURVIVORS.") #if(${stormType} == "line") #set ($pathcastLead = "THESE TORNADIC STORMS") #set ($moveLead = " DOPPLER RADAR SHOWED THESE TORNADIC STORMS MOVING") @@ -500,7 +499,7 @@ ${dateUtil.format(${now}, ${timeFormat.header}, ${localtimezone})} #if(${list.contains($bullets, "dopplerTOR")}) #set ($source = "WEATHER SPOTTERS CONFIRMED TORNADO.") #end - #set ($preAmble = "TO REPEAT...A LARGE...EXTREMELY DANGEROUS AND POTENTIALLY DEADLY TORNADO IS ON THE GROUND. TAKE IMMEDIATE ACTION TO PROTECT YOUR LIFE.") + #set ($preAmbleTOR = "TO REPEAT...A LARGE...EXTREMELY DANGEROUS AND DEADLY TORNADO IS ON THE GROUND. TO PROTECT YOUR LIFE...") #end ################################################### @@ -515,163 +514,157 @@ ${dateUtil.format(${now}, ${timeFormat.header}, ${localtimezone})} #set ($windHazard = "60 MPH WIND GUSTS") #set ($windSpeed = 60) #set ($windTag = "60MPH") - #set ($windImpact = "LARGE TREE LIMBS BROKEN OFF PARTIALLY BLOCKING ROADS...DAMAGING BUILDINGS...HOMES AND DOWNING POWER LINES.") + #set ($windImpact = "MINOR TREE DAMAGE...WITH LIMBS UP TO ONE INCH IN DIAMETER BROKEN.") #end #if(${list.contains($bullets, "70mphWind")}) #set ($windThreat = "DESTRUCTIVE WINDS IN EXCESS OF 70 MPH") #set ($windHazard = "70 MPH WIND GUSTS") #set ($windSpeed = 70) #set ($windTag = "70MPH") - #set ($windImpact = "TREES TO BE UPROOTED BLOCKING ROADS...DAMAGING BUILDINGS...HOMES AND DOWNING POWER LINES.") + #set ($windImpact = "TREE BRANCHES UP TO THREE INCHES IN DIAMETER BROKEN. POSSIBLE MINOR DAMAGE TO SHINGLE ROOFS AND METAL OUTBUILDINGS.") #end #if(${list.contains($bullets, "80mphWind")}) #set ($windThreat = "DESTRUCTIVE WINDS IN EXCESS OF 80 MPH") #set ($windHazard = "80 MPH WIND GUSTS") #set ($windSpeed = 80) #set ($windTag = "80MPH") - #set ($extensive = "EXTENSIVE ") - #set ($windImpact = "TREES TO BE UPROOTED BLOCKING ROADS...DAMAGING BUILDINGS...HOMES AND DOWNING POWER LINES.") #set ($pdssvr = "THIS IS A VERY DANGEROUS STORM.") + #set ($windImpact = "LARGE TREE BRANCHES MAY BE BROKEN...POSSIBLY BLOCKING ROADS AND DOWNING POWER LINES. SUBSTANTIAL ROOF COVERING DAMAGE LIKELY. METAL OUTBUILDINGS DAMAGED. SIGNIFICANT FLYING DEBRIS WILL BE DANGEROUS FOR ANYONE EXPOSED TO THE ELEMENTS.") #end #if(${list.contains($bullets, "90mphWind")}) #set ($windThreat = "EXTREME DAMAGING WINDS IN EXCESS OF 90 MPH") #set ($windHazard = "90 MPH WIND GUSTS") #set ($windSpeed = 90) #set ($windTag = "90MPH") - #set ($extensive = "EXTENSIVE ") - #set ($windImpact = "TREES TO BE UPROOTED BLOCKING ROADS...DAMAGING BUILDINGS...HOMES AND DOWNING POWER LINES.") #set ($pdssvr = "THIS IS A VERY DANGEROUS STORM.") + #set ($windImpact ="MOBILE HOMES MAY SUFFER MAJOR ROOF FAILURE. SUBSTANTIAL ROOF AND WINDOW DAMAGE TO SINGLE FAMILY HOMES. SOME TREES UPROOTED POSSIBLY BLOCKING ROADS AND KNOCKING DOWN POWER LINES. SIGNIFICANT FLYING AND FALLING DEBRIS MAY PROVE DEADLY FOR ANYONE EXPOSED TO THE ELEMENTS.") #end #if(${list.contains($bullets, "100mphWind")}) #set ($windThreat = "EXTREME DAMAGING WINDS IN EXCESS OF 100 MPH") #set ($windHazard = "100 MPH WIND GUSTS") #set ($windSpeed = 100) #set ($windTag = "100MPH") - #set ($extensive = "EXTENSIVE ") - #set ($windImpact = "TREES TO BE UPROOTED BLOCKING ROADS...DAMAGING BUILDINGS...HOMES AND DOWNING POWER LINES.") #set ($pdssvr = "THIS IS A VERY DANGEROUS STORM.") + #set ($windImpact ="SIGNIFICANT ROOF AND WINDOW LOSS OF SINGLE FAMILY HOMES. COMPLETE DESTRUCTION OF MOBILE HOMES AND METAL BARNS AND OUTBUILDINGS LIKELY. NUMEROUS TREES UPROOTED AND SOME TREE TRUNKS SNAPPED. SUBSTANTIAL POWER OUTAGES LIKELY. SIGNIFICANT FLYING AND FALLING DEBRIS WILL PROVE DEADLY TO THOSE WHO DO NOT SEEK SHELTER.") #end ################################################### ## HANDLE HAIL POSSIBILITIES ###################### ################################################### #set ($hailSize = 0) #set ($smallHail = "") -#set ($hailImpact = "DAMAGE TO ROOFS AND WINDOWS.") -#if(${phenomena}=="TO") - #set ($hailTag = "1.75") - #set ($hailHazard = "GOLF BALL SIZE HAIL") -#end -#if(${list.contains($bullets, "nosevereHail")}) - #set ($hailThreat = "") - #set ($hailSize = 0.75) - #set ($hailTag = "<.75IN") - #set ($hailHazard = "SMALL HAIL") -#end +#set ($hailImpact = "") +#set ($hailTag = "<.75IN") #if(${list.contains($bullets, "pennyHail")}) #set ($hailThreat = "PENNY SIZE") #set ($hailTrail = " HAIL") + #set ($hailHazard = "PENNY SIZE HAIL") #set ($hailLead = "") #set ($hailSize = 0.75) #set ($hailTag = "0.75IN") - #set ($hailHazard = "PENNY SIZE HAIL") + #set ($hailImpact = "MINOR DAMAGE TO VEHICLES...ROOFS AND WINDOWS.") #end #if(${list.contains($bullets, "nickelHail")}) #set ($hailThreat = "NICKEL SIZE") #set ($hailTrail = " HAIL") + #set ($hailHazard = "NICKEL SIZE HAIL") #set ($hailLead = "") #set ($hailSize = 0.88) #set ($hailTag = "0.88IN") - #set ($hailHazard = "NICKEL SIZE HAIL") + #set ($hailImpact = "MINOR DAMAGE TO VEHICLES...ROOFS AND WINDOWS.") #end #if(${list.contains($bullets, "quarterHail")}) #set ($hailThreat = "QUARTER SIZE") #set ($hailTrail = " HAIL") + #set ($hailHazard = "QUARTER SIZE HAIL") #set ($hailLead = "") #set ($hailSize = 1.00) #set ($hailTag = "1.00IN") - #set ($hailHazard = "QUARTER SIZE HAIL") + #set ($hailImpact = "MINOR DAMAGE TO VEHICLES...ROOFS AND WINDOWS.") #end #if(${list.contains($bullets, "halfdollarHail")}) #set ($hailThreat = "HALF DOLLAR SIZE") #set ($hailTrail = " HAIL") + #set ($hailHazard = "HALF DOLLAR SIZE HAIL") #set ($hailLead = "") #set ($hailSize = 1.25) #set ($hailTag = "1.25IN") - #set ($hailHazard = "HALF DOLLAR SIZE HAIL") + #set ($hailImpact = "MINOR DAMAGE TO VEHICLES...ROOFS AND WINDOWS.") #end #if(${list.contains($bullets, "pingpongHail")}) #set ($hailThreat = "PING PONG BALL SIZE") #set ($hailLead = "LARGE HAIL UP TO ") + #set ($hailHazard = "PING PONG SIZE HAIL") #set ($hailTrail = "") #set ($hailSize = 1.50) #set ($hailTag = "1.50IN") - #set ($hailHazard = "HALF DOLLAR SIZE HAIL") + #set ($hailImpact = "DAMAGE TO VEHICLES...ROOFS AND WINDOWS.") #end #if(${list.contains($bullets, "golfballHail")}) #set ($hailThreat = "GOLF BALL SIZE") #set ($hailLead = "LARGE DAMAGING HAIL UP TO ") + #set ($hailHazard = "GOLF BALL SIZE HAIL") #set ($hailTrail = "") #set ($hailSize = 1.75) #set ($hailTag = "1.75IN") #set ($hailImpact = "DAMAGE TO ROOFS...WINDOWS AND VEHICLES.") - #set ($hailHazard = "GOLF BALL SIZE HAIL") #end #if(${list.contains($bullets, "twoinchHail")}) #set ($hailThreat = "TWO INCHES IN DIAMETER") #set ($hailLead = "LARGE DAMAGING HAIL UP TO ") + #set ($hailHazard = "TWO INCH HAIL") #set ($hailTrail = "") #set ($hailSize = 2.00) #set ($hailTag = "2.00IN") #set ($hailImpact = "DAMAGE TO ROOFS...WINDOWS AND VEHICLES.") - #set ($hailHazard = "HAIL UP TO TWO INCHES IN DIAMETER") #end #if(${list.contains($bullets, "tennisBallHail")}) #set ($hailThreat = "TENNIS BALL SIZE") #set ($hailLead = "LARGE DESTRUCTIVE HAIL UP TO ") #set ($hailTrail = "") + #set ($hailHazard = "TENNIS BALL SIZE HAIL") #set ($hailSize = 2.50) #set ($hailTag = "2.50IN") #set ($hailImpact = "DAMAGE TO ROOFS...WINDOWS AND VEHICLES.") - #set ($hailHazard = "TENNIS BALL SIZE HAIL") #end #if(${list.contains($bullets, "baseballHail")}) #set ($hailThreat = "BASEBALL SIZE") #set ($hailLead = "LARGE DESTRUCTIVE HAIL UP TO ") - #set ($hailTrail = "") - #set ($hailSize = 2.75) - #set ($hailTag = "2.75IN") - #set ($extensive = "EXTENSIVE ") - #set ($hailImpact = "DAMAGE TO ROOFS...WINDOWS AND VEHICLES.") #set ($hailHazard = "BASEBALL SIZE HAIL") + #set ($hailTrail = "") + #set ($hailSize = 2.75) + #set ($hailTag = "2.75IN") + #set ($pdssvr = "THIS IS A VERY DANGEROUS STORM.") + #set ($hailImpact = "EXTENSIVE DAMAGE TO ROOFS...WINDOWS AND VEHICLES.") #end #if(${list.contains($bullets, "threeinchHail")}) #set ($hailThreat = "THREE INCHES IN DIAMETER") #set ($hailLead = "LARGE DESTRUCTIVE HAIL UP TO ") + #set ($hailHazard = "THREE INCH HAIL") #set ($hailTrail = "") - #set ($hailSize = 3.00) + #set ($hailSize = 3.00) #set ($hailTag = "3.00IN") - #set ($hailImpact = "DAMAGE TO ROOFS...WINDOWS AND VEHICLES.") - #set ($hailHazard = "HAIL UP TO THREE INCHES IN DIAMETER") -#end -#if(${list.contains($bullets, "softballHail")}) - #set ($hailThreat = "SOFTBALL SIZE") - #set ($hailLead = "LARGE DESTRUCTIVE HAIL UP TO ") - #set ($hailTrail = "") - #set ($hailSize = 4.25) - #set ($hailTag = "4.25IN") - #set ($extensive = "EXTENSIVE ") - #set ($hailImpact = "DAMAGE TO ROOFS...WINDOWS AND VEHICLES.") - #set ($hailHazard = "SOFTBALL SIZE HAIL") + #set ($pdssvr = "THIS IS A VERY DANGEROUS STORM.") + #set ($hailImpact = "EXTENSIVE DAMAGE TO ROOFS...WINDOWS AND VEHICLES.") #end #if(${list.contains($bullets, "grapefruitHail")}) #set ($hailThreat = "GRAPEFRUIT SIZE") #set ($hailLead = "LARGE DESTRUCTIVE HAIL UP TO ") - #set ($hailTrail = "") - #set ($hailSize = 4.00) - #set ($hailTag = "4.00IN") - #set ($extensive = "EXTENSIVE ") - #set ($hailImpact = "DAMAGE TO ROOFS...WINDOWS AND VEHICLES.") #set ($hailHazard = "GRAPEFRUIT SIZE HAIL") + #set ($hailTrail = "") + #set ($hailSize = 4.00) + #set ($hailTag = "4.00IN") + #set ($pdssvr = "THIS IS A VERY DANGEROUS STORM.") + #set ($hailImpact = "EXTENSIVE DAMAGE TO ROOFS...WINDOWS AND VEHICLES.") +#end +#if(${list.contains($bullets, "softballHail")}) + #set ($hailThreat = "SOFTBALL SIZE") + #set ($hailLead = "LARGE DESTRUCTIVE HAIL UP TO ") + #set ($hailHazard = "SOFTBALL SIZE HAIL") + #set ($hailTrail = "") + #set ($hailSize = 4.25) + #set ($hailTag = "4.25IN") + #set ($pdssvr = "THIS IS A VERY DANGEROUS STORM.") + #set ($hailImpact = "EXTENSIVE DAMAGE TO ROOFS...WINDOWS AND VEHICLES.") #end ################################################################## ######### CREATE SVR TSTM WIND AND HAIL SENTENCE/TAG############## @@ -681,7 +674,7 @@ ${dateUtil.format(${now}, ${timeFormat.header}, ${localtimezone})} #if (${phenomena}=="SV") #set ($hailwind = "!**YOU DID NOT SELECT ANY SEVERE WIND OR HAIL THREATS. PLEASE CLOSE THIS WINDOW AND RE-GENERATE THIS WARNING!**!") #set ($windhailTag = "WIND...HAIL <50MPH <.75IN") - #set ($svrimpact = "!**YOU DID NOT SELECT ANY SEVERE WIND OR HAIL THREATS. PLEASE CLOSE THIS WINDOW AND RE-GENERATE THIS WARNING!**!") +## #set ($svrimpact = "!**YOU DID NOT SELECT ANY SEVERE WIND OR HAIL THREATS. PLEASE CLOSE THIS WINDOW AND RE-GENERATE THIS WARNING!**!") #set ($hazard = "!**YOU DID NOT SELECT ANY SEVERE WIND OR HAIL THREATS. PLEASE CLOSE THIS WINDOW AND RE-GENERATE THIS WARNING!**!") #else #set ($hailTag = "HAIL...<.75IN") @@ -691,19 +684,23 @@ ${dateUtil.format(${now}, ${timeFormat.header}, ${localtimezone})} #set ($hailwind = " ${reportAuthSVR} ${windThreat}") #if(${phenomena}=="SV") #set ($smallHail = "${hailThreat}${hailTrail} MAY ALSO ACCOMPANY THE DAMAGING WINDS.") - #set ($svrimpact = "${extensive}${hailImpact} ${windImpact}") +## #set ($svrimpact = "${extensive}${hailImpact} ${windImpact}") #set ($hazard = "${windHazard} AND ${hailHazard}.") +#* #if(${list.contains($bullets, "svrTorTag")}) #set ($hazard = "${windHazard}...${hailHazard} AND POSSIBLE TORNADO.") #end + *# #end #else #set ($hailwind = " ${reportAuthSVR} ${hailLead}${hailThreat}${hailTrail} AND ${windThreat}") - #set ($svrimpact = "${extensive}${hailImpact} ${windImpact}") +## #set ($svrimpact = "${extensive}${hailImpact} ${windImpact}") #set ($hazard = "${hailHazard} AND ${windHazard}.") +#* #if(${list.contains($bullets, "svrTorTag")}) #set ($hazard = "${hailHazard}...${windHazard} AND POSSIBLE TORNADO.") #end +*# #end #set ($windTag = "WIND...${windTag}") #set ($hailTag = "HAIL...${hailTag}") @@ -713,20 +710,38 @@ ${dateUtil.format(${now}, ${timeFormat.header}, ${localtimezone})} #set ($windTag = "WIND...${windTag}") #set ($hailTag = "HAIL...${hailTag}") #set ($hazard = "${hailHazard}.") - #set ($svrimpact = "${extensive}${hailImpact} ${windImpact}") +## #set ($svrimpact = "${extensive}${hailImpact} ${windImpact}") +#* #if(${list.contains($bullets, "svrTorTag")}) #set ($hazard = "${hailHazard} AND POSSIBLE TORNADO.") #end +*# #elseif(${windSpeed} > 0) #set ($hailwind = " ${reportAuthSVR} ${windThreat}") #set ($windhailTag = "WIND...HAIL ${windTag} <.75IN") #set ($windTag = "WIND...${windTag}") #set ($hailTag = "HAIL...<.75IN") #set ($hazard = "${windHazard}.") - #set ($svrimpact = "${extensive}${hailImpact} ${windImpact}") +## #set ($svrimpact = "${extensive}${hailImpact} ${windImpact}") +#* #if(${list.contains($bullets, "svrTorTag")}) #set ($hazard = "${windHazard} AND POSSIBLE TORNADO.") #end +*# +#end +###################################################################### +## Setup wind/hail impact statement based on wind speed and hail size +###################################################################### +#if (${phenomena}=="SV") + #if (${hailSize} < 1 && ${windSpeed} < 58) + #set ($svrimpact = "!**YOU DID NOT SELECT ANY SEVERE WIND OR HAIL THREATS. PLEASE CLOSE THIS WINDOW AND RE-GENERATE THIS WARNING!**!") + #elseif(${hailSize} > 0 && ${windSpeed} < 80 && ${hailSize} < 2.75) + #set ($svrimpact = "${hailImpact} ${windImpact}") + #elseif(${hailSize} > 2.50 && ${windSpeed} < 80) + #set ($svrimpact = "${hailImpact}") + #elseif(${windSpeed} >= 80) + #set ($svrimpact = "${windImpact}") + #end #end ########################################################## ## Set the hazard for a tornado warning follow-up ## @@ -734,19 +749,20 @@ ${dateUtil.format(${now}, ${timeFormat.header}, ${localtimezone})} #if(${phenomena}=="TO") #set ($pdssvr = "") #set ($svrimpact = "") - #if (${windSpeed} >= 60) + #if (${windSpeed} >= 60 && ${hailSize} >= 1) #set ($hazard = "${torHazard}...${hailHazard} AND ${windHazard}.") - #else + #elseif (${windSpeed} >= 60 && ${hailSize} < 1) + #set ($hazard = "${torHazard} AND ${windHazard}.") + #elseif (${windSpeed} < 60 && ${hailSize} >= 1) #set ($hazard = "${torHazard} AND ${hailHazard}.") + #else + #set ($hazard = "${torHazard}.") #end ######################################################### ## If a significant or catastrophic tornado are selected ## do not include any wind or hail informadion ######################################################### -#if(${list.contains($bullets, "significantTornado")}) - #set ($hazard = "${torHazard}.") -#end -#if(${list.contains($bullets, "torEmergency")}) +#if(${list.contains($bullets, "significantTornado")} || ${list.contains($bullets, "torEmergency")}) #set ($hazard = "${torHazard}.") #end #end @@ -784,7 +800,7 @@ THIS IS A TEST MESSAGE. ## #end AT ${dateUtil.format(${event}, ${timeFormat.clock}, ${localtimezone})}...## -${reportType} LOCATED ## +${reportType} WAS LOCATED ## #handleClosestPoints($list, $closestPoints, $otherClosestPoints, $stormType, "NEAR", 6, "MILES",false) #if($movementSpeed < 3 || ${stationary}) #if(${stormType} == "line") @@ -889,13 +905,22 @@ THOSE ATTENDING THE !**now/venue name or location**! ARE IN THE PATH OF THIS STO #if(${ctaSelected} == "YES") PRECAUTIONARY/PREPAREDNESS ACTIONS... +#end +#if(${list.contains($bullets, "torEmergencyCTA")} || ${list.contains($bullets, "torEmergency")}) +#if(${list.contains($bullets, "torEmergency")}) +THIS IS AN EXTREMELY DANGEROUS TORNADO WITH COMPLETE DEVASTATION LIKELY. YOU COULD BE KILLED IF NOT UNDERGROUND OR IN A TORNADO SHELTER. DO NOT DELAY...SEEK SHELTER NOW! IF NO UNDERGROUND SHELTER IS AVAILABLE SEEK SHELTER IN AN INTERIOR ROOM OF THE LOWEST LEVEL OF A STRUCTURE...OR IF TIME ALLOWS...CONSIDER MOVING TO AN UNDERGROUND SHELTER ELSEWHERE. MOBILE HOMES AND OUTBUILDINGS WILL OFFER NO SHELTER FROM THIS TORNADO. + +#else +!** YOU SELECTED THE TORNADO EMERGENCY CTA WITHOUT SELECTING THE TORNADO EMERGENCY HEADER. PLEASE CLOSE THIS WINDOW AND RE-GENERATE THIS WARNING **! + +#end #end #if(${list.contains($bullets, "defaultMobileCTA")}) -TAKE COVER NOW! MOVE TO A BASEMENT OR AN INTERIOR ROOM ON THE LOWEST FLOOR OF A STURDY BUILDING. AVOID WINDOWS. IF IN A MOBILE HOME...A VEHICLE OR OUTDOORS...MOVE TO THE CLOSEST SUBSTANTIAL SHELTER AND PROTECT YOURSELF FROM FLYING DEBRIS. +${preAmbleTOR}TAKE COVER NOW! MOVE TO A BASEMENT OR AN INTERIOR ROOM ON THE LOWEST FLOOR OF A STURDY BUILDING. AVOID WINDOWS. IF IN A MOBILE HOME...A VEHICLE OR OUTDOORS...MOVE TO THE CLOSEST SUBSTANTIAL SHELTER AND PROTECT YOURSELF FROM FLYING DEBRIS. #end #if(${list.contains($bullets, "defaultUrbanCTA")}) -TAKE COVER NOW! MOVE TO A BASEMENT OR AN INTERIOR ROOM ON THE LOWEST FLOOR OF A STURDY BUILDING. AVOID WINDOWS. IF IN A VEHICLE OR OUTDOORS...MOVE TO THE CLOSEST SUBSTANTIAL SHELTER AND PROTECT YOURSELF FROM FLYING DEBRIS. +${preAmbleTOR}TAKE COVER NOW! MOVE TO A BASEMENT OR AN INTERIOR ROOM ON THE LOWEST FLOOR OF A STURDY BUILDING. AVOID WINDOWS. IF IN A VEHICLE OR OUTDOORS...MOVE TO THE CLOSEST SUBSTANTIAL SHELTER AND PROTECT YOURSELF FROM FLYING DEBRIS. #end #if(${list.contains($bullets, "motoristsCTA")}) @@ -931,27 +956,29 @@ IF ON OR NEAR !**NAME OF WATER BODY **!...GET AWAY FROM THE WATER AND MOVE TO SA #end ## #if(${list.contains($bullets, "torWatchRemainsInEffectCTA")}) +#if(${list.contains($bullets, "svrTorTag")}) +REMAIN ALERT FOR A POSSIBLE TORNADO! TORNADOES CAN DEVELOP QUICKLY FROM SEVERE THUNDERSTORMS. IF YOU SPOT A TORNADO GO AT ONCE INTO THE BASEMENT OR SMALL CENTRAL ROOM IN A STURDY STRUCTURE. + +#else +A TORNADO WATCH REMAINS IN EFFECT FOR THE WARNED AREA. TORNADOES CAN DEVELOP QUICKLY FROM SEVERE THUNDERSTORMS. ALTHOUGH ONE IS NOT IMMEDIATELY LIKELY...IF A TORNADO IS SPOTTED...ACT QUICKLY AND MOVE TO A PLACE OF SAFETY INSIDE A STURDY STRUCTURE...SUCH AS A BASEMENT OR SMALL INTERIOR ROOM. + +#end +#end +## +#if(${list.contains($bullets, "torPossibleTagCTA")}) REMAIN ALERT FOR A POSSIBLE TORNADO! TORNADOES CAN DEVELOP QUICKLY FROM SEVERE THUNDERSTORMS. IF YOU SPOT A TORNADO GO AT ONCE INTO THE BASEMENT OR SMALL CENTRAL ROOM IN A STURDY STRUCTURE. #end ## +## #if(${list.contains($bullets, "genericCTA")}) FOR YOUR PROTECTION MOVE TO AN INTERIOR ROOM ON THE LOWEST FLOOR OF A BUILDING. #end ## -#if(${list.contains($bullets, "canProduceTornadoesCTA")}) -UNDER CURRENT CONDITIONS TORNADO DEVELOPMENT IS NOT LIKELY...BUT TORNADOES CAN DEVELOP QUICKLY FROM SEVERE THUNDERSTORMS. ALTHOUGH ONE IS NOT IMMEDIATELY LIKELY...IF A TORNADO IS SPOTTED...ACT QUICKLY AND MOVE TO A PLACE OF SAFETY IN A STURDY STRUCTURE...SUCH AS A BASEMENT OR SMALL INTERIOR ROOM. - -#end ## #if(${list.contains($bullets, "largeHailCTA")}) -PREPARE IMMEDIATELY FOR LARGE HAIL AND DEADLY CLOUD TO GROUND LIGHTNING. PEOPLE OUTSIDE SHOULD MOVE TO A SHELTER...INSIDE A STRONG BUILDING AND AWAY FROM WINDOWS. - -#end -## -#if(${list.contains($bullets, "veryLargeHailCTA")}) -PREPARE IMMEDIATELY FOR LARGE DESTRUCTIVE HAIL CAPABLE OF PRODUCING SIGNIFICANT DAMAGE. PEOPLE OUTSIDE SHOULD MOVE TO A SHELTER...INSIDE A STRONG BUILDING AND AWAY FROM WINDOWS. +PREPARE IMMEDIATELY FOR LARGE HAIL AND DEADLY CLOUD TO GROUND LIGHTNING. SEEK SHELTER INSIDE A WELL-BUILT STRUCTURE. STAY AWAY FROM WINDOWS. #end ## @@ -972,20 +999,60 @@ THIS STORM IS PRODUCING LARGE HAIL. SEEK SHELTER NOW INSIDE A STURDY STRUCTURE A ## #if(${list.contains($bullets, "historyWindCTA")}) #if(${stormType} == "line") -THIS IS A VERY DANGEROUS SITUATION. THESE STORMS ARE PRODUCING WIDESPREAD WIND DAMAGE ACROSS !** ENTER LOCATION **!. SEEK SHELTER NOW INSIDE A STURDY STRUCTURE AND STAY AWAY FROM WINDOWS. +THIS IS A DANGEROUS SITUATION. THESE STORMS ARE PRODUCING WIDESPREAD WIND DAMAGE ACROSS !** ENTER LOCATION **!. SEEK SHELTER NOW INSIDE A STURDY STRUCTURE AND STAY AWAY FROM WINDOWS. #else -THIS IS A VERY DANGEROUS SITUATION. THIS STORM IS PRODUCING WIDESPREAD WIND DAMAGE ACROSS !** ENTER LOCATION **!. SEEK SHELTER NOW INSIDE A STURDY STRUCTURE AND STAY AWAY FROM WINDOWS. +THIS IS A DANGEROUS SITUATION. THIS STORM IS PRODUCING WIDESPREAD WIND DAMAGE ACROSS !** ENTER LOCATION **!. SEEK SHELTER NOW INSIDE A STURDY STRUCTURE AND STAY AWAY FROM WINDOWS. + +#end +#end +## +#if(${list.contains($bullets, "veryLargeHailCTA")}) +#if(${stormType} == "line") +THESE ARE DANGEROUS STORMS. PREPARE IMMEDIATELY FOR LARGE DESTRUCTIVE HAIL CAPABLE OF PRODUCING SIGNIFICANT DAMAGE. PEOPLE OUTSIDE SHOULD MOVE TO A SHELTER...INSIDE A STRONG BUILDING AND AWAY FROM WINDOWS. + +#else +THIS IS A DANGEROUS STORM. PREPARE IMMEDIATELY FOR LARGE DESTRUCTIVE HAIL CAPABLE OF PRODUCING SIGNIFICANT DAMAGE. PEOPLE OUTSIDE SHOULD MOVE TO A SHELTER...INSIDE A STRONG BUILDING AND AWAY FROM WINDOWS. + +#end +#end +## +#if(${list.contains($bullets, "extremeWindsCTA")}) +#if(${stormType} == "line") +THIS IS AN EXTREMELY DANGEROUS SITUATION WITH TORNADO LIKE WIND SPEEDS EXPECTED. MOBILE HOMES AND HIGH PROFILE VEHICLES ARE ESPECIALLY SUSCEPTIBLE TO WINDS OF THIS MAGNITUDE AND MAY BE OVERTURNED. FOR YOUR PROTECTION MOVE TO AN INTERIOR ROOM ON THE LOWEST FLOOR OF A BUILDING. THESE STORMS HAVE THE POTENTIAL TO CAUSE SERIOUS INJURY AND SIGNIFICANT PROPERTY DAMAGE. + +#else +THIS IS AN EXTREMELY DANGEROUS SITUATION WITH TORNADO LIKE WIND SPEEDS EXPECTED. MOBILE HOMES AND HIGH PROFILE VEHICLES ARE ESPECIALLY SUSCEPTIBLE TO WINDS OF THIS MAGNITUDE AND MAY BE OVERTURNED. FOR YOUR PROTECTION MOVE TO AN INTERIOR ROOM ON THE LOWEST FLOOR OF A BUILDING. THIS STORM HAS THE POTENTIAL TO CAUSE SERIOUS INJURY AND SIGNIFICANT PROPERTY DAMAGE. + +#end +#end +## +#if(${list.contains($bullets, "deadlyStormCTA")}) +#if(${stormType} == "line") +THESE ARE POTENTIALLY DEADLY STORMS. SEEK SHELTER IN AN INTERIOR ROOM ON THE LOWEST FLOOR OF A WELL-BUILT STRUCTURE. ABANDON VEHICLES IN SEARCH OF A MORE SUBSTANTIAL PERMANENT STRUCTURE. STAY AWAY FROM WINDOWS. + +#else +THIS IS A POTENTIALLY DEADLY STORM. SEEK SHELTER IN AN INTERIOR ROOM ON THE LOWEST FLOOR OF A WELL-BUILT STRUCTURE. ABANDON VEHICLES IN SEARCH OF A MORE SUBSTANTIAL PERMANENT STRUCTURE. STAY AWAY FROM WINDOWS. + +#end +#end +## +#if(${list.contains($bullets, "widespreadWindCTA")}) +#if(${stormType} == "line") +THIS IS AN EXTREMELY DANGEROUS SITUATION. THESE STORMS ARE PRODUCING WIDESPREAD WIND DAMAGE ACROSS !** ENTER LOCATION **!. SEEK SHELTER NOW INSIDE A STURDY STRUCTURE AND STAY AWAY FROM WINDOWS. + +#else +THIS IS AN EXTREMELY DANGEROUS SITUATION. THIS STORM IS PRODUCING WIDESPREAD WIND DAMAGE ACROSS !** ENTER LOCATION **!. SEEK SHELTER NOW INSIDE A STURDY STRUCTURE AND STAY AWAY FROM WINDOWS. #end #end ## #if(${list.contains($bullets, "historyWindHailCTA")}) #if(${stormType} == "line") -THIS IS A VERY DANGEROUS SITUATION. THESE STORMS ARE PRODUCING DESTRUCTIVE WINDS AND LARGE DAMAGING HAIL. SEEK SHELTER NOW INSIDE A STURDY STRUCTURE AND STAY AWAY FROM WINDOWS. +THESE STORMS ARE PRODUCING DESTRUCTIVE WINDS AND LARGE DAMAGING HAIL. SEEK SHELTER NOW INSIDE A STURDY STRUCTURE AND STAY AWAY FROM WINDOWS. #else -THIS IS A VERY DANGEROUS SITUATION. THIS STORM IS PRODUCING DESTRUCTIVE WINDS AND LARGE DAMAGING HAIL. SEEK SHELTER NOW INSIDE A STURDY STRUCTURE AND STAY AWAY FROM WINDOWS. +THIS STORM IS PRODUCING DESTRUCTIVE WINDS AND LARGE DAMAGING HAIL. SEEK SHELTER NOW INSIDE A STURDY STRUCTURE AND STAY AWAY FROM WINDOWS. #end #end @@ -993,6 +1060,18 @@ THIS IS A VERY DANGEROUS SITUATION. THIS STORM IS PRODUCING DESTRUCTIVE WINDS AN #if(${list.contains($bullets, "lawEnforcementCTA")}) TO REPORT SEVERE WEATHER CONTACT YOUR NEAREST LAW ENFORCEMENT AGENCY. THEY WILL SEND YOUR REPORT TO THE NATIONAL WEATHER SERVICE OFFICE IN ${officeLoc}. +#end +################################ +## SPECIAL CASE CALLS TO ACTION +################################ +#if(${list.contains($bullets, "gustFrontOutflowCTA")}) +#if(${stormType} == "line") +WIND DAMAGE WITH THESE STORMS WILL OCCUR BEFORE ANY RAIN OR LIGHTNING. DO NOT WAIT FOR THE SOUND OF THUNDER BEFORE TAKING COVER. SEEK SHELTER IMMEDIATELY INSIDE A STURDY STRUCTURE AND STAY AWAY FROM WINDOWS. + +#else +WIND DAMAGE WITH THIS STORM WILL OCCUR BEFORE ANY RAIN OR LIGHTNING. DO NOT WAIT FOR THE SOUND OF THUNDER BEFORE TAKING COVER. SEEK SHELTER IMMEDIATELY INSIDE A STURDY STRUCTURE AND STAY AWAY FROM WINDOWS. + +#end #end ## #if(${list.contains($bullets, "squallLineCTA")}) @@ -1006,29 +1085,17 @@ INTENSE SQUALL LINES CAN SOMETIMES PRODUCE BRIEF TORNADOES AND WIDESPREAD SIGNIF #end ## #if(${list.contains($bullets, "superCellsCTA")}) -THIS IS A SUPERCELL THUNDERSTORM. THEY ARE CAPABLE OF PRODUCING ALL TYPES OF SEVERE WEATHER...INCLUDING EXTREMELY LARGE HAIL...DESTRUCTIVE STRAIGHT LINE WINDS...AND TORNADOES. MOVE QUICKLY TO A SAFE SHELTER...SUCH AS AN INTERIOR ROOM...A BATHROOM OR CLOSET OR BASEMENT. - -#end -## -#if(${list.contains($bullets, "gustFrontOutflowCTA")}) #if(${stormType} == "line") -WIND DAMAGE WITH THESE STORMS WILL OCCUR BEFORE ANY RAIN OR LIGHTNING. DO NOT WAIT FOR THE SOUND OF THUNDER BEFORE TAKING COVER. SEEK SHELTER IMMEDIATELY INSIDE A STURDY STRUCTURE AND STAY AWAY FROM WINDOWS. +THESE THUNDERSTORMS ARE CAPABLE OF PRODUCING ALL TYPES OF SEVERE WEATHER...INCLUDING EXTREMELY LARGE HAIL...DESTRUCTIVE STRAIGHT LINE WINDS...AND TORNADOES. MOVE QUICKLY TO A SAFE SHELTER...SUCH AS AN INTERIOR ROOM...A BATHROOM OR CLOSET OR BASEMENT. #else -WIND DAMAGE WITH THIS STORM WILL OCCUR BEFORE ANY RAIN OR LIGHTNING. DO NOT WAIT FOR THE SOUND OF THUNDER BEFORE TAKING COVER. SEEK SHELTER IMMEDIATELY INSIDE A STURDY STRUCTURE AND STAY AWAY FROM WINDOWS. - -#end -#end -## -#if(${list.contains($bullets, "extremeWindsCTA")}) -#if(${stormType} == "line") -THIS IS AN EXTREMELY DANGEROUS SITUATION WITH TORNADO LIKE WIND SPEEDS EXPECTED. MOBILE HOMES AND HIGH PROFILE VEHICLES ARE ESPECIALLY SUSCEPTIBLE TO WINDS OF THIS MAGNITUDE AND MAY BE OVERTURNED. FOR YOUR PROTECTION MOVE IMMEDIATELY TO A SAFE SHELTER OR TO AN INTERIOR ROOM ON THE LOWEST FLOOR OF A BUILDING. THESE STORMS HAVE THE POTENTIAL TO CAUSE SERIOUS INJURY AND SIGNIFICANT PROPERTY DAMAGE. - -#else -THIS IS AN EXTREMELY DANGEROUS SITUATION WITH TORNADO LIKE WIND SPEEDS EXPECTED. MOBILE HOMES AND HIGH PROFILE VEHICLES ARE ESPECIALLY SUSCEPTIBLE TO WINDS OF THIS MAGNITUDE AND MAY BE OVERTURNED. FOR YOUR PROTECTION MOVE IMMEDIATELY TO A SAFE SHELTER OR TO AN INTERIOR ROOM ON THE LOWEST FLOOR OF A BUILDING. THIS STORM HAS THE POTENTIAL TO CAUSE SERIOUS INJURY AND SIGNIFICANT PROPERTY DAMAGE. +THIS THUNDERSTORM IS CAPABLE OF PRODUCING ALL TYPES OF SEVERE WEATHER...INCLUDING EXTREMELY LARGE HAIL...DESTRUCTIVE STRAIGHT LINE WINDS...AND TORNADOES. MOVE QUICKLY TO A SAFE SHELTER...SUCH AS AN INTERIOR ROOM...A BATHROOM OR CLOSET OR BASEMENT. #end #end +################################ +## MISCELLANEOUS CALLS TO ACTION +################################ ## #if(${list.contains($bullets, "lightningCTA")}) #if(${stormType} == "line") diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/impactSevereWeatherStatement.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/impactSevereWeatherStatement.xml index 1df1e3feb2..0cafbb9edd 100644 --- a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/impactSevereWeatherStatement.xml +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/impactSevereWeatherStatement.xml @@ -6,6 +6,9 @@ EVAN BOOKBINDER WFO EAX 11-4-2011 removed bulletDefaults that prevented auto selection PHIL KURIMSKI WFO DTX 2-12-2012 OB12.1.1-1 FOR IMPACT BASED TOR/SVR WARNINGS PHIL KURIMSKI WFO DTX 2-29-2012 OB12.2.1-4 + PHIL KURIMSKI 04-20-2012 + MIKE REGA 5-10-2012 DR 14525 added timeZoneField + DR 14691 added feAreaField --> @@ -279,22 +283,25 @@ - - - - - - - - - + + + + + + + + + + + + - - - - + + + + @@ -312,7 +319,7 @@ - + @@ -363,6 +370,7 @@ + @@ -424,22 +432,25 @@ - - - - - - - - - + + + + + + + + + + + + - - - - + + + + @@ -462,6 +473,8 @@ NAME STATE + FE_AREA + TIME_ZONE countyTypes.txt FIPS diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/impactTornadoWarning.vm b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/impactTornadoWarning.vm index 971a429fcf..089e9782ba 100644 --- a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/impactTornadoWarning.vm +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/impactTornadoWarning.vm @@ -4,6 +4,7 @@ ## CREATED BY PHIL KURIMSKI - WFO DTX ## ## VERSION AWIPS II 1.0 -- 2-21-2012 OB12.1.1-1 ## ## VERSION AWIPS II 1.1 -- 2-29-2012 OB12.2.1-4 ## +## VERSION AWIPS II 1.2 -- 4-20-2012 ## ################################################################ ## ESTABLISH SOME INITIAL VARIABLES #set ($preAmble = "") @@ -16,9 +17,10 @@ #set ($pdstor = "") #set ($confirmed = "") #set ($torHazard = "POTENTIAL TORNADO") +#set ($torGround = "ON THE GROUND") #set ($source = "RADAR INDICATED ROTATION.") #set ($extrasource = "") -#set ($impact = "EXTENSIVE DAMAGE TO ROOFS AND WINDOWS. TREES TO BE UPROOTED BLOCKING ROADS...DAMAGING BUILDINGS...HOMES AND DOWNING POWER LINES.") +#set ($impact = "SIGNIFICANT HOUSE AND BUILDING DAMAGE POSSIBLE. MOBILE HOMES COMPLETELY DESTROYED IF HIT. SOME TREES UPROOTED OR SNAPPED. VEHICLES WILL LIKELY BE THROWN BY TORNADIC WINDS.") #if(${stormType} == "line") #set($reportType = "A LINE OF TORNADO PRODUCING STORMS WAS REPORTED") #set($pathcastLead = "THESE TORNADIC STORMS") @@ -165,7 +167,6 @@ #end ${WMOId} ${vtecOffice} 000000 ${BBBId} TOR${siteId} - ${ugcline} /${productClass}.${action}.${vtecOffice}.TO.W.${etn}.${dateUtil.format(${start}, ${timeFormat.ymdthmz})}-${dateUtil.format(${expire}, ${timeFormat.ymdthmz}, 15)}/ @@ -207,31 +208,33 @@ THIS IS A TEST MESSAGE. ## #if(${list.contains($bullets, "doppler")}) #if(${stormType} == "line") - #set ($reportType = "A LINE OF SEVERE THUNDERSTORMS CAPABLE OF PRODUCING A TORNADO ARE LOCATED") + #set ($reportType = "A LINE OF SEVERE THUNDERSTORMS CAPABLE OF PRODUCING A TORNADO WAS LOCATED") #set ($pathcastLead = "THESE DANGEROUS STORMS") #else - #set ($reportType = "A SEVERE THUNDERSTORM CAPABLE OF PRODUCING A TORNADO IS LOCATED") + #set ($reportType = "A SEVERE THUNDERSTORM CAPABLE OF PRODUCING A TORNADO WAS LOCATED") #set ($pathcastLead = "THIS DANGEROUS STORM") #end #set ($moveLead = "..AND MOVING") + #set ($torGround = "DEVELOPING") #end #if(${list.contains($bullets, "dopplerSquall")}) - #set ($reportType = "A SEVERE SQUALL LINE CAPABLE OF PRODUCING BOTH TORNADOES AND EXTENSIVE STRAIGHT LINE WIND DAMAGE ARE LOCATED") - #set ($pathcastLead = "THIS DANGEROUS STORM") + #set ($reportType = "A SEVERE SQUALL LINE CAPABLE OF PRODUCING BOTH TORNADOES AND EXTENSIVE STRAIGHT LINE WIND DAMAGE WAS LOCATED") + #set ($pathcastLead = "THESE DANGEROUS STORMS") #set ($moveLead = "..AND MOVING") + #set ($torGround = "DEVELOPING") #end #if(${list.contains($bullets, "confirmedDoppler")}) #set ($torTag = "OBSERVED") #set ($torHazard = "DAMAGING TORNADO") #set ($confirmed = "CONFIRMED ") - #set ($source = "STORM SPOTTERS CONFIRMED TORNADO.") - #set ($impact = "EXTENSIVE DAMAGE TO HOMES AND BUILDINGS. TREES TO BE UPROOTED BLOCKING ROADS...DAMAGING BUILDINGS...HOMES AND DOWNING POWER LINES.") + #set ($source = "RADAR CONFIRMED TORNADO.") + #set ($preAmble = "TO REPEAT...A TORNADO IS ON THE GROUND. ") #if(${stormType} == "line") - #set ($reportType = "A LINE OF TORNADO PRODUCING STORMS ARE LOCATED") + #set ($reportType = "A LINE OF TORNADO PRODUCING STORMS WAS LOCATED") #set ($pathcastLead = "THESE TORNADIC STORMS") #set ($moveLead = " DOPPLER RADAR SHOWED THESE TORNADIC STORMS MOVING") #else - #set ($reportType = "A TORNADO PRODUCING STORM IS LOCATED") + #set ($reportType = "A TORNADO PRODUCING STORM WAS LOCATED") #set ($pathcastLead = "THIS TORNADIC STORM") #set ($moveLead = " DOPPLER RADAR SHOWED THIS TORNADO MOVING") #end @@ -249,7 +252,7 @@ THIS IS A TEST MESSAGE. ## #set ($pathcastLead = "THE TORNADO") #set ($moveLead = " DOPPLER RADAR SHOWED THIS TORNADO MOVING") #end - #set ($preAmble = "TO REPEAT...A LARGE...EXTREMELY DANGEROUS AND POTENTIALLY DEADLY TORNADO IS ON THE GROUND. TAKE IMMEDIATE ACTION TO PROTECT YOUR LIFE.") + #set ($preAmble = "TO REPEAT...A LARGE...EXTREMELY DANGEROUS AND POTENTIALLY DEADLY TORNADO IS ON THE GROUND. TO PROTECT YOUR LIFE...") #end *# #if(${list.contains($bullets, "spotter")}) @@ -257,78 +260,75 @@ THIS IS A TEST MESSAGE. ## #set ($torHazard = "DAMAGING TORNADO") #set ($confirmed = "CONFIRMED ") #set ($source = "WEATHER SPOTTERS CONFIRMED TORNADO.") - #set ($impact = "EXTENSIVE DAMAGE TO HOMES AND BUILDINGS. TREES TO BE UPROOTED BLOCKING ROADS...DAMAGING BUILDINGS...HOMES AND DOWNING POWER LINES.") #if(${stormType} == "line") - #set ($reportType = "A LINE OF TORNADO PRODUCING STORMS ARE LOCATED") + #set ($reportType = "A LINE OF TORNADO PRODUCING STORMS WAS LOCATED") #set ($pathcastLead = "THESE TORNADIC STORMS") #set ($moveLead = " DOPPLER RADAR SHOWED THESE TORNADIC STORMS MOVING") #else - #set ($reportType = "A CONFIRMED TORNADO IS LOCATED") + #set ($reportType = "A CONFIRMED TORNADO WAS LOCATED") #set ($pathcastLead = "THE TORNADO") #set ($moveLead = " DOPPLER RADAR SHOWED THIS TORNADO MOVING") #end - #set ($preAmble = "TO REPEAT...A TORNADO HAS BEEN CONFIRMED BY STORM SPOTTERS.") + #set ($preAmble = "TO REPEAT...A TORNADO IS ON THE GROUND. ") #end #if(${list.contains($bullets, "lawEnforcement")}) #set ($torTag = "OBSERVED") #set ($torHazard = "DAMAGING TORNADO") #set ($confirmed = "CONFIRMED ") #set ($source = "LAW ENFORCEMENT CONFIRMED TORNADO.") - #set ($impact = "EXTENSIVE DAMAGE TO HOMES AND BUILDINGS. TREES TO BE UPROOTED BLOCKING ROADS...DAMAGING BUILDINGS...HOMES AND DOWNING POWER LINES.") #if(${stormType} == "line") - #set ($reportType = "A LINE OF TORNADO PRODUCING STORMS ARE LOCATED") + #set ($reportType = "A LINE OF TORNADO PRODUCING STORMS WAS LOCATED") #set ($pathcastLead = "THESE TORNADIC STORMS") #set ($moveLead = " DOPPLER RADAR SHOWED THESE TORNADIC STORMS MOVING") #else - #set ($reportType = "A CONFIRMED TORNADO IS LOCATED") + #set ($reportType = "A CONFIRMED TORNADO WAS LOCATED") #set ($pathcastLead = "THE TORNADO") #set ($moveLead = " DOPPLER RADAR SHOWED THIS TORNADO MOVING") #end - #set ($preAmble = "TO REPEAT...A TORNADO HAS BEEN CONFIRMED BY LOCAL LAW ENFORCEMENT.") + #set ($preAmble = "TO REPEAT...A TORNADO IS ON THE GROUND. ") #end #if(${list.contains($bullets, "emergencyManagement")}) #set ($torTag = "OBSERVED") #set ($torHazard = "DAMAGING TORNADO") #set ($confirmed = "CONFIRMED ") #set ($source = "EMERGENCY MANAGEMENT CONFIRMED TORNADO.") - #set ($impact = "EXTENSIVE DAMAGE TO HOMES AND BUILDINGS. TREES TO BE UPROOTED BLOCKING ROADS...DAMAGING BUILDINGS...HOMES AND DOWNING POWER LINES.") #if(${stormType} == "line") - #set ($reportType = "A LINE OF TORNADO PRODUCING STORMS ARE LOCATED") + #set ($reportType = "A LINE OF TORNADO PRODUCING STORMS WAS LOCATED") #set ($pathcastLead = "THESE TORNADIC STORMS") #set ($moveLead = " DOPPLER RADAR SHOWED THESE TORNADIC STORMS MOVING") #else - #set ($reportType = "A CONFIRMED TORNADO IS LOCATED") + #set ($reportType = "A CONFIRMED TORNADO WAS LOCATED") #set ($pathcastLead = "THE TORNADO") #set ($moveLead = " DOPPLER RADAR SHOWED THIS TORNADO MOVING") #end - #set ($preAmble = "TO REPEAT...A TORNADO HAS BEEN CONFIRMED BY EMERGENCY MANAGEMENT OFFICIALS.") + #set ($preAmble = "TO REPEAT...A TORNADO IS ON THE GROUND. ") #end #if(${list.contains($bullets, "public")}) #set ($torTag = "OBSERVED") #set ($torHazard = "DAMAGING TORNADO") #set ($confirmed = "CONFIRMED ") #set ($source = "PUBLIC CONFIRMED TORNADO.") - #set ($impact = "EXTENSIVE DAMAGE TO HOMES AND BUILDINGS. TREES TO BE UPROOTED BLOCKING ROADS...DAMAGING BUILDINGS...HOMES AND DOWNING POWER LINES.") #if(${stormType} == "line") - #set ($reportType = "A LINE OF TORNADO PRODUCING STORMS ARE LOCATED") + #set ($reportType = "A LINE OF TORNADO PRODUCING STORMS WAS LOCATED") #set ($pathcastLead = "THESE TORNADIC STORMS") #set ($moveLead = " DOPPLER RADAR SHOWED THESE TORNADIC STORMS MOVING") #else - #set ($reportType = "A CONFIRMED TORNADO IS LOCATED") + #set ($reportType = "A CONFIRMED TORNADO WAS LOCATED") #set ($pathcastLead = "THE TORNADO") #set ($moveLead = " DOPPLER RADAR SHOWED THIS TORNADO MOVING") #end - #set ($preAmble = "TO REPEAT...A TORNADO HAS BEEN SIGHTED.") + #set ($preAmble = "TO REPEAT...A TORNADO IS ON THE GROUND. ") #end #if(${list.contains($bullets, "spotterFunnelCloud")}) ##set ($reportType = "TRAINED WEATHER SPOTTERS REPORTED A FUNNEL CLOUD") #set ($source = "WEATHER SPOTTERS REPORTED FUNNEL CLOUD.") + #set ($torGround = "DEVELOPING") #if(${stormType} == "line") - #set ($reportType = "A LINE OF SEVERE THUNDERSTORMS CAPABLE OF PRODUCING A TORNADO ARE LOCATED") + #set ($reportType = "A LINE OF SEVERE THUNDERSTORMS CAPABLE OF PRODUCING A TORNADO WAS LOCATED") #set ($pathcastLead = "THESE DANGEROUS STORMS") #set ($moveLead = " A TORNADO MAY DEVELOP AT ANY TIME. DOPPLER RADAR SHOWED THESE DANGEROUS STORMS MOVING") #else - #set ($reportType = "A SEVERE THUNDERSTORM CAPABLE OF PRODUCING A TORNADO IS LOCATED") + #set ($reportType = "A SEVERE THUNDERSTORM CAPABLE OF PRODUCING A TORNADO WAS LOCATED") #set ($pathcastLead = "THIS DANGEROUS STORM") #set ($moveLead = " A TORNADO MAY DEVELOP AT ANY TIME. DOPPLER RADAR SHOWED THIS DANGEROUS STORM MOVING") #end @@ -343,7 +343,7 @@ THIS IS A TEST MESSAGE. ## #set ($torHazard = "DAMAGING TORNADO") #set ($torThreat = "TORNADO DAMAGE THREAT...SIGNIFICANT") #set ($pdstor = "THIS IS A PARTICULARLY DANGEROUS SITUATION.") - #set ($impact = "EXTENSIVE DAMAGE TO HOMES AND BUILDINGS. TREES TO BE UPROOTED BLOCKING ROADS...DAMAGING BUILDINGS...HOMES AND DOWNING POWER LINES.") + #set ($impact = "MAJOR HOUSE AND BUILDING DAMAGE LIKELY AND COMPLETE DESTRUCTION POSSIBLE. NUMEROUS TREES SNAPPED. MAJOR POWER OUTAGES IN PATH OF TORNADO HIGHLY LIKELY. SOME ROADS POSSIBLY BLOCKED BY TORNADO DEBRIS. COMPLETE DESTRUCTION OF VEHICLES LIKELY.") #if(${stormType} == "line") #set ($pathcastLead = "THESE TORNADIC STORMS") #set ($moveLead = " DOPPLER RADAR SHOWED THESE TORNADIC STORMS MOVING") @@ -351,7 +351,7 @@ THIS IS A TEST MESSAGE. ## #set ($pathcastLead = "THE TORNADO") #set ($moveLead = " DOPPLER RADAR SHOWED THIS TORNADO MOVING") #end - #set ($preAmble = "TO REPEAT...A LARGE...EXTREMELY DANGEROUS AND POTENTIALLY DEADLY TORNADO IS ON THE GROUND. TAKE IMMEDIATE ACTION TO PROTECT YOUR LIFE.") + #set ($preAmble = "TO REPEAT...A LARGE...EXTREMELY DANGEROUS AND POTENTIALLY DEADLY TORNADO IS ${torGround}. TO PROTECT YOUR LIFE...") #end ############################################################################ ## IF A TORNADO EMERGENCY IS SELECTED THE FOLLOWING WILL OVERRIDE CERTAIN @@ -359,11 +359,12 @@ THIS IS A TEST MESSAGE. ## ############################################################################ #if(${list.contains($bullets, "torEmergency")}) #set ($reportType = "TORNADO EMERGENCY FOR !** LOCATION **!. A CONFIRMED LARGE AND DESTRUCTIVE TORNADO") + #set ($ctaSelected = "YES") #set ($torTag = "OBSERVED") #set ($torHazard = "DEADLY TORNADO") #set ($torThreat = "TORNADO DAMAGE THREAT...CATASTROPHIC") #set ($pdstor = "THIS IS A PARTICULARLY DANGEROUS SITUATION.") - #set ($impact = "LIFE THREATENING SITUATION. EXTENSIVE DAMAGE TO HOMES AND BUILDINGS...UPROOTED TREES AND DEBRIS WILL RESTRICT ACCESS INTO MANY AREAS.") + #set ($impact = "THIS IS A LIFE THREATENING SITUATION. YOU COULD BE KILLED IF NOT UNDERGROUND OR IN A TORNADO SHELTER. COMPLETE DESTRUCTION OF ENTIRE NEIGHBORHOODS IS LIKELY. MANY WELL BUILT HOMES AND BUSINESSES WILL BE COMPLETELY SWEPT FROM THEIR FOUNDATIONS. DEBRIS WILL BLOCK MOST ROADWAYS. MASS DEVASTATION IS HIGHLY LIKELY MAKING THE AREA UNRECOGNIZABLE TO SURVIVORS.") #if(${stormType} == "line") #set ($pathcastLead = "THESE TORNADIC STORMS") #set ($moveLead = " DOPPLER RADAR SHOWED THESE TORNADIC STORMS MOVING") @@ -374,7 +375,7 @@ THIS IS A TEST MESSAGE. ## #if(${list.contains($bullets, "doppler")}||${list.contains($bullets, "dopplerSquall")}) #set ($source = "WEATHER SPOTTERS CONFIRMED TORNADO.") #end - #set ($preAmble = "TO REPEAT...A LARGE...EXTREMELY DANGEROUS AND POTENTIALLY DEADLY TORNADO IS ON THE GROUND. TAKE IMMEDIATE ACTION TO PROTECT YOUR LIFE.") + #set ($preAmble = "TO REPEAT...A LARGE...EXTREMELY DANGEROUS AND DEADLY TORNADO IS ON THE GROUND. TO PROTECT YOUR LIFE...") #end #################################################### @@ -394,20 +395,22 @@ THIS IS A TEST MESSAGE. ## #end ########################################################## ## Check to see if wind is selected for the hazard phrase +## and make sure hail is at least 1 inch ########################################################## -#if (${windSpeed} >= 60) +#if (${windSpeed} >= 60 && ${hailSize} >= 1) #set ($hazard = "${torHazard}...${hailHazard} AND ${windHazard}") -#else +#elseif (${windSpeed} >= 60 && ${hailSize} < 1) + #set ($hazard = "${torHazard} AND ${windHazard}") +#elseif (${windSpeed} < 60 && ${hailSize} >= 1) #set ($hazard = "${torHazard} AND ${hailHazard}") +#else + #set ($hazard = "${torHazard}") #end ######################################################### ## If a significant or catastrophic tornado are selected ## do not include any wind or hail informadion ######################################################### -#if(${list.contains($bullets, "significantTornado")}) - #set ($hazard = "${torHazard}") -#end -#if(${list.contains($bullets, "torEmergency")}) +#if(${list.contains($bullets, "significantTornado")} || ${list.contains($bullets, "torEmergency")}) #set ($hazard = "${torHazard}") #end ###################################################### @@ -556,16 +559,25 @@ PRECAUTIONARY/PREPAREDNESS ACTIONS... #end ## +#if(${list.contains($bullets, "torEmergencyCTA")} || ${list.contains($bullets, "torEmergency")}) +#if(${list.contains($bullets, "torEmergency")}) +THIS IS AN EXTREMELY DANGEROUS TORNADO WITH COMPLETE DEVASTATION LIKELY. YOU COULD BE KILLED IF NOT UNDERGROUND OR IN A TORNADO SHELTER. DO NOT DELAY...SEEK SHELTER NOW! IF NO UNDERGROUND SHELTER IS AVAILABLE SEEK SHELTER IN AN INTERIOR ROOM OF THE LOWEST LEVEL OF A STRUCTURE...OR IF TIME ALLOWS...CONSIDER MOVING TO AN UNDERGROUND SHELTER ELSEWHERE. MOBILE HOMES AND OUTBUILDINGS WILL OFFER NO SHELTER FROM THIS TORNADO. + +#else +!** YOU SELECTED THE TORNADO EMERGENCY CTA WITHOUT SELECTING THE TORNADO EMERGENCY HEADER. PLEASE CLOSE THIS WINDOW AND RE-GENERATE THIS WARNING **! + +#end +#end #if(${list.contains($bullets, "replacesSVRCTA")}) THIS TORNADO WARNING REPLACES THE SEVERE THUNDERSTORM WARNING ISSUED FOR THE SAME AREA. #end #if(${list.contains($bullets, "defaultMobileCTA")}) -TAKE COVER NOW! MOVE TO A BASEMENT OR AN INTERIOR ROOM ON THE LOWEST FLOOR OF A STURDY BUILDING. AVOID WINDOWS. IF IN A MOBILE HOME...A VEHICLE OR OUTDOORS...MOVE TO THE CLOSEST SUBSTANTIAL SHELTER AND PROTECT YOURSELF FROM FLYING DEBRIS. +${preAmble}TAKE COVER NOW! MOVE TO A BASEMENT OR AN INTERIOR ROOM ON THE LOWEST FLOOR OF A STURDY BUILDING. AVOID WINDOWS. IF IN A MOBILE HOME...A VEHICLE OR OUTDOORS...MOVE TO THE CLOSEST SUBSTANTIAL SHELTER AND PROTECT YOURSELF FROM FLYING DEBRIS. #end #if(${list.contains($bullets, "defaultUrbanCTA")}) -TAKE COVER NOW! MOVE TO A BASEMENT OR AN INTERIOR ROOM ON THE LOWEST FLOOR OF A STURDY BUILDING. AVOID WINDOWS. IF IN A VEHICLE OR OUTDOORS...MOVE TO THE CLOSEST SUBSTANTIAL SHELTER AND PROTECT YOURSELF FROM FLYING DEBRIS. +${preAmble}TAKE COVER NOW! MOVE TO A BASEMENT OR AN INTERIOR ROOM ON THE LOWEST FLOOR OF A STURDY BUILDING. AVOID WINDOWS. IF IN A VEHICLE OR OUTDOORS...MOVE TO THE CLOSEST SUBSTANTIAL SHELTER AND PROTECT YOURSELF FROM FLYING DEBRIS. #end #if(${list.contains($bullets, "motoristsCTA")}) diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/impactTornadoWarning.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/impactTornadoWarning.xml index 150ff6c377..6abcac7af5 100644 --- a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/impactTornadoWarning.xml +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/impactTornadoWarning.xml @@ -2,6 +2,9 @@ @@ -58,7 +61,7 @@ - + @@ -109,6 +112,7 @@ + @@ -136,7 +140,7 @@ - + @@ -186,6 +190,7 @@ + @@ -219,6 +224,8 @@ NAME STATE + FE_AREA + TIME_ZONE countyTypes.txt FIPS diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/marineWeatherStatement.vm b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/marineWeatherStatement.vm index ee097514ec..cb271aa650 100644 --- a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/marineWeatherStatement.vm +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/marineWeatherStatement.vm @@ -9,6 +9,7 @@ ## Added coding for no headline in Version 1.4 ## ## VERSION AWIPS II 1.5 -- MAR 2 2012 OB12.2.1-4 ## ## Added coding for dense fog in Version 1.5 ## +## Evan Bookbinder 4-25-2012 for OB 12.3.1 (MND) ##################################################### ## Set the visibility variable to be used for dense fog ## This variable can be changed by the local office and will @@ -25,6 +26,7 @@ #end ${WMOId} ${vtecOffice} 000000 ${BBBId} MWS${siteId} + #if(${productClass}=="T") TEST...MARINE WEATHER STATEMENT...TEST #else diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/marineWeatherStatementAshfall.vm b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/marineWeatherStatementAshfall.vm index 624727dee2..ae45868f24 100644 --- a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/marineWeatherStatementAshfall.vm +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/marineWeatherStatementAshfall.vm @@ -3,6 +3,7 @@ ## ORIGINAL MWS CREATED BY PHIL KURIMSKI - WFO DTX ## AND MODIFIED BY TOM BIRCHARD - WFO HFO ## 9/22/11 ALASKA TIM FOR ASHFALL PURPOSES +## Evan Bookbinder 4-25-2012 for OB 12.3.1 (MND) ## ################################################# ## Set null variables used in the template @@ -14,6 +15,7 @@ #end ${WMOId} ${vtecOffice} 000000 ${BBBId} MWS${siteId} + #if(${productClass}=="T") TEST...MARINE WEATHER STATEMENT...TEST #else diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/nonConvectiveFlashFloodWarning.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/nonConvectiveFlashFloodWarning.xml index d92fc21ff2..dbd0196b89 100644 --- a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/nonConvectiveFlashFloodWarning.xml +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/nonConvectiveFlashFloodWarning.xml @@ -4,8 +4,8 @@ Modified Evan Bookbinder 09-16-2011 OB 11.0.8-8 Modified Phil Kurimski 09-23-2011 OB 11.0.8-8 Modified Phil Kurimski 01-26-2012 OB 12.1.1-1 - Qinglu Lin 04-04-2012 DR 14691. Added tag. ---> + Modified Qinglu Lin 04-04-2012 DR 14691. Added tag. + Modified Phil Kurimski 04-27-2012 --> mi @@ -91,7 +91,7 @@ - + @@ -157,7 +157,7 @@ - + @@ -220,7 +220,7 @@ - + @@ -276,6 +276,7 @@ NAME STATE FE_AREA + TIME_ZONE countyTypes.txt FIPS diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/nonConvectiveFlashFloodWarningFollowup.vm b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/nonConvectiveFlashFloodWarningFollowup.vm index 2cc89b3258..837ee01943 100644 --- a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/nonConvectiveFlashFloodWarningFollowup.vm +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/nonConvectiveFlashFloodWarningFollowup.vm @@ -6,6 +6,7 @@ ## -- AUG 18 2011 OB11.0.8-4 ## ## Evan Bookbinder -- SEP 16 2011 OB11.0.8-8 ## ## Phil Kurimski -- SEP 23 2011 OB11.0.8-8 ## +## Mike Rega -- MAY 03 2012 DR 14885 MND ## ##################################################### ## #set($headline = "") @@ -176,6 +177,7 @@ #if(${action}!="CANCON") ${WMOId} ${vtecOffice} 000000 ${BBBId} FFS${siteId} + #if(${productClass}=="T") TEST...FLASH FLOOD STATEMENT...TEST #else diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/nonConvectiveFlashFloodWarningFollowup.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/nonConvectiveFlashFloodWarningFollowup.xml index 682fe1cfd8..ba06385b13 100644 --- a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/nonConvectiveFlashFloodWarningFollowup.xml +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/nonConvectiveFlashFloodWarningFollowup.xml @@ -3,8 +3,8 @@ Modified Evan Bookbinder 09-16-2011 OB11.0.8-8 Modified Phil Kurimski 09-23-2011 OB 11.0.8-8 Modified Phil Kurimski 01-26-2012 OB 12.1.1-1 - Qinglu Lin 04-04-2012 DR 14691. Added tag. ---> + Modified Qinglu Lin 04-04-2012 DR 14691. Added tag. + Modified Phil Kurimski 04-27-2012 --> @@ -175,7 +175,7 @@ - + @@ -242,7 +242,7 @@ - + @@ -303,6 +303,7 @@ NAME STATE FE_AREA + TIME_ZONE countyTypes.txt FIPS diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/nonConvectiveFlashFloodWarningFollowup_Zones.vm b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/nonConvectiveFlashFloodWarningFollowup_Zones.vm index 8b0ab53899..154e723d33 100644 --- a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/nonConvectiveFlashFloodWarningFollowup_Zones.vm +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/nonConvectiveFlashFloodWarningFollowup_Zones.vm @@ -6,6 +6,7 @@ ## -- AUG 18 2011 OB11.0.8-4 ## ## Evan Bookbinder -- SEP 16 2011 OB11.0.8-8 ## ## Phil Kurimski -- SEP 23 2011 OB11.0.8-8 ## +## Mike Rega -- MAY 03 2012 DR 14885 MND ## ##################################################### ## #set($headline = "") @@ -176,6 +177,7 @@ #if(${action}!="CANCON") ${WMOId} ${vtecOffice} 000000 ${BBBId} FFS${siteId} + #if(${productClass}=="T") TEST...FLASH FLOOD STATEMENT...TEST #else diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/nonConvectiveFlashFloodWarningFollowup_Zones.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/nonConvectiveFlashFloodWarningFollowup_Zones.xml index 218996ec53..0ba5705ed8 100644 --- a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/nonConvectiveFlashFloodWarningFollowup_Zones.xml +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/nonConvectiveFlashFloodWarningFollowup_Zones.xml @@ -4,7 +4,8 @@ Modified Phil Kurimski 09-23-2011 OB 11.0.8-8 Modified Phil Kurimski 01-26-2012 OB 12.1.1-1 Modified Phil Kurimski 02-29-2012 OB 12.2.1-3 - Qinglu Lin 04-04-2012 DR 14691. Added tag. + Modified Qinglu Lin 04-04-2012 DR 14691. Added tag. + Modified Phil Kurimski 04-27-2012 --> @@ -176,7 +177,7 @@ - + @@ -243,7 +244,7 @@ - + @@ -304,6 +305,7 @@ NAME STATE FE_AREA + TIME_ZONE countyTypes.txt STATE_ZONE diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/nonConvectiveFlashFloodWarning_Zones.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/nonConvectiveFlashFloodWarning_Zones.xml index 267fadbb12..a34c4e7552 100644 --- a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/nonConvectiveFlashFloodWarning_Zones.xml +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/nonConvectiveFlashFloodWarning_Zones.xml @@ -5,8 +5,8 @@ Modified Phil Kurimski 09-21-2011 OB 11.0.8-8 Modified Phil Kurimski 01-26-2012 OB 12.1.1-1 Modified Phil Kurimski 02-29-2012 OB 12.2.1-3 - Qinglu Lin 04-04-2012 DR 14691. Added tag. ---> + Modified Qinglu Lin 04-04-2012 DR 14691. Added tag. + Modified Phil Kurimski 04-27-2012 --> mi @@ -92,7 +92,7 @@ - + @@ -157,7 +157,7 @@ - + @@ -220,7 +220,7 @@ - + @@ -276,6 +276,7 @@ NAME STATE FE_AREA + TIME_ZONE countyTypes.txt STATE_ZONE diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/severeThunderstormWarning.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/severeThunderstormWarning.xml index 60241e67ed..c3f3400904 100644 --- a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/severeThunderstormWarning.xml +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/severeThunderstormWarning.xml @@ -204,6 +204,7 @@ NAME STATE FE_AREA + TIME_ZONE countyTypes.txt FIPS diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/severeWeatherStatement.vm b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/severeWeatherStatement.vm index c13b0f42ad..c40464e5c0 100644 --- a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/severeWeatherStatement.vm +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/severeWeatherStatement.vm @@ -7,6 +7,7 @@ ## BY PHIL KURIMSKI 9-22-2011 OB11.8.0-8 ## ## BY EVAN BOOKBINDER 11-04-2011 OB11.9-3 ## ## BY EVAN BOOKBINDER 2-24-2012 OB12.2.1 ## +## BY MIKE REGA 5-3-2012 DR 14885 MND blank line ## ################################################################# ## ################################################################### @@ -46,6 +47,7 @@ ###################################### ${WMOId} ${vtecOffice} 000000 ${BBBId} SVS${siteId} + #if(${productClass}=="T") TEST...SEVERE WEATHER STATEMENT...TEST #else diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/severeWeatherStatement.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/severeWeatherStatement.xml index a80e071ac7..9955ea7cd4 100644 --- a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/severeWeatherStatement.xml +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/severeWeatherStatement.xml @@ -418,6 +418,7 @@ NAME STATE FE_AREA + TIME_ZONE countyTypes.txt FIPS diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/shortTermForecast.vm b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/shortTermForecast.vm index 8e8219a182..622ca27f51 100644 --- a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/shortTermForecast.vm +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/shortTermForecast.vm @@ -4,16 +4,17 @@ ## VERSION AWIPS II 1.0 -- AUG 19 2011 OB11.8 ## ## EDITED BY MIKE DANGELO 2-27-2012 ## ## EDITED BY Phil Kurimski 3-01-2012 OB12.2.1-4 ## +## Evan Bookbinder 4-25-2012 for OB 12.3.1 (MND) ################################################## ## ${WMOId} ${vtecOffice} 000000 ${BBBId} NOW${siteId} -#if(${productClass}=="T") -TEST...SHORT TERM FORECAST...TEST## -#else -SHORT TERM FORECAST## -#end +#if(${productClass}=="T") +TEST...SHORT TERM FORECAST...TEST +#else +SHORT TERM FORECAST +#end NATIONAL WEATHER SERVICE ${officeShort} #backupText(${backupSite}) ${dateUtil.format(${now}, ${timeFormat.header}, ${localtimezone})} diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/shortTermForecast.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/shortTermForecast.xml index 36aa500757..f74f758e93 100644 --- a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/shortTermForecast.xml +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/shortTermForecast.xml @@ -141,6 +141,7 @@ NAME STATE FE_AREA + TIME_ZONE countyTypes.txt STATE_ZONE diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/significantWeatherAdvisory.vm b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/significantWeatherAdvisory.vm index 7adc6a1039..16e1e0575b 100644 --- a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/significantWeatherAdvisory.vm +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/significantWeatherAdvisory.vm @@ -5,6 +5,7 @@ ## VERSION 1.0 8-16-2011 ## ## Edited by Mike Dangelo 02-27-2012 ## ## Edited by Phil Kurimski 3-01-2012 OB12.2.1-4 ## +## Evan Bookbinder 4-25-2012 for OB 12.3.1 (MND) ###################################################### ## ##SET SOME INITIAL VARIABLES @@ -90,12 +91,12 @@ ${WMOId} ${vtecOffice} 000000 ${BBBId} SPS${siteId} -#if(${productClass}=="T") -TEST...SPECIAL WEATHER STATEMENT...TEST## -#else -SPECIAL WEATHER STATEMENT## -#end +#if(${productClass}=="T") +TEST...SPECIAL WEATHER STATEMENT...TEST +#else +SPECIAL WEATHER STATEMENT +#end NATIONAL WEATHER SERVICE ${officeShort} #backupText(${backupSite}) ${dateUtil.format(${now}, ${timeFormat.header}, ${localtimezone})} diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/significantWeatherAdvisory.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/significantWeatherAdvisory.xml index 153b333332..36e9878d8f 100644 --- a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/significantWeatherAdvisory.xml +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/significantWeatherAdvisory.xml @@ -139,6 +139,7 @@ NAME STATE FE_AREA + TIME_ZONE countyTypes.txt STATE_ZONE diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/specialMarineWarningFollowup.vm b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/specialMarineWarningFollowup.vm index 9b712b286a..fb3ca03b3c 100644 --- a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/specialMarineWarningFollowup.vm +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/specialMarineWarningFollowup.vm @@ -43,6 +43,7 @@ #if(${action}!="CANCON") ${WMOId} ${vtecOffice} 000000 ${BBBId} MWS${siteId} + #if(${productClass}=="T") TEST...MARINE WEATHER STATEMENT...TEST #else @@ -478,6 +479,7 @@ REPORT SEVERE WEATHER TO THE COAST GUARD OR NEAREST LAW ENFORCEMENT AGENCY. THEY #if(${action}=="CANCON") ${WMOId} ${vtecOffice} 000000 ${BBBId} MWS${siteId} + #if(${productClass}=="T") TEST...MARINE WEATHER STATEMENT...TEST #else diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/specialWeatherStatement.vm b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/specialWeatherStatement.vm index 6f147e6387..522c2dc071 100644 --- a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/specialWeatherStatement.vm +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/specialWeatherStatement.vm @@ -4,12 +4,12 @@ ## ${WMOId} ${vtecOffice} 000000 ${BBBId} SPS${siteId} -#if(${productClass}=="T") -TEST...SPECIAL WEATHER STATEMENT...TEST## -#else -SPECIAL WEATHER STATEMENT## -#end +#if(${productClass}=="T") +TEST...SPECIAL WEATHER STATEMENT...TEST +#else +SPECIAL WEATHER STATEMENT +#end NATIONAL WEATHER SERVICE ${officeShort} #backupText(${backupSite}) ${dateUtil.format(${now}, ${timeFormat.header}, ${localtimezone})} diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/specialWeatherStatement.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/specialWeatherStatement.xml index b006fecc36..0181b4915b 100644 --- a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/specialWeatherStatement.xml +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/specialWeatherStatement.xml @@ -80,6 +80,7 @@ NAME STATE FE_AREA + TIME_ZONE countyTypes.txt STATE_ZONE NAME diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/sws_county.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/sws_county.xml index 8c0112aa8a..6f4e9a5dca 100644 --- a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/sws_county.xml +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/sws_county.xml @@ -71,6 +71,7 @@ NAME STATE FE_AREA + TIME_ZONE countyTypes.txt FIPS NAME diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/tornadoWarning.vm b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/tornadoWarning.vm index 3319ca85b2..0ae6165a8b 100644 --- a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/tornadoWarning.vm +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/tornadoWarning.vm @@ -10,6 +10,7 @@ ## MIKE DANGELO WFO CTP 9-22-11 - OB11.8.0-9 ## ## EVAN BOOKBINDER WFO EAX 11-04-11 - OB11.9-3 (DRs) ## ## EVAN BOOKBINDER WFO EAX 2-24-12 - OB12.2.1 ## +## MIKE REGA 5-03-12 - DR 14885 MND blank line ## ############################################################################### ## ESTABLISH SOME INITIAL VARIABLES #set($preAmble = "") @@ -98,7 +99,6 @@ #end ${WMOId} ${vtecOffice} 000000 ${BBBId} TOR${siteId} - ${ugcline} /${productClass}.${action}.${vtecOffice}.TO.W.${etn}.${dateUtil.format(${start}, ${timeFormat.ymdthmz})}-${dateUtil.format(${expire}, ${timeFormat.ymdthmz}, 15)}/ diff --git a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/tornadoWarning.xml b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/tornadoWarning.xml index 049f1729d4..067031d874 100644 --- a/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/tornadoWarning.xml +++ b/edexOsgi/build.edex/esb/data/utility/common_static/base/warngen/tornadoWarning.xml @@ -192,6 +192,7 @@ NAME STATE FE_AREA + TIME_ZONE countyTypes.txt FIPS diff --git a/edexOsgi/build.edex/esb/data/utility/edex_static/base/config/gfe/doConfig.py b/edexOsgi/build.edex/esb/data/utility/edex_static/base/config/gfe/doConfig.py index 590699fc93..b3139ea483 100644 --- a/edexOsgi/build.edex/esb/data/utility/edex_static/base/config/gfe/doConfig.py +++ b/edexOsgi/build.edex/esb/data/utility/edex_static/base/config/gfe/doConfig.py @@ -382,8 +382,8 @@ def parseSat(satdirs): def otherParse(serverhost, mhsid, port, initmodules, accumElem, - initskips, d2ddbver, logfilepurge, prddir, home, - extraWEPrec, autoConfigureNotifyTextProd, + initskips, d2ddbver, logfilepurge, prddir, home, + extraWEPrec, autoConfigureNotifyTextProd, iscRoutingTableAddress, requestedISCsites, requestISC, sendiscOnSave, sendiscOnPublish, requestedISCparms, transmitScript): if type(serverhost) != str: @@ -467,8 +467,8 @@ def otherParse(serverhost, mhsid, port, return serverhost, mhsid, \ port, initmodules, accumElem, \ - initskips, d2ddbver, logfilepurge, prddir, home,\ - extraWEPrecision, \ + initskips, d2ddbver, logfilepurge, prddir, home,\ + extraWEPrecision, \ autoConfigureNotifyTextProd, \ iscRoutingTableAddress, reqISCsites, requestISC, sendiscOnSave, \ sendiscOnPublish, reqISCparms, transmitScript diff --git a/edexOsgi/build.edex/esb/data/utility/edex_static/base/python/AtcfTrackRequest.py b/edexOsgi/build.edex/esb/data/utility/edex_static/base/python/AtcfTrackRequest.py new file mode 100644 index 0000000000..1f5b0d8a6a --- /dev/null +++ b/edexOsgi/build.edex/esb/data/utility/edex_static/base/python/AtcfTrackRequest.py @@ -0,0 +1,273 @@ + +# +# AtcfTrackRequest +# +# This code has been developed by the SIB for use in the AWIPS2 system. +# Request of ATCF track data. +# +# Usage: +# +# +# SOFTWARE HISTORY +# +# Date Ticket# Engineer Description +# ------------ ---------- ----------- -------------------------- +# 09/07/10 284 mgamazaychikov Initial Creation +# 10/10/28 307 mgamazaychikov Updated to handle time-matching +import BaseRequest +from java.util import ArrayList +from com.raytheon.uf.common.message.response import ResponseMessageGeneric +from gov.noaa.nws.ncep.edex.uengine.utility import GempakConvert + +class AtcfTrackRequest(BaseRequest.BaseRequest): + + def __init__(self): + BaseRequest.BaseRequest.__init__(self, "atcf") + self.isTechniqueSet = False + self.time = None + self.StartTime = None + self.EndTime = None + self.isTimeList= False + self.AllTimesList = [] + self.TimesList = [] + self.Convert = GempakConvert() + + def setTime(self, aTime=None): + self.time = aTime + + def setStartTime(self, aTime=None): + if aTime : + self.StartTime = aTime + else: + # set StartTime to the First Available Time + self.StartTime = self.__getFirstTime() + + def setEndTime(self, aTime=None): + if aTime : + self.EndTime = aTime + else: + # set StartTime to the Last Available Time + self.EndTime = self.__getLastTime() + + def setTechnique(self, aTechnique): + self.technique = aTechnique + self.isTechniqueSet = True + + def execute(self): + if self.time: + self.query.addParameter("dataTime", self.time) + else: + if not self.StartTime: + self.StartTime = self.__getFirstTime() + if not self.EndTime: + self.EndTime = self.__getLastTime() + if self.StartTime and self.EndTime: + self.timeRange = self.StartTime + "--" + self.EndTime + self.query.addParameter("dataTime", self.timeRange, "between") + else: + return self.__makeNullResponse("Could not set the time range") + # get the results from the database + self.queryResults = self.query.execute() + if self.queryResults is None or self.queryResults.size() == 0: + return self.__makeNullResponse() + else: + # process the results + return self.__makeResponse() + + def __getFirstTime(self): + # check if the list of available times has been calculated + if self.isTimeList: + return self.Convert.dattimToDbtime(self.AllTimesList[0]) + else: + # get the list of times and return the earliest available time + self.__getTimeList() + return self.Convert.dattimToDbtime(self.AllTimesList[0]) + + def __getLastTime(self): + # check if the list of available times has been calculated + if self.isTimeList: + return self.Convert.dattimToDbtime(self.AllTimesList[len(self.AllTimesList) -1]) + else: + # get the list of times and return the last available time + self.__getTimeList() + return self.Convert.dattimToDbtime(self.AllTimesList[len(self.AllTimesList) -1]) + + + + def __getTimePlus(self, aTime, aPlus="168"): + return self.Convert.addHours(aTime, aPlus) + +# def __createTimes(self): +# if self.time: +# self.TimesList.append(self.time) +# else: +# startIndex = self.AllTimesList.index(self.StartTime) +# endIndex = self.AllTimesList.index(self.EndTime) +# self.TimesList = self.AllTimesList[startIndex:endIndex] + + def __getTimeList(self): + import GempakCatalogTimeQuery + tq = GempakCatalogTimeQuery.GempakCatalogTimeQuery("atcf") + tq.setReturnText() + self.AllTimesList = tq.execute().split("|") + self.isTimeList =True + + def __getDictionaries(self): + import GempakSqlQuery + # list of time cyclone ID tuples: + # eg [('2010-08-28 06:00:00.0', 'EP9'), ('2010-08-28 12:00:00.0', 'EP8')] + timeIdTupleList = [] + + # timeIdTqDict - is the key-value dictionary of time-Id tuple Technique List dictionary + # each time has a corresponding dictionary of ID-Technique + # eg: {('2010-08-28 06:00:00.0','AL8'):['AEMI', 'AEMN', 'AP01', 'AP02'], ('2010-08-28 12:00:00.0','AL9'):['AP11', 'AP14', 'AP18']} + timeIdTqDict = {} + + # idNumberDict - is the key-value dictionary of cycloneID-basin, cycloneNumb tuple pairs + # each cycloneId has a corresponding basin-cycloneNumb tuple + # eg: {'AL8': ('AL', '8'), 'AL9': ('AL', '9')} + idNumberDict = {} + + for ii in range(self.queryResults.size()): + + currentRecord = self.queryResults.get(ii) + + # get the time + recordTime = str(currentRecord.getDataTime()) + + # get basin + basin = str(currentRecord.getBasin()) + # get cyclone number + cycloneNumb = str(currentRecord.getCycloneNum()) + + # construct cyclone ID + # eg EP9 + cycloneId = basin + cycloneNumb + + # construct time - cyclone ID tuple + # eg ('2010-08-21 06:00:00.0', 'EP9') + timeIdTuple = (recordTime, cycloneId) + + # check time - cyclone ID tuple old or new + if timeIdTuple in timeIdTupleList: + # existing time - cyclone ID tuple - do not add to list + pass + else: + timeIdTupleList.append(timeIdTuple) + + # add the basin,cycloneNumb tuple as value to the idNumberDict dictionary + # for the key cycloneId, if has not been added already + if (basin, cycloneNumb) in idNumberDict.values(): + pass + else: + idNumberDict[cycloneId] = (basin, cycloneNumb) + + techniqueList = [] + # check if the request is for a single technique + if self.isTechniqueSet: + techniqueList.append(self.technique) + else: + # perform the db query for the records with that cyclone ID + techniqueQuery = GempakSqlQuery.GempakSqlQuery() + + # set the return type to text(string) + # not a ResponseMessageGEneric object + techniqueQuery.setReturnText() + + # set the separator + techniqueQuery.setSeparator("|") + + # set the query text + techniqueQueryText = "SELECT DISTINCT technique FROM atcf WHERE " + \ + "basin ='" + idNumberDict[cycloneId][0] + "' AND " + \ + "cyclonenum ='" + idNumberDict[cycloneId][1] + "' AND " + \ + "reftime='" + recordTime + "'" + techniqueQuery.setQuery(techniqueQueryText) + + # execute the query + techniqueQueryResults = techniqueQuery.execute() + + # create a list of techniques + techniqueList = techniqueQueryResults.split("|") + + # add technique as value to the to the time,cyclone ID - technique dictionary + timeIdTqDict[timeIdTuple] = techniqueList + return idNumberDict, timeIdTqDict + + def __makeResponse(self): + from gov.noaa.nws.ncep.edex.uengine.tasks.atcf import AtcfCyclone, AtcfTrack + response = ArrayList() + idNumberDict, timeIdTqDict = self.__getDictionaries() + + # traverse the time,cyclone ID - technique dictionary to obtain AtcfRecords and + # construct AtcfCyclone objects + for key, value in timeIdTqDict.items(): + currentTime = key[0] + cycId = key[1] + techList = value + aBasin = idNumberDict[cycId][0] + aCycloneNumb = idNumberDict[cycId][1] + + # create new AtcfCyclone object + aCyclone = AtcfCyclone(cycId) + for techniqueName in techList: + bsResults = None + # CARQ case + if techniqueName == "CARQ": + # first we need to create track for the past + BaseRequest.BaseRequest.__init__(self, "atcf") + self.query.addParameter("dataTime", currentTime) + self.query.addParameter("basin",aBasin) + self.query.addParameter("cycloneNum",aCycloneNumb) + self.query.addParameter("technique",techniqueName) + self.query.addParameter("radWind", "34") + self.query.addParameter("fcstHour","0", "<") + order = True + self.query.setSortBy("fcstHour", order) + bsResultsPast = self.query.execute() + bsResults = bsResultsPast + + # second we need to create track for the future + BaseRequest.BaseRequest.__init__(self, "atcf") + timeRange = currentTime + "--" + self.__getTimePlus(currentTime) + self.query.addParameter("dataTime", timeRange, "between") + self.query.addParameter("basin",aBasin) + self.query.addParameter("cycloneNum",aCycloneNumb) + self.query.addParameter("technique",techniqueName) + self.query.addParameter("radWind", "34") + self.query.addParameter("fcstHour","0") + order = True + self.query.setSortBy("dataTime", order) + bsResultsFuture = self.query.execute() + count = 0 + for ii in range(bsResultsFuture.size()): + recordToChange = bsResultsFuture.get(ii) + recordToChange.setFcstHour(ii*6) + bsResults.add(recordToChange) + # non-CARQ case + else: + BaseRequest.BaseRequest.__init__(self, "atcf") + self.query.addParameter("dataTime", currentTime) + self.query.addParameter("basin",aBasin) + self.query.addParameter("cycloneNum",aCycloneNumb) + self.query.addParameter("technique",techniqueName) + order = True + self.query.setSortBy("fcstHour", order) + bsResults = self.query.execute() + if bsResults is None or bsResults.size() == 0: + pass + else: + # create new AtcfTrack object + aTrack = AtcfTrack(techniqueName, bsResults) + + # add AtcfTrack object to AtcfCyclone + aCyclone.addTrack(aTrack) + # add AtcfCyclone object to the response ArrayList + response.add(ResponseMessageGeneric(aCyclone)) + return response + +# +# Returns a string with a response message +# + def __makeNullResponse(self, aMessage="Database Query returned no results"): + return ResponseMessageGeneric(aMessage) \ No newline at end of file diff --git a/edexOsgi/build.edex/esb/data/utility/edex_static/base/python/GempakCatalogTimeQuery.py b/edexOsgi/build.edex/esb/data/utility/edex_static/base/python/GempakCatalogTimeQuery.py new file mode 100644 index 0000000000..d506d14e49 --- /dev/null +++ b/edexOsgi/build.edex/esb/data/utility/edex_static/base/python/GempakCatalogTimeQuery.py @@ -0,0 +1,188 @@ +# +# GempakCatalogTimeQuery +# +# This code has been developed by the SIB for use in the AWIPS2 system. +# Performs a MetadataCatalogQuery for data from GEMPAK and returns +# all the available unique times for the table. +# +# Usage: +# import GempakCatalogQuery +# query = GempakCatalogQuery.GempakCatalogQuery("bufrua") +# return query.execute() +# +# SOFTWARE HISTORY +# +# Date Ticket# Engineer Description +# ------------ ---------- ----------- -------------------------- +# 06/02/09 92 mgamazaychikov Initial Creation +# 10/14/09 173 mgamazaychikov Added code for satellite plugin +# 12/22/09 173_partB mgamazaychikov Added code for radar, mosaic mcidas plugin +# 06/02/10 173_partC mgamazaychikov Added code for grib plugin +# 02/02/11 mli add eventName for dynamic model names +# +from java.util import ArrayList +from com.raytheon.uf.common.message.response import ResponseMessageGeneric +from com.raytheon.edex.uengine.tasks.query import MetadataCatalogQuery +from gov.noaa.nws.ncep.edex.uengine.utility import GempakConvert + +class GempakCatalogTimeQuery(): + + def __init__(self, pluginName): + self.eventName = None + self.queryResults = ArrayList() + self.pluginName = pluginName + self.query = MetadataCatalogQuery(pluginName) + self.returnText = False + self.query.setDistinctField("dataTime") + + def __isMixed(self, s): + seen_upper = seen_lower = False + for c in s: + if c.isupper(): seen_upper = True + if c.islower(): seen_lower = True + if seen_upper and seen_lower: + return True + return False + + def setReturnText (self): + self.returnText = True + +# +# Set parameters of the metadata catalog query +# + def setParameters (self, aParms): + if self.pluginName == "satellite": + parms = aParms.split("|") + self.query.addParameter("creatingEntity", parms[0]) + self.query.addParameter("physicalElement", parms[1]) + self.query.addParameter("sectorID", parms[2]) + elif self.pluginName == "mcidas": + parms = aParms.split("|") + self.query.addParameter("imageType", parms[0]) + self.query.addParameter("areaName", parms[1]) + self.query.addParameter("resolution", parms[2]) + elif self.pluginName == "radar": + parms = aParms.split("|") + theIcao = parms[0].lower() + productCode = self.descriptionToCode (parms[1]) + self.query.addParameter("icao", theIcao) + self.query.addParameter("productCode", productCode) + self.query.addParameter("trueElevationAngle", parms[2]) + elif self.pluginName == "mosaic": + parms = aParms.split("|") + prodName = parms[0].upper() + resolution = "%s" % ( int ( float ( parms[1] ) ) * 1000 ) + self.query.addParameter("prodName", prodName) + self.query.addParameter("resolution", resolution) + elif self.pluginName == "bufrua": + self.query.addParameter("wmoHeader", "", "isNotNull") + elif self.pluginName == "sfcobs": + self.query.addParameter("wmoHeader", "", "isNotNull") + elif self.pluginName == "grib": + parms = aParms.split("|") + self.query.addParameter("modelInfo.modelName",parms[0].upper() ) + elif self.pluginName == "ncgrib": + parms = aParms.split("|") + for ii in range(len(parms)): + if ii == 0: + if self.__isMixed(parms[0]): + self.query.addParameter("modelInfo.modelName", parms[0] ) + #print "modelInfo.modelName set to", parms[0] + else: + self.query.addParameter("modelInfo.modelName",parms[0].upper() ) + #print "modelInfo.modelName set to", parms[0].upper() + elif ii == 1: + #print "setting eventName to", parms[1] + self.query.addParameter("modelInfo.eventName", parms[1]) + +# +# Returns a string with null response +# + def makeNullResponse(self): + nullStr = "Database Query returned no results" + if self.returnText: + return nullStr + else: + return ResponseMessageGeneric(nullStr) +# +# Generates a list of responses in XML format +# + def makeResponse(self): + convert = GempakConvert(self.pluginName, self.queryResults) + convert2 = GempakConvert() + convertSt = convert.getStrings() + returnStr = '' + + for s in convertSt: + retTime = convert2.dbtimeToDattim(s) + # + # add only unique times + # + if returnStr.find(retTime) == -1: + returnStr=returnStr+retTime+'|' + + # + # sort times before returning + # + if self.returnText: + return "|".join(sorted(returnStr[0:-1].split("|"))) + else: + return ResponseMessageGeneric("|".join(sorted(returnStr[0:-1].split("|")))) + +# +# Executes the query and calls appropriate response functions +# + def execute(self): + self.queryResults = self.query.execute() + # + # Make response based on the query results + # + if self.queryResults is None: + return self.makeNullResponse() + else: + return self.makeResponse() + +# +# Return the product code given the description +# + def descriptionToCode(self, aDescription): + + # + # List of descriptions (keys in dictionary) + # + descriptionList = ["BREF 1.00", + "BREF 2.00", + "VEL 1.00", + "TOPS 4.00", + "SRVEL 1.00", + "VIL 4.00", + "PRCP1 2.00", + "PRCPT 2.00"] + + # + # List of product codes (values in dictionary) + # + productCodeList = ["19", + "20", + "27", + "41", + "56", + "57", + "78", + "80"] + + + # + # Create a dictionary for key-value relationship + # + + theMap = {} + for (key, value) in map(None, descriptionList, productCodeList): + theMap[key] = value + + # + # Return a value based on the key + # + + return theMap[aDescription] + \ No newline at end of file diff --git a/edexOsgi/build.edex/esb/data/utility/edex_static/base/python/GempakDataURIRequest.py b/edexOsgi/build.edex/esb/data/utility/edex_static/base/python/GempakDataURIRequest.py new file mode 100644 index 0000000000..b2f53e2da8 --- /dev/null +++ b/edexOsgi/build.edex/esb/data/utility/edex_static/base/python/GempakDataURIRequest.py @@ -0,0 +1,164 @@ +# +# GempakDataURIRequest +# +# This code has been developed by the SIB for use in the AWIPS2 system. +# Performs a query of a database table ncgrib and returns datauri string. +# Could be re-factored for other tables. +# +# Usage: +# import GempakDataURIRequest +# query = GempakDataURIRequest.GempakDataURIRequest("grib") +# query.setDataParms("datauri!GDFILE|DATTIM|GVCORD|GLEVEL|GPARM") +# return query.execute(); +# +# SOFTWARE HISTORY +# +# Date Ticket# Engineer Description +# ------------ ---------- ----------- -------------------------- +# 04/30/10 173_partC mgamazaychikov Initial Creation +# 05/05/11 mgamazaychikov Allowed the separator to be '!' or ':' +# 08/17/11 mgamazaychikov Re-wrote to use TableQuery class +# + +from java.util import ArrayList +from com.raytheon.uf.common.message.response import ResponseMessageGeneric +from com.raytheon.uf.edex.database.plugin import PluginFactory +from com.raytheon.edex.uengine.tasks.query import TableQuery +from gov.noaa.nws.ncep.edex.uengine.utility import GempakConvert + +class GempakDataURIRequest(): + + def __init__(self, pluginName): + # + # create the TableQuery instance + # + try: + className = PluginFactory.getInstance().getPluginRecordClassName(pluginName) + except: + # + # handle the exception if the plugin record class cannot be found + # + message = "RunTimeError getting the PluginRecordClassName for " + \ + pluginName + " " + import sys + if sys.exc_info()[1] is not None: + str = "%s" % sys.exc_info()[1] + indx = str.find("\n") + if indx > 0: + message = message + str[:indx] + print "Unexpected error:" + message + return self.__makeNullResponse(message) + databaseName = "metadata" + # + # create the TableQuery instance for specified database + # and plugin record class + # + self.query = TableQuery(databaseName,className) + + def setDataParms(self, inpStr): + # + # find out which separator is used - "!" or ":" + # + if inpStr.find("!") < 0: + sepChar = ":" + else: + sepChar = "!" + # + # list of field names in inpStr delineated by by '|' + # + nameList = self.__getNamelist() + # + # list of values in inpStr delineated by by '|' + # + parmsList = (inpStr.split(sepChar)[1]).split("|") + # + # dictionary of name-value based on inpStr + # + inpDict = dict(zip(nameList, parmsList)) + # + # modify the dictionary items to make them db centric + # + refTime, fcstTime = self.__getDbTime(inpDict["dattim"]) + print "refTime2=", refTime + print "fcstTime2=", fcstTime + inpDict["dataTime.refTime"] = refTime[0:-2] + inpDict["dataTime.fcstTime"]= fcstTime + #inpDict["dataTime.refTime"], inpDict["dataTime.fcstTime"] = self.__getDbTime(inpDict["dattim"]) + del inpDict["dattim"] + inpDict["modelName"] = self.__getDbModelInfo(inpDict["modelName"]) + # + # set to return dataURI field + # + self.query.addReturnedField("dataURI", None) + # + # set the query parameters + # + print "inpDict=", inpDict + for key, value in inpDict.items(): + self.query.addParameter (key, value) + + def execute(self): + # + # execute the set query + # + try: + queryResult = ArrayList() + queryResult = self.query.execute() + size = queryResult.size() + print "queryResult = ", queryResult + print "queryResult size = ", size + except: + message = "RunTimeError executing TableQuery " + import sys + if sys.exc_info()[1] is not None: + str = "%s" % sys.exc_info()[1] + indx = str.find("\n") + if indx > 0: + message = message + str[:indx] + print "Unexpected error:" + message + return self.__makeNullResponse(message) + # + # process the results of the query + # + if queryResult is None or size==0: + return self.__makeNullResponse("Error query returned no results") + else: + return self.__makeResponse(queryResult) + + def __isMixed(self, s): + seen_upper = seen_lower = False + for c in s: + if c.isupper(): seen_upper = True + if c.islower(): seen_lower = True + if seen_upper and seen_lower: + return True + return False + + def __getNamelist (self): + return ['modelName', 'dattim', 'vcord', 'glevel1', 'parm', 'eventName'] + + def __getDbTime (self, aDattim): + refTime = aDattim.upper().split("F")[0] + fcstTime = "%s" % (int(aDattim.upper().split("F")[1]) * 3600) + convert = GempakConvert() + refTime = convert.dattimToDbtime(refTime) + print "refTime=", refTime + print "fcstTime=", fcstTime + return refTime, fcstTime + + def __getDbModelInfo (self, aMdl): + if self.__isMixed( aMdl ): + return aMdl + else: + return aMdl.upper() + + def __makeResponse(self, aResponse): + response = ArrayList() + aResponse0 = "%s" % aResponse.get(0) + print "aResponse=", aResponse + print "aResponse0=", aResponse0 + response.add(ResponseMessageGeneric(aResponse0)) + return response + + def __makeNullResponse(self, aMessage=None): + return ResponseMessageGeneric(aMessage) \ No newline at end of file diff --git a/edexOsgi/build.edex/esb/data/utility/edex_static/base/python/GempakEnsMemberRequest.py b/edexOsgi/build.edex/esb/data/utility/edex_static/base/python/GempakEnsMemberRequest.py new file mode 100644 index 0000000000..d2ddb3c764 --- /dev/null +++ b/edexOsgi/build.edex/esb/data/utility/edex_static/base/python/GempakEnsMemberRequest.py @@ -0,0 +1,104 @@ +# +# GempakEnsMemberRequest +# +# This code has been developed by the SIB for use in the AWIPS2 system. +# Performs a query of a database table ncgrib and returns ensemble members string. +# Could be re-factored for other tables. +# +# Usage: +# import GempakEnsMemberRequest +# query = GempakEnsMemberRequest.GempakEnsMemberRequest("ncgrib") +# query.setDataParms("modelName|eventName|DATTIM") +# return query.execute(); +# +# SOFTWARE HISTORY +# +# Date Ticket# Engineer Description +# ------------ ---------- ----------- -------------------------- +# 08/03/11 173_partC mgamazaychikov Initial Creation +# +# +import GempakSqlQuery +import GempakParmDict +from java.util import ArrayList +from com.raytheon.uf.common.message.response import ResponseMessageGeneric +from gov.noaa.nws.ncep.edex.uengine.utility import GempakConvert + +class GempakEnsMemberRequest(GempakSqlQuery.GempakSqlQuery): + + def __init__(self, pluginName): + self.eventName = None + # + # create the GempakSqlQuery instance + # + self.GSQ = GempakSqlQuery.GempakSqlQuery() + + # + # set the return type to text(string) + # not a ResponseMessageGEneric object + # + self.GSQ.setReturnText() + self.GSQ.setSeparator("|") + self.pluginName = pluginName + + def setDataParms(self, inpStr): + + # + # list of values in inpStr delineated by by '|' + # + parmsList = inpStr.split("|") + + modelName = parmsList[0] + eventName = parmsList[1] + dattim = parmsList[2] + dbTime = self.__getDbTime(dattim) + + # + # construct the SQL query to execute + # + + myQuery = "SELECT distinct eventname FROM " + \ + self.pluginName + " WHERE " + \ + "modelname='" + modelName + \ + "' AND eventname LIKE '%" + eventName + \ + "%' AND datauri LIKE '%/" + dbTime + "/%'" + print "myQuery====", myQuery + # + # set the SQL query + # + self.GSQ.setQuery(myQuery) + + + def __getDbTime (self, aDattim): + if self.pluginName == 'grib' or self.pluginName == 'ncgrib': + convert = GempakConvert() + return convert.dattimToDbtime(aDattim) + else: + return None + + def execute(self): + if self.GSQ is None: + return self.makeNullResponse("Accessing a non-existent dictionary key") + else: + # + # execute the set query + # + self.queryResult = self.GSQ.execute() + print "self.queryResult=", self.queryResult + + # + # process the results of the query + # + if self.queryResult is None: + return self.__makeNullResponse("Query returned no results") + else: + return self.__makeResponse() + + def __makeResponse(self): + response = ArrayList() + + response.add(ResponseMessageGeneric(self.queryResult)) + return response + + def __makeNullResponse(self, aMessage=None): + return ResponseMessageGeneric(aMessage) \ No newline at end of file diff --git a/edexOsgi/build.edex/esb/data/utility/edex_static/base/python/GempakEnsembleTemplateGenerator.py b/edexOsgi/build.edex/esb/data/utility/edex_static/base/python/GempakEnsembleTemplateGenerator.py new file mode 100644 index 0000000000..2cb557ed5e --- /dev/null +++ b/edexOsgi/build.edex/esb/data/utility/edex_static/base/python/GempakEnsembleTemplateGenerator.py @@ -0,0 +1,111 @@ + + +from java.util import ArrayList +from com.raytheon.uf.common.message.response import ResponseMessageGeneric +from com.raytheon.uf.edex.database.plugin import PluginFactory +from com.raytheon.edex.uengine.tasks.query import TableQuery +from gov.noaa.nws.ncep.edex.uengine.utility import GempakConvert + +class GempakEnsembleTemplateGenerator(): + + def __init__(self, pluginName): + self.pluginName = pluginName + self.eventName = None + self.perturbationNum = 0 + # + # create the TableQuery instance + # + try: + className = PluginFactory.getInstance().getPluginRecordClassName(pluginName) + except: + # + # handle the exception if the plugin record class cannot be found + # + message = "RunTimeError getting the PluginRecordClassName for " + \ + pluginName + " " + import sys + if sys.exc_info()[1] is not None: + str = "%s" % sys.exc_info()[1] + indx = str.find("\n") + if indx > 0: + message = message + str[:indx] + print "Unexpected error:" + message + return self.__makeNullResponse(message) + databaseName = "metadata" + # + # create the TableQuery instance for specified database + # and plugin record class + # + self.query = TableQuery(databaseName,className) + self.query.setDistinctField("eventName") + + def setEnsembleName(self, modelName): + self.modelName = modelName + self.query.addParameter ("modelName", modelName) + + def setEnsembleEventName(self, eventName): + self.eventName = eventName + self.query.addParameter ("eventName", eventName) + + def setEnsemblePerturbationNumber(self, perturbationNum): + self.perturbationNum = perturbationNum + self.query.addParameter ("modelInfo.perturbationNumber", perturbationNum) + + def execute(self): + # + # execute the set query + # + try: + queryResult = ArrayList() + queryResult = self.query.execute() +# print "queryResult = ", queryResult + except: + message = "RunTimeError executing TableQuery " + import sys + if sys.exc_info()[1] is not None: + str = "%s" % sys.exc_info()[1] + indx = str.find("\n") + if indx > 0: + message = message + str[:indx] + print "Unexpected error:" + message + return self.__makeNullResponse(message) + # + # process the results of the query + # + if queryResult is None: + return self.__makeNullResponse("Query returned no results") + else: + return self.__makeResponse(queryResult) + + def __makeResponse(self, ensArrayList): + size = ensArrayList.size() + ensList = [] + for i in range(size): + ensList.append("%s" % ensArrayList.get(i)) + commonStart = self.__findCommonStart(ensList) +# print "commonStart= ", commonStart +# if self.perturbationNum == 0: +# ensTemplate = self.modelName + "_db_" + commonStart + "*_YYYYMMDDHHfFFF" +# else: + ensTemplate = self.modelName + "_db_" + commonStart + "_YYYYMMDDHHfFFF" + response = ArrayList() + response.add(ResponseMessageGeneric(ensTemplate)) + return response + + def __makeNullResponse(self, aMessage=None): + return ResponseMessageGeneric(aMessage) + + def __findCommonStart (self, strlist): + strlist = strlist[:] + prev = None + while True: + common = self.__getCommonLetters(strlist) + if common == prev: + break + strlist.append(common) + prev = common + return self.__getCommonLetters(strlist) + + def __getCommonLetters(self, strlist): + return ''.join([x[0] for x in zip(*strlist) \ + if reduce(lambda a,b:(a == b) and a or None,x)]) \ No newline at end of file diff --git a/edexOsgi/build.edex/esb/data/utility/edex_static/base/python/GempakGridCycleQuery.py b/edexOsgi/build.edex/esb/data/utility/edex_static/base/python/GempakGridCycleQuery.py new file mode 100644 index 0000000000..05f750597b --- /dev/null +++ b/edexOsgi/build.edex/esb/data/utility/edex_static/base/python/GempakGridCycleQuery.py @@ -0,0 +1,76 @@ +# +# GempakGridCycleQuery +# +# This code has been developed by the SIB for use in the AWIPS2 system. +# Performs a GempakSqlQuery for Grid data from GEMPAK and returns +# all the available unique forecast times for the model's cycle. +# +# Usage: +# import GempakGridCycleQuery +# query = GempakGridCycleQuery.GempakGridCycleQuery() +# query.setParameters("ruc|1300") +# return query.execute() +# +# SOFTWARE HISTORY +# +# Date Ticket# Engineer Description +# ------------ ---------- ----------- -------------------------- +# 07/02/10 92 mgamazaychikov Initial Creation +# +from java.util import ArrayList +from com.raytheon.uf.common.message.response import ResponseMessageGeneric +from com.raytheon.edex.uengine.tasks.query import MetadataCatalogQuery +from gov.noaa.nws.ncep.edex.uengine.utility import GempakConvert +import GempakSqlQuery + +class GempakGridCycleQuery(): + + def __init__(self, aPlugin): + self.plugin = aPlugin + self.queryResults = ArrayList() + self.GSQ = GempakSqlQuery.GempakSqlQuery() + self.GSQ.setReturnText() + self.convert = GempakConvert() + +# +# Set parameters of the metadata catalog query +# + def setParameters (self, aParms): + parms = aParms.split("|") + self.model=parms[0].upper() + self.cycle = self.convert.dattimToDbtime(parms[1].upper()).replace (' ', '_') + #print "model=", self.model + #print "cycle=", self.cycle + +# +# Generates a list of responses in XML format +# + def makeResponse(self): + retStr = self.convert.dbtimeToDattim((self.queryResult).split("/")[2]) + #print "returning time=", retStr + return ResponseMessageGeneric(retStr) + +# +# Executes the query and calls appropriate response functions +# + def execute(self): + # + # construct the SQL query to execute + # + myQuery = "SELECT datauri FROM " + self.plugin + " WHERE datauri LIKE '%" + \ + self.cycle + "%' AND datauri ~* '/" + self.model + "/' LIMIT 1" + #print "myQuery:", myQuery + + # + # set the SQL query + # + self.GSQ.setQuery(myQuery) + self.queryResult = self.GSQ.execute() + #print "self.queryResult=", self.queryResult + # + # process the results of the query + # + if self.queryResult is None: + return self.makeNullResponse("Query returned no results") + else: + return self.makeResponse() \ No newline at end of file diff --git a/edexOsgi/build.edex/esb/data/utility/edex_static/base/python/GempakGridDiagnostic.py b/edexOsgi/build.edex/esb/data/utility/edex_static/base/python/GempakGridDiagnostic.py new file mode 100644 index 0000000000..a34da9a2ff --- /dev/null +++ b/edexOsgi/build.edex/esb/data/utility/edex_static/base/python/GempakGridDiagnostic.py @@ -0,0 +1,81 @@ +# +# GempakGridDiagnostic +# +# This code has been developed by the SIB for use in the AWIPS2 system. +# Performs a calculation of a grid diagnostic using GEMPAK so, and returns +# the data. +# +# Usage: +# import GempakGridDiagnostic +# gd = GempakGridDiagnostic.GempakGridDiagnostic() +# gd.setGlevel('750') +# gd.setGdattim('2009-07-01_13:00:00.0_(5)') +# gd.setGdfile('ruc130') +# gd.setGvect('wnd') or gd.setGfunc('urel') +# gd.setGvcord('PRES') +# gd.setGarea('ks') +# gd.setScale('0') +# gd.setProj('mer') +# return gd.execute() +# +# SOFTWARE HISTORY +# +# Date Ticket# Engineer Description +# ------------ ---------- ----------- -------------------------- +# 04/10 173_partC mgamazaychikov Initial Creation. +# 05/10 173_partC T. Lee Split setParm method to separate methods, +# renamed the module. +# 06/10 173_partC mgamazaychikov Added documentation +# + +from com.raytheon.uf.common.message.response import ResponseMessageGeneric +from gov.noaa.nws.ncep.edex.uengine.tasks.gempak import Dgdriv +from gov.noaa.nws.ncep.edex.uengine.utility import GempakConvert + +class GempakGridDiagnostic(): + + def __init__(self): + self.Dgdriv = Dgdriv() + + def setGlevel(self, glevel): + self.Dgdriv.setGlevel(glevel) + + def setGdattim(self, aDbTime): + convert = GempakConvert() + aGdattim = convert.dbtimeToDattim(aDbTime.replace('_', ' ')) + #print aGdattim + self.Dgdriv.setGdattim (aGdattim) + + def setGdfile(self, gdfile): + self.Dgdriv.setGdfile(gdfile) + + def setGfunc(self, gfunc): + self.Dgdriv.setGfunc(gfunc) + + def setGvect(self, gfunc): + self.Dgdriv.setGvect(gfunc) + + def setGvcord(self, gvcord): + self.Dgdriv.setGvcord(gvcord) + + def setGarea(self, garea): + self.Dgdriv.setGarea(garea) + + def setScale(self, scale): + self.Dgdriv.setScale(scale) + + def setProj(self, proj): + self.Dgdriv.setProj(proj) + + def makeResponse(self): + return ResponseMessageGeneric(self.result) + + def makeNullResponse(self): + return ResponseMessageGeneric("No grid data is available") + + def execute(self): + self.result = self.Dgdriv.execute() + if self.result is None: + return self.makeNullResponse() + else: + return self.makeResponse() \ No newline at end of file diff --git a/edexOsgi/build.edex/esb/data/utility/edex_static/base/python/GempakGridLinkRequest.py b/edexOsgi/build.edex/esb/data/utility/edex_static/base/python/GempakGridLinkRequest.py new file mode 100644 index 0000000000..9468545fca --- /dev/null +++ b/edexOsgi/build.edex/esb/data/utility/edex_static/base/python/GempakGridLinkRequest.py @@ -0,0 +1,117 @@ +# +# GempakGridLinkRequest +# +# This code has been developed by the SIB for use in the AWIPS2 system. +# Performs a BaseRequest for a grid data from GEMPAK, and stores +# the float data in the uEngineProducts directory for later transfer. +# +# Usage: +# import GempakGridLinkRequest +# dataRequest = GempakGridLinkRequest.GempakGridLinkRequest("grib") +# dataRequest.setDataUri("...") +# return dataRequest.execute() +# +# SOFTWARE HISTORY +# +# Date Ticket# Engineer Description +# ------------ ---------- ----------- -------------------------- +# 06/02/10 173_partC mgamazaychikov Initial Creation. +# + +import BaseRequest +from java.util import ArrayList +from com.raytheon.uf.common.message.response import ResponseMessageGeneric +from gov.noaa.nws.ncep.edex.uengine.utility import GempakConvert + +class GempakGridLinkRequest(BaseRequest.BaseRequest): + + def __init__(self,pluginName): + BaseRequest.BaseRequest.__init__(self, pluginName) + self.format = "grid" + self.pluginName = pluginName + +# +# Sets the dataURI parameter for the query +# + def setDataUri(self, aDataUri): + name = "dataURI" + operand = "=" + theDataUri = aDataUri + self.query.addParameter(name, theDataUri, operand) + +# +# Execute the BaseRequest and calls the appropriate response function +# + def execute(self): + self.queryResults = self.query.execute() + if self.queryResults is None or self.queryResults.size() == 0: + self.makeNullResponse() + else: + return self.__makeResponse() + +# +# Builds the return string content and adds it to the response ArrayList +# + def __makeResponse(self): + from com.raytheon.edex.uengine.tasks.decode import FileIn + from gov.noaa.nws.ncep.edex.uengine.output import GridOut + response = ArrayList() + size = self.queryResults.size() + for i in range(size): + currentQuery = self.queryResults.get(i) + + # + # grid coverage + # + if self.pluginName == 'grib': + gridNavInfo = GempakConvert.getGridNavigationContent(currentQuery.getSpatialObject()).split(";") + elif self.pluginName == 'ncgrib': + gridNavInfo = GempakConvert.getNcgridNavigationContent(currentQuery.getSpatialObject()).split(";") + + nx = gridNavInfo[1] + ny = gridNavInfo[2] + + # + # Call FileIn constructor + # + fileIn = FileIn(self.plugin, currentQuery) + + # + # Call the execute method, getting back the data record + # + record = fileIn.execute() + self.nxStr = "%s" % nx + self.nyStr = "%s" % ny + fileOut = GridOut(record.getDataObject(), self.format, self.nxStr, self.nyStr) + + # + # Execute method of FileOut class stores the data + # in a file in uEngineProducts directory with the extension + # contained in the string self.format + # + writeFile = fileOut.execute() + + # + # Separate the file name from the complete path and store in content + # + content = ("%s" % writeFile).split("/")[len(("%s" % writeFile).split("/") ) - 1] + + # + # + # + import socket + hostname = socket.gethostbyaddr(socket.gethostname())[2][0] + # + # Return content wrapped in a generic XML message + # + response.add(ResponseMessageGeneric(hostname+"|"+content)) + + return response + +# +# Returns a string with null response +# + def makeNullResponse(self): + response = ArrayList() + response.add(ResponseMessageGeneric("Database Query returned no results")) + return response \ No newline at end of file diff --git a/edexOsgi/build.edex/esb/data/utility/edex_static/base/python/GempakGridNavigationRequest.py b/edexOsgi/build.edex/esb/data/utility/edex_static/base/python/GempakGridNavigationRequest.py new file mode 100644 index 0000000000..a2f76ceeb5 --- /dev/null +++ b/edexOsgi/build.edex/esb/data/utility/edex_static/base/python/GempakGridNavigationRequest.py @@ -0,0 +1,131 @@ +# +# GempakGridNavigationRequest +# +# This code has been developed by the SIB for use in the AWIPS2 system. +# Performs a BaseRequest for a grid navigation parameters from GEMPAK. +# +# Usage: +# import GempakGridNavigationRequest +# dataRequest = GempakGridNavigationRequest.GempakGridNavigationRequest() +# dataRequest.setGridId("...") +# return dataRequest.execute() +# +# SOFTWARE HISTORY +# +# Date Ticket# Engineer Description +# ------------ ---------- ----------- -------------------------- +# 06/02/10 173_partC mgamazaychikov Initial Creation +# 02/02/11 mli add eventName for dynamic model names +# + +import BaseRequest +from java.util import ArrayList +from com.raytheon.uf.common.message.response import ResponseMessageGeneric +from com.raytheon.edex.uengine.tasks.query import SqlQueryTask +from gov.noaa.nws.ncep.edex.uengine.utility import GempakConvert + +class GempakGridNavigationRequest(BaseRequest.BaseRequest): + + def __init__(self, pluginName='grib'): + self.eventName = None + self.pluginName = pluginName + if self.pluginName == 'grib': + self.tableName = 'grib_models' + elif self.pluginName == 'ncgrib': + self.tableName = 'ncgrib_models' + BaseRequest.BaseRequest.__init__(self, self.pluginName) + +# +# Sets the ICAO parameter for the query +# + def setGridIdParms(self, aGridName, *parms): + for ii in range(len(parms)): + if ii == 0: + #print "setting time to", parms[0] + convert = GempakConvert() + self.query.addParameter("dataTime", convert.dattimToDbtime(parms[0])) + elif ii == 1: + #print "setting eventName to", parms[1] + self.query.addParameter("modelInfo.eventName", parms[1]) + + self.gridName= aGridName + +# +# Execute the BaseRequest and calls the appropriate response function +# + def execute(self): + # + # set up the db query for grib plugin + # + if self.pluginName == 'grib': + # + # Construct the SQL query to retrieve record IDs from bufrua table + # + gridIdQueryHead = "SELECT DISTINCT id FROM " + self.tableName + " WHERE modelname='" + gridIdQueryTail = "'" + gridIdQuery = gridIdQueryHead + self.gridName + gridIdQueryTail + + # + # + # Create an instance of SQL Query and execute it + # + self.sqlGridIDQuery = SqlQueryTask(gridIdQuery) + sqlGridIDQueryResults = self.sqlGridIDQuery.execute() + + # + # Retrieve the rows into the ArrayList of grid IDs + # + gridID = ArrayList() + gridID = sqlGridIDQueryResults.getRows() + gridIDList = ArrayList() + for gid in gridID: + strID = "%s" % gid + gridIDList.add(strID[1:-1]) + szID = gridIDList.size() + if szID == 0: + return self.makeNullResponse() + singleGridId = gridIDList.get(0) + self.query.setCount(1) + modelInfoId = "%s" % singleGridId + #print "modelInfoId=", modelInfoId + self.query.addParameter("modelInfo.id","%s" % singleGridId) + # + # set up the db query for ncgrib plugin + # + elif self.pluginName == 'ncgrib': + self.query.addParameter("modelInfo.modelName","%s" % self.gridName) +# if (self.eventName != None): +# self.query.addParameter("modelInfo.eventName","%s" % self.eventName) + self.query.setCount(1) + # + # execute the query + # + self.queryResults = self.query.execute() + if self.queryResults is None or self.queryResults.size() == 0: + self.makeNullResponse() + else: + return self.__makeResponse() + +# +# Builds the return string content and adds it to the response ArrayList +# + def __makeResponse(self): + from com.raytheon.edex.uengine.tasks.decode import FileIn + response = ArrayList() + size = self.queryResults.size() + for i in range(size): + currentQuery = self.queryResults.get(i) + if self.pluginName == 'grib': + content = GempakConvert.getGridNavigationContent(currentQuery.getSpatialObject()) + elif self.pluginName == 'ncgrib': + content = GempakConvert.getNcgridNavigationContent(currentQuery.getSpatialObject()) + response.add(ResponseMessageGeneric(content)) + return response + +# +# Returns a string with null response +# + def makeNullResponse(self): + response = ArrayList() + response.add(ResponseMessageGeneric("Database Query returned no results")) + return response \ No newline at end of file diff --git a/edexOsgi/build.edex/esb/data/utility/edex_static/base/python/GempakMcidasHdrRequest.py b/edexOsgi/build.edex/esb/data/utility/edex_static/base/python/GempakMcidasHdrRequest.py new file mode 100644 index 0000000000..456f4e58d3 --- /dev/null +++ b/edexOsgi/build.edex/esb/data/utility/edex_static/base/python/GempakMcidasHdrRequest.py @@ -0,0 +1,111 @@ +# +# GempakMcidasHdrRequest +# +# This code has been developed by the SIB for use in the AWIPS2 system. +# Performs a BaseRequest for a McIDAS "image header" from GEMPAK. +# +# Usage: +# import GempakMcidasHdrRequest +# dataRequest = GempakMcidasHdrRequest.GempakMcidasHdrRequest() +# dataRequest.setImageType("...") +# dataRequest.setAreaName("...") +# dataRequest.setResolution("...") +# dataRequest.setTime("...") +# return dataRequest.execute() +# +# SOFTWARE HISTORY +# +# Date Ticket# Engineer Description +# ------------ ---------- ----------- -------------------------- +# 12/22/09 173_partB mgamazaychikov Initial Creation +# + +import BaseRequest +from com.raytheon.uf.common.message.response import ResponseMessageGeneric +from java.util import ArrayList +from gov.noaa.nws.ncep.edex.uengine.utility import GempakConvert +from com.raytheon.edex.uengine.tasks.query import SqlQueryTask + + +class GempakMcidasHdrRequest(BaseRequest.BaseRequest): + + def __init__(self): + BaseRequest.BaseRequest.__init__(self, "mcidas") +# +# Converts time form GEMPAK format to database format +# and sets the dataTime parameter for the query +# + def setTime(self, aDattim): + convert = GempakConvert() + name = "dataTime" + operand = "between" + aw2Time = convert.dattimToDbtime(aDattim) + timeRange = convert.setTimeRange(aw2Time) + self.query.addParameter(name, timeRange, operand) + +# +# Sets the Image Type parameter for the query +# + def setImageType(self, aImageType): + name = "imageType" + operand = "like" + theImageType = "%" + aImageType + "%" + self.query.addParameter(name, theImageType, operand) + +# +# Sets the Area Name parameter for the query +# + def setAreaName(self, aAreaName): + name = "areaName" + operand = "like" + theAreaName = "%" + aAreaName + "%" + self.query.addParameter(name, theAreaName, operand) + +# +# Sets the Resolution parameter for the query +# + def setResolution(self, aResolution): + name = "resolution" + operand = "=" + self.query.addParameter(name, aResolution, operand) + +# +# Execute the BaseRequest and calls the appropriate response function +# + def execute(self): + self.query.setCount(1) + self.queryResults = self.query.execute() + if self.queryResults is None or self.queryResults.size() == 0: + self.makeNullResponse() + else: + return self.__makeResponse() + +# +# Builds the return string content and adds it to the response ArrayList +# + def __makeResponse(self): + + response = ArrayList() + size = self.queryResults.size() + for i in range(size): + currentQuery = self.queryResults.get(i) + + content = GempakConvert.getMcidasHdrContent(currentQuery.getSpatialObject()) + + content = content + ";" + "%s" % currentQuery.getSatelliteId() + \ + ";" + "%s" % currentQuery.getImageTypeNumber() + \ + ";" + "%s" % currentQuery.getCalType() + aDbTime = "%s" % currentQuery.getDataTime() + aDattim = GempakConvert.dbtimeToSatDattim(aDbTime) + content = content + ";" + aDattim + response.add(ResponseMessageGeneric(content)) + + return response + +# +# Returns a string with null response +# + def makeNullResponse(self): + response = ArrayList() + response.add(ResponseMessageGeneric("Database Query returned no results")) + return response \ No newline at end of file diff --git a/edexOsgi/build.edex/esb/data/utility/edex_static/base/python/GempakMcidasImgLinkRequest.py b/edexOsgi/build.edex/esb/data/utility/edex_static/base/python/GempakMcidasImgLinkRequest.py new file mode 100644 index 0000000000..76c5c62a9d --- /dev/null +++ b/edexOsgi/build.edex/esb/data/utility/edex_static/base/python/GempakMcidasImgLinkRequest.py @@ -0,0 +1,130 @@ +# +# GempakMcidasImgLinkRequest +# +# This code has been developed by the SIB for use in the AWIPS2 system. +# Performs a BaseRequest for a McIDAS image from GEMPAK, and stores +# the image data in the uEngineProducts directory for later transfer. +# +## Usage: +# import GempakMcidasHdrRequest +# dataRequest = GempakMcidasHdrRequest.GempakMcidasHdrRequest() +# dataRequest.setImageType("...") +# dataRequest.setAreaName("...") +# dataRequest.setResolution("...") +# dataRequest.setTime("...") +# return dataRequest.execute() +# +# SOFTWARE HISTORY +# +# Date Ticket# Engineer Description +# ------------ ---------- ----------- -------------------------- +# 12/22/09 173_partB mgamazaychikov Initial Creation +# + +import BaseRequest +from com.raytheon.uf.common.message.response import ResponseMessageGeneric +from java.util import ArrayList +from gov.noaa.nws.ncep.edex.uengine.utility import GempakConvert + +class GempakMcidasImgLinkRequest(BaseRequest.BaseRequest): + + def __init__(self): + BaseRequest.BaseRequest.__init__(self, "mcidas") + self.format = "db2g" + +# +# Converts time form GEMPAK format to database format +# and sets the dataTime parameter for the query +# + def setTime(self, aDattim): + convert = GempakConvert() + name = "dataTime" + operand = "between" + aw2Time = convert.dattimToDbtime(aDattim) + timeRange = convert.setTimeRange(aw2Time) + self.query.addParameter(name, timeRange, operand) + +# +# Sets the Image Type parameter for the query +# + def setImageType(self, aImageType): + name = "imageType" + operand = "like" + theImageType = "%" + aImageType + "%" + self.query.addParameter(name, theImageType, operand) + +# +# Sets the Area Name parameter for the query +# + def setAreaName(self, aAreaName): + name = "areaName" + operand = "like" + theAreaName = "%" + aAreaName + "%" + self.query.addParameter(name, theAreaName, operand) + +# +# Sets the Resolution parameter for the query +# + def setResolution(self, aResolution): + name = "resolution" + operand = "=" + self.query.addParameter(name, aResolution, operand) + +# +# Execute the BaseRequest and calls the appropriate response function +# + def execute(self): + self.queryResults = self.query.execute() + if self.queryResults is None or self.queryResults.size() == 0: + self.makeNullResponse() + else: + return self.__makeResponse() + +# +# Builds the return string content and adds it to the response ArrayList +# + def __makeResponse(self): + from com.raytheon.edex.uengine.tasks.decode import FileIn + from com.raytheon.edex.uengine.tasks.output import FileOut + response = ArrayList() + size = self.queryResults.size() + for i in range(size): + currentQuery = self.queryResults.get(i) + # + # Call FileIn constructor + # + fileIn = FileIn(self.plugin, currentQuery) + + # + # Call the execute method, getting back the data record + # + record = fileIn.execute() + + fileOut = FileOut(record.getDataObject(), self.format) + + # + # Execute method of FileOut class stores the data + # in a file in uEngineProducts directory with the extension + # contained in the string self.format + # + writeFile = fileOut.execute() + + # + # Separate the file name from the complete path and store in content + # + content = ("%s" % writeFile).split("/")[len(("%s" % writeFile).split("/") ) - 1] + + # + # Return content wrapped in a generic XML message + # + response.add(ResponseMessageGeneric(content)) + + return response + +# +# Returns a string with null response +# + def makeNullResponse(self): + response = ArrayList() + response.add(ResponseMessageGeneric("Database Query returned no results")) + return response \ No newline at end of file diff --git a/edexOsgi/build.edex/esb/data/utility/edex_static/base/python/GempakMosaicHdrRequest.py b/edexOsgi/build.edex/esb/data/utility/edex_static/base/python/GempakMosaicHdrRequest.py new file mode 100644 index 0000000000..34c55b9c00 --- /dev/null +++ b/edexOsgi/build.edex/esb/data/utility/edex_static/base/python/GempakMosaicHdrRequest.py @@ -0,0 +1,110 @@ +# +# GempakMosaicHdrRequest +# +# This code has been developed by the SIB for use in the AWIPS2 system. +# Performs a BaseRequest for a MOsaic "image header" from GEMPAK. +# +# Usage: +# import GempakMosaicHdrRequest +# dataRequest = GempakMosaicHdrRequest.GempakMosaicHdrRequest() +# dataRequest.setProduct("...") +# dataRequest.setResolution("...") +# dataRequest.setTime("...") +# return dataRequest.execute() +# +# SOFTWARE HISTORY +# +# Date Ticket# Engineer Description +# ------------ ---------- ----------- -------------------------- +# 12/22/09 173_partB mgamazaychikov Initial Creation +# + +import BaseRequest +from com.raytheon.uf.common.message.response import ResponseMessageGeneric +from java.util import ArrayList +from gov.noaa.nws.ncep.edex.uengine.utility import GempakConvert + + +class GempakMosaicHdrRequest(BaseRequest.BaseRequest): + + def __init__(self): + BaseRequest.BaseRequest.__init__(self, "mosaic") +# +# Converts time form GEMPAK format to database format +# and sets the dataTime parameter for the query +# + def setTime(self, aDattim): + convert = GempakConvert() + name = "dataTime" + operand = "between" + aw2Time = convert.dattimToDbtime(aDattim) + timeRange = convert.setTimeRange(aw2Time) + self.query.addParameter(name, timeRange, operand) + +# +# Sets the ICAO parameter for the query +# +# def setSector(self, aIcao): +# name = "icao" +# self.query.addParameter(name, aIcao) + +# +# Sets the Product Code parameter for the query +# + def setProduct(self, aProduct): + name = "prodName" + self.query.addParameter(name, aProduct) + +# +# Sets the Gate Resolution parameter for the query +# + def setResolution(self, aResolution): + name = "resolution" + theResolution = "%s" % int ( float(aResolution) * 1000 ) + self.query.addParameter(name, theResolution) + +# +# Execute the BaseRequest and calls the appropriate response function +# + def execute(self): + self.query.setCount(1) + self.queryResults = self.query.execute() + if self.queryResults is None or self.queryResults.size() == 0: + self.makeNullResponse() + else: + return self.__makeResponse() + +# +# Builds the return string content and adds it to the response ArrayList +# + def __makeResponse(self): + from com.raytheon.edex.uengine.tasks.decode import FileIn + response = ArrayList() + size = self.queryResults.size() + for i in range(size): + currentQuery = self.queryResults.get(i) + aLat = "%s" % currentQuery.getLatitude() + aLon = "%s" % currentQuery.getLongitude() + aProd = "%s" % currentQuery.getProductCode() + aNx = "%s" % currentQuery.getNx() + aNy = "%s" % currentQuery.getNy() + aDbTime = "%s" % currentQuery.getDataTime() + aDattim = GempakConvert.dbtimeToSatDattim(aDbTime) + content = aLat + ";" + aLon + ";" + aProd + ";" + aNx + ";" + aNy + ";" + aDattim + fileIn = FileIn(self.plugin, currentQuery) + records = fileIn.retrieveGroup() + convert = GempakConvert(); + thresholds = convert.getRadarThresholds(currentQuery, records); + rpgIdDec = "10000" + content = content + ";"+ thresholds[0:-1] + ";" + rpgIdDec + response.add(ResponseMessageGeneric(content)) + + return response + +# +# Returns a string with null response +# + def makeNullResponse(self): + response = ArrayList() + response.add(ResponseMessageGeneric("Database Query returned no results")) + return response \ No newline at end of file diff --git a/edexOsgi/build.edex/esb/data/utility/edex_static/base/python/GempakMosaicImgLinkRequest.py b/edexOsgi/build.edex/esb/data/utility/edex_static/base/python/GempakMosaicImgLinkRequest.py new file mode 100644 index 0000000000..8e486e63e2 --- /dev/null +++ b/edexOsgi/build.edex/esb/data/utility/edex_static/base/python/GempakMosaicImgLinkRequest.py @@ -0,0 +1,123 @@ +# +# GempakMosaicImgLinkRequest +# +# This code has been developed by the SIB for use in the AWIPS2 system. +# Performs a BaseRequest for a Mosaic image from GEMPAK, and stores +# the image data in the uEngineProducts directory for later transfer. +# +# Usage: +# import GempakSatHdrRequest +# dataRequest = GempakSatHdrRequest.GempakSatHdrRequest() +# dataRequest.setPhysicalElement("...") +# dataRequest.setSectorID("...") +# dataRequest.setTime("090519/1100") +# return dataRequest.execute() +# +# SOFTWARE HISTORY +# +# Date Ticket# Engineer Description +# ------------ ---------- ----------- -------------------------- +# 12/22/09 173_partB mgamazaychikov Initial Creation +# + +import BaseRequest +from com.raytheon.uf.common.message.response import ResponseMessageGeneric +from java.util import ArrayList +from gov.noaa.nws.ncep.edex.uengine.utility import GempakConvert + + +class GempakMosaicImgLinkRequest(BaseRequest.BaseRequest): + + def __init__(self): + BaseRequest.BaseRequest.__init__(self, "mosaic") + self.format = "db2g" +# +# Converts time form GEMPAK format to database format +# and sets the dataTime parameter for the query +# + def setTime(self, aDattim): + convert = GempakConvert() + name = "dataTime" + operand = "between" + aw2Time = convert.dattimToDbtime(aDattim) + timeRange = convert.setTimeRange(aw2Time) + self.query.addParameter(name, timeRange, operand) + +# +# Sets the Product Code parameter for the query +# + def setProduct(self, aProduct): + name = "prodName" + self.query.addParameter(name, aProduct) + +# +# Sets the Gate Resolution parameter for the query +# + def setResolution(self, aResolution): + name = "resolution" + theResolution = "%s" % int ( float(aResolution) * 1000 ) + self.query.addParameter(name, theResolution) + +# +# Execute the BaseRequest and calls the appropriate response function +# + def execute(self): + self.query.setCount(1) + self.queryResults = self.query.execute() + if self.queryResults is None or self.queryResults.size() == 0: + self.makeNullResponse() + else: + return self.__makeResponse() + +# +# Builds the return string content and adds it to the response ArrayList +# + def __makeResponse(self): + from com.raytheon.edex.uengine.tasks.decode import FileIn + from com.raytheon.edex.uengine.tasks.output import FileOut + from gov.noaa.nws.ncep.edex.plugin.mosaic.uengine import DecodeMosaicImage + from com.raytheon.edex.uengine.tasks.process import ColorMapImage, ReprojectImage, ImageOut + response = ArrayList() + size = self.queryResults.size() + for i in range(size): + currentQuery = self.queryResults.get(i) + # + # Call FileIn constructor + # + fileIn = FileIn(self.plugin, currentQuery) + records = fileIn.retrieveGroup() + radarImage = DecodeMosaicImage(currentQuery, records, "GEMPAK") + + # + # Call the execute method, getting back the data record + # + record = radarImage.execute() + + fileOut = FileOut(record, self.format) + + # + # Execute method of FileOut class stores the data + # in a file in uEngineProducts directory with the extension + # contained in the string self.format + # + writeFile = fileOut.execute() + + # + # Separate the file name from the complete path and store in content + # + content = ("%s" % writeFile).split("/")[len(("%s" % writeFile).split("/") ) - 1] + + # + # Return content wrapped in a generic XML message + # + response.add(ResponseMessageGeneric(content)) + + return response + +# +# Returns a string with null response +# + def makeNullResponse(self): + response = ArrayList() + response.add(ResponseMessageGeneric("Database Query returned no results")) + return response \ No newline at end of file diff --git a/edexOsgi/build.edex/esb/data/utility/edex_static/base/python/GempakNcgridNavigationRequest.py b/edexOsgi/build.edex/esb/data/utility/edex_static/base/python/GempakNcgridNavigationRequest.py new file mode 100644 index 0000000000..f5fe8dc82c --- /dev/null +++ b/edexOsgi/build.edex/esb/data/utility/edex_static/base/python/GempakNcgridNavigationRequest.py @@ -0,0 +1,96 @@ +# +# GempakNcgridNavigationRequest +# +# This code has been developed by the SIB for use in the AWIPS2 system. +# Performs a BaseRequest for a grid navigation parameters from GEMPAK. +# +# Usage: +# import GempakNcgridNavigationRequest +# dataRequest = GempakNcgridNavigationRequest.GempakNcgridNavigationRequest() +# dataRequest.setGridId("...") +# return dataRequest.execute() +# +# SOFTWARE HISTORY +# +# Date Ticket# Engineer Description +# ------------ ---------- ----------- -------------------------- +# 06/02/10 173_partC mgamazaychikov Initial Creation +# + +import BaseRequest +from java.util import ArrayList +from com.raytheon.uf.common.message.response import ResponseMessageGeneric +from com.raytheon.edex.uengine.tasks.query import SqlQueryTask +from gov.noaa.nws.ncep.edex.uengine.utility import GempakConvert + +class GempakNcgridNavigationRequest(BaseRequest.BaseRequest): + + def __init__(self): + BaseRequest.BaseRequest.__init__(self, "ncgrib") + +# +# Sets the ICAO parameter for the query +# + def setGridId(self, aGridName): + self.gridName= aGridName + +# +# Execute the BaseRequest and calls the appropriate response function +# + def execute(self): + # + # Construct the SQL query to retrieve record IDs from bufrua table + # + gridIdQueryHead = "SELECT DISTINCT id FROM ncgrib_models WHERE modelname='" + gridIdQueryTail = "'" + gridIdQuery = gridIdQueryHead + self.gridName + gridIdQueryTail + + # + # + # Create an instance of SQL Query and execute it + # + self.sqlGridIDQuery = SqlQueryTask(gridIdQuery) + sqlGridIDQueryResults = self.sqlGridIDQuery.execute() + + # + # Retrieve the rows into the ArrayList of grid IDs + # + gridID = ArrayList() + gridID = sqlGridIDQueryResults.getRows() + gridIDList = ArrayList() + for gid in gridID: + strID = "%s" % gid + gridIDList.add(strID[1:-1]) + szID = gridIDList.size() + if szID == 0: + return self.makeNullResponse() + singleGridId = gridIDList.get(0) + self.query.setCount(1) + modelInfoId = "%s" % singleGridId + self.query.addParameter("modelInfo.id","%s" % singleGridId) + self.queryResults = self.query.execute() + if self.queryResults is None or self.queryResults.size() == 0: + self.makeNullResponse() + else: + return self.__makeResponse() + +# +# Builds the return string content and adds it to the response ArrayList +# + def __makeResponse(self): + from com.raytheon.edex.uengine.tasks.decode import FileIn + response = ArrayList() + size = self.queryResults.size() + for i in range(size): + currentQuery = self.queryResults.get(i) + content = GempakConvert.getNcgridNavigationContent(currentQuery.getSpatialObject()) + response.add(ResponseMessageGeneric(content)) + return response + +# +# Returns a string with null response +# + def makeNullResponse(self): + response = ArrayList() + response.add(ResponseMessageGeneric("Database Query returned no results")) + return response \ No newline at end of file diff --git a/edexOsgi/build.edex/esb/data/utility/edex_static/base/python/GempakParmDict.py b/edexOsgi/build.edex/esb/data/utility/edex_static/base/python/GempakParmDict.py new file mode 100644 index 0000000000..8dd5f748e3 --- /dev/null +++ b/edexOsgi/build.edex/esb/data/utility/edex_static/base/python/GempakParmDict.py @@ -0,0 +1,161 @@ +# +# GempakParmDict +# +# This code has been developed by the SIB for use in the AWIPS2 system. +# Creates a dictionary for GEMPAK GRIB names and fullnames from $GEMTBL/grid tables, +# and updates the dictionary when changes are made to the tables. +# +# Usage: +# import GempakParmDict +# dataRequest = GempakParmDict.GempakParmDict() +# return dataRequest.execute("UREL") +# +# SOFTWARE HISTORY +# +# Date Ticket# Engineer Description +# ------------ ---------- ----------- -------------------------- +# 06/02/10 173_partC mgamazaychikov Initial Creation +# +import os +import time +import pickle +from com.raytheon.uf.common.message.response import ResponseMessageGeneric + +class GempakParmDict(): + """This module defines a dictionary for translating + GEMPAK variables/parameter names to A2DB ones.""" + def __init__ (self): + self.dictDirName = "/usr1/" + os.getlogin() + "/to11dr11/workspace/build.edex/esb/data/utility/edex_static/base/ncep/dictionary/" + self.dictName = "gempakParmDict.pkl" + self.tableDirName = "/export-1/cdbsrv/nawdev/nawips/gempak/tables/grid/" + self.fullDictName = self.dictDirName + self.dictName + + # + # create the dictionary if it does not exist + # + if not self.__dictionaryExists (): + self.__createDictionary() + else: + # + # check if the update is needed + # + if self.__dictionaryUpdateNeeded(): + self.__updateDictionary() + + # + # load the dictionary + # + self.gempakNames = [] + self.gempakNames = self.__loadDictionary() + + def __dictionaryExists(self): + return os.access(self.fullDictName, os.F_OK) + + def __dictionaryUpdateNeeded(self): + return os.stat(self.tableDirName).st_mtime > os.stat(self.fullDictName).st_mtime + + def __updateDictionary(self): + self.__deleteDictionary() + self.__createDictionary() + + def __deleteDictionary(self): + os.remove(self.fullDictName) + + def __createDictionary (self): + dictDirName = self.dictDirName + dictName = self.dictName + tableDirName = self.tableDirName + files = [ + "wmogrib1.tbl", "wmogrib2.tbl", "wmogrib3.tbl", + "wmogrib128.tbl", "wmogrib128.tbl", "wmogrib128.tbl", "wmogrib128.tbl", + "ncepgrib1.tbl", "ncepgrib2.tbl", + "ncepgrib129.tbl", "ncepgrib130.tbl", "ncepgrib133.tbl", + "nmcgrib1.tbl", "nmcgrib2.tbl", + "ecmwfgrib128.tbl", "gwcgrib2.tbl", + "g2vars.tbl", "g2varswmo2.tbl", "g2varsncep1.tbl" + ] + dictFinal = {} + nameList = [] + abbrList = [] + g1NameStart = 4 + g1NameEnd = 38 + g1AbbrStart = 59 + g1AbbrEnd = 72 + g2NameStart = 16 + g2NameEnd = 47 + g2AbbrStart = 70 + g2AbbrEnd = 81 + for j,fi in enumerate(files): + file = open(tableDirName + files[j]) + if files[j][:2] == 'g2': + nameStart = g2NameStart + nameEnd = g2NameEnd + abbrStart = g2AbbrStart + abbrEnd = g2AbbrEnd + else: + nameStart = g1NameStart + nameEnd = g1NameEnd + abbrStart = g1AbbrStart + abbrEnd = g1AbbrEnd + kk = 0 + ii = 0 + while 1: + line = file.readline() + # + # check if the end of file is reached + # + if not line: + break + # + # if the end of file is not reached + # check if the line is commented out with '!' + # + skipping = False + if line[0] != '!': + name = line[nameStart:nameEnd].rstrip() + abbr = line[abbrStart:abbrEnd].rstrip() + # + # if the line is not commented out with '!', + # add name and abbr to lists, + # if the abbreviation is not already in the list + # and not an empty string or 'NONE' + # + if abbr in abbrList: + skipping = True + else: + if not abbr.isalnum(): + if abbr.find('-') == -1: + skipping = True + else: + skipping = False + if abbr == 'NONE': + skipping = True + + if skipping: + pass + ii = ii + 1 + else: + kk = kk + 1 + nameList.append(name) + abbrList.append(abbr) + file.close() + dictFinal = dict(zip(abbrList, nameList)) + output = open(self.fullDictName, 'wb') + pickle.dump(dictFinal, output, -1) + output.close() + + def __loadDictionary(self): + pklFile = open(self.fullDictName,'rb') + nameDict = pickle.load(pklFile) + pklFile.close() + return nameDict + + def execute(self, aParm): + try: + name = self.gempakNames[aParm] + except KeyError: + print "Accessing a non-existent dictionary key" + name = '' + return (ResponseMessageGeneric(name)) + + \ No newline at end of file diff --git a/edexOsgi/build.edex/esb/data/utility/edex_static/base/python/GempakRadarCatalogQuery.py b/edexOsgi/build.edex/esb/data/utility/edex_static/base/python/GempakRadarCatalogQuery.py new file mode 100644 index 0000000000..a5d8844f72 --- /dev/null +++ b/edexOsgi/build.edex/esb/data/utility/edex_static/base/python/GempakRadarCatalogQuery.py @@ -0,0 +1,68 @@ +# +# GempakRadarCatalogQuery +# +# This code has been developed by the SIB for use in the AWIPS2 system. +# Performs a MetadataCatalogQuery for data from GEMPAK and returns +# the requested returned field. +# +# Usage: +# import GempakRadarCatalogQuery +# query = GempakRadarCatalogQuery.GempakRadarCatalogQuery("radar") +# query.addConstraint("...","...") +# query.addConstraint("...","...") +# query.setDistinctField("..."); +# return query.execute() +# +# SOFTWARE HISTORY +# +# Date Ticket# Engineer Description +# ------------ ---------- ----------- -------------------------- +# 12/22/09 173_partB mgamazaychikov Initial Creation +# +from java.util import ArrayList +from com.raytheon.uf.common.message.response import ResponseMessageGeneric +from com.raytheon.edex.uengine.tasks.query import MetadataCatalogQuery +from gov.noaa.nws.ncep.edex.uengine.utility import GempakConvert + +class GempakRadarCatalogQuery(): + + def __init__(self, pluginName): + self.queryResults = ArrayList() + self.pluginName = pluginName + self.query = MetadataCatalogQuery(pluginName) + + def setDistinctField(self,field): + self.distinctField = field + self.query.setDistinctField(field) + + def addConstraint(self, name, value, operand="="): + self.query.addParameter(name, value, operand) + +# +# Generates a list of responses in XML format +# + def makeResponse(self): + convert = GempakConvert(self.pluginName, self.queryResults) + return convert.ConvertRadarRMC(self.distinctField) + +# +# Returns a string with null response +# + def makeNullResponse(self): + response = ArrayList() + response.add("Database Query returned no results") + return response + +# +# Executes the query and calls appropriate response functions +# + def execute(self): + name = "productCode" + value = "2" + operand = "!=" + self.query.addParameter(name, value, operand) + self.queryResults = self.query.execute() + if self.queryResults is None: + self.makeNullResponse() + else: + return self.makeResponse() diff --git a/edexOsgi/build.edex/esb/data/utility/edex_static/base/python/GempakRadarHdrRequest.py b/edexOsgi/build.edex/esb/data/utility/edex_static/base/python/GempakRadarHdrRequest.py new file mode 100644 index 0000000000..dc7aa1a5e1 --- /dev/null +++ b/edexOsgi/build.edex/esb/data/utility/edex_static/base/python/GempakRadarHdrRequest.py @@ -0,0 +1,118 @@ +# +# GempakRadarHdrRequest +# +# This code has been developed by the SIB for use in the AWIPS2 system. +# Performs a BaseRequest for a radar "image header" from GEMPAK. +# +# Usage: +# import GempakRadarHdrRequest +# dataRequest = GempakRadarHdrRequest.GempakRadarHdrRequest() +# dataRequest.setPhysicalElement("...") +# dataRequest.setSectorID("...") +# dataRequest.setTime("...") +# return dataRequest.execute() +# +# SOFTWARE HISTORY +# +# Date Ticket# Engineer Description +# ------------ ---------- ----------- -------------------------- +# 12/22/09 173_partB mgamazaychikov Initial Creation +# + +import BaseRequest +from com.raytheon.uf.common.message.response import ResponseMessageGeneric +from java.util import ArrayList +from gov.noaa.nws.ncep.edex.uengine.utility import GempakConvert + + +class GempakRadarHdrRequest(BaseRequest.BaseRequest): + + def __init__(self): + BaseRequest.BaseRequest.__init__(self, "radar") +# +# Converts time form GEMPAK format to database format +# and sets the dataTime parameter for the query +# + def setTime(self, aDattim): + convert = GempakConvert() + name = "dataTime" + operand = "between" + aw2Time = convert.dattimToDbtime(aDattim) + timeRange = convert.setTimeRange(aw2Time) + self.query.addParameter(name, timeRange, operand) + +# +# Sets the ICAO parameter for the query +# + def setIcao(self, aIcao): + name = "icao" + self.query.addParameter(name, aIcao) + +# +# Sets the Product Code parameter for the query +# + def setProduct(self, aProduct): + name = "productCode" + self.query.addParameter(name, aProduct) + +# +# Sets the Gate Resolution parameter for the query +# + def setResolution(self, aResolution): + name = "gateResolution" + theResolution = "%s" % int ( float(aResolution) * 1000 ) + self.query.addParameter(name, theResolution) + +# +# Sets the Elevation Angle parameter for the query +# + def setAngle(self, aAngle): + name = "trueElevationAngle" + self.query.addParameter(name, aAngle) + +# +# Execute the BaseRequest and calls the appropriate response function +# + def execute(self): + self.query.setCount(1) + self.queryResults = self.query.execute() + if self.queryResults is None or self.queryResults.size() == 0: + self.makeNullResponse() + else: + return self.__makeResponse() + +# +# Builds the return string content and adds it to the response ArrayList +# + def __makeResponse(self): + from com.raytheon.edex.uengine.tasks.decode import FileIn + response = ArrayList() + size = self.queryResults.size() + for i in range(size): + currentQuery = self.queryResults.get(i) + aLat = "%s" % currentQuery.getLatitude() + aLon = "%s" % currentQuery.getLongitude() + aProd = "%s" % currentQuery.getProductCode() + aAngle = "%s" % currentQuery.getTrueElevationAngle() + aNumBins = "%s" % currentQuery.getNumBins() + aFormat = "%s" % currentQuery.getFormat() + aDbTime = "%s" % currentQuery.getDataTime() + aDattim = GempakConvert.dbtimeToSatDattim(aDbTime) + content = aLat + ";" + aLon + ";" + aProd + ";" + aAngle + ";" + aNumBins + ";" + aFormat + ";" + aDattim + fileIn = FileIn(self.plugin, currentQuery) + records = fileIn.retrieveGroup() + convert = GempakConvert(); + thresholds = convert.getRadarThresholds(currentQuery, records); + rpgIdDec = currentQuery.getSpatialObject().getRpgIdDec() + content = content + ";"+ thresholds[0:-1] + ";" + rpgIdDec + response.add(ResponseMessageGeneric(content)) + + return response + +# +# Returns a string with null response +# + def makeNullResponse(self): + response = ArrayList() + response.add(ResponseMessageGeneric("Database Query returned no results")) + return response \ No newline at end of file diff --git a/edexOsgi/build.edex/esb/data/utility/edex_static/base/python/GempakRadarImgLinkRequest.py b/edexOsgi/build.edex/esb/data/utility/edex_static/base/python/GempakRadarImgLinkRequest.py new file mode 100644 index 0000000000..97a60ed828 --- /dev/null +++ b/edexOsgi/build.edex/esb/data/utility/edex_static/base/python/GempakRadarImgLinkRequest.py @@ -0,0 +1,139 @@ +# +# GempakRadarImgLinkRequest +# +# This code has been developed by the SIB for use in the AWIPS2 system. +# Performs a BaseRequest for a radar image from GEMPAK, and stores +# the image data in the uEngineProducts directory for later transfer. +# +# Usage: +# import GempakRadarImgLinkRequest +# dataRequest = GempakRadarImgLinkRequest.GempakRadarImgLinkRequest() +# dataRequest.setProduct("...") +# dataRequest.setIcao("...") +# dataRequest.setResolution("...") +# dataRequest.setAngle("...") +# dataRequest.setTime("...") +# return dataRequest.execute() +# +# SOFTWARE HISTORY +# +# Date Ticket# Engineer Description +# ------------ ---------- ----------- -------------------------- +# 12/22/09 173_partB mgamazaychikov Initial Creation +# + +import BaseRequest +from com.raytheon.uf.common.message.response import ResponseMessageGeneric +from java.util import ArrayList +from gov.noaa.nws.ncep.edex.uengine.utility import GempakConvert + + +class GempakRadarImgLinkRequest(BaseRequest.BaseRequest): + + def __init__(self): + BaseRequest.BaseRequest.__init__(self, "radar") + self.format = "db2g" +# +# Converts time form GEMPAK format to database format +# and sets the dataTime parameter for the query +# + def setTime(self, aDattim): + convert = GempakConvert() + name = "dataTime" + operand = "between" + aw2Time = convert.dattimToDbtime(aDattim) + timeRange = convert.setTimeRange(aw2Time) + self.query.addParameter(name, timeRange, operand) + +# +# Sets the ICAO parameter for the query +# + def setIcao(self, aIcao): + name = "icao" + self.query.addParameter(name, aIcao) + +# +# Sets the Product Code parameter for the query +# + def setProduct(self, aProduct): + name = "productCode" + self.query.addParameter(name, aProduct) + +# +# Sets the Gate Resolution parameter for the query +# + def setResolution(self, aResolution): + name = "gateResolution" + theResolution = "%s" % int ( float(aResolution) * 1000 ) + self.query.addParameter(name, theResolution) + +# +# Sets the Elevation Angle parameter for the query +# + def setAngle(self, aAngle): + name = "trueElevationAngle" + self.query.addParameter(name, aAngle) + +# +# Execute the BaseRequest and calls the appropriate response function +# + def execute(self): + self.query.setCount(1) + self.queryResults = self.query.execute() + if self.queryResults is None or self.queryResults.size() == 0: + self.makeNullResponse() + else: + return self.__makeResponse() + +# +# Builds the return string content and adds it to the response ArrayList +# + def __makeResponse(self): + from com.raytheon.edex.uengine.tasks.decode import FileIn + from com.raytheon.edex.uengine.tasks.output import FileOut + from gov.noaa.nws.ncep.edex.uengine.tasks.radar import GempakDecodeRadarImage + from com.raytheon.edex.uengine.tasks.process import ColorMapImage, ReprojectImage, ImageOut + response = ArrayList() + size = self.queryResults.size() + for i in range(size): + currentQuery = self.queryResults.get(i) + # + # Call FileIn constructor + # + fileIn = FileIn(self.plugin, currentQuery) + records = fileIn.retrieveGroup() + radarImage = GempakDecodeRadarImage(currentQuery, records) + + # + # Call the execute method, getting back the data record + # + record = radarImage.execute() + + fileOut = FileOut(record, self.format) + + # + # Execute method of FileOut class stores the data + # in a file in uEngineProducts directory with the extension + # contained in the string self.format + # + writeFile = fileOut.execute() + + # + # Separate the file name from the complete path and store in content + # + content = ("%s" % writeFile).split("/")[len(("%s" % writeFile).split("/") ) - 1] + + # + # Return content wrapped in a generic XML message + # + response.add(ResponseMessageGeneric(content)) + + return response + +# +# Returns a string with null response +# + def makeNullResponse(self): + response = ArrayList() + response.add(ResponseMessageGeneric("Database Query returned no results")) + return response \ No newline at end of file diff --git a/edexOsgi/build.edex/esb/data/utility/edex_static/base/python/GempakSatelliteHdrRequest.py b/edexOsgi/build.edex/esb/data/utility/edex_static/base/python/GempakSatelliteHdrRequest.py new file mode 100644 index 0000000000..40768d8d11 --- /dev/null +++ b/edexOsgi/build.edex/esb/data/utility/edex_static/base/python/GempakSatelliteHdrRequest.py @@ -0,0 +1,98 @@ +# +# GempakSatelliteHdrRequest +# +# This code has been developed by the SIB for use in the AWIPS2 system. +# Performs a BaseRequest for a satellite "image header" from GEMPAK. +# +# Usage: +# import GempakSatelliteHdrRequest +# dataRequest = GempakSatelliteHdrRequest.GempakSatelliteHdrRequest() +# dataRequest.setPhysicalElement("...") +# dataRequest.setSectorID("...") +# dataRequest.setTime("...") +# return dataRequest.execute() +# +# SOFTWARE HISTORY +# +# Date Ticket# Engineer Description +# ------------ ---------- ----------- -------------------------- +# 10/14/09 173 mgamazaychikov Initial Creation +# + +import BaseRequest +from com.raytheon.uf.common.message.response import ResponseMessageGeneric +from java.util import ArrayList +from gov.noaa.nws.ncep.edex.uengine.utility import GempakConvert + + +class GempakSatelliteHdrRequest(BaseRequest.BaseRequest): + + def __init__(self): + BaseRequest.BaseRequest.__init__(self, "satellite") +# +# Converts time form GEMPAK format to database format +# and sets the dataTime parameter for the query +# + def setTime(self, aDattim): + convert = GempakConvert() + name = "dataTime" + operand = "between" + aw2Time = convert.dattimToDbtime(aDattim) + timeRange = convert.setTimeRange(aw2Time) + self.query.addParameter(name, timeRange, operand) + +# +# Sets the Physical Element parameter for the query +# + def setPhysicalElement(self, aPhysEl): + name = "physicalElement" + operand = "like" + thePhysEl = "%" + aPhysEl + "%" + self.query.addParameter(name, thePhysEl, operand) + +# +# Sets the Sector ID parameter for the query +# + def setSectorID(self, aSecId): + name = "sectorID" + operand = "like" + theSecId = "%" + aSecId + "%" + self.query.addParameter(name, theSecId, operand) + +# +# Execute the BaseRequest and calls the appropriate response function +# + def execute(self): + self.query.setCount(1) + self.queryResults = self.query.execute() + if self.queryResults is None or self.queryResults.size() == 0: + self.makeNullResponse() + else: + return self.__makeResponse() + +# +# Builds the return string content and adds it to the response ArrayList +# + def __makeResponse(self): + + response = ArrayList() + size = self.queryResults.size() + for i in range(size): + currentQuery = self.queryResults.get(i) + + content = GempakConvert.getSatHdrContent(currentQuery.getSpatialObject()) + content = content + ";" + currentQuery.getCreatingEntity() + ";" + currentQuery.getPhysicalElement() + aDbTime = "%s" % currentQuery.getDataTime() + aDattim = GempakConvert.dbtimeToSatDattim(aDbTime) + content = content + ";" + aDattim + response.add(ResponseMessageGeneric(content)) + + return response + +# +# Returns a string with null response +# + def makeNullResponse(self): + response = ArrayList() + response.add(ResponseMessageGeneric("Database Query returned no results")) + return response \ No newline at end of file diff --git a/edexOsgi/build.edex/esb/data/utility/edex_static/base/python/GempakSatelliteImgLinkRequest.py b/edexOsgi/build.edex/esb/data/utility/edex_static/base/python/GempakSatelliteImgLinkRequest.py new file mode 100644 index 0000000000..5284781951 --- /dev/null +++ b/edexOsgi/build.edex/esb/data/utility/edex_static/base/python/GempakSatelliteImgLinkRequest.py @@ -0,0 +1,121 @@ +# +# GempakSatelliteImgLinkRequest +# +# This code has been developed by the SIB for use in the AWIPS2 system. +# Performs a BaseRequest for a satellite image from GEMPAK, and stores +# the image data in the uEngineProducts directory for later transfer. +# +# Usage: +# import GempakSatelliteImgLinkRequest +# dataRequest = GempakSatelliteImgLinkRequest.GempakSatelliteImgLinkRequest() +# dataRequest.setPhysicalElement("...") +# dataRequest.setSectorID("...") +# dataRequest.setTime("090519/1100") +# return dataRequest.execute() +# +# SOFTWARE HISTORY +# +# Date Ticket# Engineer Description +# ------------ ---------- ----------- -------------------------- +# 10/14/09 173 mgamazaychikov Initial Creation. +# + +import BaseRequest +from com.raytheon.uf.common.message.response import ResponseMessageGeneric +from java.util import ArrayList +from gov.noaa.nws.ncep.edex.uengine.utility import GempakConvert + +class GempakSatelliteImgLinkRequest(BaseRequest.BaseRequest): + + def __init__(self): + BaseRequest.BaseRequest.__init__(self, "satellite") + self.format = "db2g" + +# +# Converts time form GEMPAK format to database format +# and sets the dataTime parameter for the query +# + def setTime(self, aDattim): + convert = GempakConvert() + name = "dataTime" + operand = "between" + aw2Time = convert.dattimToDbtime(aDattim) + timeRange = convert.setTimeRange(aw2Time) + self.query.addParameter(name, timeRange, operand) + +# +# Sets the Physical Element parameter for the query +# + def setPhysicalElement(self, aPhysEl): + name = "physicalElement" + operand = "like" + thePhysEl = "%" + aPhysEl + "%" + self.query.addParameter(name, thePhysEl, operand) + +# +# Sets the Sector ID parameter for the query +# + def setSectorID(self, aSecId): + name = "sectorID" + operand = "like" + theSecId = "%" + aSecId + "%" + self.query.addParameter(name, theSecId, operand) + +# +# Execute the BaseRequest and calls the appropriate response function +# + def execute(self): + self.queryResults = self.query.execute() + if self.queryResults is None or self.queryResults.size() == 0: + self.makeNullResponse() + else: + return self.__makeResponse() + +# +# Builds the return string content and adds it to the response ArrayList +# + def __makeResponse(self): + from com.raytheon.edex.uengine.tasks.decode import FileIn + from com.raytheon.edex.uengine.tasks.output import FileOut + response = ArrayList() + size = self.queryResults.size() + for i in range(size): + currentQuery = self.queryResults.get(i) + # + # Call FileIn constructor + # + fileIn = FileIn(self.plugin, currentQuery) + + # + # Call the execute method, getting back the data record + # + record = fileIn.execute() + + fileOut = FileOut(record.getDataObject(), self.format) + + # + # Execute method of FileOut class stores the data + # in a file in uEngineProducts directory with the extension + # contained in the string self.format + # + writeFile = fileOut.execute() + + # + # Separate the file name from the complete path and store in content + # + content = ("%s" % writeFile).split("/")[len(("%s" % writeFile).split("/") ) - 1] + + # + # Return content wrapped in a generic XML message + # + response.add(ResponseMessageGeneric(content)) + + return response + +# +# Returns a string with null response +# + def makeNullResponse(self): + response = ArrayList() + response.add(ResponseMessageGeneric("Database Query returned no results")) + return response \ No newline at end of file diff --git a/edexOsgi/build.edex/esb/data/utility/edex_static/base/python/GempakScanDbRequest.py b/edexOsgi/build.edex/esb/data/utility/edex_static/base/python/GempakScanDbRequest.py new file mode 100644 index 0000000000..ae02b33c78 --- /dev/null +++ b/edexOsgi/build.edex/esb/data/utility/edex_static/base/python/GempakScanDbRequest.py @@ -0,0 +1,167 @@ +# +# GempakScanDbRequest +# +# This code has been developed by the SIB for use in the AWIPS2 system. +# Performs a query of a database table ncgrib and returns ensemble members string. +# Could be re-factored for other tables. +# +# Usage: +# import GempakScanDbRequest +# query = GempakScanDbRequest.GempakScanDbRequest("ncgrib") +# query.setParameters("modelname|dbtag|eventtag|timetmplt") +# return query.execute(); +# +# SOFTWARE HISTORY +# +# Date Ticket# Engineer Description +# ------------ ---------- ----------- -------------------------- +# 08/03/11 173_partC mgamazaychikov Initial Creation +# +# +from string import Template +import re +import GempakSqlQuery +from java.util import ArrayList +from com.raytheon.uf.common.message.response import ResponseMessageGeneric +from gov.noaa.nws.ncep.edex.uengine.utility import GempakConvert + +class GempakScanDbRequest(): + + def __init__(self, pluginName): + # + # create the GempakSqlQuery instance + # + self.GSQ = GempakSqlQuery.GempakSqlQuery() + + # + # set the return type to text(string) + # not a ResponseMessageGEneric object + # + self.GSQ.setReturnText() + self.GSQ.setSeparator("|") + self.pluginName = pluginName + + def setParameters(self, inpStr): + + # + # list of values in inpStr delineated by by '|' + # + parmsList = inpStr.split("|") + + modelName = parmsList[0] + dbTag = parmsList[1] + eventTag = parmsList[2] + if eventTag.find("*") > 0: + eventTag = eventTag.split("*")[0] + + gempakTimeStr = parmsList[3] + self.prefix = modelName + "_" + dbTag + "_" + duriTimeSearchString = self.__constructDuriTimeString(gempakTimeStr) + #print "duriTimeSearchString=", duriTimeSearchString + + # + # construct the SQL query to execute + # + + myQuery = "SELECT distinct reftime, forecasttime, eventname FROM " + \ + self.pluginName + " WHERE " + \ + "modelname='" + modelName + \ + "' AND eventname LIKE '" + eventTag + \ + "%' AND datauri LIKE '%" + duriTimeSearchString + "%'" + #print "myQuery====", myQuery + # + # set the SQL query + # + self.GSQ.setQuery(myQuery) + + def __constructDuriTimeString(self,gempakTimeStr): + cycleKeys = 'YYYY|MM|DD|HH' + + gempakTimeStrCycle = gempakTimeStr.split("f")[0] + gempakTimeStrCycle = gempakTimeStrCycle.replace("[0-9]", "x") + gempakTimeStrFFF = gempakTimeStr.split("f")[1] + gempakTimeStrFFF = gempakTimeStrFFF.replace("[0-9]", "%") + + gempakCyclePattern = re.compile(r'^(\w{4})(\w{2})(\w{2})(\w{2})$') + gempakCycleValues = gempakCyclePattern.search(gempakTimeStrCycle).groups() + + duriCycleFormat = '$YYYY-$MM-$DD $HH%' + duriCycleTmplt = Template(duriCycleFormat) + duriCycleKeys = tuple(cycleKeys.split("|")) + + gempakToDuri = dict(zip(duriCycleKeys, gempakCycleValues)) + + duriTimeStrCycle = duriCycleTmplt.safe_substitute(gempakToDuri) + duriTimeStrCycle = duriTimeStrCycle.replace("x","%") + duriTimeStrCycle = duriTimeStrCycle.replace(" ","_") + + duriTimeStrFFF = "_(" + gempakTimeStrFFF + duriTimeStrFFF = re.sub(r'\([0]{1,2}','(', duriTimeStrFFF) + + return duriTimeStrCycle + duriTimeStrFFF + + def __constructReturnString(self,gsqResults): + cycleKeys = 'YYYY|MM|DD|HH' + + gempakCycleKeys = tuple(cycleKeys.split("|")) + + duriCyclePattern = re.compile(r'^(\d{4})-(\d{2})-(\d{2}) (\d{2}):(\d{2}):(\d{2}\.0)$') + + gempakCycleFormat = '$YYYY$MM$DD$HH' + gempakCycleTmplt = Template(gempakCycleFormat) + + returnString="" + + gsqResultsList = gsqResults.split("|") + + for str in gsqResultsList: + lst = str.split(",") + cycle = lst[0] + forecastTime = lst[1] + eventName = lst[2].strip(" ") + duriCycleValues = duriCyclePattern.search(cycle).groups() + + duriToGempak = dict(zip(gempakCycleKeys, duriCycleValues)) + + gempakTimeStrCycle = gempakCycleTmplt.safe_substitute(duriToGempak) + + gempakFFF = 'f%03d|' % ( int(forecastTime) / 3600 ) + + returnString = returnString + self.prefix + eventName + "_" + \ + gempakTimeStrCycle + gempakFFF + + #print "returnString=", returnString[0:-1] + return returnString[0:-1] + + def execute(self): + if self.GSQ is None: + return self.makeNullResponse("Accessing a non-existent dictionary key") + else: + # + # execute the set query + # + gsqResults = self.GSQ.execute() + #print "gsqResults=", gsqResults + if gsqResults is None: + return self.__makeNullResponse("Query returned no results") + else: + self.returnString = self.__constructReturnString(gsqResults) + #print "self.returnString=", self.returnString + + # + # process the results of the query + # + if self.returnString is None: + return self.__makeNullResponse("Query returned no results") + else: + #print "calling self.__makeResponse" + return self.__makeResponse() + + def __makeResponse(self): + response = ArrayList() + + response.add(ResponseMessageGeneric(self.returnString)) + return response + + def __makeNullResponse(self, aMessage=None): + return ResponseMessageGeneric(aMessage) \ No newline at end of file diff --git a/edexOsgi/build.edex/esb/data/utility/edex_static/base/python/GempakSqlQuery.py b/edexOsgi/build.edex/esb/data/utility/edex_static/base/python/GempakSqlQuery.py new file mode 100644 index 0000000000..f75adc915c --- /dev/null +++ b/edexOsgi/build.edex/esb/data/utility/edex_static/base/python/GempakSqlQuery.py @@ -0,0 +1,102 @@ +# +# GempakSqlQuery +# +# This code has been developed by the SIB for use in the AWIPS2 system. +# Performs a BaseRequest for a grid data from GEMPAK, and stores +# the float data in the uEngineProducts directory for later transfer. +# +# Usage: +# import GempakSqlQuery +# gsq = GempakSqlQuery.GempakSqlQuery() +# gsq.setQuery("...") +# [gsq.setReturnTest()] +# return gsq.execute() +# +# SOFTWARE HISTORY +# +# Date Ticket# Engineer Description +# ------------ ---------- ----------- -------------------------- +# 06/02/10 173_partC mgamazaychikov Initial Creation. +# 09/09/10 mgamazaychikov Added setSeparator function +# +from com.raytheon.uf.common.message.response import ResponseMessageGeneric +from com.raytheon.uf.common.dataquery.db import QueryResult +from com.raytheon.uf.edex.database.tasks import SqlQueryTask +from java.util import ArrayList + +class GempakSqlQuery(): +# +# Initializes the query +# + def __init__ (self, dbName="metadata"): + self.dbname = dbName + self.queryResults = None + self.returnText = False + self.isTextSeparated = False + + def setQuery (self, aQuery): + self.query = aQuery + + def setReturnText (self): + self.returnText = True + + def setSeparator(self, aSeparator): + self.separator = aSeparator + self.isTextSeparated = True + +# +# Returns a string with null response +# + def makeNullResponse(self): + nullStr = "Database Query returned no results" + if self.returnText: + return nullStr + else: + response = ArrayList() + response.add(ResponseMessageGeneric(nullStr)) + return response + + +# +# Returns a string with response +# + def makeResponse(self): + response = ArrayList() + returnString="" + queryRows = ArrayList() + queryRows = self.queryResults.getRows() + for qrow in queryRows: + rowStr = "%s" % qrow + if self.returnText: + returnString = returnString + rowStr[1:-1] + if self.isTextSeparated: + returnString = returnString + self.separator + else: + response.add(ResponseMessageGeneric(rowStr[1:-1])) + if self.returnText: + if self.isTextSeparated: + return returnString[0:-1] + else: + return returnString + else: + return response + +# +# Executes the query and calls appropriate response functions +# + def execute(self): + #self.queryResults = ArrayList() + + # + # Create an instance of SQL Query and execute it + # + self.sqlQuery = SqlQueryTask(self.query, self.dbname) + self.queryResults = self.sqlQuery.execute() + + # + # Make response based on the query results + # + if self.queryResults is None: + return self.makeNullResponse() + else: + return self.makeResponse() \ No newline at end of file diff --git a/edexOsgi/build.edex/esb/data/utility/edex_static/base/python/McidasRequest.py b/edexOsgi/build.edex/esb/data/utility/edex_static/base/python/McidasRequest.py new file mode 100644 index 0000000000..460b608ac1 --- /dev/null +++ b/edexOsgi/build.edex/esb/data/utility/edex_static/base/python/McidasRequest.py @@ -0,0 +1,83 @@ +import BaseRequest +from java.util import ArrayList + +# +# Request of mcidas image script +# +# +# SOFTWARE HISTORY +# +# Date Ticket# Engineer Description +# ------------ ---------- ----------- -------------------------- +# 09/2009 144 T. Lee Initial Creation. +# +# + +class McidasRequest(BaseRequest.BaseRequest): + + def __init__(self,): + BaseRequest.BaseRequest.__init__(self, "mcidas") + self.__createImage = False + self.__reproject = False + self.__colormap = "BW" + self.__format = "png" + self.__kml = False + + def setColormap(self, colormap): + self.__colormap = colormap + + def setFormat(self, format): + self.__format = format + + def reprojectImage(self, reproject): + self.__reproject = reproject + + def requestImage(self, image): + self.__createImage = image + + def requestKml(self, kml): + self.__kml = kml + + def execute(self): + self.queryResults = self.query.execute() + if self.queryResults is None or self.queryResults.size() == 0: + self.makeNullResponse() + else: + if self.__createImage: + return self.__makeImageResponse() + else: + return self.makeResponse() + + def __makeImageResponse(self): + from com.raytheon.edex.uengine.tasks.decode import FileIn + from com.raytheon.edex.uengine.tasks.process import ColorMapImage, ReprojectImage, ImageOut + from com.raytheon.edex.uengine.tasks.output import FileOut + from com.raytheon.edex.uengine.tasks.response import MakeResponseUri + from com.raytheon.uf.common.geospatial import MapUtil + response = ArrayList() + size = self.queryResults.size() + for i in range(size): + currentQuery = self.queryResults.get(i) + geom = MapUtil.getGridGeometry(currentQuery.getSpatialObject()) + crs = geom.getCoordinateReferenceSystem() + fileIn = FileIn(self.plugin, currentQuery) + record = fileIn.execute() + colorMap = ColorMapImage(self.__colormap, record.getDataObject(), geom) + imageOut = None + if self.__reproject: + reproject = ReprojectImage(colorMap.execute(), geom, crs) + reprojectedImage = reproject.execute() + imageOut = ImageOut(reprojectedImage, self.__format, reproject.getGridGeometry()) + else: + imageOut = ImageOut(colorMap.execute(), self.__format, geom) + fileOut = FileOut(imageOut.execute(), self.__format) + writeFile = fileOut.execute() + makeResponse = MakeResponseUri(writeFile, None, currentQuery.getIdentifier(), self.__format) + response.add(makeResponse.execute()) + if self.__kml: + from com.raytheon.edex.uengine.tasks.output import KmlImage + kmlImage = KmlImage(writeFile, geom) + kmlFile = kmlImage.execute() + kmlResponse = MakeResponseUri(kmlFile, None, None, "kml") + response.add(kmlResponse.execute()) + return response \ No newline at end of file diff --git a/edexOsgi/build.edex/esb/data/utility/edex_static/base/python/NcModelAvailableTimesQuery.py b/edexOsgi/build.edex/esb/data/utility/edex_static/base/python/NcModelAvailableTimesQuery.py new file mode 100644 index 0000000000..cb9483bba4 --- /dev/null +++ b/edexOsgi/build.edex/esb/data/utility/edex_static/base/python/NcModelAvailableTimesQuery.py @@ -0,0 +1,92 @@ +# +# NcModelAvailableTimesQuery +# +# This code has been developed by the SIB for use in the AWIPS2 system. +# Scans dataLocation directory and returns all the available cycles. +# +# Usage: +# import NcModelAvailableTimesQuery +# query = NcModelAvailableTimesQuery.NcModelAvailableTimesQuery() +# query.setDataLocation("$MODEL/gfs") +# query.setCurrentCycle("2010-11-28 18:00:00.0") +# return query.execute() +# +# SOFTWARE HISTORY +# +# Date Ticket# Engineer Description +# ------------ ---------- ----------- -------------------------- +# 10/22/10 ?? mgamazaychikov Initial Creation +# +from java.util import ArrayList +from com.raytheon.uf.common.message.response import ResponseMessageGeneric +from gov.noaa.nws.ncep.edex.uengine.utility import GempakConvert +import os +import re + + +class NcModelAvailableTimesQuery(): + + def __init__(self): + self.convert = GempakConvert() + +# +# Set parameters of the metadata catalog query +# + def setDataLocation(self, aDataLocation): + dirLevels = aDataLocation.split("/") + numberDirLevel = len(dirLevels) + if aDataLocation.find("$") == 0: + envName = dirLevels[0].split("$")[1] + self.location = os.environ [envName] + for ii in range (1,numberDirLevel -1): + self.location = self.location + "/" + dirLevels[ii] + self.model = dirLevels[numberDirLevel-1].lower() + else: + self.location = "/".join(dirLevels[0:numberDirLevel-1]) + self.model = dirLevels[numberDirLevel-1].lower() +# +# Set parameters of the metadata catalog query +# + def setCurrentCycle(self, aTime): + fileDate = aTime.split(' ')[0] + fileTime = aTime.split(' ')[1] + self.fileTmplt = ''.join(fileDate.split('-')[0:3]) + \ + ''.join(fileTime.split(':')[0]) + 'f' + +# +# Executes the query and calls appropriate response functions +# + def execute(self): + dataDir = self.location + "/" + self.model + allFiles = os.listdir(dataDir) + srchPattern = self.model + '_' + self.fileTmplt + '*' + test = re.compile(srchPattern, re.IGNORECASE) + availTimes = [f[f.find('_')+1:] for f in allFiles if test.search(f)] + availTimes.sort() + retAvailTimes = [self.__fileNameTimeToDbtime(at) for at in availTimes] + if retAvailTimes: + return self.__makeResponse(retAvailTimes) + else: + return self.__makeNullResponse("No times available") + +# +# Converts YYYYMMDDHHfHHH file name time to DataTime format YYYY-MM-DD HH:MM:SS.S (H) +# + def __fileNameTimeToDbtime (self, aFileNameTime): + aList = aFileNameTime.upper().split("F") + return (aList[0][:4] + '-' + aList[0][4:6] + + '-' + aList[0][6:8] + ' ' + aList[0][8:10] + + ':00:00.0 (' + str(int(aList[1])) + ')') + +# +# Generates a list of responses in XML format +# + def __makeResponse(self, aTimes): + retStr = "|".join(aTimes) + return ResponseMessageGeneric(retStr) + +# +# Returns a string with a response message +# + def __makeNullResponse(self, aMessage="Query returned no results"): + return ResponseMessageGeneric(aMessage) \ No newline at end of file diff --git a/edexOsgi/build.edex/esb/data/utility/edex_static/base/python/NcModelCycleQuery.py b/edexOsgi/build.edex/esb/data/utility/edex_static/base/python/NcModelCycleQuery.py new file mode 100644 index 0000000000..d0623c00fe --- /dev/null +++ b/edexOsgi/build.edex/esb/data/utility/edex_static/base/python/NcModelCycleQuery.py @@ -0,0 +1,72 @@ +# +# NcModelCycleQuery +# +# This code has been developed by the SIB for use in the AWIPS2 system. +# Scans dataLocation directory and returns all the available cycles. +# +# Usage: +# import NcModelCycleQuery +# query = NcModelCycleQuery.NcModelCycleQuery() +# query.setDataLocation("$MODEL/gfs") +# return query.execute() +# +# SOFTWARE HISTORY +# +# Date Ticket# Engineer Description +# ------------ ---------- ----------- -------------------------- +# 10/22/10 ?? mgamazaychikov Initial Creation +# +from java.util import ArrayList +from com.raytheon.uf.common.message.response import ResponseMessageGeneric +from gov.noaa.nws.ncep.edex.uengine.utility import GempakConvert +import os + + +class NcModelCycleQuery(): + + def __init__(self): + self.convert = GempakConvert() + +# +# Set parameters of the metadata catalog query +# + def setDataLocation(self, aDataLocation): + dirLevels = aDataLocation.split("/") + numberDirLevel = len(dirLevels) + if aDataLocation.find("$") == 0: + envName = dirLevels[0].split("$")[1] + location = os.environ [envName] + for ii in range (1,numberDirLevel -1): + location = location + "/" + dirLevels[ii] + model = dirLevels[numberDirLevel-1].lower() + else: + location = "/".join(dirLevels[0:numberDirLevel-1]) + model = dirLevels[numberDirLevel-1].lower() + self.dataDir = location + "/" + model + +# +# Executes the query and calls appropriate response functions +# + def execute(self): + cycles=[] + for fn in os.listdir (self.dataDir): + cycle = fn.split('_')[1].split('f')[0][2:8] + "_" + fn.split('_')[1].split('f')[0][8:]+ '00' + if cycle not in cycles: + cycles.append(cycle) + cycles.sort() + if cycles is None: + return self.makeNullResponse("No cycle times available") + else: + return self.__makeResponse(cycles) +# +# Generates a list of responses in XML format +# + def __makeResponse(self, cycles): + retStr = "|".join(cycles) + return ResponseMessageGeneric(retStr) + +# +# Returns a string with a response message +# + def __makeNullResponse(self, aMessage="Database Query returned no results"): + return ResponseMessageGeneric(aMessage) \ No newline at end of file diff --git a/edexOsgi/build.edex/esb/data/utility/edex_static/base/textproducts/templates/product/Hazard_HLS.py b/edexOsgi/build.edex/esb/data/utility/edex_static/base/textproducts/templates/product/Hazard_HLS.py index 8e107fe119..f703d6b209 100644 --- a/edexOsgi/build.edex/esb/data/utility/edex_static/base/textproducts/templates/product/Hazard_HLS.py +++ b/edexOsgi/build.edex/esb/data/utility/edex_static/base/textproducts/templates/product/Hazard_HLS.py @@ -5167,17 +5167,16 @@ READINESS ACTIONS AS RECOMMENDED."""), def _surge_Watch_Impact_stmt(self, info, segment): t="" water_dict = self._totalWaterLevel_dict(info, segment) - if info.surgeHtPlusTide > water_dict.get("Extreme", 8): + if info.surgeHtPlusTide > water_dict.get("Extreme", 7): damage="WIDESPREAD MAJOR" - elif info.surgeHtPlusTide > water_dict.get("High", 6): + elif info.surgeHtPlusTide > water_dict.get("High", 5): damage="AREAS OF MAJOR" - elif info.surgeHtPlusTide > water_dict.get("Moderate", 4): + elif info.surgeHtPlusTide > water_dict.get("Moderate", 3): damage="AREAS OF MODERATE" - elif info.surgeHtPlusTide > water_dict.get("Low", 2) or \ - info.surgeHtPlusTide > water_dict.get("VeryLow", 1): + elif info.surgeHtPlusTide > water_dict.get("Low", 1): damage="AREAS OF MINOR" else: damage = None @@ -5190,17 +5189,16 @@ READINESS ACTIONS AS RECOMMENDED."""), def _surge_Impact_stmt(self, info, segment): t="" water_dict = self._totalWaterLevel_dict(info, segment) - if info.surgeHtPlusTide > water_dict.get("Extreme", 8): + if info.surgeHtPlusTide > water_dict.get("Extreme", 7): damage= self._totalWaterLevel_Extreme_stmt(info, segment) - elif info.surgeHtPlusTide > water_dict.get("High", 6): + elif info.surgeHtPlusTide > water_dict.get("High", 5): damage= self._totalWaterLevel_High_stmt(info, segment) - elif info.surgeHtPlusTide > water_dict.get("Moderate", 4): + elif info.surgeHtPlusTide > water_dict.get("Moderate", 3): damage= self._totalWaterLevel_Moderate_stmt(info, segment) - elif info.surgeHtPlusTide > water_dict.get("Low", 2) or \ - info.surgeHtPlusTide > water_dict.get("VeryLow", 1): + elif info.surgeHtPlusTide > water_dict.get("Low", 1): damage= self._totalWaterLevel_Low_stmt(info, segment) else: damage ="MINOR COASTAL FLOOD DAMAGE" @@ -5211,18 +5209,16 @@ READINESS ACTIONS AS RECOMMENDED."""), # Enter customized values for land and marine zones return { "zone1": { - "Extreme": 8, - "High": 6, - "Moderate": 4, - "Low": 2, - "VeryLow": 1, + "Extreme": 7, + "High": 5, + "Moderate": 3, + "Low": 1, }, "default": { - "Extreme": 8, - "High": 6, - "Moderate": 4, - "Low": 2, - "VeryLow": 1, + "Extreme": 7, + "High": 5, + "Moderate": 3, + "Low": 1, }, } @@ -5344,26 +5340,6 @@ DISPLACED. MODERATE BEACH EROSION WILL OCCUR...WHICH MAY BECOME SUBSTANTIAL IF CONDITIONS EXTEND THROUGH MULTIPLE HIGH TIDES. SEVERAL ROADS IN FLOOD-PRONE AREAS WILL LIKELY BE CLOSED. -""" - return t - - def _totalWaterLevel_VeryLow_stmt(self, info, segment): - t = "" - t+= """ -THERE IS A LIMITED THREAT TO LIFE AND PROPERTY FROM COASTAL -FLOODING...POTENTIALLY HAVING A VERY LOW BUT NOTABLE IMPACT. THE -CONCERN IS FOR THE CHANCE OF LOCALIZED MINOR COASTAL FLOODING TO -OCCUR WITHIN THE SURGE ZONE...RESULTING IN SHALLOW INUNDATION IN -SPOTS. IF REALIZED...PEOPLE WITHIN THE THREATENED AREAS WHO -FAILED TO ACT ACCORDING TO THEIR PERSONAL DISASTER PLAN WILL HAVE -PLACED THEMSELVES AT SOME MEASURE OF RISK. - -A FEW HOMES AND BUSINESSES ALONG THE SHORELINE...OR IN FLOOD- -PRONE AREAS...MAY EXPERIENCE SOME WATER ENTERING INSIDE... -ESPECIALLY IN PLACES SUBJECT TO TIDAL RUN-UP OR OVERWASH...AND -PARTICULARLY DURING HIGH TIDE. ENHANCED WAVE ACTION IN EXPOSED -AREAS MAY CAUSE SOME DAMAGE TO PIERS...DOCKS...AND MARINAS. A FEW -ROADS IN FLOOD-PRONE AREAS MAY BE TEMPORARILY CLOSED. """ return t @@ -7197,7 +7173,4 @@ class HLS_Scenario(HLS_Dialog): # close window and set status "Ok" self._status = "Ok" self.ok() - - - diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/initializeNcepDb.sh b/edexOsgi/build.edex/opt/db/ddl/ncep/initializeNcepDb.sh index 7a9eb6a10c..71a764cad4 100644 --- a/edexOsgi/build.edex/opt/db/ddl/ncep/initializeNcepDb.sh +++ b/edexOsgi/build.edex/opt/db/ddl/ncep/initializeNcepDb.sh @@ -33,6 +33,7 @@ for shp in `find ${4}/shapefiles -name "*.shp"` ; do if [[ $base == 'Adjcstlbnds' \ || $base == 'Airmetcstlbnds' \ || $base == 'Akpsabnds' \ + || $base == 'Artccbnds' \ || $base == 'Ascairways' \ || $base == 'Ascarrfa' \ || $base == 'Ascartcc' \ @@ -45,7 +46,6 @@ for shp in `find ${4}/shapefiles -name "*.shp"` ; do || $base == 'Ascwrzones' \ || $base == 'Awcartcc' \ || $base == 'Awcccfcan' \ - || $base == 'Awcfaarea' \ || $base == 'Atlbasin' \ || $base == 'Bwus_bnd' \ || $base == 'Bwus_label' \ @@ -77,6 +77,7 @@ for shp in `find ${4}/shapefiles -name "*.shp"` ; do || $base == 'Mzbnds' \ || $base == 'Mzcntybnds' \ || $base == 'Npsabnds' \ + || $base == 'OPC_Ssa' \ || $base == 'Opcbnds' \ || $base == 'Opcbnds_nomex' \ || $base == 'PacBasin' \ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/loadPermclust.sql b/edexOsgi/build.edex/opt/db/ddl/ncep/loadPermclust.sql index d3e4b83895..c765f9d284 100644 --- a/edexOsgi/build.edex/opt/db/ddl/ncep/loadPermclust.sql +++ b/edexOsgi/build.edex/opt/db/ddl/ncep/loadPermclust.sql @@ -1,67 +1,67 @@ copy stns.permclust (wfo, clustername, cntyfipscode) FROM stdin with delimiter as ',' ; -BOX,Bristol+Newport+Narag Bay,44001 + 44005 + 672360 -BOX,Norfolk + Boston Harbor,25021 + 672300 -BOX,Dukes+Vineyard&Nantucket Snd,25007 + 672320 + 672330 -BOX,Washington + Block Isl Snd,44009 + 672370 -BOX,Suffolk + Boston Harbor,25025 + 672300 -BOX,Plymouth+Boston Harbor,25023+672300 -CAR,Hancock+costal_waters,23009+670500 -CAR,Washington+costal_waters,23029+670500 -CHS,Charleston,45019+663300 -CLE,Cuyahoga,39035+631460 -CRP,Calhoun + Bays,48057 + 682350 -CRP,Refugio + Bays,48391+682350 -CRP,Aransas + Bays,48007+682350 -CRP,San_Patricio + Bays,48409+682300 -CRP,Nueces + Bays,48355+682300 -CRP,Kleberg + Bays,48273+682300 -DTX,Macomb,26099+604600 -DTX,St._Clair + St._Clair River,26147 + 604220 -DTX,Wayne,26163+604230 -LOT,Lake_IL,17097+647400 -LOT,Cook,17031+647400+647410+647420 -LOX,Los_Angeles,6037+616550+616760 -LOX,Ventura,6111+616760+616550 -LOX,Santa_Barbara,6083+616500+616730 -LWX,Anne_Arundel + Chesapeake Bay,24003 + 675310 + 675320 -LWX,Arlington+ Tidal Potomac,51013 + 675350 -LWX,Balt + Chke Bay,24005 + 675310 -LWX,Baltimore_City+Chesapk Bay,24510 + 675310 -LWX,Calvert + Chesapeake Bay,24009 + 675330 + 675340 -LWX,Charles + Tidal Potomac,24017 + 675360 + 675350 -LWX,City_of_Alexandria+Tidal Pot,51510 + 675350 -LWX,D.C. + Tidal Potomac,11001 + 675350 -LWX,Fairfax + Tidal Potomac,51059 + 675350 + 675360 -LWX,Harford + Chesapeake Bay,24025 + 675300 + 675310 -LWX,King_George + Chesapeake Bay,51099 + 675360 -LWX,Prince_William + Chesapeake Bay,51153 + 675360 -LWX,St._Marys+Ches Bay+Tidal Pot,24037 + 675340 + 675370 -LWX,Stafford + Tidal Potomac,51179 + 675360 -MFL,Palm_Beach,12099+666100 -MFL,Miami-Dade,12086+666300 -MTR,Monterey,6053+615350 -MTR,Santa_Clara,6085+615350 -MTR,San_Mateo,6081+615300 -MTR,San_Francisco,6075+615300 -MTR,Marin,6041+615300 -OKX,NYC\, NY Metro,36005 + 36061 + 36085 + 36047 + 36081 + 673380 -OKX,Suffolk,036103+673400+673450 -PHI,Cape_May,34009+674310 -PHI,New_Castle,10003+674300 -PQR,Clatsop+Columbia Rvr Bar+CW,41007+612500+612100 -PQR,Pacific+Columbia Rvr Bar+CW,53049+612500+612100 -PQR,Tillamook + CW,41057 + 612500 -PQR,Lincoln + CW,41041 + 612550 -SEW,Grays_Harbor,53027+611100 -SEW,Jefferson,53031+611340+611350 -SEW,Mason,53045+611350 -SEW,Kitsap,53035+611350 -SEW,Island,53029+611340+611350 -SGX,San_Diego county,6073 + 617500 -TBW,Pinellas,12103+688300 -TBW,Hillsborough,12057+688300 -TBW,Manatee,12081+688300 -TBW,Lee,12071+688560 -TBW,Charlotte,12015+688560 +BOX,Bristol+Newport+Narag Bay,44001 + 44005 + 73236 +BOX,Norfolk + Boston Harbor,25021 + 73230 +BOX,Dukes+Vineyard&Nantucket Snd,25007 + 73232 + 73233 +BOX,Washington + Block Isl Snd,44009 + 73237 +BOX,Suffolk + Boston Harbor,25025 + 73230 +BOX,Plymouth+Boston Harbor,25023+73230 +CAR,Hancock+costal_waters,23009+73050 +CAR,Washington+costal_waters,23029+73050 +CHS,Charleston,45019+75330 +CLE,Cuyahoga,39035+96146 +CRP,Calhoun + Bays,48057 + 77235 +CRP,Refugio + Bays,48391+77235 +CRP,Aransas + Bays,48007+77235 +CRP,San_Patricio + Bays,48409+77230 +CRP,Nueces + Bays,48355+77230 +CRP,Kleberg + Bays,48273+77230 +DTX,Macomb,26099+94460 +DTX,St._Clair + St._Clair River,26147 + 94422 +DTX,Wayne,26163+94423 +LOT,Lake_IL,17097+92740 +LOT,Cook,17031+92740+92741+92742 +LOX,Los_Angeles,6037+57655+57676 +LOX,Ventura,6111+57676+57655 +LOX,Santa_Barbara,6083+57650+57673 +LWX,Anne_Arundel + Chesapeake Bay,24003 + 73531 + 73532 +LWX,Arlington+ Tidal Potomac,51013 + 73535 +LWX,Balt + Chke Bay,24005 + 73531 +LWX,Baltimore_City+Chesapk Bay,24510 + 73531 +LWX,Calvert + Chesapeake Bay,24009 + 73533 + 73534 +LWX,Charles + Tidal Potomac,24017 + 73536 + 73535 +LWX,City_of_Alexandria+Tidal Pot,51510 + 73535 +LWX,D.C. + Tidal Potomac,11001 + 73535 +LWX,Fairfax + Tidal Potomac,51059 + 73535 + 73536 +LWX,Harford + Chesapeake Bay,24025 + 73530 + 73531 +LWX,King_George + Chesapeake Bay,51099 + 73536 +LWX,Prince_William + Chesapeake Bay,51153 + 73536 +LWX,St._Marys+Ches Bay+Tidal Pot,24037 + 73534 + 73537 +LWX,Stafford + Tidal Potomac,51179 + 73536 +MFL,Palm_Beach,12099+75610 +MFL,Miami-Dade,12086+75630 +MTR,Monterey,6053+57535 +MTR,Santa_Clara,6085+57535 +MTR,San_Mateo,6081+57530 +MTR,San_Francisco,6075+57530 +MTR,Marin,6041+57530 +OKX,NYC\, NY Metro,36005 + 36061 + 36085 + 36047 + 36081 + 73338 +OKX,Suffolk,36103+73340+73345 +PHI,Cape_May,34009+73431 +PHI,New_Castle,10003+73430 +PQR,Clatsop+Columbia Rvr Bar+CW,41007+57250+57210 +PQR,Pacific+Columbia Rvr Bar+CW,53049+57250+57210 +PQR,Tillamook + CW,41057 + 57250 +PQR,Lincoln + CW,41041 + 57255 +SEW,Grays_Harbor,53027+57110 +SEW,Jefferson,53031+57134+57135 +SEW,Mason,53045+57135 +SEW,Kitsap,53035+57135 +SEW,Island,53029+57134+57135 +SGX,San_Diego county,6073 + 57750 +TBW,Pinellas,12103+77830 +TBW,Hillsborough,12057+77830 +TBW,Manatee,12081+77830 +TBW,Lee,12071+77856 +TBW,Charlotte,12015+77856 \. diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Adjcstlbnds/adjcstlbnds.dbf b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Adjcstlbnds/adjcstlbnds.dbf new file mode 100644 index 0000000000..b56f769453 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Adjcstlbnds/adjcstlbnds.dbf differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Adjcstlbnds/adjcstlbnds.fix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Adjcstlbnds/adjcstlbnds.fix new file mode 100644 index 0000000000..9a45575169 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Adjcstlbnds/adjcstlbnds.fix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Adjcstlbnds/adjcstlbnds.prj b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Adjcstlbnds/adjcstlbnds.prj new file mode 100644 index 0000000000..a7ee8d00be --- /dev/null +++ b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Adjcstlbnds/adjcstlbnds.prj @@ -0,0 +1 @@ +GEOGCS["WGS84(DD)", DATUM["WGS84", SPHEROID["WGS84", 6378137.0, 298.257223563]], PRIMEM["Greenwich", 0.0], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH]] \ No newline at end of file diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Adjcstlbnds/adjcstlbnds.qix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Adjcstlbnds/adjcstlbnds.qix new file mode 100644 index 0000000000..fcfba29ec2 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Adjcstlbnds/adjcstlbnds.qix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Adjcstlbnds/adjcstlbnds.shp b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Adjcstlbnds/adjcstlbnds.shp new file mode 100644 index 0000000000..247553d7f3 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Adjcstlbnds/adjcstlbnds.shp differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Adjcstlbnds/adjcstlbnds.shx b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Adjcstlbnds/adjcstlbnds.shx new file mode 100644 index 0000000000..4e62e6caaa Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Adjcstlbnds/adjcstlbnds.shx differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Airmetcstlbnds/airmetcstlbnds.dbf b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Airmetcstlbnds/airmetcstlbnds.dbf new file mode 100644 index 0000000000..f284d08490 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Airmetcstlbnds/airmetcstlbnds.dbf differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Airmetcstlbnds/airmetcstlbnds.fix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Airmetcstlbnds/airmetcstlbnds.fix new file mode 100644 index 0000000000..e7258ec208 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Airmetcstlbnds/airmetcstlbnds.fix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Airmetcstlbnds/airmetcstlbnds.prj b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Airmetcstlbnds/airmetcstlbnds.prj new file mode 100644 index 0000000000..a7ee8d00be --- /dev/null +++ b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Airmetcstlbnds/airmetcstlbnds.prj @@ -0,0 +1 @@ +GEOGCS["WGS84(DD)", DATUM["WGS84", SPHEROID["WGS84", 6378137.0, 298.257223563]], PRIMEM["Greenwich", 0.0], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH]] \ No newline at end of file diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Airmetcstlbnds/airmetcstlbnds.qix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Airmetcstlbnds/airmetcstlbnds.qix new file mode 100644 index 0000000000..3b2016c9ea Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Airmetcstlbnds/airmetcstlbnds.qix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Airmetcstlbnds/airmetcstlbnds.shp b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Airmetcstlbnds/airmetcstlbnds.shp new file mode 100644 index 0000000000..863dca3e2b Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Airmetcstlbnds/airmetcstlbnds.shp differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Airmetcstlbnds/airmetcstlbnds.shx b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Airmetcstlbnds/airmetcstlbnds.shx new file mode 100644 index 0000000000..3838ca8d73 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Airmetcstlbnds/airmetcstlbnds.shx differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Akpsabnds/akpsabnds.dbf b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Akpsabnds/akpsabnds.dbf new file mode 100644 index 0000000000..88c8b39f01 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Akpsabnds/akpsabnds.dbf differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Akpsabnds/akpsabnds.fix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Akpsabnds/akpsabnds.fix new file mode 100644 index 0000000000..fe5fa4d252 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Akpsabnds/akpsabnds.fix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Akpsabnds/akpsabnds.prj b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Akpsabnds/akpsabnds.prj new file mode 100644 index 0000000000..a7ee8d00be --- /dev/null +++ b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Akpsabnds/akpsabnds.prj @@ -0,0 +1 @@ +GEOGCS["WGS84(DD)", DATUM["WGS84", SPHEROID["WGS84", 6378137.0, 298.257223563]], PRIMEM["Greenwich", 0.0], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH]] \ No newline at end of file diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Akpsabnds/akpsabnds.qix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Akpsabnds/akpsabnds.qix new file mode 100644 index 0000000000..86b0712727 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Akpsabnds/akpsabnds.qix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Akpsabnds/akpsabnds.shp b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Akpsabnds/akpsabnds.shp new file mode 100644 index 0000000000..19c2d562c6 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Akpsabnds/akpsabnds.shp differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Akpsabnds/akpsabnds.shx b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Akpsabnds/akpsabnds.shx new file mode 100644 index 0000000000..4c3d0cfb6a Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Akpsabnds/akpsabnds.shx differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Artccbnds/artccbnds.dbf b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Artccbnds/artccbnds.dbf new file mode 100644 index 0000000000..41e1aa6952 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Artccbnds/artccbnds.dbf differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Artccbnds/artccbnds.fix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Artccbnds/artccbnds.fix new file mode 100644 index 0000000000..e7258ec208 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Artccbnds/artccbnds.fix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Artccbnds/artccbnds.prj b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Artccbnds/artccbnds.prj new file mode 100644 index 0000000000..a7ee8d00be --- /dev/null +++ b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Artccbnds/artccbnds.prj @@ -0,0 +1 @@ +GEOGCS["WGS84(DD)", DATUM["WGS84", SPHEROID["WGS84", 6378137.0, 298.257223563]], PRIMEM["Greenwich", 0.0], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH]] \ No newline at end of file diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Artccbnds/artccbnds.qix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Artccbnds/artccbnds.qix new file mode 100644 index 0000000000..5ad4afb81a Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Artccbnds/artccbnds.qix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Artccbnds/artccbnds.shp b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Artccbnds/artccbnds.shp new file mode 100644 index 0000000000..787cd19d5d Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Artccbnds/artccbnds.shp differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Artccbnds/artccbnds.shx b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Artccbnds/artccbnds.shx new file mode 100644 index 0000000000..bc7ffcb20a Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Artccbnds/artccbnds.shx differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascairways/ascairways.dbf b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascairways/ascairways.dbf new file mode 100644 index 0000000000..c229abb38b Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascairways/ascairways.dbf differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascairways/ascairways.fix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascairways/ascairways.fix new file mode 100644 index 0000000000..ef6edc4edc Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascairways/ascairways.fix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascairways/ascairways.prj b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascairways/ascairways.prj new file mode 100644 index 0000000000..a7ee8d00be --- /dev/null +++ b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascairways/ascairways.prj @@ -0,0 +1 @@ +GEOGCS["WGS84(DD)", DATUM["WGS84", SPHEROID["WGS84", 6378137.0, 298.257223563]], PRIMEM["Greenwich", 0.0], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH]] \ No newline at end of file diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascairways/ascairways.qix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascairways/ascairways.qix new file mode 100644 index 0000000000..778767d7d7 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascairways/ascairways.qix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascairways/ascairways.shp b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascairways/ascairways.shp new file mode 100644 index 0000000000..e9d32fea18 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascairways/ascairways.shp differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascairways/ascairways.shx b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascairways/ascairways.shx new file mode 100644 index 0000000000..077af73ed5 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascairways/ascairways.shx differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascarrfa/asccarrfa.dbf b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascarrfa/asccarrfa.dbf new file mode 100644 index 0000000000..cfd90f40b5 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascarrfa/asccarrfa.dbf differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascarrfa/asccarrfa.fix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascarrfa/asccarrfa.fix new file mode 100644 index 0000000000..52c6bac185 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascarrfa/asccarrfa.fix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascarrfa/asccarrfa.prj b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascarrfa/asccarrfa.prj new file mode 100644 index 0000000000..a7ee8d00be --- /dev/null +++ b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascarrfa/asccarrfa.prj @@ -0,0 +1 @@ +GEOGCS["WGS84(DD)", DATUM["WGS84", SPHEROID["WGS84", 6378137.0, 298.257223563]], PRIMEM["Greenwich", 0.0], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH]] \ No newline at end of file diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascarrfa/asccarrfa.qix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascarrfa/asccarrfa.qix new file mode 100644 index 0000000000..d0b9720796 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascarrfa/asccarrfa.qix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascarrfa/asccarrfa.shp b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascarrfa/asccarrfa.shp new file mode 100644 index 0000000000..bdf6c7a322 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascarrfa/asccarrfa.shp differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascarrfa/asccarrfa.shx b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascarrfa/asccarrfa.shx new file mode 100644 index 0000000000..24fdcb371d Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascarrfa/asccarrfa.shx differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascartcc/ascartcc.dbf b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascartcc/ascartcc.dbf new file mode 100644 index 0000000000..3e81250164 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascartcc/ascartcc.dbf differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascartcc/ascartcc.fix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascartcc/ascartcc.fix new file mode 100644 index 0000000000..bf8d7c31d1 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascartcc/ascartcc.fix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascartcc/ascartcc.prj b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascartcc/ascartcc.prj new file mode 100644 index 0000000000..a7ee8d00be --- /dev/null +++ b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascartcc/ascartcc.prj @@ -0,0 +1 @@ +GEOGCS["WGS84(DD)", DATUM["WGS84", SPHEROID["WGS84", 6378137.0, 298.257223563]], PRIMEM["Greenwich", 0.0], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH]] \ No newline at end of file diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascartcc/ascartcc.qix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascartcc/ascartcc.qix new file mode 100644 index 0000000000..e900068537 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascartcc/ascartcc.qix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascartcc/ascartcc.shp b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascartcc/ascartcc.shp new file mode 100644 index 0000000000..700733aebb Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascartcc/ascartcc.shp differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascartcc/ascartcc.shx b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascartcc/ascartcc.shx new file mode 100644 index 0000000000..9c82bbc9fc Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascartcc/ascartcc.shx differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascfaarea/ascfaarea.dbf b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascfaarea/ascfaarea.dbf new file mode 100644 index 0000000000..13d5662ae9 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascfaarea/ascfaarea.dbf differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascfaarea/ascfaarea.fix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascfaarea/ascfaarea.fix new file mode 100644 index 0000000000..d26926f84a Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascfaarea/ascfaarea.fix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascfaarea/ascfaarea.prj b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascfaarea/ascfaarea.prj new file mode 100644 index 0000000000..a7ee8d00be --- /dev/null +++ b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascfaarea/ascfaarea.prj @@ -0,0 +1 @@ +GEOGCS["WGS84(DD)", DATUM["WGS84", SPHEROID["WGS84", 6378137.0, 298.257223563]], PRIMEM["Greenwich", 0.0], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH]] \ No newline at end of file diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascfaarea/ascfaarea.qix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascfaarea/ascfaarea.qix new file mode 100644 index 0000000000..6678060bf2 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascfaarea/ascfaarea.qix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascfaarea/ascfaarea.shp b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascfaarea/ascfaarea.shp new file mode 100644 index 0000000000..a1fbef5637 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascfaarea/ascfaarea.shp differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascfaarea/ascfaarea.shx b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascfaarea/ascfaarea.shx new file mode 100644 index 0000000000..e94d2ec524 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascfaarea/ascfaarea.shx differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascfaregion/ascfaregion.dbf b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascfaregion/ascfaregion.dbf new file mode 100644 index 0000000000..a5633e47c3 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascfaregion/ascfaregion.dbf differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascfaregion/ascfaregion.fix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascfaregion/ascfaregion.fix new file mode 100644 index 0000000000..36763b4dc6 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascfaregion/ascfaregion.fix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascfaregion/ascfaregion.prj b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascfaregion/ascfaregion.prj new file mode 100644 index 0000000000..a7ee8d00be --- /dev/null +++ b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascfaregion/ascfaregion.prj @@ -0,0 +1 @@ +GEOGCS["WGS84(DD)", DATUM["WGS84", SPHEROID["WGS84", 6378137.0, 298.257223563]], PRIMEM["Greenwich", 0.0], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH]] \ No newline at end of file diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascfaregion/ascfaregion.qix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascfaregion/ascfaregion.qix new file mode 100644 index 0000000000..a86dde9b7e Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascfaregion/ascfaregion.qix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascfaregion/ascfaregion.shp b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascfaregion/ascfaregion.shp new file mode 100644 index 0000000000..7e98d253d8 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascfaregion/ascfaregion.shp differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascfaregion/ascfaregion.shx b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascfaregion/ascfaregion.shx new file mode 100644 index 0000000000..75aa3dd332 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascfaregion/ascfaregion.shx differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascgulffa/ascgulffa.dbf b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascgulffa/ascgulffa.dbf new file mode 100644 index 0000000000..cfd90f40b5 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascgulffa/ascgulffa.dbf differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascgulffa/ascgulffa.prj b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascgulffa/ascgulffa.prj new file mode 100644 index 0000000000..a7ee8d00be --- /dev/null +++ b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascgulffa/ascgulffa.prj @@ -0,0 +1 @@ +GEOGCS["WGS84(DD)", DATUM["WGS84", SPHEROID["WGS84", 6378137.0, 298.257223563]], PRIMEM["Greenwich", 0.0], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH]] \ No newline at end of file diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascgulffa/ascgulffa.shp b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascgulffa/ascgulffa.shp new file mode 100644 index 0000000000..7decf1f984 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascgulffa/ascgulffa.shp differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascgulffa/ascgulffa.shx b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascgulffa/ascgulffa.shx new file mode 100644 index 0000000000..4b87320f8a Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascgulffa/ascgulffa.shx differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascgulffa/ascgulffa.tbl b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascgulffa/ascgulffa.tbl new file mode 100644 index 0000000000..b9c2960595 --- /dev/null +++ b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascgulffa/ascgulffa.tbl @@ -0,0 +1,4 @@ + 20 27.783 24.000 -83.166 -97.133 29.600 -85.000 + 28.933 -85.000 27.783 -85.000 27.583 -83.750 24.000 -83.166 + 24.000 -86.000 24.500 -88.000 24.500 -93.000 26.000 -95.916 + 25.966 -97.133 diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Aschifiwo/aschifiwo.dbf b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Aschifiwo/aschifiwo.dbf new file mode 100644 index 0000000000..d9168ad25d Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Aschifiwo/aschifiwo.dbf differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Aschifiwo/aschifiwo.fix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Aschifiwo/aschifiwo.fix new file mode 100644 index 0000000000..e7258ec208 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Aschifiwo/aschifiwo.fix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Aschifiwo/aschifiwo.prj b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Aschifiwo/aschifiwo.prj new file mode 100644 index 0000000000..a7ee8d00be --- /dev/null +++ b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Aschifiwo/aschifiwo.prj @@ -0,0 +1 @@ +GEOGCS["WGS84(DD)", DATUM["WGS84", SPHEROID["WGS84", 6378137.0, 298.257223563]], PRIMEM["Greenwich", 0.0], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH]] \ No newline at end of file diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Aschifiwo/aschifiwo.qix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Aschifiwo/aschifiwo.qix new file mode 100644 index 0000000000..3345c6a206 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Aschifiwo/aschifiwo.qix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Aschifiwo/aschifiwo.shp b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Aschifiwo/aschifiwo.shp new file mode 100644 index 0000000000..f2ac5a7f18 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Aschifiwo/aschifiwo.shp differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Aschifiwo/aschifiwo.shx b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Aschifiwo/aschifiwo.shx new file mode 100644 index 0000000000..4a7e4f117f Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Aschifiwo/aschifiwo.shx differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Asctropfirs/asctropfirs.dbf b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Asctropfirs/asctropfirs.dbf new file mode 100644 index 0000000000..3e81250164 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Asctropfirs/asctropfirs.dbf differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Asctropfirs/asctropfirs.prj b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Asctropfirs/asctropfirs.prj new file mode 100644 index 0000000000..a7ee8d00be --- /dev/null +++ b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Asctropfirs/asctropfirs.prj @@ -0,0 +1 @@ +GEOGCS["WGS84(DD)", DATUM["WGS84", SPHEROID["WGS84", 6378137.0, 298.257223563]], PRIMEM["Greenwich", 0.0], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH]] \ No newline at end of file diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Asctropfirs/asctropfirs.shp b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Asctropfirs/asctropfirs.shp new file mode 100644 index 0000000000..aa33914e49 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Asctropfirs/asctropfirs.shp differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Asctropfirs/asctropfirs.shx b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Asctropfirs/asctropfirs.shx new file mode 100644 index 0000000000..b9be8ccd13 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Asctropfirs/asctropfirs.shx differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Asctropfirs/asctropfirs.tbl b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Asctropfirs/asctropfirs.tbl new file mode 100644 index 0000000000..e8d1e2ee02 --- /dev/null +++ b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Asctropfirs/asctropfirs.tbl @@ -0,0 +1,193 @@ + 38 22.300 8.917 -37.500 -65.000 15.000 -65.000 + 15.000 -63.250 15.333 -63.000 17.367 -63.000 18.000 -62.000 + 18.000 -45.000 22.300 -40.000 17.000 -37.500 13.500 -37.500 + 10.000 -48.000 9.333 -54.000 8.917 -57.000 8.917 -59.950 + 9.990 -61.466 9.990 -61.928 10.085 -62.058 10.733 -61.783 + 11.000 -62.500 15.000 -65.000 + 230 15.683 0.742 -59.784 -73.417 11.866 -71.334 + 12.000 -71.000 12.500 -71.417 12.500 -70.500 11.400 -67.967 + 15.683 -67.067 15.000 -65.000 11.000 -62.500 10.733 -61.784 + 10.085 -62.058 9.989 -61.928 9.989 -61.466 8.916 -59.950 + 8.916 -60.250 8.550 -60.000 8.300 -59.784 8.066 -60.000 + 7.833 -60.367 7.833 -60.500 7.500 -60.650 7.333 -60.550 + 7.216 -60.584 7.225 -60.367 7.125 -60.250 6.966 -60.350 + 6.766 -60.717 6.816 -60.850 6.733 -60.934 6.733 -61.134 + 6.600 -61.167 6.400 -61.100 6.200 -61.100 5.958 -61.384 + 5.200 -60.734 5.183 -60.667 4.966 -60.550 4.766 -60.717 + 4.525 -60.967 4.400 -61.500 4.283 -61.500 4.116 -61.934 + 4.000 -62.750 3.675 -62.717 3.683 -63.000 3.766 -63.134 + 3.900 -63.200 3.916 -63.584 4.050 -63.992 4.200 -64.200 + 4.216 -64.617 4.000 -64.484 3.916 -64.167 3.600 -64.067 + 3.350 -64.117 3.183 -64.284 2.708 -64.200 2.533 -64.217 + 2.350 -63.850 2.466 -63.334 2.150 -63.367 1.966 -63.817 + 2.016 -64.034 1.633 -64.067 1.383 -64.350 1.450 -64.450 + 1.233 -64.767 1.208 -64.917 0.883 -65.267 0.766 -65.784 + 0.742 -66.333 1.183 -66.834 2.350 -67.142 2.833 -67.617 + 2.866 -67.817 3.383 -67.250 3.716 -67.475 3.850 -67.650 + 4.225 -67.800 4.550 -67.884 5.100 -67.817 5.333 -67.884 + 5.533 -67.684 5.816 -67.634 6.000 -67.467 6.200 -67.534 + 6.266 -67.834 6.200 -67.967 6.116 -68.667 6.200 -69.050 + 6.066 -69.234 6.100 -69.450 6.966 -70.100 6.916 -70.250 + 7.083 -70.667 6.950 -71.034 7.000 -71.167 7.033 -71.750 + 6.966 -72.000 7.350 -72.234 7.416 -72.467 7.500 -72.467 + 7.966 -72.450 8.066 -72.384 8.375 -72.367 8.639 -72.659 + 9.083 -72.784 9.083 -72.950 9.216 -73.017 9.133 -73.417 + 9.850 -73.017 10.466 -72.900 11.166 -72.450 11.183 -72.250 + 11.650 -71.967 11.866 -71.334 + 22 17.000 11.400 -67.067 -74.000 12.500 -70.500 + 12.500 -71.417 14.333 -74.000 16.000 -74.000 17.000 -73.000 + 17.000 -71.667 16.000 -71.667 16.000 -68.000 15.683 -67.067 + 11.400 -67.967 12.500 -70.500 + 54 20.417 16.000 -68.000 -71.999 16.000 -71.667 + 17.000 -71.667 18.033 -71.758 18.183 -71.783 18.317 -71.733 + 18.358 -71.736 18.467 -71.933 18.517 -71.900 18.633 -71.999 + 18.667 -71.983 18.642 -71.825 18.700 -71.817 18.750 -71.750 + 18.867 -71.750 18.950 -71.817 18.967 -71.867 19.000 -71.838 + 19.150 -71.650 19.200 -71.633 19.317 -71.808 19.392 -71.700 + 19.700 -71.767 20.417 -71.667 20.417 -70.500 19.000 -68.000 + 16.000 -68.000 16.000 -71.667 + 32 23.500 15.000 -60.000 -69.150 23.500 -68.683 + 23.500 -60.000 20.000 -60.000 18.000 -61.500 18.000 -62.000 + 17.367 -63.000 15.333 -63.000 15.000 -63.250 15.000 -65.000 + 15.683 -67.067 16.000 -68.000 19.000 -68.000 19.650 -69.150 + 21.133 -67.750 22.750 -68.467 23.500 -68.683 + 26 20.417 18.500 -71.633 -75.000 19.700 -71.767 + 19.392 -71.700 19.317 -71.808 19.200 -71.633 19.150 -71.650 + 19.000 -71.838 19.000 -72.000 18.500 -72.000 18.500 -75.000 + 20.000 -73.333 20.417 -73.000 20.417 -71.667 19.700 -71.767 + 42 19.000 17.000 -71.667 -75.000 19.000 -71.838 + 18.967 -71.867 18.950 -71.817 18.867 -71.750 18.750 -71.750 + 18.700 -71.817 18.642 -71.825 18.667 -71.983 18.633 -71.999 + 18.517 -71.900 18.467 -71.933 18.358 -71.736 18.317 -71.733 + 18.183 -71.783 18.033 -71.758 17.000 -71.667 17.000 -73.000 + 18.500 -75.000 18.500 -72.000 19.000 -72.000 19.000 -71.838 + 54 20.417 17.000 -71.633 -75.000 18.500 -75.000 + 20.000 -73.333 20.417 -73.000 20.417 -71.667 19.700 -71.767 + 19.392 -71.700 19.317 -71.808 19.200 -71.633 19.150 -71.650 + 19.000 -71.838 18.967 -71.867 18.950 -71.817 18.867 -71.750 + 18.750 -71.750 18.700 -71.817 18.642 -71.825 18.667 -71.983 + 18.633 -71.999 18.517 -71.900 18.467 -71.933 18.358 -71.736 + 18.317 -71.733 18.183 -71.783 18.033 -71.758 17.000 -71.667 + 17.000 -73.000 18.500 -75.000 + 20 20.000 15.000 -73.000 -82.250 20.000 -82.000 + 20.000 -78.333 19.500 -77.500 18.500 -75.000 17.000 -73.000 + 16.000 -74.000 15.000 -74.000 15.000 -82.250 19.000 -82.083 + 20.000 -82.000 + 42 15.000 7.633 -71.000 -77.417 15.000 -77.417 + 15.000 -74.001 14.333 -74.001 12.500 -71.417 12.000 -71.000 + 11.866 -71.334 11.650 -71.967 11.183 -72.250 11.166 -72.450 + 10.466 -72.900 9.850 -73.017 9.133 -73.417 9.216 -73.017 + 9.083 -72.950 9.083 -72.784 8.639 -72.659 8.355 -73.284 + 7.929 -74.214 7.633 -74.867 8.583 -77.417 15.000 -77.417 + 94 15.000 4.500 -77.175 -83.050 15.000 -82.250 + 15.000 -77.417 8.583 -77.417 8.517 -77.442 8.475 -77.433 + 8.467 -77.392 8.375 -77.333 8.325 -77.342 8.225 -77.300 + 8.208 -77.258 8.142 -77.233 8.042 -77.233 7.975 -77.175 + 7.925 -77.175 7.917 -77.317 7.867 -77.350 7.750 -77.308 + 7.717 -77.417 7.517 -77.575 7.733 -77.725 7.633 -77.767 + 7.508 -77.717 7.467 -77.800 7.250 -77.883 6.733 -78.300 + 6.467 -78.783 6.267 -79.050 4.500 -80.000 4.533 -82.917 + 7.550 -82.917 8.033 -82.900 8.245 -82.925 8.333 -83.050 + 8.470 -82.845 8.633 -82.821 8.748 -82.925 8.942 -82.717 + 9.100 -82.933 9.467 -82.942 9.500 -82.850 9.590 -82.887 + 9.625 -82.850 9.483 -82.620 9.558 -82.600 9.550 -82.567 + 12.900 -82.817 15.000 -82.250 + 112 20.733 1.417 -82.000 -100.000 13.000 -95.000 + 14.550 -92.233 14.667 -92.183 14.850 -92.200 15.017 -92.133 + 15.083 -92.083 15.250 -92.233 16.083 -91.750 16.083 -90.467 + 16.233 -90.467 16.383 -90.417 16.467 -90.667 16.650 -90.700 + 16.917 -91.100 17.150 -91.317 17.183 -91.417 17.250 -91.467 + 17.250 -91.017 17.811 -90.978 17.817 -89.150 17.950 -89.150 + 18.000 -89.033 17.850 -88.833 18.483 -88.483 18.483 -88.317 + 18.417 -88.033 18.150 -88.033 18.150 -87.750 20.000 -86.000 + 20.183 -85.283 20.733 -85.350 20.000 -82.000 19.000 -82.083 + 15.000 -82.250 12.900 -82.817 9.550 -82.567 9.558 -82.600 + 9.483 -82.620 9.625 -82.850 9.590 -82.887 9.500 -82.850 + 9.467 -82.942 9.100 -82.933 8.942 -82.717 8.748 -82.925 + 8.633 -82.821 8.470 -82.845 8.333 -83.050 8.245 -82.925 + 8.033 -82.900 7.550 -82.917 1.417 -82.917 1.417 -92.000 + 8.583 -96.000 11.500 -100.000 13.000 -95.000 + 26 24.000 18.500 -73.333 -86.000 24.000 -86.000 + 24.000 -83.167 24.000 -78.000 22.588 -76.000 22.000 -75.167 + 20.000 -73.333 18.500 -75.000 19.500 -77.500 20.000 -78.333 + 20.000 -82.000 20.733 -85.350 22.000 -86.000 24.000 -86.000 + 58 23.000 13.000 -90.417 -97.083 23.000 -95.000 + 21.484 -92.672 21.059 -92.358 20.732 -92.117 19.672 -91.957 + 17.811 -90.978 17.250 -91.017 17.250 -91.467 17.183 -91.417 + 17.150 -91.317 16.917 -91.100 16.650 -90.700 16.467 -90.667 + 16.383 -90.417 16.233 -90.467 16.083 -90.467 16.083 -91.750 + 15.250 -92.233 15.083 -92.083 15.017 -92.133 14.850 -92.200 + 14.667 -92.183 14.550 -92.233 13.000 -95.000 13.450 -97.083 + 14.926 -96.586 19.483 -95.000 21.151 -95.000 23.000 -95.000 + 18 24.500 20.975 -89.233 -95.000 21.059 -92.358 + 21.484 -92.672 23.000 -95.000 24.500 -93.000 24.500 -91.822 + 24.500 -89.233 21.585 -89.477 20.975 -90.368 21.059 -92.358 + 18 24.500 20.760 -85.819 -89.477 24.500 -89.233 + 24.500 -88.000 24.000 -86.000 22.000 -86.000 21.649 -85.819 + 20.760 -86.696 20.891 -88.764 21.585 -89.477 24.500 -89.233 + 44 21.649 17.811 -85.283 -92.358 17.811 -90.978 + 19.672 -91.957 20.732 -92.117 21.059 -92.358 20.975 -90.368 + 21.585 -89.477 20.891 -88.764 20.760 -86.696 21.649 -85.819 + 20.733 -85.350 20.183 -85.283 20.000 -86.000 18.150 -87.750 + 18.150 -88.033 18.417 -88.033 18.483 -88.317 18.483 -88.483 + 17.850 -88.833 18.000 -89.033 17.950 -89.150 17.817 -89.150 + 17.811 -90.978 + 10 15.000 11.500 -95.000 -105.000 15.000 -105.000 + 13.450 -97.083 13.000 -95.000 11.500 -100.000 15.000 -105.000 + 88 24.500 13.000 -85.284 -97.084 17.810 -90.979 + 17.250 -91.017 17.250 -91.467 17.183 -91.417 17.150 -91.317 + 16.916 -91.101 16.650 -90.701 16.466 -90.667 16.383 -90.417 + 16.233 -90.467 16.083 -90.467 16.083 -91.751 15.250 -92.234 + 15.083 -92.084 15.016 -92.134 14.850 -92.201 14.666 -92.184 + 14.550 -92.234 13.000 -95.001 13.450 -97.084 14.925 -96.586 + 19.483 -95.001 20.151 -95.001 23.000 -95.001 24.500 -93.001 + 24.500 -91.823 24.500 -89.234 24.500 -88.001 24.000 -86.001 + 22.000 -86.001 21.649 -85.819 20.733 -85.351 20.183 -85.284 + 20.000 -86.001 18.150 -87.751 18.150 -88.034 18.416 -88.034 + 18.483 -88.317 18.483 -88.484 17.850 -88.834 18.000 -89.034 + 17.950 -89.151 17.816 -89.151 17.810 -90.979 + 148 31.783 23.000 -93.001 -108.501 31.333 -108.217 + 31.783 -108.217 31.783 -107.389 31.783 -106.534 31.750 -106.501 + 31.733 -106.384 31.466 -106.209 31.383 -106.001 31.000 -105.551 + 30.833 -105.317 30.683 -104.984 30.366 -104.834 30.150 -104.684 + 30.000 -104.701 29.650 -104.517 29.533 -104.351 29.483 -104.217 + 29.400 -104.151 29.316 -104.001 29.266 -103.784 29.183 -103.684 + 29.150 -103.551 29.066 -103.451 28.916 -103.184 29.183 -102.984 + 29.200 -102.884 29.358 -102.884 29.400 -102.826 29.741 -102.759 + 29.766 -102.559 29.766 -102.388 29.862 -102.342 29.879 -102.313 + 29.833 -102.180 29.783 -102.101 29.783 -101.801 29.750 -101.517 + 29.583 -101.292 29.533 -101.251 29.366 -101.001 29.166 -100.751 + 28.900 -100.634 28.650 -100.484 28.183 -100.192 27.983 -99.951 + 27.766 -99.834 27.650 -99.701 27.491 -99.526 27.308 -99.517 + 27.036 -99.442 26.883 -99.317 26.666 -99.184 26.560 -99.156 + 26.400 -99.067 26.233 -98.651 26.066 -98.217 26.050 -98.051 + 26.033 -97.751 25.841 -97.401 26.000 -97.001 26.000 -95.917 + 24.500 -93.001 23.000 -95.001 23.000 -96.001 23.363 -99.347 + 23.449 -100.234 23.666 -102.834 24.214 -103.513 25.749 -105.470 + 27.087 -107.247 28.000 -108.501 28.577 -108.501 31.333 -108.501 + 31.333 -108.217 + 34 26.560 23.000 -93.000 -100.234 26.000 -95.917 + 24.500 -93.000 23.000 -95.000 23.000 -96.000 23.363 -99.347 + 23.449 -100.234 25.276 -100.132 25.776 -99.548 26.560 -99.155 + 26.400 -99.067 26.233 -98.650 26.067 -98.217 26.050 -98.050 + 26.033 -97.750 25.842 -97.400 26.000 -97.000 26.000 -95.917 + 66 29.879 23.449 -99.155 -103.512 29.767 -102.558 + 29.767 -102.388 29.862 -102.342 29.879 -102.312 29.833 -102.179 + 29.783 -102.100 29.783 -101.800 29.758 -101.517 29.583 -101.292 + 29.533 -101.250 29.367 -101.000 29.167 -100.750 28.900 -100.633 + 28.650 -100.483 28.183 -100.192 27.983 -99.950 27.775 -99.833 + 27.650 -99.700 27.492 -99.525 27.308 -99.517 27.036 -99.441 + 26.883 -99.317 26.667 -99.183 26.560 -99.155 25.776 -99.548 + 25.273 -100.132 23.449 -100.234 23.667 -102.833 24.214 -103.512 + 24.728 -103.465 25.862 -102.547 26.633 -101.917 29.767 -102.558 + 76 31.783 24.214 -101.921 -108.500 29.767 -102.558 + 26.637 -101.921 25.862 -102.547 24.728 -103.465 24.214 -103.512 + 25.749 -105.469 27.088 -107.246 28.000 -108.500 31.333 -108.500 + 31.333 -108.217 31.783 -108.217 31.783 -107.388 31.783 -106.533 + 31.750 -106.500 31.733 -106.383 31.467 -106.208 31.383 -106.000 + 31.000 -105.550 30.833 -105.317 30.683 -104.983 30.367 -104.833 + 30.150 -104.683 30.000 -104.700 29.650 -104.517 29.533 -104.350 + 29.483 -104.217 29.400 -104.150 29.317 -104.000 29.267 -103.783 + 29.183 -103.683 29.150 -103.550 29.067 -103.450 28.917 -103.183 + 29.183 -102.983 29.208 -102.883 29.358 -102.883 29.400 -102.825 + 29.742 -102.758 diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Asctweb/asctweb.dbf b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Asctweb/asctweb.dbf new file mode 100644 index 0000000000..51588a8723 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Asctweb/asctweb.dbf differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Asctweb/asctweb.prj b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Asctweb/asctweb.prj new file mode 100644 index 0000000000..a7ee8d00be --- /dev/null +++ b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Asctweb/asctweb.prj @@ -0,0 +1 @@ +GEOGCS["WGS84(DD)", DATUM["WGS84", SPHEROID["WGS84", 6378137.0, 298.257223563]], PRIMEM["Greenwich", 0.0], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH]] \ No newline at end of file diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Asctweb/asctweb.shp b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Asctweb/asctweb.shp new file mode 100644 index 0000000000..11cec84b00 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Asctweb/asctweb.shp differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Asctweb/asctweb.shx b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Asctweb/asctweb.shx new file mode 100644 index 0000000000..933eec32a2 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Asctweb/asctweb.shx differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Asctweb/asctweb.tbl b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Asctweb/asctweb.tbl new file mode 100644 index 0000000000..e6e8a8f62d --- /dev/null +++ b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Asctweb/asctweb.tbl @@ -0,0 +1,512 @@ + 6 46.872 43.646 -68.018 -70.309 43.646 -70.309 + 44.807 -68.828 46.872 -68.018 + 4 44.473 43.646 -70.309 -73.150 43.646 -70.309 + 44.473 -73.150 + 4 44.807 44.473 -68.828 -73.150 44.473 -73.150 + 44.807 -68.828 + 42 42.614 42.114 -70.755 -71.255 42.364 -70.755 + 42.442 -70.768 42.511 -70.803 42.567 -70.858 42.602 -70.928 + 42.614 -71.005 42.602 -71.083 42.567 -71.152 42.511 -71.208 + 42.442 -71.243 42.364 -71.255 42.287 -71.243 42.217 -71.208 + 42.162 -71.152 42.127 -71.083 42.114 -71.005 42.127 -70.928 + 42.162 -70.858 42.217 -70.803 42.287 -70.768 42.364 -70.755 + 4 43.646 42.364 -70.309 -71.005 42.364 -71.005 + 43.646 -70.309 + 6 44.473 42.364 -71.005 -73.150 42.364 -71.005 + 43.626 -72.304 44.473 -73.150 + 4 42.748 42.364 -71.005 -73.803 42.364 -71.005 + 42.748 -73.803 + 6 42.364 40.767 -71.005 -73.983 42.364 -71.005 + 41.939 -72.683 40.767 -73.983 + 6 42.364 41.253 -70.060 -71.005 42.364 -71.005 + 41.669 -70.280 41.253 -70.060 + 8 44.936 43.111 -73.150 -76.106 44.473 -73.150 + 44.936 -74.846 43.992 -76.022 43.111 -76.106 + 6 44.473 40.767 -73.150 -73.983 44.473 -73.150 + 42.748 -73.803 40.767 -73.983 + 4 43.111 42.748 -73.803 -76.106 42.748 -73.803 + 43.111 -76.106 + 6 42.748 42.160 -73.803 -76.891 42.748 -73.803 + 42.209 -75.980 42.160 -76.891 + 6 41.253 40.767 -70.060 -73.983 40.767 -73.983 + 41.168 -71.578 41.253 -70.060 + 42 40.120 39.620 -74.995 -75.495 39.870 -74.995 + 39.948 -75.007 40.017 -75.043 40.073 -75.098 40.108 -75.168 + 40.120 -75.245 40.108 -75.322 40.073 -75.392 40.017 -75.447 + 39.948 -75.483 39.870 -75.495 39.793 -75.483 39.723 -75.447 + 39.668 -75.392 39.633 -75.322 39.620 -75.245 39.633 -75.168 + 39.668 -75.098 39.723 -75.043 39.793 -75.007 39.870 -74.995 + 42 40.444 39.944 -76.513 -77.013 40.194 -76.513 + 40.271 -76.526 40.341 -76.561 40.396 -76.616 40.431 -76.686 + 40.444 -76.763 40.431 -76.841 40.396 -76.910 40.341 -76.966 + 40.271 -77.001 40.194 -77.013 40.116 -77.001 40.047 -76.966 + 39.991 -76.910 39.956 -76.841 39.944 -76.763 39.956 -76.686 + 39.991 -76.616 40.047 -76.561 40.116 -76.526 40.194 -76.513 + 6 42.160 40.194 -76.763 -76.922 40.194 -76.763 + 41.242 -76.922 42.160 -76.891 + 4 39.175 38.852 -76.668 -77.038 38.852 -77.038 + 39.175 -76.668 + 6 39.870 36.895 -75.245 -76.201 36.895 -76.201 + 38.341 -75.510 39.870 -75.245 + 4 38.852 38.373 -77.038 -81.593 38.852 -77.038 + 38.373 -81.593 + 6 36.895 34.271 -76.201 -77.903 34.271 -77.903 + 35.073 -77.043 36.895 -76.201 + 6 42.941 41.411 -78.732 -81.849 42.941 -78.732 + 42.082 -80.176 41.411 -81.849 + 42 41.661 41.161 -81.599 -82.099 41.411 -81.599 + 41.488 -81.612 41.558 -81.647 41.613 -81.702 41.649 -81.772 + 41.661 -81.849 41.649 -81.927 41.613 -81.996 41.558 -82.052 + 41.488 -82.087 41.411 -82.099 41.334 -82.087 41.264 -82.052 + 41.209 -81.996 41.173 -81.927 41.161 -81.849 41.173 -81.772 + 41.209 -81.702 41.264 -81.647 41.334 -81.612 41.411 -81.599 + 4 42.212 41.411 -81.849 -83.349 41.411 -81.849 + 42.212 -83.349 + 6 41.411 39.046 -81.849 -84.662 41.411 -81.849 + 39.998 -82.892 39.046 -84.662 + 6 42.941 40.491 -78.640 -80.233 40.491 -80.233 + 41.803 -78.640 42.941 -78.732 + 6 41.411 40.194 -76.763 -81.849 41.411 -81.849 + 40.491 -80.233 40.194 -76.763 + 4 40.491 38.852 -77.038 -80.233 40.491 -80.233 + 38.852 -77.038 + 6 28.429 26.683 -80.096 -81.316 26.683 -80.096 + 27.656 -80.418 28.429 -81.316 + 6 28.103 25.793 -80.096 -80.646 28.103 -80.646 + 26.683 -80.096 25.793 -80.290 + 8 30.782 28.429 -81.316 -83.277 30.782 -83.277 + 29.690 -82.272 29.172 -82.224 28.429 -81.316 + 6 30.494 28.103 -80.646 -81.688 30.494 -81.688 + 29.180 -81.058 28.103 -80.646 + 6 42.858 41.986 -97.435 -103.095 41.986 -97.435 + 42.858 -100.547 42.837 -103.095 + 4 41.986 41.303 -95.894 -97.435 41.303 -95.894 + 41.986 -97.435 + 6 33.641 30.494 -81.688 -84.427 33.641 -84.427 + 32.693 -83.649 30.494 -81.688 + 4 32.127 30.494 -81.202 -81.688 30.494 -81.688 + 32.127 -81.202 + 42 32.766 32.266 -84.689 -85.189 32.516 -84.689 + 32.594 -84.701 32.663 -84.737 32.719 -84.792 32.754 -84.862 + 32.766 -84.939 32.754 -85.016 32.719 -85.086 32.663 -85.141 + 32.594 -85.177 32.516 -85.189 32.439 -85.177 32.369 -85.141 + 32.314 -85.086 32.279 -85.016 32.266 -84.939 32.279 -84.862 + 32.314 -84.792 32.369 -84.737 32.439 -84.701 32.516 -84.689 + 4 30.494 30.396 -81.688 -84.350 30.494 -81.688 + 30.396 -84.350 + 6 26.558 25.042 -77.470 -80.290 25.793 -80.290 + 26.558 -78.695 25.042 -77.470 + 4 25.793 24.556 -80.290 -81.759 25.793 -80.290 + 24.556 -81.759 + 6 27.976 25.793 -80.290 -82.533 25.793 -80.290 + 26.587 -81.863 27.976 -82.533 + 6 30.396 27.976 -82.533 -84.350 27.976 -82.533 + 29.636 -83.105 30.396 -84.350 + 6 29.180 27.976 -81.058 -82.533 27.976 -82.533 + 28.546 -81.333 29.180 -81.058 + 4 37.244 34.729 -92.225 -93.387 34.729 -92.225 + 37.244 -93.387 + 6 37.244 35.393 -93.387 -97.601 35.393 -97.601 + 36.198 -95.888 37.244 -93.387 + 6 36.198 32.896 -95.783 -97.037 36.198 -95.888 + 34.883 -95.783 32.896 -97.037 + 4 37.650 35.219 -97.433 -101.706 37.650 -97.433 + 35.219 -101.706 + 4 37.928 35.219 -100.724 -101.706 37.928 -100.724 + 35.219 -101.706 + 6 35.219 31.942 -101.706 -102.202 35.219 -101.706 + 33.664 -101.823 31.942 -102.202 + 4 37.259 35.219 -101.706 -104.341 35.219 -101.706 + 37.259 -104.341 + 4 31.942 31.807 -102.202 -106.378 31.942 -102.202 + 31.807 -106.378 + 4 35.219 35.040 -101.706 -106.609 35.040 -106.609 + 35.219 -101.706 + 4 35.511 35.040 -106.609 -108.789 35.040 -106.609 + 35.511 -108.789 + 6 35.040 31.942 -102.202 -106.609 35.040 -106.609 + 33.302 -104.531 31.942 -102.202 + 6 35.040 31.807 -106.378 -107.271 35.040 -106.609 + 33.236 -107.271 31.807 -106.378 + 4 32.116 31.807 -106.378 -110.941 31.807 -106.378 + 32.116 -110.941 + 4 36.742 35.040 -106.609 -108.230 35.040 -106.609 + 36.742 -108.230 + 6 37.259 35.040 -104.341 -106.609 35.040 -106.609 + 35.654 -105.142 37.259 -104.341 + 6 45.571 43.533 -84.080 -85.582 45.571 -84.797 + 44.741 -85.582 43.533 -84.080 + 6 44.741 41.709 -85.582 -86.319 44.741 -85.582 + 43.169 -86.238 41.709 -86.319 + 4 47.168 46.842 -88.489 -92.194 47.168 -88.489 + 46.842 -92.194 + 8 44.881 42.947 -87.897 -93.217 42.947 -87.897 + 43.139 -89.338 43.879 -91.256 44.881 -93.217 + 6 46.842 42.947 -87.897 -92.194 42.947 -87.897 + 44.929 -89.627 46.842 -92.194 + 6 44.929 44.865 -89.627 -93.217 44.929 -89.627 + 44.865 -91.485 44.881 -93.217 + 6 42.000 38.748 -87.830 -90.360 42.000 -87.830 + 39.844 -89.677 38.748 -90.360 + 4 42.000 40.783 -87.830 -91.126 42.000 -87.830 + 40.783 -91.126 + 4 42.000 41.449 -87.830 -90.507 42.000 -87.830 + 41.449 -90.507 + 8 43.909 42.000 -87.830 -92.498 42.000 -87.830 + 42.195 -89.097 42.403 -90.709 43.909 -92.498 + 4 42.947 42.000 -87.830 -87.897 42.000 -87.830 + 42.947 -87.897 + 4 42.000 39.717 -86.294 -87.830 39.717 -86.294 + 42.000 -87.830 + 6 38.748 35.044 -89.571 -90.360 38.748 -90.360 + 37.225 -89.571 35.044 -89.977 + 4 38.748 37.244 -90.360 -93.387 38.748 -90.360 + 37.244 -93.387 + 6 39.123 38.748 -90.360 -94.593 38.748 -90.360 + 38.818 -92.220 39.123 -94.593 + 4 37.244 37.225 -89.571 -93.387 37.244 -93.387 + 37.225 -89.571 + 4 39.123 37.244 -93.387 -94.593 37.244 -93.387 + 39.123 -94.593 + 6 40.783 39.123 -91.126 -94.593 39.123 -94.593 + 40.094 -92.545 40.783 -91.126 + 6 43.158 39.123 -93.331 -94.593 39.123 -94.593 + 41.535 -93.661 43.158 -93.331 + 6 41.535 41.303 -90.507 -95.894 41.303 -95.894 + 41.535 -93.661 41.449 -90.507 + 6 44.881 43.158 -92.498 -93.331 44.881 -93.217 + 43.909 -92.498 43.158 -93.331 + 6 44.881 43.581 -93.217 -96.742 44.881 -93.217 + 44.547 -95.082 43.581 -96.742 + 6 46.919 44.881 -93.217 -96.815 44.881 -93.217 + 45.866 -95.395 46.919 -96.815 + 42 47.092 46.592 -91.944 -92.444 46.842 -91.944 + 46.919 -91.956 46.989 -91.991 47.044 -92.047 47.080 -92.116 + 47.092 -92.194 47.080 -92.271 47.044 -92.341 46.989 -92.396 + 46.919 -92.431 46.842 -92.444 46.765 -92.431 46.695 -92.396 + 46.640 -92.341 46.604 -92.271 46.592 -92.194 46.604 -92.116 + 46.640 -92.047 46.695 -91.991 46.765 -91.956 46.842 -91.944 + 4 46.919 46.842 -92.194 -96.815 46.842 -92.194 + 46.919 -96.815 + 6 48.566 46.842 -92.194 -97.176 46.842 -92.194 + 48.566 -93.403 47.949 -97.176 + 6 48.259 47.949 -97.176 -103.642 48.178 -103.642 + 48.259 -101.281 47.949 -97.176 + 6 49.911 46.919 -96.815 -97.243 46.919 -96.815 + 47.949 -97.176 49.911 -97.243 + 4 46.919 46.774 -96.815 -100.748 46.774 -100.748 + 46.919 -96.815 + 4 46.774 46.428 -100.748 -105.886 46.774 -100.748 + 46.428 -105.886 + 4 48.178 46.774 -100.748 -103.642 46.774 -100.748 + 48.178 -103.642 + 4 48.259 46.774 -100.748 -101.281 46.774 -100.748 + 48.259 -101.281 + 6 46.774 43.581 -96.742 -100.748 43.581 -96.742 + 44.385 -98.229 46.774 -100.748 + 4 46.919 43.581 -96.742 -96.815 43.581 -96.742 + 46.919 -96.815 + 4 44.045 41.874 -103.058 -103.596 44.045 -103.058 + 41.874 -103.596 + 4 46.774 44.045 -100.748 -103.058 44.045 -103.058 + 46.774 -100.748 + 6 41.303 40.968 -95.894 -100.687 41.303 -95.894 + 40.968 -98.309 41.126 -100.687 + 4 41.126 39.371 -100.687 -101.699 41.126 -100.687 + 39.371 -101.699 + 4 41.874 41.126 -100.687 -103.596 41.126 -100.687 + 41.874 -103.596 + 4 39.123 37.650 -94.593 -97.433 39.123 -94.593 + 37.650 -97.433 + 4 41.303 39.123 -94.593 -95.894 39.123 -94.593 + 41.303 -95.894 + 4 37.928 37.650 -97.433 -100.724 37.650 -97.433 + 37.928 -100.724 + 6 41.126 37.650 -97.433 -100.687 37.650 -97.433 + 38.872 -98.812 41.126 -100.687 + 4 39.371 37.928 -100.724 -101.699 37.928 -100.724 + 39.371 -101.699 + 6 41.126 39.858 -100.687 -104.667 39.858 -104.667 + 40.176 -103.222 41.126 -100.687 + 4 39.858 39.371 -101.699 -104.667 39.858 -104.667 + 39.371 -101.699 + 6 39.858 37.928 -100.724 -104.667 39.858 -104.667 + 38.051 -103.511 37.928 -100.724 + 6 39.858 37.259 -104.341 -104.667 39.858 -104.667 + 38.289 -104.497 37.259 -104.341 + 6 39.858 39.123 -104.667 -108.527 39.858 -104.667 + 39.642 -106.918 39.123 -108.527 + 4 41.312 39.858 -104.667 -105.674 39.858 -104.667 + 41.312 -105.674 + 4 41.156 39.858 -104.667 -104.812 39.858 -104.667 + 41.156 -104.812 + 4 41.594 39.123 -108.527 -109.065 39.123 -108.527 + 41.594 -109.065 + 4 39.123 38.289 -104.497 -108.527 39.123 -108.527 + 38.289 -104.497 + 4 39.123 36.742 -108.230 -108.527 39.123 -108.527 + 36.742 -108.230 + 4 37.928 37.259 -100.724 -104.341 37.928 -100.724 + 37.259 -104.341 + 4 44.045 42.908 -103.058 -106.464 42.908 -106.464 + 44.045 -103.058 + 6 42.908 41.874 -103.596 -106.464 42.908 -106.464 + 42.797 -105.386 41.874 -103.596 + 6 42.908 41.156 -104.812 -106.464 42.908 -106.464 + 42.797 -105.386 41.156 -104.812 + 6 43.607 42.815 -106.464 -110.738 42.908 -106.464 + 42.815 -108.730 43.607 -110.738 + 6 45.808 42.908 -106.464 -108.544 42.908 -106.464 + 44.769 -106.980 45.808 -108.544 + 4 43.607 41.594 -109.065 -110.738 41.594 -109.065 + 43.607 -110.738 + 6 45.808 41.594 -108.544 -109.065 41.594 -109.065 + 42.815 -108.730 45.808 -108.544 + 8 41.806 41.156 -104.812 -109.065 41.594 -109.065 + 41.806 -107.200 41.312 -105.674 41.156 -104.812 + 6 39.123 36.198 -94.593 -95.888 36.198 -95.888 + 37.669 -95.485 39.123 -94.593 + 42 39.373 38.873 -94.343 -94.843 39.123 -94.343 + 39.201 -94.355 39.270 -94.391 39.326 -94.446 39.361 -94.516 + 39.373 -94.593 39.361 -94.670 39.326 -94.740 39.270 -94.795 + 39.201 -94.831 39.123 -94.843 39.046 -94.831 38.976 -94.795 + 38.921 -94.740 38.886 -94.670 38.873 -94.593 38.886 -94.516 + 38.921 -94.446 38.976 -94.391 39.046 -94.355 39.123 -94.343 + 42 45.131 44.631 -92.967 -93.467 44.881 -92.967 + 44.958 -92.979 45.028 -93.015 45.083 -93.070 45.118 -93.140 + 45.131 -93.217 45.118 -93.294 45.083 -93.364 45.028 -93.419 + 44.958 -93.455 44.881 -93.467 44.803 -93.455 44.734 -93.419 + 44.678 -93.364 44.643 -93.294 44.631 -93.217 44.643 -93.140 + 44.678 -93.070 44.734 -93.015 44.803 -92.979 44.881 -92.967 + 6 43.581 40.094 -92.545 -96.742 40.094 -92.545 + 41.535 -93.661 43.581 -96.742 + 42 37.900 37.400 -97.183 -97.683 37.650 -97.183 + 37.727 -97.195 37.797 -97.231 37.852 -97.286 37.888 -97.356 + 37.900 -97.433 37.888 -97.510 37.852 -97.580 37.797 -97.635 + 37.727 -97.671 37.650 -97.683 37.573 -97.671 37.503 -97.635 + 37.448 -97.580 37.412 -97.510 37.400 -97.433 37.412 -97.356 + 37.448 -97.286 37.503 -97.231 37.573 -97.195 37.650 -97.183 + 42 42.652 42.153 -96.134 -96.634 42.403 -96.134 + 42.480 -96.147 42.549 -96.182 42.605 -96.237 42.640 -96.307 + 42.652 -96.384 42.640 -96.462 42.605 -96.531 42.549 -96.587 + 42.480 -96.622 42.403 -96.634 42.325 -96.622 42.256 -96.587 + 42.200 -96.531 42.165 -96.462 42.153 -96.384 42.165 -96.307 + 42.200 -96.237 42.256 -96.182 42.325 -96.147 42.403 -96.134 + 42 41.699 41.199 -90.257 -90.757 41.449 -90.257 + 41.526 -90.270 41.596 -90.305 41.651 -90.361 41.686 -90.430 + 41.699 -90.507 41.686 -90.585 41.651 -90.654 41.596 -90.710 + 41.526 -90.745 41.449 -90.757 41.371 -90.745 41.302 -90.710 + 41.246 -90.654 41.211 -90.585 41.199 -90.508 41.211 -90.430 + 41.246 -90.361 41.302 -90.305 41.371 -90.270 41.449 -90.257 + 42 41.785 41.285 -93.411 -93.911 41.535 -93.411 + 41.612 -93.423 41.682 -93.458 41.737 -93.514 41.773 -93.583 + 41.785 -93.661 41.773 -93.738 41.737 -93.808 41.682 -93.863 + 41.612 -93.898 41.535 -93.911 41.458 -93.898 41.388 -93.863 + 41.333 -93.808 41.297 -93.738 41.285 -93.661 41.297 -93.583 + 41.333 -93.514 41.388 -93.458 41.458 -93.423 41.535 -93.411 + 42 42.135 41.635 -91.461 -91.961 41.885 -91.461 + 41.962 -91.473 42.032 -91.509 42.087 -91.564 42.122 -91.634 + 42.135 -91.711 42.122 -91.788 42.087 -91.858 42.032 -91.913 + 41.962 -91.949 41.885 -91.961 41.807 -91.949 41.738 -91.913 + 41.682 -91.858 41.647 -91.788 41.635 -91.711 41.647 -91.634 + 41.682 -91.564 41.738 -91.509 41.807 -91.473 41.885 -91.461 + 42 40.108 39.608 -104.417 -104.917 39.858 -104.417 + 39.936 -104.429 40.005 -104.465 40.061 -104.520 40.096 -104.590 + 40.108 -104.667 40.096 -104.744 40.061 -104.814 40.005 -104.869 + 39.936 -104.905 39.858 -104.917 39.781 -104.905 39.711 -104.869 + 39.656 -104.814 39.621 -104.744 39.608 -104.667 39.621 -104.590 + 39.656 -104.520 39.711 -104.465 39.781 -104.429 39.858 -104.417 + 4 45.571 43.533 -84.080 -84.797 43.533 -84.080 + 45.571 -84.797 + 4 41.709 39.717 -86.294 -86.319 39.717 -86.294 + 41.709 -86.319 + 42 39.967 39.467 -86.044 -86.544 39.717 -86.044 + 39.794 -86.057 39.864 -86.092 39.919 -86.147 39.955 -86.217 + 39.967 -86.294 39.955 -86.372 39.919 -86.441 39.864 -86.497 + 39.794 -86.532 39.717 -86.544 39.640 -86.532 39.570 -86.497 + 39.515 -86.441 39.479 -86.372 39.467 -86.294 39.479 -86.217 + 39.515 -86.147 39.570 -86.092 39.640 -86.057 39.717 -86.044 + 42 37.494 36.994 -93.137 -93.637 37.244 -93.137 + 37.322 -93.149 37.391 -93.185 37.447 -93.240 37.482 -93.310 + 37.494 -93.387 37.482 -93.464 37.447 -93.534 37.391 -93.589 + 37.322 -93.625 37.244 -93.637 37.167 -93.625 37.097 -93.589 + 37.042 -93.534 37.007 -93.464 36.994 -93.387 37.007 -93.310 + 37.042 -93.240 37.097 -93.185 37.167 -93.149 37.244 -93.137 + 4 42.908 41.594 -106.464 -109.065 42.908 -106.464 + 41.594 -109.065 + 4 40.788 40.441 -109.510 -111.978 40.788 -111.978 + 40.441 -109.510 + 8 41.594 36.926 -109.065 -111.448 41.594 -109.065 + 40.441 -109.510 39.612 -110.751 36.926 -111.448 + 4 39.371 38.791 -97.651 -101.699 38.791 -97.651 + 39.371 -101.699 + 4 44.383 44.045 -100.286 -103.058 44.045 -103.058 + 44.383 -100.286 + 4 44.383 43.581 -96.742 -100.286 43.581 -96.742 + 44.383 -100.286 + 8 45.955 45.699 -108.544 -112.498 45.808 -108.544 + 45.699 -110.448 45.777 -111.153 45.955 -112.498 + 8 47.482 45.808 -105.886 -111.371 46.428 -105.886 + 45.808 -108.544 47.049 -109.467 47.482 -111.371 + 8 48.543 47.482 -103.642 -111.371 47.482 -111.371 + 48.543 -109.762 48.212 -106.615 48.178 -103.642 + 10 47.482 43.514 -111.371 -112.552 47.482 -111.371 + 46.607 -111.983 45.955 -112.498 45.255 -112.552 43.514 -112.070 + 4 47.482 46.916 -111.371 -114.091 47.482 -111.371 + 46.916 -114.091 + 6 48.608 47.482 -111.371 -114.255 47.482 -111.371 + 48.608 -112.376 48.311 -114.255 + 6 48.311 45.121 -113.882 -114.255 48.311 -114.255 + 46.916 -114.091 45.121 -113.882 + 10 47.620 45.955 -112.498 -117.534 45.955 -112.498 + 46.670 -113.150 46.916 -114.091 47.470 -115.800 47.620 -117.534 + 4 45.121 43.514 -112.070 -113.882 43.514 -112.070 + 45.121 -113.882 + 4 43.607 43.514 -110.738 -112.070 43.514 -112.070 + 43.607 -110.738 + 4 42.911 41.594 -109.065 -112.596 42.911 -112.596 + 41.594 -109.065 + 8 43.564 42.542 -112.070 -116.223 43.564 -116.223 + 42.542 -113.772 42.911 -112.596 43.514 -112.070 + 4 43.564 40.825 -115.792 -116.223 43.564 -116.223 + 40.825 -115.792 + 6 47.620 43.564 -116.223 -117.534 43.564 -116.223 + 46.374 -117.015 47.620 -117.534 + 4 45.121 43.564 -113.882 -116.223 43.564 -116.223 + 45.121 -113.882 + 4 47.620 45.695 -117.534 -118.841 47.620 -117.534 + 45.695 -118.841 + 6 47.620 47.033 -117.534 -120.531 47.620 -117.534 + 47.208 -119.320 47.033 -120.531 + 4 46.568 45.695 -118.841 -120.544 46.568 -120.544 + 45.695 -118.841 + 6 48.792 47.449 -122.282 -122.538 48.792 -122.538 + 47.907 -122.282 47.449 -122.309 + 42 47.699 47.199 -122.059 -122.559 47.449 -122.059 + 47.526 -122.072 47.596 -122.107 47.651 -122.162 47.687 -122.232 + 47.699 -122.309 47.687 -122.387 47.651 -122.456 47.596 -122.512 + 47.526 -122.547 47.449 -122.559 47.372 -122.547 47.302 -122.512 + 47.247 -122.456 47.211 -122.387 47.199 -122.309 47.211 -122.232 + 47.247 -122.162 47.302 -122.107 47.372 -122.072 47.449 -122.059 + 6 47.449 45.589 -122.309 -122.902 47.449 -122.309 + 46.971 -122.902 45.589 -122.597 + 6 46.971 46.158 -122.902 -123.937 46.971 -122.902 + 46.971 -123.937 46.158 -123.879 + 6 47.449 47.033 -120.531 -122.309 47.449 -122.309 + 47.277 -121.337 47.033 -120.531 + 6 45.695 43.564 -116.223 -118.841 45.695 -118.841 + 44.838 -117.810 43.564 -116.223 + 4 45.695 44.254 -118.841 -121.150 45.695 -118.841 + 44.254 -121.150 + 6 45.695 45.589 -118.841 -122.597 45.695 -118.841 + 45.619 -121.167 45.589 -122.597 + 6 45.619 42.161 -120.399 -121.167 45.619 -121.167 + 44.254 -121.150 42.161 -120.399 + 6 44.254 43.564 -116.223 -121.150 44.254 -121.150 + 43.592 -118.955 43.564 -116.223 + 6 42.372 42.156 -120.399 -122.873 42.372 -122.873 + 42.156 -121.733 42.161 -120.399 + 4 45.589 44.254 -121.150 -122.597 44.254 -121.150 + 45.589 -122.597 + 6 45.589 42.372 -122.597 -123.219 45.589 -122.597 + 44.123 -123.219 42.372 -122.873 + 4 46.158 45.589 -122.597 -123.879 45.589 -122.597 + 46.158 -123.879 + 6 46.158 40.978 -123.879 -124.246 46.158 -123.879 + 43.417 -124.246 40.978 -124.109 + 4 42.372 40.978 -122.873 -124.109 40.978 -124.109 + 42.372 -122.873 + 6 43.592 39.499 -118.955 -120.399 43.592 -118.955 + 42.161 -120.399 39.499 -119.768 + 4 42.372 42.156 -121.733 -122.873 42.372 -122.873 + 42.156 -121.733 + 6 41.594 40.788 -109.065 -112.012 40.788 -111.978 + 41.196 -112.012 41.594 -109.065 + 6 40.788 39.123 -108.527 -111.978 40.788 -111.978 + 40.216 -111.721 39.123 -108.527 + 8 40.788 36.081 -111.978 -115.152 40.788 -111.978 + 38.427 -113.013 37.701 -113.099 36.081 -115.152 + 6 40.825 40.718 -111.978 -115.792 40.788 -111.978 + 40.718 -114.033 40.825 -115.792 + 4 42.542 40.788 -111.978 -113.772 40.788 -111.978 + 42.542 -113.772 + 6 42.911 40.788 -111.978 -112.596 40.788 -111.978 + 42.167 -112.297 42.911 -112.596 + 6 39.123 36.081 -108.527 -115.152 36.081 -115.152 + 37.706 -112.146 39.123 -108.527 + 6 36.742 33.436 -108.230 -112.009 33.436 -112.009 + 35.022 -110.722 36.742 -108.230 + 6 37.706 34.652 -112.146 -112.421 34.652 -112.421 + 35.952 -112.147 37.706 -112.146 + 8 35.511 34.652 -108.789 -112.421 34.652 -112.421 + 35.138 -111.671 35.022 -110.722 35.511 -108.789 + 6 33.436 31.469 -109.604 -112.009 33.436 -112.009 + 32.116 -110.941 31.469 -109.604 + 6 36.081 33.436 -112.009 -115.152 33.436 -112.009 + 34.652 -112.421 36.081 -115.152 + 4 36.081 34.766 -114.623 -115.152 36.081 -115.152 + 34.766 -114.623 + 6 36.742 35.952 -108.230 -115.152 36.081 -115.152 + 35.952 -112.147 36.742 -108.230 + 4 35.138 33.436 -111.671 -112.009 33.436 -112.009 + 35.138 -111.671 + 4 32.888 32.116 -110.941 -112.720 32.116 -110.941 + 32.888 -112.720 + 4 39.499 37.373 -118.364 -119.768 39.499 -119.768 + 37.373 -118.364 + 4 43.564 39.499 -116.223 -119.768 39.499 -119.768 + 43.564 -116.223 + 6 40.825 39.499 -115.792 -119.768 39.499 -119.768 + 40.066 -118.565 40.825 -115.792 + 6 39.499 36.081 -115.152 -119.768 39.499 -119.768 + 38.060 -117.087 36.081 -115.152 + 6 40.825 36.081 -114.842 -115.792 36.081 -115.152 + 39.300 -114.842 40.825 -115.792 + 4 42.372 40.509 -122.293 -122.873 40.509 -122.293 + 42.372 -122.873 + 4 42.156 40.509 -121.733 -122.293 40.509 -122.293 + 42.156 -121.733 + 4 40.509 39.499 -119.768 -122.293 40.509 -122.293 + 39.499 -119.768 + 4 40.509 37.721 -122.221 -122.293 40.509 -122.293 + 37.721 -122.221 + 4 40.978 40.509 -122.293 -124.109 40.509 -122.293 + 40.978 -124.109 + 4 37.721 37.619 -122.221 -122.375 37.619 -122.375 + 37.721 -122.221 + 6 39.499 37.721 -119.768 -122.221 37.721 -122.221 + 38.513 -121.493 39.499 -119.768 + 4 38.060 37.721 -117.087 -122.221 37.721 -122.221 + 38.060 -117.087 + 4 40.978 37.721 -122.221 -124.109 37.721 -122.221 + 40.978 -124.109 + 4 37.362 35.434 -119.057 -121.929 37.362 -121.929 + 35.434 -119.057 + 4 37.362 34.426 -119.840 -121.929 37.362 -121.929 + 34.426 -119.840 + 6 37.894 35.434 -119.057 -121.238 37.894 -121.238 + 36.776 -119.718 35.434 -119.057 + 6 40.509 37.894 -121.238 -122.293 40.509 -122.293 + 38.513 -121.493 37.894 -121.238 + 4 34.766 33.436 -112.009 -114.623 33.436 -112.009 + 34.766 -114.623 + 42 34.192 33.693 -118.158 -118.658 33.943 -118.158 + 34.020 -118.170 34.089 -118.206 34.145 -118.261 34.180 -118.331 + 34.192 -118.408 34.180 -118.485 34.145 -118.555 34.089 -118.610 + 34.020 -118.646 33.943 -118.658 33.865 -118.646 33.796 -118.610 + 33.740 -118.555 33.705 -118.485 33.693 -118.408 33.705 -118.331 + 33.740 -118.261 33.796 -118.206 33.865 -118.170 33.943 -118.158 + 6 37.373 34.629 -117.829 -118.364 34.629 -118.084 + 35.659 -117.829 37.373 -118.364 + 6 36.081 34.741 -115.152 -118.219 34.741 -118.219 + 34.854 -116.787 36.081 -115.152 + 6 34.426 34.016 -118.451 -119.840 34.016 -118.451 + 34.201 -119.207 34.426 -119.840 + 42 34.192 33.693 -118.158 -118.658 33.943 -118.158 + 34.020 -118.170 34.089 -118.206 34.145 -118.261 34.180 -118.331 + 34.192 -118.408 34.180 -118.485 34.145 -118.555 34.089 -118.610 + 34.020 -118.646 33.943 -118.658 33.865 -118.646 33.796 -118.610 + 33.740 -118.555 33.705 -118.485 33.693 -118.408 33.705 -118.331 + 33.740 -118.261 33.796 -118.206 33.865 -118.170 33.943 -118.158 + 4 33.676 32.734 -117.190 -117.868 33.676 -117.868 + 32.734 -117.190 diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascwrzones/ascwrzones.dbf b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascwrzones/ascwrzones.dbf new file mode 100644 index 0000000000..1b569b9862 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascwrzones/ascwrzones.dbf differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascwrzones/ascwrzones.prj b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascwrzones/ascwrzones.prj new file mode 100644 index 0000000000..a7ee8d00be --- /dev/null +++ b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascwrzones/ascwrzones.prj @@ -0,0 +1 @@ +GEOGCS["WGS84(DD)", DATUM["WGS84", SPHEROID["WGS84", 6378137.0, 298.257223563]], PRIMEM["Greenwich", 0.0], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH]] \ No newline at end of file diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascwrzones/ascwrzones.shp b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascwrzones/ascwrzones.shp new file mode 100644 index 0000000000..c45735f75a Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascwrzones/ascwrzones.shp differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascwrzones/ascwrzones.shx b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascwrzones/ascwrzones.shx new file mode 100644 index 0000000000..fe27abaafd Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascwrzones/ascwrzones.shx differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascwrzones/ascwrzones.tbl b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascwrzones/ascwrzones.tbl new file mode 100644 index 0000000000..dfb4826b2e --- /dev/null +++ b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ascwrzones/ascwrzones.tbl @@ -0,0 +1,300 @@ + 22 37.000 34.167 -109.033 -112.167 37.000 -112.167 + 36.500 -112.000 36.000 -111.667 35.417 -111.500 35.250 -111.500 + 35.000 -111.333 34.667 -111.167 34.500 -111.000 34.333 -110.500 + 34.333 -110.250 34.167 -109.033 + 18 37.000 31.533 -109.033 -114.033 36.167 -114.033 + 35.000 -113.300 33.333 -113.333 33.000 -112.833 32.667 -112.167 + 32.583 -111.583 32.167 -111.500 32.000 -111.500 31.533 -111.633 + 32 37.000 31.350 -109.033 -114.150 34.283 -114.150 + 34.283 -113.000 34.167 -112.667 34.083 -112.250 33.833 -112.000 + 33.667 -111.667 33.417 -111.500 33.333 -111.000 33.000 -111.250 + 32.583 -111.583 33.000 -111.250 32.833 -111.000 32.500 -111.000 + 32.333 -110.833 31.750 -111.083 31.350 -110.917 + 30 37.000 31.350 -109.033 -114.150 35.417 -111.500 + 35.417 -112.000 35.333 -112.167 35.167 -112.333 34.967 -112.367 + 35.000 -113.300 34.967 -112.367 34.917 -111.750 34.833 -111.667 + 34.750 -111.583 34.550 -111.583 34.500 -111.667 34.417 -111.667 + 34.133 -110.200 34.333 -110.250 + 14 37.000 31.350 -109.033 -114.150 34.133 -110.200 + 34.000 -110.167 33.833 -110.000 33.583 -109.750 33.500 -109.617 + 33.300 -109.617 33.300 -109.033 + 8 37.000 31.350 -109.033 -114.150 33.333 -111.000 + 33.300 -110.750 33.417 -110.417 33.583 -109.750 + 8 42.000 31.350 -109.033 -114.150 42.000 -112.083 + 41.583 -111.917 41.583 -111.750 42.000 -111.750 + 44 42.000 31.350 -109.033 -114.150 41.000 -114.033 + 41.333 -113.667 41.417 -113.500 41.750 -113.500 41.833 -113.000 + 41.667 -112.333 41.417 -112.083 41.167 -112.000 40.917 -111.833 + 40.500 -111.833 40.000 -111.333 39.833 -111.500 39.833 -111.750 + 39.500 -111.833 39.500 -112.000 39.833 -112.167 40.000 -112.333 + 40.000 -112.667 40.833 -112.583 41.167 -112.250 41.333 -112.333 + 41.667 -112.333 + 18 42.000 31.350 -109.033 -114.150 40.500 -109.050 + 40.500 -110.000 40.417 -110.667 40.333 -110.833 40.300 -110.917 + 40.200 -110.917 40.167 -110.833 40.000 -110.000 39.833 -109.050 + 26 42.000 31.350 -109.033 -114.150 39.583 -114.033 + 39.583 -112.667 39.533 -112.333 39.333 -112.333 39.167 -112.167 + 39.000 -112.167 38.833 -112.500 38.667 -112.667 38.500 -112.667 + 38.333 -112.500 37.667 -113.167 37.633 -113.333 37.633 -114.033 + 30 42.000 31.350 -109.033 -114.150 39.533 -112.333 + 39.500 -112.000 39.500 -111.667 39.550 -111.500 39.500 -111.417 + 39.083 -111.667 38.333 -112.083 38.033 -112.083 38.033 -112.250 + 38.167 -112.250 39.083 -111.917 39.500 -111.667 39.550 -111.500 + 39.500 -111.417 39.417 -111.083 + 8 42.000 31.350 -109.033 -114.150 39.333 -109.050 + 39.083 -109.667 39.167 -110.333 39.000 -111.167 + 20 42.000 31.350 -109.033 -114.150 39.167 -110.333 + 39.667 -110.333 39.667 -110.667 39.500 -111.000 39.417 -111.083 + 39.000 -111.167 38.500 -111.250 38.083 -111.250 37.833 -111.833 + 37.000 -112.667 + 16 42.000 31.350 -109.033 -114.150 37.000 -113.833 + 37.167 -113.917 37.333 -113.917 37.333 -113.667 37.417 -113.417 + 37.333 -113.333 37.167 -113.333 37.000 -113.417 + 16 42.000 31.350 -109.033 -114.150 38.250 -110.667 + 38.167 -110.667 38.083 -110.500 37.917 -110.500 37.833 -110.667 + 38.083 -110.833 38.250 -110.833 38.250 -110.667 + 14 42.000 31.350 -109.033 -114.150 38.667 -109.050 + 38.750 -109.167 38.750 -109.333 38.583 -109.417 38.333 -109.417 + 38.333 -109.250 38.500 -109.050 + 16 42.000 31.350 -109.033 -114.150 38.083 -109.500 + 38.000 -109.333 37.750 -109.500 37.750 -109.833 37.833 -109.917 + 38.000 -109.833 38.083 -109.667 38.083 -109.500 + 50 42.000 31.350 -109.033 -120.000 42.000 -117.000 + 40.633 -117.000 40.633 -117.250 40.533 -117.333 40.667 -117.500 + 40.667 -117.667 40.867 -117.667 40.867 -118.750 40.950 -118.750 + 40.950 -119.333 40.833 -119.333 40.667 -119.667 40.333 -119.833 + 40.333 -120.000 40.333 -119.833 40.000 -119.833 39.583 -119.417 + 39.083 -119.333 38.833 -119.333 38.833 -118.833 38.500 -118.833 + 38.417 -118.750 38.417 -118.250 38.083 -118.250 37.900 -118.433 + 30 42.000 31.350 -109.033 -120.000 40.133 -114.033 + 40.133 -117.000 40.633 -117.000 40.133 -117.000 40.083 -117.533 + 40.000 -117.583 39.667 -117.500 39.083 -117.833 38.467 -117.750 + 38.083 -118.250 38.467 -117.750 38.667 -115.000 38.667 -114.033 + 37.000 -114.033 37.000 -117.217 + 36 42.000 31.350 -109.033 -123.667 42.000 -123.500 + 41.967 -123.667 41.383 -123.650 41.383 -123.483 41.183 -123.383 + 40.917 -123.583 39.983 -123.533 39.983 -122.933 39.800 -122.933 + 39.617 -122.883 39.617 -122.750 39.300 -122.750 39.217 -122.500 + 38.933 -122.367 38.867 -122.400 38.683 -122.667 38.867 -122.850 + 38.800 -123.383 + 18 42.000 31.350 -109.033 -123.667 42.000 -121.400 + 41.200 -121.400 41.200 -121.300 40.467 -121.300 40.467 -121.017 + 40.250 -121.017 40.250 -120.500 39.717 -120.167 39.717 -120.000 + 32 42.000 31.350 -109.033 -123.667 39.983 -122.933 + 40.317 -123.050 41.000 -122.167 41.000 -121.833 40.467 -121.750 + 40.467 -121.300 40.467 -121.750 39.000 -121.583 39.000 -121.100 + 38.733 -121.100 38.317 -121.000 38.083 -120.950 37.650 -120.417 + 37.200 -120.033 36.667 -119.000 35.000 -118.417 + 36 42.000 31.350 -109.033 -123.667 38.867 -122.400 + 38.533 -122.083 38.333 -122.067 38.083 -121.883 37.533 -121.567 + 37.483 -121.450 37.283 -121.483 37.167 -121.417 37.150 -121.250 + 36.967 -121.250 36.833 -121.133 36.750 -120.917 36.483 -120.583 + 36.283 -120.667 35.817 -120.200 35.633 -120.200 35.100 -119.550 + 34.917 -119.467 + 20 42.000 31.350 -109.033 -123.667 38.683 -119.567 + 38.500 -119.500 38.350 -119.617 38.250 -119.617 37.650 -120.417 + 38.083 -120.950 38.317 -121.000 38.283 -121.433 38.150 -121.550 + 38.083 -121.883 + 8 42.000 31.350 -109.033 -123.667 36.967 -121.250 + 36.917 -121.583 36.917 -121.850 34.750 -120.000 + 30 42.000 31.350 -109.033 -123.667 37.467 -117.900 + 37.467 -118.667 36.750 -118.250 35.833 -117.967 35.667 -118.000 + 35.667 -118.167 35.000 -118.417 35.000 -119.000 34.917 -118.833 + 34.917 -119.467 34.750 -120.000 34.667 -120.167 34.583 -120.250 + 34.583 -120.333 34.467 -120.500 + 38 42.000 31.350 -109.033 -123.667 37.467 -118.250 + 36.750 -117.917 35.917 -117.750 35.833 -117.967 35.667 -118.000 + 35.333 -118.000 35.000 -118.083 34.833 -118.583 34.750 -118.583 + 34.667 -118.000 34.500 -117.500 34.333 -117.000 34.000 -116.500 + 33.750 -116.000 33.750 -115.333 34.000 -115.000 34.333 -114.583 + 34.667 -114.750 35.000 -114.667 + 24 42.000 31.350 -109.033 -123.667 33.750 -116.000 + 33.917 -116.500 34.000 -116.667 34.167 -117.000 33.917 -117.000 + 33.500 -116.500 33.333 -116.250 33.417 -116.750 33.000 -116.500 + 32.833 -116.417 32.667 -116.583 32.600 -116.417 + 14 42.000 31.350 -109.033 -123.667 34.667 -120.167 + 34.583 -119.417 34.633 -119.000 34.500 -118.500 34.333 -118.000 + 34.250 -117.333 32.567 -116.667 + 32 42.000 31.350 -109.033 -123.667 34.583 -120.250 + 34.500 -119.417 34.083 -118.917 34.633 -119.000 34.083 -118.917 + 34.167 -118.583 34.500 -118.500 34.167 -118.583 34.167 -118.333 + 33.750 -118.333 33.917 -117.917 33.667 -117.667 33.500 -117.667 + 33.583 -117.667 33.333 -117.333 32.550 -117.000 + 20 42.000 31.350 -109.033 -123.667 34.333 -118.000 + 34.083 -117.750 33.917 -117.917 34.083 -117.750 33.833 -117.333 + 33.583 -117.417 33.667 -117.667 33.583 -117.417 33.417 -117.167 + 32.550 -116.833 + 58 46.150 31.350 -109.033 -124.333 46.150 -123.333 + 45.667 -123.333 45.667 -123.417 45.583 -123.333 45.500 -123.417 + 45.000 -123.417 45.000 -124.000 45.000 -123.417 44.750 -123.417 + 44.750 -123.583 44.417 -123.583 44.417 -123.667 43.917 -123.750 + 43.667 -123.583 43.500 -123.583 43.333 -123.667 43.333 -124.333 + 43.333 -123.667 43.167 -123.667 43.167 -123.750 43.000 -123.750 + 43.000 -123.833 42.800 -123.833 42.750 -123.750 42.500 -123.867 + 42.500 -124.000 42.333 -124.083 42.333 -123.833 42.000 -123.833 + 52 46.150 31.350 -109.033 -124.333 43.917 -123.750 + 43.917 -123.667 43.750 -123.167 43.533 -123.167 43.533 -122.750 + 43.450 -122.750 43.450 -122.500 42.000 -122.500 43.500 -122.500 + 44.917 -122.250 45.617 -122.250 45.583 -121.917 45.567 -121.417 + 45.550 -120.917 45.567 -121.417 45.500 -121.417 45.500 -121.500 + 43.617 -121.500 43.617 -119.883 43.617 -122.000 43.450 -122.167 + 43.450 -122.500 43.450 -122.167 43.333 -122.000 43.083 -122.050 + 42.000 -122.050 + 24 46.150 31.350 -109.033 -124.333 45.750 -120.650 + 45.550 -120.917 45.500 -120.833 45.250 -121.000 45.200 -120.750 + 45.083 -120.667 45.083 -119.750 45.000 -119.750 45.000 -119.167 + 45.167 -119.167 45.667 -118.333 46.000 -118.333 + 30 46.150 31.350 -109.033 -124.333 45.083 -120.500 + 44.833 -120.333 44.467 -120.333 44.467 -120.000 44.417 -120.000 + 44.383 -119.833 44.300 -119.833 44.300 -119.667 43.967 -119.667 + 43.967 -119.750 43.667 -119.750 43.667 -119.883 42.750 -119.883 + 42.750 -119.333 42.000 -119.333 + 18 46.150 31.350 -109.033 -124.333 43.967 -119.667 + 43.967 -118.833 44.033 -118.833 44.033 -118.250 44.250 -118.250 + 44.450 -118.000 44.450 -117.550 44.300 -117.467 44.300 -117.250 + 24 48.000 31.350 -109.033 -124.333 48.000 -123.167 + 47.933 -123.000 47.867 -123.000 47.583 -123.333 47.250 -123.500 + 47.133 -123.750 46.250 -123.833 47.133 -123.750 47.250 -123.833 + 47.917 -124.167 48.000 -123.833 48.000 -123.167 + 20 48.000 31.350 -109.033 -124.333 47.500 -120.667 + 47.417 -120.333 47.000 -119.833 46.833 -119.833 46.667 -120.000 + 46.667 -120.333 47.083 -120.917 47.167 -121.000 47.333 -121.000 + 47.500 -120.667 + 18 48.000 31.350 -109.033 -124.333 46.000 -119.000 + 46.167 -118.833 46.333 -118.833 46.500 -119.000 46.500 -119.333 + 46.333 -119.500 46.167 -119.500 46.000 -119.333 45.950 -119.250 + 18 49.000 31.350 -109.033 -124.333 49.000 -122.000 + 48.500 -121.833 47.833 -121.583 47.500 -121.583 47.167 -121.667 + 46.917 -121.800 46.367 -122.167 46.000 -122.167 45.667 -121.917 + 14 49.000 31.350 -109.033 -124.333 49.000 -119.000 + 48.167 -118.833 47.833 -118.500 47.717 -118.333 47.667 -117.833 + 47.667 -117.033 47.250 -123.833 + 6 49.000 31.350 -109.033 -124.333 48.333 -124.000 + 48.167 -124.000 48.000 -123.833 + 8 49.000 31.350 -109.033 -124.333 48.500 -121.833 + 48.333 -122.000 47.867 -122.917 47.867 -123.000 + 8 49.000 31.350 -109.033 -124.333 46.917 -121.800 + 47.000 -122.667 47.083 -123.083 47.250 -123.500 + 10 49.000 31.350 -109.033 -124.333 47.667 -117.500 + 47.250 -117.833 46.750 -118.250 46.333 -118.333 46.000 -118.167 + 6 49.000 31.350 -109.033 -124.333 47.717 -118.333 + 47.667 -119.333 47.417 -120.333 + 6 49.000 31.350 -109.033 -124.333 49.000 -119.500 + 48.167 -120.333 47.500 -120.667 + 14 49.000 31.350 -109.033 -124.333 47.083 -120.917 + 47.000 -121.167 46.500 -121.167 46.167 -120.667 46.000 -120.667 + 45.833 -121.500 45.717 -121.583 + 10 49.000 31.350 -109.033 -124.333 47.167 -117.033 + 47.050 -116.283 47.000 -116.000 47.000 -115.500 47.100 -115.250 + 14 49.000 31.350 -109.033 -124.333 47.050 -116.283 + 47.000 -116.283 46.917 -116.167 46.333 -115.667 46.000 -115.500 + 45.667 -115.500 45.500 -116.500 + 30 49.000 31.350 -109.033 -124.333 44.300 -117.250 + 44.833 -116.667 44.917 -116.500 44.917 -116.333 44.833 -116.083 + 44.167 -116.083 43.667 -116.000 43.250 -115.500 43.083 -115.083 + 43.083 -114.917 43.500 -114.167 43.667 -113.833 44.000 -113.000 + 44.417 -112.000 44.167 -111.067 + 30 49.000 31.350 -109.033 -124.333 43.683 -117.067 + 43.333 -116.833 42.667 -116.000 42.583 -115.000 42.583 -114.833 + 42.417 -114.333 42.417 -114.000 42.000 -114.000 42.417 -114.000 + 42.417 -113.500 42.667 -113.000 42.833 -112.500 43.500 -112.000 + 43.833 -111.500 44.000 -111.067 + 12 49.000 31.350 -109.033 -124.333 43.250 -115.500 + 43.500 -115.083 43.833 -114.583 44.000 -114.583 44.000 -114.417 + 43.500 -114.167 + 8 49.000 31.350 -109.033 -124.333 43.083 -115.083 + 42.917 -115.167 42.750 -115.167 42.583 -115.000 + 6 49.000 31.350 -109.033 -124.333 43.667 -113.833 + 43.250 -113.500 42.417 -113.500 + 30 49.000 31.350 -109.033 -124.333 45.583 -114.667 + 45.500 -114.750 45.500 -114.833 45.417 -114.833 45.333 -114.583 + 44.833 -114.800 44.667 -115.000 44.750 -115.083 44.667 -115.167 + 44.667 -115.333 44.600 -115.300 44.333 -115.333 44.000 -115.000 + 43.667 -115.083 43.500 -115.083 + 32 49.000 31.350 -109.033 -124.333 49.000 -114.050 + 48.000 -113.000 47.583 -113.100 47.500 -113.050 47.617 -112.833 + 47.500 -112.000 47.167 -112.000 47.000 -111.833 47.000 -111.000 + 46.833 -110.667 46.667 -110.300 46.167 -110.300 46.167 -110.800 + 45.583 -110.800 45.333 -111.067 45.000 -111.067 + 22 49.000 31.350 -109.033 -124.333 47.500 -115.667 + 47.117 -114.417 47.117 -114.000 47.583 -114.000 47.583 -113.100 + 47.500 -113.050 46.417 -112.300 46.250 -112.583 46.250 -113.250 + 45.917 -113.500 45.667 -114.000 + 18 49.000 31.350 -109.033 -124.333 49.000 -111.250 + 48.250 -111.250 48.250 -111.417 47.700 -111.417 47.700 -111.000 + 47.417 -110.633 47.333 -110.750 47.083 -110.750 46.833 -110.667 + 16 49.000 31.350 -107.233 -124.333 49.000 -107.233 + 47.700 -107.417 47.583 -108.000 47.583 -108.333 47.750 -108.833 + 47.750 -109.500 47.417 -110.167 47.417 -110.633 + 20 49.000 31.350 -106.250 -124.333 47.583 -108.000 + 46.867 -108.000 46.417 -107.833 46.000 -107.500 45.917 -107.000 + 45.667 -107.000 45.667 -106.750 45.167 -106.750 45.167 -106.250 + 45.000 -106.250 + 26 49.000 31.350 -104.017 -124.333 46.250 -110.300 + 46.250 -109.667 46.133 -109.667 46.133 -108.833 46.417 -107.833 + 46.867 -108.000 46.867 -106.117 47.167 -106.083 47.167 -105.333 + 46.917 -105.000 46.917 -104.583 46.750 -104.583 46.500 -104.017 + 44 49.000 31.350 -104.017 -124.333 37.000 -109.033 + 31.350 -109.033 31.350 -111.050 31.450 -111.383 31.533 -111.633 + 32.050 -113.317 32.500 -114.833 32.750 -114.700 32.733 -114.500 + 33.033 -114.500 33.033 -114.683 33.400 -114.683 33.450 -114.583 + 34.100 -114.417 34.283 -114.150 34.317 -114.083 35.000 -114.667 + 36.000 -114.700 36.167 -114.700 36.167 -114.033 37.000 -114.033 + 37.000 -109.033 + 14 49.000 31.350 -104.017 -124.333 42.000 -111.033 + 41.000 -111.033 41.000 -109.050 37.000 -109.050 37.000 -114.033 + 42.000 -114.033 42.000 -111.033 + 34 49.000 31.350 -104.017 -124.333 42.000 -114.033 + 36.167 -114.033 36.167 -114.700 36.000 -114.700 35.000 -114.667 + 35.833 -115.667 36.000 -115.917 37.000 -117.217 37.467 -117.900 + 37.900 -118.433 38.417 -119.200 38.567 -119.383 38.683 -119.567 + 38.917 -119.900 39.000 -120.000 42.000 -120.000 42.000 -114.033 + 110 49.000 31.350 -104.017 -124.400 42.000 -124.183 + 42.000 -120.000 39.000 -120.000 38.917 -119.900 38.683 -119.567 + 38.567 -119.383 38.417 -119.200 37.900 -118.433 37.467 -117.900 + 37.000 -117.217 36.000 -115.917 35.833 -115.667 35.000 -114.667 + 34.317 -114.083 34.283 -114.150 34.100 -114.417 33.450 -114.583 + 33.400 -114.683 33.033 -114.683 33.033 -114.500 32.733 -114.500 + 32.750 -114.700 32.633 -116.100 32.600 -116.417 32.567 -116.667 + 32.550 -116.833 32.550 -117.117 32.583 -118.000 32.667 -119.000 + 33.500 -120.000 34.000 -120.500 34.467 -120.500 34.583 -120.650 + 34.967 -120.650 35.000 -120.667 35.667 -121.267 35.817 -121.333 + 36.333 -121.867 36.617 -121.917 36.917 -121.850 36.983 -121.917 + 36.967 -122.150 37.117 -122.333 37.233 -122.417 37.717 -122.500 + 37.833 -122.583 38.333 -122.917 38.333 -123.083 38.800 -123.383 + 38.950 -123.750 40.283 -124.367 40.467 -124.400 41.467 -124.033 + 41.783 -124.250 42.000 -124.183 + 90 49.000 31.350 -104.017 -124.583 46.000 -116.917 + 45.850 -116.783 45.617 -116.500 45.533 -116.467 45.267 -116.733 + 45.083 -116.750 44.850 -116.933 44.500 -117.167 44.300 -117.250 + 44.000 -117.333 43.917 -117.333 43.683 -117.067 42.000 -117.067 + 42.000 -124.333 42.967 -124.583 43.333 -124.333 43.617 -124.217 + 43.867 -124.167 44.283 -124.100 45.033 -124.000 45.767 -123.983 + 46.250 -124.000 46.250 -123.500 46.150 -123.333 46.167 -123.200 + 46.167 -123.150 46.000 -122.867 45.917 -122.867 45.917 -122.750 + 46.000 -122.750 46.000 -122.333 46.067 -122.250 45.617 -122.250 + 45.667 -121.917 45.717 -121.583 45.733 -121.500 45.700 -121.417 + 45.650 -120.917 45.750 -120.650 45.833 -120.000 45.850 -119.883 + 45.917 -119.417 45.950 -119.250 46.000 -119.000 46.000 -116.917 + 88 49.000 31.350 -104.017 -124.750 49.000 -117.033 + 46.550 -117.033 46.433 -117.050 46.000 -116.917 46.000 -119.000 + 45.950 -119.250 45.917 -119.417 45.850 -119.883 45.833 -120.000 + 45.750 -120.650 45.650 -120.917 45.700 -121.417 45.733 -121.500 + 45.717 -121.583 45.667 -121.917 45.617 -122.250 46.067 -122.250 + 46.000 -122.333 46.000 -122.750 45.917 -122.750 45.917 -122.867 + 46.000 -122.867 46.167 -123.150 46.167 -123.200 46.150 -123.333 + 46.250 -123.500 46.250 -124.083 46.800 -124.083 47.167 -124.200 + 47.517 -124.333 47.883 -124.583 48.000 -124.667 48.500 -124.750 + 48.500 -124.500 48.333 -124.000 48.250 -123.500 48.417 -123.167 + 48.500 -123.250 48.667 -123.250 48.750 -123.167 48.750 -123.000 + 48.833 -123.000 49.000 -123.167 49.000 -117.033 + 74 49.000 31.350 -104.017 -124.750 49.000 -116.033 + 48.000 -116.033 47.717 -115.667 47.500 -115.667 47.433 -115.733 + 46.933 -115.000 46.750 -114.667 46.633 -114.600 46.667 -114.333 + 46.033 -114.500 45.750 -114.583 45.583 -114.667 45.667 -114.000 + 44.500 -113.000 44.450 -112.833 44.550 -111.600 44.750 -111.383 + 44.750 -111.333 44.500 -111.067 42.000 -111.067 42.000 -117.067 + 43.683 -117.067 43.917 -117.333 44.000 -117.333 44.300 -117.250 + 44.500 -117.167 44.850 -116.933 45.083 -116.750 45.267 -116.733 + 45.533 -116.467 45.617 -116.500 45.850 -116.783 46.000 -116.917 + 46.433 -117.050 46.550 -117.033 49.000 -117.033 49.000 -116.033 diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Atlbasin/atl_basin.dbf b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Atlbasin/atl_basin.dbf new file mode 100644 index 0000000000..0882a226ea Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Atlbasin/atl_basin.dbf differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Atlbasin/atl_basin.fix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Atlbasin/atl_basin.fix new file mode 100644 index 0000000000..52c6bac185 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Atlbasin/atl_basin.fix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Atlbasin/atl_basin.prj b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Atlbasin/atl_basin.prj new file mode 100644 index 0000000000..a7ee8d00be --- /dev/null +++ b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Atlbasin/atl_basin.prj @@ -0,0 +1 @@ +GEOGCS["WGS84(DD)", DATUM["WGS84", SPHEROID["WGS84", 6378137.0, 298.257223563]], PRIMEM["Greenwich", 0.0], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH]] \ No newline at end of file diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Atlbasin/atl_basin.qix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Atlbasin/atl_basin.qix new file mode 100644 index 0000000000..e68454c9d4 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Atlbasin/atl_basin.qix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Atlbasin/atl_basin.shp b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Atlbasin/atl_basin.shp new file mode 100644 index 0000000000..39706ff259 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Atlbasin/atl_basin.shp differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Atlbasin/atl_basin.shx b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Atlbasin/atl_basin.shx new file mode 100644 index 0000000000..fb3edb49c5 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Atlbasin/atl_basin.shx differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Awcartcc/artccbnds.dbf b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Awcartcc/artccbnds.dbf new file mode 100644 index 0000000000..87857ec051 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Awcartcc/artccbnds.dbf differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Awcartcc/artccbnds.fix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Awcartcc/artccbnds.fix new file mode 100644 index 0000000000..e7258ec208 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Awcartcc/artccbnds.fix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Awcartcc/artccbnds.prj b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Awcartcc/artccbnds.prj new file mode 100644 index 0000000000..a7ee8d00be --- /dev/null +++ b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Awcartcc/artccbnds.prj @@ -0,0 +1 @@ +GEOGCS["WGS84(DD)", DATUM["WGS84", SPHEROID["WGS84", 6378137.0, 298.257223563]], PRIMEM["Greenwich", 0.0], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH]] \ No newline at end of file diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Awcartcc/artccbnds.qix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Awcartcc/artccbnds.qix new file mode 100644 index 0000000000..5ad4afb81a Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Awcartcc/artccbnds.qix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Awcartcc/artccbnds.shp b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Awcartcc/artccbnds.shp new file mode 100644 index 0000000000..787cd19d5d Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Awcartcc/artccbnds.shp differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Awcartcc/artccbnds.shx b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Awcartcc/artccbnds.shx new file mode 100644 index 0000000000..bc7ffcb20a Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Awcartcc/artccbnds.shx differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Awcccfcan/ccf_can.dbf b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Awcccfcan/ccf_can.dbf new file mode 100644 index 0000000000..9e72da7c43 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Awcccfcan/ccf_can.dbf differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Awcccfcan/ccf_can.fix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Awcccfcan/ccf_can.fix new file mode 100644 index 0000000000..52c6bac185 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Awcccfcan/ccf_can.fix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Awcccfcan/ccf_can.prj b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Awcccfcan/ccf_can.prj new file mode 100644 index 0000000000..a7ee8d00be --- /dev/null +++ b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Awcccfcan/ccf_can.prj @@ -0,0 +1 @@ +GEOGCS["WGS84(DD)", DATUM["WGS84", SPHEROID["WGS84", 6378137.0, 298.257223563]], PRIMEM["Greenwich", 0.0], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH]] \ No newline at end of file diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Awcccfcan/ccf_can.qix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Awcccfcan/ccf_can.qix new file mode 100644 index 0000000000..07c08ea704 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Awcccfcan/ccf_can.qix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Awcccfcan/ccf_can.shp b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Awcccfcan/ccf_can.shp new file mode 100644 index 0000000000..00c6b68675 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Awcccfcan/ccf_can.shp differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Awcccfcan/ccf_can.shx b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Awcccfcan/ccf_can.shx new file mode 100644 index 0000000000..32ae7c700d Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Awcccfcan/ccf_can.shx differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Bwus_bnd/bwus_bnd.dbf b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Bwus_bnd/bwus_bnd.dbf new file mode 100644 index 0000000000..25c08c18e1 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Bwus_bnd/bwus_bnd.dbf differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Bwus_bnd/bwus_bnd.fix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Bwus_bnd/bwus_bnd.fix new file mode 100644 index 0000000000..52c6bac185 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Bwus_bnd/bwus_bnd.fix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Bwus_bnd/bwus_bnd.prj b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Bwus_bnd/bwus_bnd.prj new file mode 100644 index 0000000000..a7ee8d00be --- /dev/null +++ b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Bwus_bnd/bwus_bnd.prj @@ -0,0 +1 @@ +GEOGCS["WGS84(DD)", DATUM["WGS84", SPHEROID["WGS84", 6378137.0, 298.257223563]], PRIMEM["Greenwich", 0.0], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH]] \ No newline at end of file diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Bwus_bnd/bwus_bnd.qix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Bwus_bnd/bwus_bnd.qix new file mode 100644 index 0000000000..2dc3a56248 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Bwus_bnd/bwus_bnd.qix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Bwus_bnd/bwus_bnd.shp b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Bwus_bnd/bwus_bnd.shp new file mode 100644 index 0000000000..065a78bd3e Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Bwus_bnd/bwus_bnd.shp differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Bwus_bnd/bwus_bnd.shx b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Bwus_bnd/bwus_bnd.shx new file mode 100644 index 0000000000..31d47da95b Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Bwus_bnd/bwus_bnd.shx differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Bwus_label/bwus_label.dbf b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Bwus_label/bwus_label.dbf new file mode 100644 index 0000000000..54b63c4a88 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Bwus_label/bwus_label.dbf differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Bwus_label/bwus_label.fix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Bwus_label/bwus_label.fix new file mode 100644 index 0000000000..bb4d942186 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Bwus_label/bwus_label.fix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Bwus_label/bwus_label.prj b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Bwus_label/bwus_label.prj new file mode 100644 index 0000000000..a7ee8d00be --- /dev/null +++ b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Bwus_label/bwus_label.prj @@ -0,0 +1 @@ +GEOGCS["WGS84(DD)", DATUM["WGS84", SPHEROID["WGS84", 6378137.0, 298.257223563]], PRIMEM["Greenwich", 0.0], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH]] \ No newline at end of file diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Bwus_label/bwus_label.qix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Bwus_label/bwus_label.qix new file mode 100644 index 0000000000..b55d5a5033 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Bwus_label/bwus_label.qix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Bwus_label/bwus_label.shp b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Bwus_label/bwus_label.shp new file mode 100644 index 0000000000..8ce986e478 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Bwus_label/bwus_label.shp differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Bwus_label/bwus_label.shx b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Bwus_label/bwus_label.shx new file mode 100644 index 0000000000..367da0d433 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Bwus_label/bwus_label.shx differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Bwx1224/bwx1224.dbf b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Bwx1224/bwx1224.dbf new file mode 100644 index 0000000000..fe22f9e3dd Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Bwx1224/bwx1224.dbf differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Bwx1224/bwx1224.fix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Bwx1224/bwx1224.fix new file mode 100644 index 0000000000..52c6bac185 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Bwx1224/bwx1224.fix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Bwx1224/bwx1224.prj b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Bwx1224/bwx1224.prj new file mode 100644 index 0000000000..a7ee8d00be --- /dev/null +++ b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Bwx1224/bwx1224.prj @@ -0,0 +1 @@ +GEOGCS["WGS84(DD)", DATUM["WGS84", SPHEROID["WGS84", 6378137.0, 298.257223563]], PRIMEM["Greenwich", 0.0], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH]] \ No newline at end of file diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Bwx1224/bwx1224.qix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Bwx1224/bwx1224.qix new file mode 100644 index 0000000000..ea11ee1fb1 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Bwx1224/bwx1224.qix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Bwx1224/bwx1224.shp b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Bwx1224/bwx1224.shp new file mode 100644 index 0000000000..3a0e5b3cb2 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Bwx1224/bwx1224.shp differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Bwx1224/bwx1224.shx b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Bwx1224/bwx1224.shx new file mode 100644 index 0000000000..a4d068fca2 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Bwx1224/bwx1224.shx differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Countybnds/countybnds.dbf b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Countybnds/countybnds.dbf new file mode 100644 index 0000000000..492b875197 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Countybnds/countybnds.dbf differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Countybnds/countybnds.fix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Countybnds/countybnds.fix new file mode 100644 index 0000000000..f9aebd7c5f Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Countybnds/countybnds.fix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Countybnds/countybnds.prj b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Countybnds/countybnds.prj new file mode 100644 index 0000000000..a7ee8d00be --- /dev/null +++ b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Countybnds/countybnds.prj @@ -0,0 +1 @@ +GEOGCS["WGS84(DD)", DATUM["WGS84", SPHEROID["WGS84", 6378137.0, 298.257223563]], PRIMEM["Greenwich", 0.0], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH]] \ No newline at end of file diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Countybnds/countybnds.qix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Countybnds/countybnds.qix new file mode 100644 index 0000000000..debe9416ce Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Countybnds/countybnds.qix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Countybnds/countybnds.shp b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Countybnds/countybnds.shp new file mode 100644 index 0000000000..7ff19e5359 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Countybnds/countybnds.shp differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Countybnds/countybnds.shx b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Countybnds/countybnds.shx new file mode 100644 index 0000000000..f6fb890b7e Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Countybnds/countybnds.shx differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Cpcus_bnd/cpcus_bnd.dbf b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Cpcus_bnd/cpcus_bnd.dbf new file mode 100644 index 0000000000..75234e49ab Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Cpcus_bnd/cpcus_bnd.dbf differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Cpcus_bnd/cpcus_bnd.fix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Cpcus_bnd/cpcus_bnd.fix new file mode 100644 index 0000000000..52c6bac185 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Cpcus_bnd/cpcus_bnd.fix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Cpcus_bnd/cpcus_bnd.prj b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Cpcus_bnd/cpcus_bnd.prj new file mode 100644 index 0000000000..a7ee8d00be --- /dev/null +++ b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Cpcus_bnd/cpcus_bnd.prj @@ -0,0 +1 @@ +GEOGCS["WGS84(DD)", DATUM["WGS84", SPHEROID["WGS84", 6378137.0, 298.257223563]], PRIMEM["Greenwich", 0.0], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH]] \ No newline at end of file diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Cpcus_bnd/cpcus_bnd.qix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Cpcus_bnd/cpcus_bnd.qix new file mode 100644 index 0000000000..404a442bb0 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Cpcus_bnd/cpcus_bnd.qix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Cpcus_bnd/cpcus_bnd.shp b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Cpcus_bnd/cpcus_bnd.shp new file mode 100644 index 0000000000..752ba11454 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Cpcus_bnd/cpcus_bnd.shp differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Cpcus_bnd/cpcus_bnd.shx b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Cpcus_bnd/cpcus_bnd.shx new file mode 100644 index 0000000000..774f5a0777 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Cpcus_bnd/cpcus_bnd.shx differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Cwabnds/cwabnds.dbf b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Cwabnds/cwabnds.dbf new file mode 100644 index 0000000000..b8d0244173 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Cwabnds/cwabnds.dbf differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Cwabnds/cwabnds.fix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Cwabnds/cwabnds.fix new file mode 100644 index 0000000000..0565e7cf03 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Cwabnds/cwabnds.fix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Cwabnds/cwabnds.prj b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Cwabnds/cwabnds.prj new file mode 100644 index 0000000000..a7ee8d00be --- /dev/null +++ b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Cwabnds/cwabnds.prj @@ -0,0 +1 @@ +GEOGCS["WGS84(DD)", DATUM["WGS84", SPHEROID["WGS84", 6378137.0, 298.257223563]], PRIMEM["Greenwich", 0.0], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH]] \ No newline at end of file diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Cwabnds/cwabnds.qix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Cwabnds/cwabnds.qix new file mode 100644 index 0000000000..60a9fd7171 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Cwabnds/cwabnds.qix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Cwabnds/cwabnds.shp b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Cwabnds/cwabnds.shp new file mode 100644 index 0000000000..5d16a8f8d2 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Cwabnds/cwabnds.shp differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Cwabnds/cwabnds.shx b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Cwabnds/cwabnds.shx new file mode 100644 index 0000000000..55afc35e11 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Cwabnds/cwabnds.shx differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Elev_NAM1000/elev_NAM1000.dbf b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Elev_NAM1000/elev_NAM1000.dbf new file mode 100644 index 0000000000..4c41da12ef Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Elev_NAM1000/elev_NAM1000.dbf differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Elev_NAM1000/elev_NAM1000.fix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Elev_NAM1000/elev_NAM1000.fix new file mode 100644 index 0000000000..34d4d01dc2 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Elev_NAM1000/elev_NAM1000.fix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Elev_NAM1000/elev_NAM1000.prj b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Elev_NAM1000/elev_NAM1000.prj new file mode 100644 index 0000000000..a7ee8d00be --- /dev/null +++ b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Elev_NAM1000/elev_NAM1000.prj @@ -0,0 +1 @@ +GEOGCS["WGS84(DD)", DATUM["WGS84", SPHEROID["WGS84", 6378137.0, 298.257223563]], PRIMEM["Greenwich", 0.0], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH]] \ No newline at end of file diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Elev_NAM1000/elev_NAM1000.qix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Elev_NAM1000/elev_NAM1000.qix new file mode 100644 index 0000000000..40a1db0f01 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Elev_NAM1000/elev_NAM1000.qix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Elev_NAM1000/elev_NAM1000.shp b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Elev_NAM1000/elev_NAM1000.shp new file mode 100644 index 0000000000..3d054813a4 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Elev_NAM1000/elev_NAM1000.shp differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Elev_NAM1000/elev_NAM1000.shx b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Elev_NAM1000/elev_NAM1000.shx new file mode 100644 index 0000000000..860265a162 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Elev_NAM1000/elev_NAM1000.shx differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Enh_area/enh_area.dbf b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Enh_area/enh_area.dbf new file mode 100644 index 0000000000..ad0fc1e909 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Enh_area/enh_area.dbf differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Enh_area/enh_area.fix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Enh_area/enh_area.fix new file mode 100644 index 0000000000..52c6bac185 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Enh_area/enh_area.fix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Enh_area/enh_area.prj b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Enh_area/enh_area.prj new file mode 100644 index 0000000000..a7ee8d00be --- /dev/null +++ b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Enh_area/enh_area.prj @@ -0,0 +1 @@ +GEOGCS["WGS84(DD)", DATUM["WGS84", SPHEROID["WGS84", 6378137.0, 298.257223563]], PRIMEM["Greenwich", 0.0], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH]] \ No newline at end of file diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Enh_area/enh_area.qix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Enh_area/enh_area.qix new file mode 100644 index 0000000000..48940d6eba Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Enh_area/enh_area.qix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Enh_area/enh_area.shp b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Enh_area/enh_area.shp new file mode 100644 index 0000000000..21e73c104f Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Enh_area/enh_area.shp differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Enh_area/enh_area.shx b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Enh_area/enh_area.shx new file mode 100644 index 0000000000..b9ede7a272 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Enh_area/enh_area.shx differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/FA_Area/FA_Area.dbf b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/FA_Area/FA_Area.dbf new file mode 100644 index 0000000000..4b16c712d0 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/FA_Area/FA_Area.dbf differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/FA_Area/FA_Area.fix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/FA_Area/FA_Area.fix new file mode 100644 index 0000000000..d26926f84a Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/FA_Area/FA_Area.fix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/FA_Area/FA_Area.prj b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/FA_Area/FA_Area.prj new file mode 100644 index 0000000000..a7ee8d00be --- /dev/null +++ b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/FA_Area/FA_Area.prj @@ -0,0 +1 @@ +GEOGCS["WGS84(DD)", DATUM["WGS84", SPHEROID["WGS84", 6378137.0, 298.257223563]], PRIMEM["Greenwich", 0.0], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH]] \ No newline at end of file diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/FA_Area/FA_Area.qix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/FA_Area/FA_Area.qix new file mode 100644 index 0000000000..543dbab43f Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/FA_Area/FA_Area.qix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/FA_Area/FA_Area.shp b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/FA_Area/FA_Area.shp new file mode 100644 index 0000000000..b6cb43bb71 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/FA_Area/FA_Area.shp differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/FA_Area/FA_Area.shx b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/FA_Area/FA_Area.shx new file mode 100644 index 0000000000..73a288865e Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/FA_Area/FA_Area.shx differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/FA_AreaX/FA_AreaX.dbf b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/FA_AreaX/FA_AreaX.dbf new file mode 100644 index 0000000000..e3769f8d42 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/FA_AreaX/FA_AreaX.dbf differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/FA_AreaX/FA_AreaX.fix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/FA_AreaX/FA_AreaX.fix new file mode 100644 index 0000000000..d26926f84a Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/FA_AreaX/FA_AreaX.fix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/FA_AreaX/FA_AreaX.prj b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/FA_AreaX/FA_AreaX.prj new file mode 100644 index 0000000000..a7ee8d00be --- /dev/null +++ b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/FA_AreaX/FA_AreaX.prj @@ -0,0 +1 @@ +GEOGCS["WGS84(DD)", DATUM["WGS84", SPHEROID["WGS84", 6378137.0, 298.257223563]], PRIMEM["Greenwich", 0.0], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH]] \ No newline at end of file diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/FA_AreaX/FA_AreaX.qix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/FA_AreaX/FA_AreaX.qix new file mode 100644 index 0000000000..c7f2286a35 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/FA_AreaX/FA_AreaX.qix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/FA_AreaX/FA_AreaX.shp b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/FA_AreaX/FA_AreaX.shp new file mode 100644 index 0000000000..64d4773c20 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/FA_AreaX/FA_AreaX.shp differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/FA_AreaX/FA_AreaX.shx b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/FA_AreaX/FA_AreaX.shx new file mode 100644 index 0000000000..1d3df8b00e Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/FA_AreaX/FA_AreaX.shx differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/FA_Region/FA_Region.dbf b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/FA_Region/FA_Region.dbf new file mode 100644 index 0000000000..0f3bb6840e Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/FA_Region/FA_Region.dbf differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/FA_Region/FA_Region.fix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/FA_Region/FA_Region.fix new file mode 100644 index 0000000000..36763b4dc6 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/FA_Region/FA_Region.fix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/FA_Region/FA_Region.prj b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/FA_Region/FA_Region.prj new file mode 100644 index 0000000000..a7ee8d00be --- /dev/null +++ b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/FA_Region/FA_Region.prj @@ -0,0 +1 @@ +GEOGCS["WGS84(DD)", DATUM["WGS84", SPHEROID["WGS84", 6378137.0, 298.257223563]], PRIMEM["Greenwich", 0.0], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH]] \ No newline at end of file diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/FA_Region/FA_Region.qix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/FA_Region/FA_Region.qix new file mode 100644 index 0000000000..85abaa2120 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/FA_Region/FA_Region.qix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/FA_Region/FA_Region.shp b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/FA_Region/FA_Region.shp new file mode 100644 index 0000000000..77939eb341 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/FA_Region/FA_Region.shp differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/FA_Region/FA_Region.shx b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/FA_Region/FA_Region.shx new file mode 100644 index 0000000000..f2c86e484e Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/FA_Region/FA_Region.shx differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/FirKzoaAwc/fir_kzoa_awc.dbf b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/FirKzoaAwc/fir_kzoa_awc.dbf new file mode 100644 index 0000000000..94bb755229 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/FirKzoaAwc/fir_kzoa_awc.dbf differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/FirKzoaAwc/fir_kzoa_awc.fix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/FirKzoaAwc/fir_kzoa_awc.fix new file mode 100644 index 0000000000..52c6bac185 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/FirKzoaAwc/fir_kzoa_awc.fix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/FirKzoaAwc/fir_kzoa_awc.prj b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/FirKzoaAwc/fir_kzoa_awc.prj new file mode 100644 index 0000000000..a7ee8d00be --- /dev/null +++ b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/FirKzoaAwc/fir_kzoa_awc.prj @@ -0,0 +1 @@ +GEOGCS["WGS84(DD)", DATUM["WGS84", SPHEROID["WGS84", 6378137.0, 298.257223563]], PRIMEM["Greenwich", 0.0], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH]] \ No newline at end of file diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/FirKzoaAwc/fir_kzoa_awc.qix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/FirKzoaAwc/fir_kzoa_awc.qix new file mode 100644 index 0000000000..2c87f33d8f Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/FirKzoaAwc/fir_kzoa_awc.qix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/FirKzoaAwc/fir_kzoa_awc.shp b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/FirKzoaAwc/fir_kzoa_awc.shp new file mode 100644 index 0000000000..1f01a60f33 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/FirKzoaAwc/fir_kzoa_awc.shp differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/FirKzoaAwc/fir_kzoa_awc.shx b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/FirKzoaAwc/fir_kzoa_awc.shx new file mode 100644 index 0000000000..2534f893d0 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/FirKzoaAwc/fir_kzoa_awc.shx differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Firbnds/firbnds.dbf b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Firbnds/firbnds.dbf new file mode 100644 index 0000000000..c9040491ea Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Firbnds/firbnds.dbf differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Firbnds/firbnds.fix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Firbnds/firbnds.fix new file mode 100644 index 0000000000..d26926f84a Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Firbnds/firbnds.fix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Firbnds/firbnds.prj b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Firbnds/firbnds.prj new file mode 100644 index 0000000000..a7ee8d00be --- /dev/null +++ b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Firbnds/firbnds.prj @@ -0,0 +1 @@ +GEOGCS["WGS84(DD)", DATUM["WGS84", SPHEROID["WGS84", 6378137.0, 298.257223563]], PRIMEM["Greenwich", 0.0], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH]] \ No newline at end of file diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Firbnds/firbnds.qix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Firbnds/firbnds.qix new file mode 100644 index 0000000000..4983361b5c Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Firbnds/firbnds.qix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Firbnds/firbnds.shp b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Firbnds/firbnds.shp new file mode 100644 index 0000000000..c1d706a57e Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Firbnds/firbnds.shp differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Firbnds/firbnds.shx b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Firbnds/firbnds.shx new file mode 100644 index 0000000000..1d7d37ee9c Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Firbnds/firbnds.shx differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/FireWxAOR/cf17jl07.dbf b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/FireWxAOR/cf17jl07.dbf new file mode 100644 index 0000000000..747b1be17f Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/FireWxAOR/cf17jl07.dbf differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/FireWxAOR/cf17jl07.shp b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/FireWxAOR/cf17jl07.shp new file mode 100644 index 0000000000..b704f58ad8 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/FireWxAOR/cf17jl07.shp differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/FireWxAOR/cf17jl07.shx b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/FireWxAOR/cf17jl07.shx new file mode 100644 index 0000000000..3c5c221c11 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/FireWxAOR/cf17jl07.shx differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Firebnds/firebnds.dbf b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Firebnds/firebnds.dbf new file mode 100644 index 0000000000..cfd1d4149e Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Firebnds/firebnds.dbf differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Firebnds/firebnds.fix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Firebnds/firebnds.fix new file mode 100644 index 0000000000..46f0677cc7 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Firebnds/firebnds.fix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Firebnds/firebnds.prj b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Firebnds/firebnds.prj new file mode 100644 index 0000000000..a7ee8d00be --- /dev/null +++ b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Firebnds/firebnds.prj @@ -0,0 +1 @@ +GEOGCS["WGS84(DD)", DATUM["WGS84", SPHEROID["WGS84", 6378137.0, 298.257223563]], PRIMEM["Greenwich", 0.0], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH]] \ No newline at end of file diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Firebnds/firebnds.qix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Firebnds/firebnds.qix new file mode 100644 index 0000000000..f27c5e40f9 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Firebnds/firebnds.qix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Firebnds/firebnds.shp b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Firebnds/firebnds.shp new file mode 100644 index 0000000000..00ce3d7b77 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Firebnds/firebnds.shp differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Firebnds/firebnds.shx b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Firebnds/firebnds.shx new file mode 100644 index 0000000000..bf82739999 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Firebnds/firebnds.shx differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/G2t_atl_bnd/g2t_atl_bnd.dbf b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/G2t_atl_bnd/g2t_atl_bnd.dbf new file mode 100644 index 0000000000..a90890f055 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/G2t_atl_bnd/g2t_atl_bnd.dbf differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/G2t_atl_bnd/g2t_atl_bnd.fix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/G2t_atl_bnd/g2t_atl_bnd.fix new file mode 100644 index 0000000000..752a990c92 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/G2t_atl_bnd/g2t_atl_bnd.fix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/G2t_atl_bnd/g2t_atl_bnd.prj b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/G2t_atl_bnd/g2t_atl_bnd.prj new file mode 100644 index 0000000000..a7ee8d00be --- /dev/null +++ b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/G2t_atl_bnd/g2t_atl_bnd.prj @@ -0,0 +1 @@ +GEOGCS["WGS84(DD)", DATUM["WGS84", SPHEROID["WGS84", 6378137.0, 298.257223563]], PRIMEM["Greenwich", 0.0], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH]] \ No newline at end of file diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/G2t_atl_bnd/g2t_atl_bnd.qix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/G2t_atl_bnd/g2t_atl_bnd.qix new file mode 100644 index 0000000000..598b8c3b7c Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/G2t_atl_bnd/g2t_atl_bnd.qix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/G2t_atl_bnd/g2t_atl_bnd.shp b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/G2t_atl_bnd/g2t_atl_bnd.shp new file mode 100644 index 0000000000..9d32061707 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/G2t_atl_bnd/g2t_atl_bnd.shp differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/G2t_atl_bnd/g2t_atl_bnd.shx b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/G2t_atl_bnd/g2t_atl_bnd.shx new file mode 100644 index 0000000000..567339a98a Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/G2t_atl_bnd/g2t_atl_bnd.shx differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/G2t_nwc/g2t_nwc.dbf b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/G2t_nwc/g2t_nwc.dbf new file mode 100644 index 0000000000..583804c9fe Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/G2t_nwc/g2t_nwc.dbf differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/G2t_nwc/g2t_nwc.fix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/G2t_nwc/g2t_nwc.fix new file mode 100644 index 0000000000..c50232fa28 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/G2t_nwc/g2t_nwc.fix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/G2t_nwc/g2t_nwc.prj b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/G2t_nwc/g2t_nwc.prj new file mode 100644 index 0000000000..a7ee8d00be --- /dev/null +++ b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/G2t_nwc/g2t_nwc.prj @@ -0,0 +1 @@ +GEOGCS["WGS84(DD)", DATUM["WGS84", SPHEROID["WGS84", 6378137.0, 298.257223563]], PRIMEM["Greenwich", 0.0], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH]] \ No newline at end of file diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/G2t_nwc/g2t_nwc.qix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/G2t_nwc/g2t_nwc.qix new file mode 100644 index 0000000000..2becf88ba7 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/G2t_nwc/g2t_nwc.qix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/G2t_nwc/g2t_nwc.shp b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/G2t_nwc/g2t_nwc.shp new file mode 100644 index 0000000000..d9a3fae8b9 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/G2t_nwc/g2t_nwc.shp differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/G2t_nwc/g2t_nwc.shx b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/G2t_nwc/g2t_nwc.shx new file mode 100644 index 0000000000..4015bf4114 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/G2t_nwc/g2t_nwc.shx differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/G2t_pac_bnd/g2t_pac_bnd.dbf b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/G2t_pac_bnd/g2t_pac_bnd.dbf new file mode 100644 index 0000000000..939bfe7a1a Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/G2t_pac_bnd/g2t_pac_bnd.dbf differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/G2t_pac_bnd/g2t_pac_bnd.fix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/G2t_pac_bnd/g2t_pac_bnd.fix new file mode 100644 index 0000000000..9504b07a4a Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/G2t_pac_bnd/g2t_pac_bnd.fix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/G2t_pac_bnd/g2t_pac_bnd.prj b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/G2t_pac_bnd/g2t_pac_bnd.prj new file mode 100644 index 0000000000..a7ee8d00be --- /dev/null +++ b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/G2t_pac_bnd/g2t_pac_bnd.prj @@ -0,0 +1 @@ +GEOGCS["WGS84(DD)", DATUM["WGS84", SPHEROID["WGS84", 6378137.0, 298.257223563]], PRIMEM["Greenwich", 0.0], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH]] \ No newline at end of file diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/G2t_pac_bnd/g2t_pac_bnd.qix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/G2t_pac_bnd/g2t_pac_bnd.qix new file mode 100644 index 0000000000..6a411da51d Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/G2t_pac_bnd/g2t_pac_bnd.qix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/G2t_pac_bnd/g2t_pac_bnd.shp b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/G2t_pac_bnd/g2t_pac_bnd.shp new file mode 100644 index 0000000000..a20774c432 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/G2t_pac_bnd/g2t_pac_bnd.shp differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/G2t_pac_bnd/g2t_pac_bnd.shx b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/G2t_pac_bnd/g2t_pac_bnd.shx new file mode 100644 index 0000000000..e7d1d27725 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/G2t_pac_bnd/g2t_pac_bnd.shx differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/G2t_tpc_bnd/g2t_tpc_bnd.dbf b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/G2t_tpc_bnd/g2t_tpc_bnd.dbf new file mode 100644 index 0000000000..ef1fb62289 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/G2t_tpc_bnd/g2t_tpc_bnd.dbf differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/G2t_tpc_bnd/g2t_tpc_bnd.fix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/G2t_tpc_bnd/g2t_tpc_bnd.fix new file mode 100644 index 0000000000..65b75cc0eb Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/G2t_tpc_bnd/g2t_tpc_bnd.fix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/G2t_tpc_bnd/g2t_tpc_bnd.prj b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/G2t_tpc_bnd/g2t_tpc_bnd.prj new file mode 100644 index 0000000000..a7ee8d00be --- /dev/null +++ b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/G2t_tpc_bnd/g2t_tpc_bnd.prj @@ -0,0 +1 @@ +GEOGCS["WGS84(DD)", DATUM["WGS84", SPHEROID["WGS84", 6378137.0, 298.257223563]], PRIMEM["Greenwich", 0.0], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH]] \ No newline at end of file diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/G2t_tpc_bnd/g2t_tpc_bnd.qix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/G2t_tpc_bnd/g2t_tpc_bnd.qix new file mode 100644 index 0000000000..e980b18b07 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/G2t_tpc_bnd/g2t_tpc_bnd.qix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/G2t_tpc_bnd/g2t_tpc_bnd.shp b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/G2t_tpc_bnd/g2t_tpc_bnd.shp new file mode 100644 index 0000000000..91602fd092 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/G2t_tpc_bnd/g2t_tpc_bnd.shp differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/G2t_tpc_bnd/g2t_tpc_bnd.shx b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/G2t_tpc_bnd/g2t_tpc_bnd.shx new file mode 100644 index 0000000000..852e0c463b Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/G2t_tpc_bnd/g2t_tpc_bnd.shx differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Gfa_conus/gfa_conus.dbf b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Gfa_conus/gfa_conus.dbf new file mode 100644 index 0000000000..7c6a897ce4 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Gfa_conus/gfa_conus.dbf differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Gfa_conus/gfa_conus.fix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Gfa_conus/gfa_conus.fix new file mode 100644 index 0000000000..52c6bac185 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Gfa_conus/gfa_conus.fix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Gfa_conus/gfa_conus.prj b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Gfa_conus/gfa_conus.prj new file mode 100644 index 0000000000..a7ee8d00be --- /dev/null +++ b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Gfa_conus/gfa_conus.prj @@ -0,0 +1 @@ +GEOGCS["WGS84(DD)", DATUM["WGS84", SPHEROID["WGS84", 6378137.0, 298.257223563]], PRIMEM["Greenwich", 0.0], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH]] \ No newline at end of file diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Gfa_conus/gfa_conus.qix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Gfa_conus/gfa_conus.qix new file mode 100644 index 0000000000..d486d274aa Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Gfa_conus/gfa_conus.qix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Gfa_conus/gfa_conus.shp b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Gfa_conus/gfa_conus.shp new file mode 100644 index 0000000000..18c5454c3e Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Gfa_conus/gfa_conus.shp differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Gfa_conus/gfa_conus.shx b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Gfa_conus/gfa_conus.shx new file mode 100644 index 0000000000..eddb27b039 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Gfa_conus/gfa_conus.shx differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Greatlakesbnds/greatlakesbnds.dbf b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Greatlakesbnds/greatlakesbnds.dbf new file mode 100644 index 0000000000..7cee21ee9c Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Greatlakesbnds/greatlakesbnds.dbf differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Greatlakesbnds/greatlakesbnds.fix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Greatlakesbnds/greatlakesbnds.fix new file mode 100644 index 0000000000..7a298fc676 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Greatlakesbnds/greatlakesbnds.fix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Greatlakesbnds/greatlakesbnds.prj b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Greatlakesbnds/greatlakesbnds.prj new file mode 100644 index 0000000000..a7ee8d00be --- /dev/null +++ b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Greatlakesbnds/greatlakesbnds.prj @@ -0,0 +1 @@ +GEOGCS["WGS84(DD)", DATUM["WGS84", SPHEROID["WGS84", 6378137.0, 298.257223563]], PRIMEM["Greenwich", 0.0], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH]] \ No newline at end of file diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Greatlakesbnds/greatlakesbnds.qix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Greatlakesbnds/greatlakesbnds.qix new file mode 100644 index 0000000000..a228fc71e8 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Greatlakesbnds/greatlakesbnds.qix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Greatlakesbnds/greatlakesbnds.shp b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Greatlakesbnds/greatlakesbnds.shp new file mode 100644 index 0000000000..8a43252abf Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Greatlakesbnds/greatlakesbnds.shp differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Greatlakesbnds/greatlakesbnds.shx b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Greatlakesbnds/greatlakesbnds.shx new file mode 100644 index 0000000000..42392d083c Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Greatlakesbnds/greatlakesbnds.shx differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Hcnbnds/hcnbnds.dbf b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Hcnbnds/hcnbnds.dbf new file mode 100644 index 0000000000..74deec7be1 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Hcnbnds/hcnbnds.dbf differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Hcnbnds/hcnbnds.fix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Hcnbnds/hcnbnds.fix new file mode 100644 index 0000000000..52c6bac185 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Hcnbnds/hcnbnds.fix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Hcnbnds/hcnbnds.prj b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Hcnbnds/hcnbnds.prj new file mode 100644 index 0000000000..a7ee8d00be --- /dev/null +++ b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Hcnbnds/hcnbnds.prj @@ -0,0 +1 @@ +GEOGCS["WGS84(DD)", DATUM["WGS84", SPHEROID["WGS84", 6378137.0, 298.257223563]], PRIMEM["Greenwich", 0.0], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH]] \ No newline at end of file diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Hcnbnds/hcnbnds.qix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Hcnbnds/hcnbnds.qix new file mode 100644 index 0000000000..43f618f00d Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Hcnbnds/hcnbnds.qix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Hcnbnds/hcnbnds.shp b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Hcnbnds/hcnbnds.shp new file mode 100644 index 0000000000..702de62731 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Hcnbnds/hcnbnds.shp differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Hcnbnds/hcnbnds.shx b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Hcnbnds/hcnbnds.shx new file mode 100644 index 0000000000..ff9c127d19 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Hcnbnds/hcnbnds.shx differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Hpc050_med/hpc050_med.dbf b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Hpc050_med/hpc050_med.dbf new file mode 100644 index 0000000000..d3ea657b19 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Hpc050_med/hpc050_med.dbf differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Hpc050_med/hpc050_med.fix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Hpc050_med/hpc050_med.fix new file mode 100644 index 0000000000..52c6bac185 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Hpc050_med/hpc050_med.fix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Hpc050_med/hpc050_med.prj b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Hpc050_med/hpc050_med.prj new file mode 100644 index 0000000000..a7ee8d00be --- /dev/null +++ b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Hpc050_med/hpc050_med.prj @@ -0,0 +1 @@ +GEOGCS["WGS84(DD)", DATUM["WGS84", SPHEROID["WGS84", 6378137.0, 298.257223563]], PRIMEM["Greenwich", 0.0], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH]] \ No newline at end of file diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Hpc050_med/hpc050_med.qix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Hpc050_med/hpc050_med.qix new file mode 100644 index 0000000000..f6a2c02064 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Hpc050_med/hpc050_med.qix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Hpc050_med/hpc050_med.shp b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Hpc050_med/hpc050_med.shp new file mode 100644 index 0000000000..990cab786e Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Hpc050_med/hpc050_med.shp differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Hpc050_med/hpc050_med.shx b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Hpc050_med/hpc050_med.shx new file mode 100644 index 0000000000..84a661d0c9 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Hpc050_med/hpc050_med.shx differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Hpcsfc/hpcsfc.dbf b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Hpcsfc/hpcsfc.dbf new file mode 100644 index 0000000000..d9de22f9e8 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Hpcsfc/hpcsfc.dbf differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Hpcsfc/hpcsfc.fix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Hpcsfc/hpcsfc.fix new file mode 100644 index 0000000000..52c6bac185 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Hpcsfc/hpcsfc.fix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Hpcsfc/hpcsfc.prj b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Hpcsfc/hpcsfc.prj new file mode 100644 index 0000000000..a7ee8d00be --- /dev/null +++ b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Hpcsfc/hpcsfc.prj @@ -0,0 +1 @@ +GEOGCS["WGS84(DD)", DATUM["WGS84", SPHEROID["WGS84", 6378137.0, 298.257223563]], PRIMEM["Greenwich", 0.0], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH]] \ No newline at end of file diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Hpcsfc/hpcsfc.qix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Hpcsfc/hpcsfc.qix new file mode 100644 index 0000000000..446e8a4ff9 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Hpcsfc/hpcsfc.qix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Hpcsfc/hpcsfc.shp b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Hpcsfc/hpcsfc.shp new file mode 100644 index 0000000000..b2c0f93884 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Hpcsfc/hpcsfc.shp differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Hpcsfc/hpcsfc.shx b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Hpcsfc/hpcsfc.shx new file mode 100644 index 0000000000..1635c63933 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Hpcsfc/hpcsfc.shx differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Lakesbnds/lakesbnds.dbf b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Lakesbnds/lakesbnds.dbf new file mode 100644 index 0000000000..cf6f5c8543 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Lakesbnds/lakesbnds.dbf differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Lakesbnds/lakesbnds.fix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Lakesbnds/lakesbnds.fix new file mode 100644 index 0000000000..157069e4f7 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Lakesbnds/lakesbnds.fix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Lakesbnds/lakesbnds.prj b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Lakesbnds/lakesbnds.prj new file mode 100644 index 0000000000..a7ee8d00be --- /dev/null +++ b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Lakesbnds/lakesbnds.prj @@ -0,0 +1 @@ +GEOGCS["WGS84(DD)", DATUM["WGS84", SPHEROID["WGS84", 6378137.0, 298.257223563]], PRIMEM["Greenwich", 0.0], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH]] \ No newline at end of file diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Lakesbnds/lakesbnds.qix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Lakesbnds/lakesbnds.qix new file mode 100644 index 0000000000..ab8e23ccbf Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Lakesbnds/lakesbnds.qix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Lakesbnds/lakesbnds.shp b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Lakesbnds/lakesbnds.shp new file mode 100644 index 0000000000..4b8384683d Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Lakesbnds/lakesbnds.shp differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Lakesbnds/lakesbnds.shx b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Lakesbnds/lakesbnds.shx new file mode 100644 index 0000000000..69691101ed Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Lakesbnds/lakesbnds.shx differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Locowobnds/locowobnds.dbf b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Locowobnds/locowobnds.dbf new file mode 100644 index 0000000000..4b6821d2e9 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Locowobnds/locowobnds.dbf differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Locowobnds/locowobnds.fix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Locowobnds/locowobnds.fix new file mode 100644 index 0000000000..0994818204 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Locowobnds/locowobnds.fix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Locowobnds/locowobnds.prj b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Locowobnds/locowobnds.prj new file mode 100644 index 0000000000..a7ee8d00be --- /dev/null +++ b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Locowobnds/locowobnds.prj @@ -0,0 +1 @@ +GEOGCS["WGS84(DD)", DATUM["WGS84", SPHEROID["WGS84", 6378137.0, 298.257223563]], PRIMEM["Greenwich", 0.0], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH]] \ No newline at end of file diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Locowobnds/locowobnds.qix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Locowobnds/locowobnds.qix new file mode 100644 index 0000000000..804cbcd722 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Locowobnds/locowobnds.qix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Locowobnds/locowobnds.shp b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Locowobnds/locowobnds.shp new file mode 100644 index 0000000000..464dfd43e9 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Locowobnds/locowobnds.shp differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Locowobnds/locowobnds.shx b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Locowobnds/locowobnds.shx new file mode 100644 index 0000000000..c07100359b Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Locowobnds/locowobnds.shx differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Mwobnds/mwobnds.dbf b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Mwobnds/mwobnds.dbf new file mode 100644 index 0000000000..62fe824ef3 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Mwobnds/mwobnds.dbf differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Mwobnds/mwobnds.fix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Mwobnds/mwobnds.fix new file mode 100644 index 0000000000..ea86bd3f87 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Mwobnds/mwobnds.fix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Mwobnds/mwobnds.prj b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Mwobnds/mwobnds.prj new file mode 100644 index 0000000000..a7ee8d00be --- /dev/null +++ b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Mwobnds/mwobnds.prj @@ -0,0 +1 @@ +GEOGCS["WGS84(DD)", DATUM["WGS84", SPHEROID["WGS84", 6378137.0, 298.257223563]], PRIMEM["Greenwich", 0.0], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH]] \ No newline at end of file diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Mwobnds/mwobnds.qix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Mwobnds/mwobnds.qix new file mode 100644 index 0000000000..c750e4202a Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Mwobnds/mwobnds.qix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Mwobnds/mwobnds.shp b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Mwobnds/mwobnds.shp new file mode 100644 index 0000000000..18fb5eeafa Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Mwobnds/mwobnds.shp differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Mwobnds/mwobnds.shx b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Mwobnds/mwobnds.shx new file mode 100644 index 0000000000..c3ab29c02e Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Mwobnds/mwobnds.shx differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Mzbnds/mzbnds.dbf b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Mzbnds/mzbnds.dbf new file mode 100644 index 0000000000..7372fa3513 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Mzbnds/mzbnds.dbf differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Mzbnds/mzbnds.fix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Mzbnds/mzbnds.fix new file mode 100644 index 0000000000..64971efdec Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Mzbnds/mzbnds.fix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Mzbnds/mzbnds.prj b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Mzbnds/mzbnds.prj new file mode 100644 index 0000000000..a7ee8d00be --- /dev/null +++ b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Mzbnds/mzbnds.prj @@ -0,0 +1 @@ +GEOGCS["WGS84(DD)", DATUM["WGS84", SPHEROID["WGS84", 6378137.0, 298.257223563]], PRIMEM["Greenwich", 0.0], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH]] \ No newline at end of file diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Mzbnds/mzbnds.qix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Mzbnds/mzbnds.qix new file mode 100644 index 0000000000..670e0fd9f1 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Mzbnds/mzbnds.qix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Mzbnds/mzbnds.shp b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Mzbnds/mzbnds.shp new file mode 100644 index 0000000000..f75ab9c1e7 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Mzbnds/mzbnds.shp differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Mzbnds/mzbnds.shx b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Mzbnds/mzbnds.shx new file mode 100644 index 0000000000..309add7b60 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Mzbnds/mzbnds.shx differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Mzcntybnds/mzcntybnds.dbf b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Mzcntybnds/mzcntybnds.dbf new file mode 100644 index 0000000000..de2f44e793 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Mzcntybnds/mzcntybnds.dbf differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Mzcntybnds/mzcntybnds.fix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Mzcntybnds/mzcntybnds.fix new file mode 100644 index 0000000000..24b759df14 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Mzcntybnds/mzcntybnds.fix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Mzcntybnds/mzcntybnds.prj b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Mzcntybnds/mzcntybnds.prj new file mode 100644 index 0000000000..a7ee8d00be --- /dev/null +++ b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Mzcntybnds/mzcntybnds.prj @@ -0,0 +1 @@ +GEOGCS["WGS84(DD)", DATUM["WGS84", SPHEROID["WGS84", 6378137.0, 298.257223563]], PRIMEM["Greenwich", 0.0], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH]] \ No newline at end of file diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Mzcntybnds/mzcntybnds.qix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Mzcntybnds/mzcntybnds.qix new file mode 100644 index 0000000000..e2dcdfff1f Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Mzcntybnds/mzcntybnds.qix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Mzcntybnds/mzcntybnds.shp b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Mzcntybnds/mzcntybnds.shp new file mode 100644 index 0000000000..3eab876bcc Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Mzcntybnds/mzcntybnds.shp differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Mzcntybnds/mzcntybnds.shx b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Mzcntybnds/mzcntybnds.shx new file mode 100644 index 0000000000..3ed6715249 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Mzcntybnds/mzcntybnds.shx differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Npsabnds/npsabnds.dbf b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Npsabnds/npsabnds.dbf new file mode 100644 index 0000000000..89a600bfa7 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Npsabnds/npsabnds.dbf differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Npsabnds/npsabnds.fix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Npsabnds/npsabnds.fix new file mode 100644 index 0000000000..79ee3a39c2 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Npsabnds/npsabnds.fix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Npsabnds/npsabnds.prj b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Npsabnds/npsabnds.prj new file mode 100644 index 0000000000..a7ee8d00be --- /dev/null +++ b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Npsabnds/npsabnds.prj @@ -0,0 +1 @@ +GEOGCS["WGS84(DD)", DATUM["WGS84", SPHEROID["WGS84", 6378137.0, 298.257223563]], PRIMEM["Greenwich", 0.0], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH]] \ No newline at end of file diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Npsabnds/npsabnds.qix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Npsabnds/npsabnds.qix new file mode 100644 index 0000000000..353a2925c5 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Npsabnds/npsabnds.qix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Npsabnds/npsabnds.shp b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Npsabnds/npsabnds.shp new file mode 100644 index 0000000000..d7c2b4e4de Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Npsabnds/npsabnds.shp differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Npsabnds/npsabnds.shx b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Npsabnds/npsabnds.shx new file mode 100644 index 0000000000..431aff2156 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Npsabnds/npsabnds.shx differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/OPC_Ssa/ssa_bnd.dbf b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/OPC_Ssa/ssa_bnd.dbf new file mode 100644 index 0000000000..26f5494c2f Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/OPC_Ssa/ssa_bnd.dbf differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/OPC_Ssa/ssa_bnd.fix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/OPC_Ssa/ssa_bnd.fix new file mode 100644 index 0000000000..7df1ec520b Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/OPC_Ssa/ssa_bnd.fix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/OPC_Ssa/ssa_bnd.prj b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/OPC_Ssa/ssa_bnd.prj new file mode 100644 index 0000000000..a7ee8d00be --- /dev/null +++ b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/OPC_Ssa/ssa_bnd.prj @@ -0,0 +1 @@ +GEOGCS["WGS84(DD)", DATUM["WGS84", SPHEROID["WGS84", 6378137.0, 298.257223563]], PRIMEM["Greenwich", 0.0], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH]] \ No newline at end of file diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/OPC_Ssa/ssa_bnd.qix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/OPC_Ssa/ssa_bnd.qix new file mode 100644 index 0000000000..a141c91d15 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/OPC_Ssa/ssa_bnd.qix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/OPC_Ssa/ssa_bnd.shp b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/OPC_Ssa/ssa_bnd.shp new file mode 100644 index 0000000000..a8ce6b24fc Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/OPC_Ssa/ssa_bnd.shp differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/OPC_Ssa/ssa_bnd.shx b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/OPC_Ssa/ssa_bnd.shx new file mode 100644 index 0000000000..c4e4db016e Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/OPC_Ssa/ssa_bnd.shx differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Opcbnds/opcbnds.dbf b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Opcbnds/opcbnds.dbf new file mode 100644 index 0000000000..7b7edb1c9f Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Opcbnds/opcbnds.dbf differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Opcbnds/opcbnds.fix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Opcbnds/opcbnds.fix new file mode 100644 index 0000000000..52c6bac185 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Opcbnds/opcbnds.fix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Opcbnds/opcbnds.prj b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Opcbnds/opcbnds.prj new file mode 100644 index 0000000000..a7ee8d00be --- /dev/null +++ b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Opcbnds/opcbnds.prj @@ -0,0 +1 @@ +GEOGCS["WGS84(DD)", DATUM["WGS84", SPHEROID["WGS84", 6378137.0, 298.257223563]], PRIMEM["Greenwich", 0.0], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH]] \ No newline at end of file diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Opcbnds/opcbnds.qix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Opcbnds/opcbnds.qix new file mode 100644 index 0000000000..3367a4f9ce Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Opcbnds/opcbnds.qix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Opcbnds/opcbnds.shp b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Opcbnds/opcbnds.shp new file mode 100644 index 0000000000..a1f1e948ea Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Opcbnds/opcbnds.shp differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Opcbnds/opcbnds.shx b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Opcbnds/opcbnds.shx new file mode 100644 index 0000000000..a5bbb88cb6 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Opcbnds/opcbnds.shx differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Opcbnds_nomex/opcbnds_nomex.dbf b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Opcbnds_nomex/opcbnds_nomex.dbf new file mode 100644 index 0000000000..5d2294f81d Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Opcbnds_nomex/opcbnds_nomex.dbf differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Opcbnds_nomex/opcbnds_nomex.fix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Opcbnds_nomex/opcbnds_nomex.fix new file mode 100644 index 0000000000..52c6bac185 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Opcbnds_nomex/opcbnds_nomex.fix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Opcbnds_nomex/opcbnds_nomex.prj b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Opcbnds_nomex/opcbnds_nomex.prj new file mode 100644 index 0000000000..a7ee8d00be --- /dev/null +++ b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Opcbnds_nomex/opcbnds_nomex.prj @@ -0,0 +1 @@ +GEOGCS["WGS84(DD)", DATUM["WGS84", SPHEROID["WGS84", 6378137.0, 298.257223563]], PRIMEM["Greenwich", 0.0], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH]] \ No newline at end of file diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Opcbnds_nomex/opcbnds_nomex.qix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Opcbnds_nomex/opcbnds_nomex.qix new file mode 100644 index 0000000000..ec36f10d32 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Opcbnds_nomex/opcbnds_nomex.qix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Opcbnds_nomex/opcbnds_nomex.shp b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Opcbnds_nomex/opcbnds_nomex.shp new file mode 100644 index 0000000000..e243c227db Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Opcbnds_nomex/opcbnds_nomex.shp differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Opcbnds_nomex/opcbnds_nomex.shx b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Opcbnds_nomex/opcbnds_nomex.shx new file mode 100644 index 0000000000..6f0b83e88e Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Opcbnds_nomex/opcbnds_nomex.shx differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/PacBasin/pac_basin.dbf b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/PacBasin/pac_basin.dbf new file mode 100644 index 0000000000..8cd1f8005d Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/PacBasin/pac_basin.dbf differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/PacBasin/pac_basin.fix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/PacBasin/pac_basin.fix new file mode 100644 index 0000000000..52c6bac185 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/PacBasin/pac_basin.fix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/PacBasin/pac_basin.prj b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/PacBasin/pac_basin.prj new file mode 100644 index 0000000000..a7ee8d00be --- /dev/null +++ b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/PacBasin/pac_basin.prj @@ -0,0 +1 @@ +GEOGCS["WGS84(DD)", DATUM["WGS84", SPHEROID["WGS84", 6378137.0, 298.257223563]], PRIMEM["Greenwich", 0.0], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH]] \ No newline at end of file diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/PacBasin/pac_basin.qix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/PacBasin/pac_basin.qix new file mode 100644 index 0000000000..f80c447d45 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/PacBasin/pac_basin.qix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/PacBasin/pac_basin.shp b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/PacBasin/pac_basin.shp new file mode 100644 index 0000000000..e786187149 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/PacBasin/pac_basin.shp differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/PacBasin/pac_basin.shx b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/PacBasin/pac_basin.shx new file mode 100644 index 0000000000..8b7e37d894 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/PacBasin/pac_basin.shx differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Pfzbnds/pfzbnds.dbf b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Pfzbnds/pfzbnds.dbf new file mode 100644 index 0000000000..b13d5fccf2 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Pfzbnds/pfzbnds.dbf differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Pfzbnds/pfzbnds.fix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Pfzbnds/pfzbnds.fix new file mode 100644 index 0000000000..16838b20da Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Pfzbnds/pfzbnds.fix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Pfzbnds/pfzbnds.prj b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Pfzbnds/pfzbnds.prj new file mode 100644 index 0000000000..a7ee8d00be --- /dev/null +++ b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Pfzbnds/pfzbnds.prj @@ -0,0 +1 @@ +GEOGCS["WGS84(DD)", DATUM["WGS84", SPHEROID["WGS84", 6378137.0, 298.257223563]], PRIMEM["Greenwich", 0.0], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH]] \ No newline at end of file diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Pfzbnds/pfzbnds.qix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Pfzbnds/pfzbnds.qix new file mode 100644 index 0000000000..722b1f9666 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Pfzbnds/pfzbnds.qix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Pfzbnds/pfzbnds.shp b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Pfzbnds/pfzbnds.shp new file mode 100644 index 0000000000..9fd0c60ceb Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Pfzbnds/pfzbnds.shp differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Pfzbnds/pfzbnds.shx b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Pfzbnds/pfzbnds.shx new file mode 100644 index 0000000000..54630d1a88 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Pfzbnds/pfzbnds.shx differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Rfcbnds/rfcbnds.dbf b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Rfcbnds/rfcbnds.dbf new file mode 100644 index 0000000000..1374587e08 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Rfcbnds/rfcbnds.dbf differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Rfcbnds/rfcbnds.fix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Rfcbnds/rfcbnds.fix new file mode 100644 index 0000000000..7df1ec520b Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Rfcbnds/rfcbnds.fix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Rfcbnds/rfcbnds.prj b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Rfcbnds/rfcbnds.prj new file mode 100644 index 0000000000..a7ee8d00be --- /dev/null +++ b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Rfcbnds/rfcbnds.prj @@ -0,0 +1 @@ +GEOGCS["WGS84(DD)", DATUM["WGS84", SPHEROID["WGS84", 6378137.0, 298.257223563]], PRIMEM["Greenwich", 0.0], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH]] \ No newline at end of file diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Rfcbnds/rfcbnds.qix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Rfcbnds/rfcbnds.qix new file mode 100644 index 0000000000..9f634650f4 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Rfcbnds/rfcbnds.qix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Rfcbnds/rfcbnds.shp b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Rfcbnds/rfcbnds.shp new file mode 100644 index 0000000000..907dea7f75 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Rfcbnds/rfcbnds.shp differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Rfcbnds/rfcbnds.shx b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Rfcbnds/rfcbnds.shx new file mode 100644 index 0000000000..4bc1462b89 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Rfcbnds/rfcbnds.shx differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/SPC_outlook_area/SPC_outlook_area.dbf b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/SPC_outlook_area/SPC_outlook_area.dbf new file mode 100644 index 0000000000..a7f6e4df04 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/SPC_outlook_area/SPC_outlook_area.dbf differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/SPC_outlook_area/SPC_outlook_area.fix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/SPC_outlook_area/SPC_outlook_area.fix new file mode 100644 index 0000000000..52c6bac185 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/SPC_outlook_area/SPC_outlook_area.fix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/SPC_outlook_area/SPC_outlook_area.prj b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/SPC_outlook_area/SPC_outlook_area.prj new file mode 100644 index 0000000000..a7ee8d00be --- /dev/null +++ b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/SPC_outlook_area/SPC_outlook_area.prj @@ -0,0 +1 @@ +GEOGCS["WGS84(DD)", DATUM["WGS84", SPHEROID["WGS84", 6378137.0, 298.257223563]], PRIMEM["Greenwich", 0.0], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH]] \ No newline at end of file diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/SPC_outlook_area/SPC_outlook_area.qix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/SPC_outlook_area/SPC_outlook_area.qix new file mode 100644 index 0000000000..2dfcfa9ec0 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/SPC_outlook_area/SPC_outlook_area.qix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/SPC_outlook_area/SPC_outlook_area.shp b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/SPC_outlook_area/SPC_outlook_area.shp new file mode 100644 index 0000000000..e26d7923c6 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/SPC_outlook_area/SPC_outlook_area.shp differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/SPC_outlook_area/SPC_outlook_area.shx b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/SPC_outlook_area/SPC_outlook_area.shx new file mode 100644 index 0000000000..f75e007d0c Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/SPC_outlook_area/SPC_outlook_area.shx differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Sig_high/sig_high.dbf b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Sig_high/sig_high.dbf new file mode 100644 index 0000000000..0cdcc5ca9f Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Sig_high/sig_high.dbf differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Sig_high/sig_high.fix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Sig_high/sig_high.fix new file mode 100644 index 0000000000..52c6bac185 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Sig_high/sig_high.fix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Sig_high/sig_high.prj b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Sig_high/sig_high.prj new file mode 100644 index 0000000000..a7ee8d00be --- /dev/null +++ b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Sig_high/sig_high.prj @@ -0,0 +1 @@ +GEOGCS["WGS84(DD)", DATUM["WGS84", SPHEROID["WGS84", 6378137.0, 298.257223563]], PRIMEM["Greenwich", 0.0], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH]] \ No newline at end of file diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Sig_high/sig_high.qix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Sig_high/sig_high.qix new file mode 100644 index 0000000000..ab88e88abc Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Sig_high/sig_high.qix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Sig_high/sig_high.shp b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Sig_high/sig_high.shp new file mode 100644 index 0000000000..56cebe4336 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Sig_high/sig_high.shp differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Sig_high/sig_high.shx b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Sig_high/sig_high.shx new file mode 100644 index 0000000000..c6e7db9ab2 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Sig_high/sig_high.shx differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ssa_bnd/ssa_bnd.dbf b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ssa_bnd/ssa_bnd.dbf new file mode 100644 index 0000000000..2cbbe05fe3 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ssa_bnd/ssa_bnd.dbf differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ssa_bnd/ssa_bnd.fix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ssa_bnd/ssa_bnd.fix new file mode 100644 index 0000000000..8ae4e3ba69 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ssa_bnd/ssa_bnd.fix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ssa_bnd/ssa_bnd.prj b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ssa_bnd/ssa_bnd.prj new file mode 100644 index 0000000000..a7ee8d00be --- /dev/null +++ b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ssa_bnd/ssa_bnd.prj @@ -0,0 +1 @@ +GEOGCS["WGS84(DD)", DATUM["WGS84", SPHEROID["WGS84", 6378137.0, 298.257223563]], PRIMEM["Greenwich", 0.0], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH]] \ No newline at end of file diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ssa_bnd/ssa_bnd.qix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ssa_bnd/ssa_bnd.qix new file mode 100644 index 0000000000..e590dfbd3e Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ssa_bnd/ssa_bnd.qix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ssa_bnd/ssa_bnd.shp b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ssa_bnd/ssa_bnd.shp new file mode 100644 index 0000000000..f907322bfb Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ssa_bnd/ssa_bnd.shp differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ssa_bnd/ssa_bnd.shx b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ssa_bnd/ssa_bnd.shx new file mode 100644 index 0000000000..fd8cf4411d Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ssa_bnd/ssa_bnd.shx differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Statebnds/statebnds.dbf b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Statebnds/statebnds.dbf new file mode 100644 index 0000000000..468c59f340 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Statebnds/statebnds.dbf differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Statebnds/statebnds.fix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Statebnds/statebnds.fix new file mode 100644 index 0000000000..70b95200f5 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Statebnds/statebnds.fix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Statebnds/statebnds.prj b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Statebnds/statebnds.prj new file mode 100644 index 0000000000..a7ee8d00be --- /dev/null +++ b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Statebnds/statebnds.prj @@ -0,0 +1 @@ +GEOGCS["WGS84(DD)", DATUM["WGS84", SPHEROID["WGS84", 6378137.0, 298.257223563]], PRIMEM["Greenwich", 0.0], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH]] \ No newline at end of file diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Statebnds/statebnds.qix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Statebnds/statebnds.qix new file mode 100644 index 0000000000..6cc4639477 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Statebnds/statebnds.qix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Statebnds/statebnds.shp b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Statebnds/statebnds.shp new file mode 100644 index 0000000000..1d56c0a9a1 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Statebnds/statebnds.shp differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Statebnds/statebnds.shx b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Statebnds/statebnds.shx new file mode 100644 index 0000000000..66cdd54f32 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Statebnds/statebnds.shx differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Tpcbounds/tpcbounds.dbf b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Tpcbounds/tpcbounds.dbf new file mode 100644 index 0000000000..46466e75c3 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Tpcbounds/tpcbounds.dbf differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Tpcbounds/tpcbounds.fix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Tpcbounds/tpcbounds.fix new file mode 100644 index 0000000000..0994818204 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Tpcbounds/tpcbounds.fix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Tpcbounds/tpcbounds.prj b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Tpcbounds/tpcbounds.prj new file mode 100644 index 0000000000..a7ee8d00be --- /dev/null +++ b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Tpcbounds/tpcbounds.prj @@ -0,0 +1 @@ +GEOGCS["WGS84(DD)", DATUM["WGS84", SPHEROID["WGS84", 6378137.0, 298.257223563]], PRIMEM["Greenwich", 0.0], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH]] \ No newline at end of file diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Tpcbounds/tpcbounds.qix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Tpcbounds/tpcbounds.qix new file mode 100644 index 0000000000..804cbcd722 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Tpcbounds/tpcbounds.qix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Tpcbounds/tpcbounds.shp b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Tpcbounds/tpcbounds.shp new file mode 100644 index 0000000000..926f53e749 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Tpcbounds/tpcbounds.shp differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Tpcbounds/tpcbounds.shx b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Tpcbounds/tpcbounds.shx new file mode 100644 index 0000000000..7c7ee1e102 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Tpcbounds/tpcbounds.shx differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Tzbnds/tzbnds.dbf b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Tzbnds/tzbnds.dbf new file mode 100644 index 0000000000..e2a8963d91 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Tzbnds/tzbnds.dbf differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Tzbnds/tzbnds.fix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Tzbnds/tzbnds.fix new file mode 100644 index 0000000000..0994818204 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Tzbnds/tzbnds.fix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Tzbnds/tzbnds.prj b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Tzbnds/tzbnds.prj new file mode 100644 index 0000000000..a7ee8d00be --- /dev/null +++ b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Tzbnds/tzbnds.prj @@ -0,0 +1 @@ +GEOGCS["WGS84(DD)", DATUM["WGS84", SPHEROID["WGS84", 6378137.0, 298.257223563]], PRIMEM["Greenwich", 0.0], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH]] \ No newline at end of file diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Tzbnds/tzbnds.qix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Tzbnds/tzbnds.qix new file mode 100644 index 0000000000..27f528edb9 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Tzbnds/tzbnds.qix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Tzbnds/tzbnds.shp b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Tzbnds/tzbnds.shp new file mode 100644 index 0000000000..c042788be3 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Tzbnds/tzbnds.shp differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Tzbnds/tzbnds.shx b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Tzbnds/tzbnds.shx new file mode 100644 index 0000000000..7f07a65427 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Tzbnds/tzbnds.shx differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ua_bnd/ua_bnd.dbf b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ua_bnd/ua_bnd.dbf new file mode 100644 index 0000000000..9b9b8216ca Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ua_bnd/ua_bnd.dbf differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ua_bnd/ua_bnd.fix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ua_bnd/ua_bnd.fix new file mode 100644 index 0000000000..7a298fc676 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ua_bnd/ua_bnd.fix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ua_bnd/ua_bnd.prj b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ua_bnd/ua_bnd.prj new file mode 100644 index 0000000000..a7ee8d00be --- /dev/null +++ b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ua_bnd/ua_bnd.prj @@ -0,0 +1 @@ +GEOGCS["WGS84(DD)", DATUM["WGS84", SPHEROID["WGS84", 6378137.0, 298.257223563]], PRIMEM["Greenwich", 0.0], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH]] \ No newline at end of file diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ua_bnd/ua_bnd.qix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ua_bnd/ua_bnd.qix new file mode 100644 index 0000000000..e1d0301e9b Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ua_bnd/ua_bnd.qix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ua_bnd/ua_bnd.shp b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ua_bnd/ua_bnd.shp new file mode 100644 index 0000000000..5668fb71fd Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ua_bnd/ua_bnd.shp differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ua_bnd/ua_bnd.shx b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ua_bnd/ua_bnd.shx new file mode 100644 index 0000000000..3781306696 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Ua_bnd/ua_bnd.shx differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Us_ak/us_ak.dbf b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Us_ak/us_ak.dbf new file mode 100644 index 0000000000..00ee4f805d Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Us_ak/us_ak.dbf differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Us_ak/us_ak.fix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Us_ak/us_ak.fix new file mode 100644 index 0000000000..bb4d942186 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Us_ak/us_ak.fix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Us_ak/us_ak.prj b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Us_ak/us_ak.prj new file mode 100644 index 0000000000..a7ee8d00be --- /dev/null +++ b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Us_ak/us_ak.prj @@ -0,0 +1 @@ +GEOGCS["WGS84(DD)", DATUM["WGS84", SPHEROID["WGS84", 6378137.0, 298.257223563]], PRIMEM["Greenwich", 0.0], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH]] \ No newline at end of file diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Us_ak/us_ak.qix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Us_ak/us_ak.qix new file mode 100644 index 0000000000..7da5382628 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Us_ak/us_ak.qix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Us_ak/us_ak.shp b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Us_ak/us_ak.shp new file mode 100644 index 0000000000..67fdd0d653 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Us_ak/us_ak.shp differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Us_ak/us_ak.shx b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Us_ak/us_ak.shx new file mode 100644 index 0000000000..5300ad9274 Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Us_ak/us_ak.shx differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Vaacarbnds/vaacarbnds.dbf b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Vaacarbnds/vaacarbnds.dbf new file mode 100644 index 0000000000..bf1b9a7d7e Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Vaacarbnds/vaacarbnds.dbf differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Vaacarbnds/vaacarbnds.fix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Vaacarbnds/vaacarbnds.fix new file mode 100644 index 0000000000..d758f18f2e Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Vaacarbnds/vaacarbnds.fix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Vaacarbnds/vaacarbnds.prj b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Vaacarbnds/vaacarbnds.prj new file mode 100644 index 0000000000..a7ee8d00be --- /dev/null +++ b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Vaacarbnds/vaacarbnds.prj @@ -0,0 +1 @@ +GEOGCS["WGS84(DD)", DATUM["WGS84", SPHEROID["WGS84", 6378137.0, 298.257223563]], PRIMEM["Greenwich", 0.0], UNIT["degree", 0.017453292519943295], AXIS["Geodetic longitude", EAST], AXIS["Geodetic latitude", NORTH]] \ No newline at end of file diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Vaacarbnds/vaacarbnds.qix b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Vaacarbnds/vaacarbnds.qix new file mode 100644 index 0000000000..aba8cab04e Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Vaacarbnds/vaacarbnds.qix differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Vaacarbnds/vaacarbnds.shp b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Vaacarbnds/vaacarbnds.shp new file mode 100644 index 0000000000..2db663558f Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Vaacarbnds/vaacarbnds.shp differ diff --git a/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Vaacarbnds/vaacarbnds.shx b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Vaacarbnds/vaacarbnds.shx new file mode 100644 index 0000000000..e5be6e3c3e Binary files /dev/null and b/edexOsgi/build.edex/opt/db/ddl/ncep/shapefiles/Vaacarbnds/vaacarbnds.shx differ diff --git a/edexOsgi/build.edex/opt/db/ddl/setup/postgresql.conf b/edexOsgi/build.edex/opt/db/ddl/setup/postgresql.conf index 29d7883eaa..06f60796fd 100644 --- a/edexOsgi/build.edex/opt/db/ddl/setup/postgresql.conf +++ b/edexOsgi/build.edex/opt/db/ddl/setup/postgresql.conf @@ -399,7 +399,7 @@ autovacuum = on # enable autovacuum subprocess? #check_function_bodies = on #default_transaction_isolation = 'read committed' #default_transaction_read_only = off -#statement_timeout = 0 # 0 is disabled +statement_timeout = 1800000 # 0 is disabled, statements running for more than 30 minutes will timeout #vacuum_freeze_min_age = 100000000 # - Locale and Formatting - diff --git a/edexOsgi/build.edex/rpm/component/edex/includes/edex-ncep/MANIFEST.MF b/edexOsgi/build.edex/rpm/component/edex/includes/edex-ncep/MANIFEST.MF index 9e7336bf3a..2cc88c5cb2 100644 --- a/edexOsgi/build.edex/rpm/component/edex/includes/edex-ncep/MANIFEST.MF +++ b/edexOsgi/build.edex/rpm/component/edex/includes/edex-ncep/MANIFEST.MF @@ -17,11 +17,16 @@ Require-Bundle: edu.wisc.ssec.mcidas;bundle-version="1.0.0", gov.noaa.nws.ncep.common.dataplugin.intlsigmet;bundle-version="1.0.0", gov.noaa.nws.ncep.common.dataplugin.ncccfp;bundle-version="1.0.0", gov.noaa.nws.ncep.common.dataplugin.ncscat;bundle-version="1.0.0", + gov.noaa.nws.ncep.common.dataplugin.ncairep;bundle-version="1.0.0", + gov.noaa.nws.ncep.common.dataplugin.ncpafm;bundle-version="1.0.0", + gov.noaa.nws.ncep.common.dataplugin.ncpirep;bundle-version="1.0.0", gov.noaa.nws.ncep.common.dataplugin.nonconvsigmet;bundle-version="1.0.0", + gov.noaa.nws.ncep.common.dataplugin.sgwh;bundle-version="1.0.0", + gov.noaa.nws.ncep.common.dataplugin.sgwhv;bundle-version="1.0.0", + gov.noaa.nws.ncep.common.dataplugin.ssha;bundle-version="1.0.0", gov.noaa.nws.ncep.common.dataplugin.tcm;bundle-version="1.0.0", gov.noaa.nws.ncep.common.dataplugin.wcp;bundle-version="1.0.0", gov.noaa.nws.ncep.common.log;bundle-version="1.0.0", - gov.noaa.nws.ncep.edex.gempak.jna;bundle-version="1.0.0", gov.noaa.nws.ncep.edex.ingest.util;bundle-version="1.0.0", gov.noaa.nws.ncep.edex.plugin.airmet;bundle-version="1.0.0", gov.noaa.nws.ncep.edex.plugin.atcf;bundle-version="1.0.0", @@ -34,36 +39,32 @@ Require-Bundle: edu.wisc.ssec.mcidas;bundle-version="1.0.0", gov.noaa.nws.ncep.edex.plugin.mosaic;bundle-version="1.0.0", gov.noaa.nws.ncep.edex.plugin.ncccfp;bundle-version="1.11.7", gov.noaa.nws.ncep.edex.plugin.ncgrib;bundle-version="1.0.0", + gov.noaa.nws.ncep.edex.plugin.ncpafm;bundle-version="1.0.0", gov.noaa.nws.ncep.edex.plugin.ncscat;bundle-version="1.0.0", gov.noaa.nws.ncep.edex.plugin.nctext;bundle-version="1.0.0", gov.noaa.nws.ncep.edex.plugin.nonconvsigmet;bundle-version="1.0.0", + gov.noaa.nws.ncep.edex.plugin.sgwh;bundle-version="1.0.0", + gov.noaa.nws.ncep.edex.plugin.ssha;bundle-version="1.0.0", gov.noaa.nws.ncep.edex.plugin.tcm;bundle-version="1.0.0", gov.noaa.nws.ncep.edex.plugin.wcp;bundle-version="1.0.0", gov.noaa.nws.ncep.edex.purgeutil;bundle-version="1.0.0", - gov.noaa.nws.ncep.common;bundle-version="1.0.0", - gov.noaa.nws.ncep.common.dataplugin.mcidas;bundle-version="1.0.0", - gov.noaa.nws.ncep.common.dataplugin.ncairep;bundle-version="1.0.0", - gov.noaa.nws.ncep.common.dataplugin.ncgrib;bundle-version="1.0.0", - gov.noaa.nws.ncep.common.dataplugin.ncpafm;bundle-version="1.0.0", - gov.noaa.nws.ncep.common.dataplugin.ncpirep;bundle-version="1.0.0", - gov.noaa.nws.ncep.common.dataplugin.ncscd;bundle-version="1.0.0", - gov.noaa.nws.ncep.common.dataplugin.nctaf;bundle-version="1.0.0", - gov.noaa.nws.ncep.common.dataplugin.ncuair;bundle-version="1.0.0", - gov.noaa.nws.ncep.common.dataplugin.sgwh;bundle-version="1.0.0", - gov.noaa.nws.ncep.common.dataplugin.sgwhv;bundle-version="1.0.0", - gov.noaa.nws.ncep.common.dataplugin.ssha;bundle-version="1.0.0", - gov.noaa.nws.ncep.common.dataplugin.stormtrack;bundle-version="1.0.0", - gov.noaa.nws.ncep.edex.common;bundle-version="1.0.0", gov.noaa.nws.ncep.edex.ingest.grib.util;bundle-version="1.0.0", gov.noaa.nws.ncep.edex.plugin.ncairep;bundle-version="1.12.1174", - gov.noaa.nws.ncep.edex.plugin.ncpafm;bundle-version="1.0.0", gov.noaa.nws.ncep.edex.plugin.ncpirep;bundle-version="1.12.1174", + gov.noaa.nws.ncep.common.dataplugin.ncscd;bundle-version="1.0.0", gov.noaa.nws.ncep.edex.plugin.ncscd;bundle-version="1.0.0", - gov.noaa.nws.ncep.edex.plugin.nctaf;bundle-version="1.0.0", - gov.noaa.nws.ncep.edex.plugin.ncuair;bundle-version="1.0.0", - gov.noaa.nws.ncep.edex.plugin.sgwh;bundle-version="1.0.0", - gov.noaa.nws.ncep.edex.plugin.sgwhv;bundle-version="1.0.0", - gov.noaa.nws.ncep.edex.plugin.ssha;bundle-version="1.0.0", + gov.noaa.nws.ncep.common.dataplugin.stormtrack;bundle-version="1.0.0", gov.noaa.nws.ncep.edex.plugin.stormtrack;bundle-version="1.0.0", - gov.noaa.nws.ncep.edex.uengine;bundle-version="1.0.0" + gov.noaa.nws.ncep.common.dataplugin.nctaf;bundle-version="1.0.0", + gov.noaa.nws.ncep.edex.plugin.nctaf;bundle-version="1.0.0", + gov.noaa.nws.ncep.edex.plugin.sgwhv;bundle-version="1.0.0", + gov.noaa.nws.ncep.edex.plugin.ncuair;bundle-version="1.0.0", + gov.noaa.nws.ncep.edex.common;bundle-version="1.0.0", + gov.noaa.nws.ncep.common.dataplugin.mcidas;bundle-version="1.0.0", + gov.noaa.nws.ncep.common.dataplugin.ncgrib;bundle-version="1.0.0", + gov.noaa.nws.ncep.common;bundle-version="1.0.0", + gov.noaa.nws.ncep.edex.uengine;bundle-version="1.0.0", + gov.noaa.nws.ncep.common.dataplugin.ncuair;bundle-version="1.0.0", + gov.noaa.nws.ncep.uf.common.dataplugin.fits;bundle-version="1.0.0", + gov.noaa.nws.ncep.uf.edex.plugin.fits;bundle-version="1.0.0" diff --git a/edexOsgi/build.edex/rpm/component/edex/includes/edex-npp/MANIFEST.MF b/edexOsgi/build.edex/rpm/component/edex/includes/edex-npp/MANIFEST.MF deleted file mode 100644 index 70fbcd0c78..0000000000 --- a/edexOsgi/build.edex/rpm/component/edex/includes/edex-npp/MANIFEST.MF +++ /dev/null @@ -1,47 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: edex-npp -Bundle-SymbolicName: edex-npp -Bundle-Version: 1 -Bundle-Vendor: RAYTHEON -Eclipse-BuddyPolicy: registered, ext, global -Eclipse-RegisterBuddy: com.raytheon.uf.common.serialization -Export-Package: com.raytheon.edex.colormap, - com.raytheon.edex.common.cluster, - com.raytheon.edex.common.db, - com.raytheon.edex.common.request, - com.raytheon.edex.contours, - com.raytheon.edex.contours.util, - com.raytheon.edex.db.dao, - com.raytheon.edex.db.dao.pool, - com.raytheon.edex.db.dao.spatial, - com.raytheon.edex.db.dao.supporting, - com.raytheon.edex.db.mapping, - com.raytheon.edex.db.objects.hibernate, - com.raytheon.edex.db.objects.spatial, - com.raytheon.edex.db.objects.supporting, - com.raytheon.edex.db.purge, - com.raytheon.edex.db.query, - com.raytheon.edex.esb, - com.raytheon.edex.exception, - com.raytheon.edex.grid, - com.raytheon.edex.jmx, - com.raytheon.edex.map, - com.raytheon.edex.msg, - com.raytheon.edex.objanalysis, - com.raytheon.edex.plugin, - com.raytheon.edex.plugin.factory, - com.raytheon.edex.scriptfactory, - com.raytheon.edex.site, - com.raytheon.edex.subscription, - com.raytheon.edex.test, - com.raytheon.edex.tools, - com.raytheon.edex.tools.time, - com.raytheon.edex.topo, - com.raytheon.edex.urifilter, - com.raytheon.edex.util, - com.raytheon.edex.utility -Bundle-RequiredExecutionEnvironment: JavaSE-1.6 -Require-Bundle: com.raytheon.uf.common.dataplugin.npp.viirs;bundle-version="1.0.0", - com.raytheon.uf.edex.plugin.npp.viirs;bundle-version="1.0.0" - diff --git a/edexOsgi/com.raytheon.edex.feature.uframe/feature.xml b/edexOsgi/com.raytheon.edex.feature.uframe/feature.xml index ec75b398b5..58f0911577 100644 --- a/edexOsgi/com.raytheon.edex.feature.uframe/feature.xml +++ b/edexOsgi/com.raytheon.edex.feature.uframe/feature.xml @@ -1282,12 +1282,6 @@ install-size="0" version="0.0.0"/> - - - - - - pdoList = new HashSet(); - EDEXUtil.checkPersistenceTimes(pdo); + Set pdoList = new HashSet(); + EDEXUtil.checkPersistenceTimes(pdo); - try { - PluginDao dao = PluginFactory.getInstance().getPluginDao( - pdo[0].getPluginName()); - StorageStatus ss = dao.persistToHDF5(pdo); - StorageException[] se = ss.getExceptions(); - pdoList.addAll(Arrays.asList(pdo)); - if (se != null) { - Map pdosThatFailed = new HashMap(); - for (StorageException s : se) { - IDataRecord rec = s.getRecord(); + try { + PluginDao dao = PluginFactory.getInstance().getPluginDao( + pdo[0].getPluginName()); + StorageStatus ss = dao.persistToHDF5(pdo); + StorageException[] se = ss.getExceptions(); + pdoList.addAll(Arrays.asList(pdo)); + if (se != null) { + Map pdosThatFailed = new HashMap(); + for (StorageException s : se) { + IDataRecord rec = s.getRecord(); - if (rec != null) { - // If we have correlation info and it's a pdo, use that - // for the error message... - Object corrObj = rec.getCorrelationObject(); - if (corrObj != null - && corrObj instanceof PluginDataObject) { - pdosThatFailed.put((PluginDataObject) corrObj, s); - } else { - // otherwise, do the best we can with the group - // information - logger.error("Persisting record " + rec.getGroup() - + "/" + rec.getName() + " failed.", s); - } - } else { - // All we know is something bad happened. - logger.error("Persistence error occurred: ", s); - } + if (rec != null) { + // If we have correlation info and it's a pdo, use that + // for the error message... + Object corrObj = rec.getCorrelationObject(); + if (corrObj != null + && corrObj instanceof PluginDataObject) { + pdosThatFailed.put((PluginDataObject) corrObj, s); + } else { + // otherwise, do the best we can with the group + // information + logger.error("Persisting record " + rec.getGroup() + + "/" + rec.getName() + " failed.", s); + } + } else { + // All we know is something bad happened. + logger.error("Persistence error occurred: ", s); + } - // Produce error messages for each pdo that failed - int errCnt = 0; - boolean suppressed = false; - for (Map.Entry e : pdosThatFailed - .entrySet()) { - if (errCnt > 50) { - logger.warn("More than 50 errors occurred in this batch. The remaining errors will be suppressed."); - suppressed = true; - continue; - } + // Produce error messages for each pdo that failed + int errCnt = 0; + boolean suppressed = false; + for (Map.Entry e : pdosThatFailed + .entrySet()) { + if (errCnt > 50) { + logger.warn("More than 50 errors occurred in this batch. The remaining errors will be suppressed."); + suppressed = true; + continue; + } - if (!suppressed) { - if (e.getValue() instanceof DuplicateRecordStorageException) { - logger.warn("Duplicate record encountered (duplicate ignored): " - + e.getKey().getDataURI()); - } else { - logger.error( - "Error persisting record " + e.getKey() - + " to database: ", - e.getValue()); - } - } + if (!suppressed) { + if (e.getValue() instanceof DuplicateRecordStorageException) { + logger.warn("Duplicate record encountered (duplicate ignored): " + + e.getKey().getDataURI()); + } else { + logger.error( + "Error persisting record " + e.getKey() + + " to database: ", + e.getValue()); + } + } - // Remove from the pdoList so the pdo is not propagated - // to the next service - pdoList.remove(e.getKey()); - errCnt++; + // Remove from the pdoList so the pdo is not propagated + // to the next service + pdoList.remove(e.getKey()); + errCnt++; - } - } + } + } - } + } - } catch (Throwable e1) { - logger.error( - "Critical persistence error occurred. Individual records that failed will be logged separately.", - e1); - for (PluginDataObject p : pdo) { - logger.error("Record " - + p - + " failed persistence due to critical error logged above."); - } - } + } catch (Throwable e1) { + logger.error( + "Critical persistence error occurred. Individual records that failed will be logged separately.", + e1); + for (PluginDataObject p : pdo) { + logger.error("Record " + + p + + " failed persistence due to critical error logged above."); + } + } - return pdoList.toArray(new PluginDataObject[pdoList.size()]); - } + return pdoList.toArray(new PluginDataObject[pdoList.size()]); + } + + public PluginDataObject[] removeRawData(PluginDataObject[] pdos) { + if (pdos != null) { + for (PluginDataObject pdo : pdos) { + pdo.setMessageData(null); + } + } + return pdos; + } } diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject b/edexOsgi/com.raytheon.edex.plugin.gfe/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject index b3c79dcd04..c13bd549c5 100644 --- a/edexOsgi/com.raytheon.edex.plugin.gfe/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject +++ b/edexOsgi/com.raytheon.edex.plugin.gfe/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject @@ -1,5 +1,4 @@ com.raytheon.edex.plugin.gfe.wcl.WclInfo com.raytheon.edex.plugin.gfe.isc.IscSendRecord -com.raytheon.edex.plugin.gfe.isc.IscSendRecordPK com.raytheon.edex.plugin.gfe.smartinit.SmartInitRecord com.raytheon.edex.plugin.gfe.smartinit.SmartInitRecordPK \ No newline at end of file diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/res/spring/gfe-request.xml b/edexOsgi/com.raytheon.edex.plugin.gfe/res/spring/gfe-request.xml index beb20b64ea..2a0404d2cd 100644 --- a/edexOsgi/com.raytheon.edex.plugin.gfe/res/spring/gfe-request.xml +++ b/edexOsgi/com.raytheon.edex.plugin.gfe/res/spring/gfe-request.xml @@ -480,7 +480,7 @@ + uri="clusteredquartz://gfe/purgeGfeLogs/?cron=${purge.logs.cron}" /> diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/res/spring/gfe-spring.xml b/edexOsgi/com.raytheon.edex.plugin.gfe/res/spring/gfe-spring.xml index d6b140a6b0..696cce7ac8 100644 --- a/edexOsgi/com.raytheon.edex.plugin.gfe/res/spring/gfe-spring.xml +++ b/edexOsgi/com.raytheon.edex.plugin.gfe/res/spring/gfe-spring.xml @@ -67,7 +67,26 @@ - + + + + + + + + + + + + + + + + java.lang.Throwable + + + + - - - - - - - - - - - - - java.lang.Throwable - - - - diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/cache/d2dparms/D2DParmIdCache.java b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/cache/d2dparms/D2DParmIdCache.java index 6a4cbaf1c3..46790b19f3 100644 --- a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/cache/d2dparms/D2DParmIdCache.java +++ b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/cache/d2dparms/D2DParmIdCache.java @@ -294,7 +294,7 @@ public class D2DParmIdCache { } /** - * Refreshes the cache for the given site. This is called up site + * Refreshes the cache for the given site. This is called upon site * activation. Also, the cache is rebuilt when the grib plugin purges its * data. The grib plugin will put a message on a topic so all members of the * cluster will know to rebuild their caches with the updated grib @@ -344,13 +344,20 @@ public class D2DParmIdCache { e); } - for (DatabaseID id : dbIds) { - try { - parmIds.addAll(dao.getD2DParmIdsFromDb(model, id)); - } catch (DataAccessLayerException e) { - throw new PluginException( - "Error adding parmIds to D2DParmIdCache!!", - e); + if (!dbIds.isEmpty()) { + int versions = Math.min( + config.desiredDbVersions(dbIds.get(0)), + dbIds.size()); + + for (int i = 0; i < versions; i++) { + try { + parmIds.addAll(dao.getD2DParmIdsFromDb(model, + dbIds.get(i))); + } catch (DataAccessLayerException e) { + throw new PluginException( + "Error adding parmIds to D2DParmIdCache!!", + e); + } } } diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/config/GFESiteActivation.java b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/config/GFESiteActivation.java index ff5bb19b59..29bda929f2 100644 --- a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/config/GFESiteActivation.java +++ b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/config/GFESiteActivation.java @@ -31,6 +31,7 @@ import com.raytheon.edex.plugin.gfe.cache.d2dparms.D2DParmIdCache; import com.raytheon.edex.plugin.gfe.cache.gridlocations.GridLocationCache; import com.raytheon.edex.plugin.gfe.cache.ifpparms.IFPParmIdCache; import com.raytheon.edex.plugin.gfe.db.dao.GFEDao; +import com.raytheon.edex.plugin.gfe.db.dao.IscSendRecordDao; import com.raytheon.edex.plugin.gfe.exception.GfeConfigurationException; import com.raytheon.edex.plugin.gfe.isc.IRTManager; import com.raytheon.edex.plugin.gfe.reference.MapManager; @@ -74,6 +75,8 @@ import com.raytheon.uf.edex.site.ISiteActivationListener; * ------------ ---------- ----------- -------------------------- * Jul 9, 2009 njensen Initial creation * Oct 26, 2010 #6811 jclark changed listener type + * Apr 06, 2012 #457 dgilling Clear site's ISCSendRecords on + * site deactivation. * * * @@ -216,6 +219,7 @@ public class GFESiteActivation implements ISiteActivationListener { * * @param siteID */ + @Override public void activateSite(String siteID) throws Exception { sendActivationBeginNotification(siteID); @@ -475,6 +479,7 @@ public class GFESiteActivation implements ISiteActivationListener { * * @param siteID */ + @Override public void deactivateSite(String siteID) throws Exception { sendDeactivationBeginNotification(siteID); @@ -504,6 +509,14 @@ public class GFESiteActivation implements ISiteActivationListener { IRTManager.getInstance().disableISC(config.getMhsid(), siteID); } + try { + new IscSendRecordDao().deleteForSite(siteID); + } catch (DataAccessLayerException e) { + statusHandler.handle(Priority.PROBLEM, + "Could not clear IscSendRecords for site " + siteID + + " from queue.", e); + } + TopoDatabaseManager.removeTopoDatabase(siteID); for (String source : ClimoDatabaseManager.getClimoSources()) { ClimoDatabaseManager.removeClimoDatabase(siteID, source); @@ -538,6 +551,7 @@ public class GFESiteActivation implements ISiteActivationListener { * * @return the active sites */ + @Override public Set getActiveSites() { return IFPServerConfigManager.getActiveSites(); } @@ -572,4 +586,4 @@ public class GFESiteActivation implements ISiteActivationListener { return retVal; } -} +} \ No newline at end of file diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/db/dao/GFEDao.java b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/db/dao/GFEDao.java index 7ccd4f1896..b79557181b 100644 --- a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/db/dao/GFEDao.java +++ b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/db/dao/GFEDao.java @@ -28,7 +28,6 @@ import java.util.Collections; import java.util.Date; import java.util.HashMap; import java.util.HashSet; -import java.util.LinkedHashSet; import java.util.List; import java.util.Map; import java.util.Set; @@ -155,6 +154,7 @@ public class GFEDao extends DefaultPluginDao { public int purgeDatabaseForSite(final String siteID) throws DataAccessLayerException { return (Integer) txTemplate.execute(new TransactionCallback() { + @Override public Integer doInTransaction(TransactionStatus status) { List dbs = getDatabaseInventoryForSite(siteID); if (dbs.isEmpty()) { @@ -353,6 +353,7 @@ public class GFEDao extends DefaultPluginDao { throws DataAccessLayerException { GFERecord retVal = (GFERecord) txTemplate .execute(new TransactionCallback() { + @Override @SuppressWarnings("unchecked") public GFERecord doInTransaction(TransactionStatus status) { DetachedCriteria criteria = DetachedCriteria @@ -376,6 +377,7 @@ public class GFEDao extends DefaultPluginDao { } List retVal = (List) txTemplate .execute(new TransactionCallback() { + @Override public List doInTransaction( TransactionStatus status) { List dataTimes = new ArrayList(); @@ -383,25 +385,14 @@ public class GFEDao extends DefaultPluginDao { dataTimes.add(new DataTime(tr.getStart().getTime(), tr)); } + DetachedCriteria criteria = DetachedCriteria .forClass(GFERecord.class) .add(Property.forName("parmId").eq(parmId)) .add(Property.forName("dataTime").in(dataTimes)); List list = getHibernateTemplate() .findByCriteria(criteria); - list = new ArrayList( - new LinkedHashSet(list)); - if (list.size() > 0) { - for (GFERecord rec : list) { - Set set = new LinkedHashSet( - rec.getGridHistory()); - rec.setGridHistory(new ArrayList( - set)); - } - return list; - } else { - return Collections.emptyList(); - } + return list; } }); return retVal; @@ -463,7 +454,12 @@ public class GFEDao extends DefaultPluginDao { + range); } else if (result.size() == 1) { GFERecord returnedRecord = result.get(0); - returnedRecord.setGridHistory(history.get(range)); + + List existHist = returnedRecord + .getGridHistory(); + List newHist = history.get(range); + consolidateHistories(existHist, newHist); + this.update(returnedRecord); } else { logger.error("MORE THAN 1 RESULT WAS RETURNED: " @@ -472,6 +468,30 @@ public class GFEDao extends DefaultPluginDao { } } + public void consolidateHistories(List existHist, + List newHist) { + for (int i = 0; i < newHist.size(); i++) { + if (i < existHist.size()) { + existHist.get(i).replaceValues(newHist.get(i)); + } else { + existHist.add(newHist.get(i)); + } + } + + if (existHist.size() > newHist.size()) { + // not sure if we will ever have a case where the updated + // record has fewer history records than existing record + + // log a message as this has the potential to cause orphaned + // history records + statusHandler.handle(Priority.WARN, + "Updated record has fewer history records."); + for (int i = newHist.size(); i < existHist.size(); i++) { + existHist.remove(i); + } + } + } + /** * Gets all GFE Records with the specified DatabaseID * diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/db/dao/GFELockDao.java b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/db/dao/GFELockDao.java index 09ae8e7cb3..b14de30cd9 100644 --- a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/db/dao/GFELockDao.java +++ b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/db/dao/GFELockDao.java @@ -21,13 +21,18 @@ package com.raytheon.edex.plugin.gfe.db.dao; import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.HashMap; import java.util.List; +import java.util.Map; -import org.hibernate.Criteria; import org.hibernate.Session; +import org.hibernate.Transaction; import com.raytheon.uf.common.dataplugin.gfe.db.objects.ParmID; import com.raytheon.uf.common.dataplugin.gfe.server.lock.Lock; +import com.raytheon.uf.common.dataplugin.gfe.server.lock.LockTable; import com.raytheon.uf.common.dataquery.db.QueryParam.QueryOperand; import com.raytheon.uf.common.message.WsId; import com.raytheon.uf.common.time.TimeRange; @@ -97,36 +102,6 @@ public class GFELockDao extends CoreDao { return locks; } - /** - * Gets all locks - * - * @return All locks currently held - * @throws DataAccessLayerException - * If database errors occur - */ - @SuppressWarnings("unchecked") - public List getAllLocks() throws DataAccessLayerException { - Session s = this.getHibernateTemplate().getSessionFactory() - .openSession(); - List locks = null; - try { - // Until cluster-safe caching is in place, this line is necessary to - // maintain consistency in a cluster and prevent phantom locks - // s.setCacheMode(CacheMode.IGNORE); - - Criteria c = s.createCriteria(daoClass); - locks = c.list(); - if (locks == null) { - locks = new ArrayList(); - } - } finally { - if (s != null) { - s.close(); - } - } - return locks; - } - /** * Gets a specific lock * @@ -161,4 +136,93 @@ public class GFELockDao extends CoreDao { return locks.get(0); } } + + /** + * Gets locks for the provided list of ParmIDs. The locks are retrieved, + * lock tables are constructed and assigned the provided workstation ID + * + * @param parmIds + * The ParmIDs to get the lock tables for + * @param wsId + * The workstation ID to assign to the lock tables + * @return A map of the ParmID and its associated lock table + * @throws DataAccessLayerException + * If errors occur during database interaction + */ + @SuppressWarnings("unchecked") + public Map getLocks(List parmIds, WsId wsId) + throws DataAccessLayerException { + // The return variable + Map lockMap = new HashMap(); + + // Variable to hold the results of the lock table query + List queryResult = null; + + // Return if no parmIDs are provided + if (parmIds.isEmpty()) { + return Collections.emptyMap(); + } + + DatabaseQuery query = new DatabaseQuery(daoClass.getName()); + query.addQueryParam("parmId", parmIds, QueryOperand.IN); + queryResult = (List) queryByCriteria(query); + + ParmID lockParmID = null; + for (Lock lock : queryResult) { + lockParmID = lock.getParmId(); + LockTable lockTable = lockMap.get(lockParmID); + if (lockTable == null) { + lockTable = new LockTable(lockParmID, new ArrayList(), + wsId); + lockMap.put(lockParmID, lockTable); + } + lockTable.addLock(lock); + } + /* + * Do a check to make sure all required lock tables are present in the + * map + */ + if (parmIds != null) { + for (ParmID requiredParmId : parmIds) { + if (!lockMap.containsKey(requiredParmId)) { + lockMap.put(requiredParmId, new LockTable(requiredParmId, + new ArrayList(0), wsId)); + } + } + } + return lockMap; + } + + /** + * Updates additions and deletions to the lock table in a single transaction + * + * @param locksToDelete + * The locks to delete + * @param locksToAdd + * The locks to add + */ + public void updateCombinedLocks(Collection locksToDelete, + Collection locksToAdd) throws DataAccessLayerException { + if (!locksToDelete.isEmpty() || !locksToAdd.isEmpty()) { + Session s = this.getHibernateTemplate().getSessionFactory() + .openSession(); + Transaction tx = s.beginTransaction(); + try { + for (Lock lock : locksToAdd) { + s.save(lock); + } + for (Lock lock : locksToDelete) { + s.delete(lock); + } + tx.commit(); + } catch (Throwable e) { + tx.rollback(); + throw new DataAccessLayerException("Error combining locks", e); + } finally { + if (s != null) { + s.close(); + } + } + } + } } diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/db/dao/IscSendRecordDao.java b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/db/dao/IscSendRecordDao.java index 80cf016632..be1c9403c9 100644 --- a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/db/dao/IscSendRecordDao.java +++ b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/db/dao/IscSendRecordDao.java @@ -22,7 +22,7 @@ package com.raytheon.edex.plugin.gfe.db.dao; import java.util.Date; import com.raytheon.edex.plugin.gfe.isc.IscSendRecord; -import com.raytheon.edex.plugin.gfe.isc.IscSendRecordPK.IscSendState; +import com.raytheon.edex.plugin.gfe.isc.IscSendRecord.IscSendState; import com.raytheon.uf.common.dataquery.db.QueryParam.QueryOperand; import com.raytheon.uf.edex.database.DataAccessLayerException; import com.raytheon.uf.edex.database.dao.CoreDao; @@ -39,6 +39,9 @@ import com.raytheon.uf.edex.database.query.DatabaseQuery; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * Nov 10, 2011 bphillip Initial creation + * Apr 06, 2012 #457 dgilling Added deleteForSite(). + * May 08, 2012 #600 dgilling Refactor to match IscSendRecord + * changes. * * * @@ -48,19 +51,24 @@ import com.raytheon.uf.edex.database.query.DatabaseQuery; public class IscSendRecordDao extends CoreDao { - /** - * @param config - */ public IscSendRecordDao() { super(DaoConfig.forClass(IscSendRecord.class)); } public int purgeExpiredPending() throws DataAccessLayerException { DatabaseQuery deleteStmt = new DatabaseQuery(this.daoClass); - deleteStmt.addQueryParam("id.timeRange.end", new Date(), + deleteStmt.addQueryParam("timeRange.end", new Date(), QueryOperand.LESSTHAN); - deleteStmt.addQueryParam("id.state", IscSendState.PENDING); + deleteStmt.addQueryParam("state", IscSendState.PENDING); return this.deleteByCriteria(deleteStmt); } -} + public int deleteForSite(String siteId) throws DataAccessLayerException { + DatabaseQuery deleteStmt = new DatabaseQuery(this.daoClass); + deleteStmt.addQueryParam("state", IscSendState.RUNNING, + QueryOperand.NOTEQUALS); + deleteStmt.addQueryParam("parmID", "%:" + siteId + "_%", + QueryOperand.LIKE); + return deleteByCriteria(deleteStmt); + } +} \ No newline at end of file diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/isc/IscSendJob.java b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/isc/IscSendJob.java index 52cd460760..c46a082ff8 100644 --- a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/isc/IscSendJob.java +++ b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/isc/IscSendJob.java @@ -31,6 +31,7 @@ import java.util.Map; import jep.JepException; +import com.raytheon.edex.plugin.gfe.config.GFESiteActivation; import com.raytheon.edex.plugin.gfe.config.IFPServerConfig; import com.raytheon.edex.plugin.gfe.config.IFPServerConfigManager; import com.raytheon.edex.plugin.gfe.db.dao.GFEDao; @@ -60,6 +61,8 @@ import com.raytheon.uf.edex.database.plugin.PluginFactory; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * 07/06/09 1995 bphillip Initial release + * 04/06/12 #457 dgilling Move call to delete records + * from queue into run(). * * * @@ -117,6 +120,7 @@ public class IscSendJob implements Runnable { .getNextSendJob(runningTimeOutMillis); if (record != null) { runIscSend(record); + SendIscTransactions.removeSendJob(record); } else { try { Thread.sleep(threadSleepInterval); @@ -135,11 +139,18 @@ public class IscSendJob implements Runnable { private void runIscSend(IscSendRecord request) { try { - ParmID id = request.getId().getParmID(); - TimeRange tr = request.getId().getTimeRange(); - String xmlDest = request.getId().getXmlDest(); + ParmID id = request.getParmID(); + TimeRange tr = request.getTimeRange(); + String xmlDest = request.getXmlDest(); String siteId = id.getDbId().getSiteId(); + if (!GFESiteActivation.getInstance().getActiveSites() + .contains(siteId)) { + statusHandler.warn("Attempted to send " + id + + " for deactivated site " + siteId + "."); + return; + } + statusHandler.info("Starting isc for " + id.toString() + " " + tr.toString() + " " + xmlDest); @@ -204,8 +215,7 @@ public class IscSendJob implements Runnable { return; } - WsId wsId = new WsId(InetAddress.getLocalHost(), "ISC", "ISC", - 0); + WsId wsId = new WsId(InetAddress.getLocalHost(), "ISC", "ISC"); List inventory = sr.getPayload(); List overlapTimes = new ArrayList(); for (TimeRange range : inventory) { @@ -241,7 +251,6 @@ public class IscSendJob implements Runnable { } catch (Throwable t) { statusHandler.error("Exception in ISCSendJob: ", t); } - SendIscTransactions.removeSendJob(request); } public int getRunningTimeOutMillis() { @@ -267,4 +276,4 @@ public class IscSendJob implements Runnable { public void setInitialDelay(int initialDelay) { this.initialDelay = initialDelay; } -} +} \ No newline at end of file diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/isc/IscSendQueue.java b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/isc/IscSendQueue.java index dcff6a5fee..72c923aff8 100644 --- a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/isc/IscSendQueue.java +++ b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/isc/IscSendQueue.java @@ -36,7 +36,8 @@ import org.hibernate.Transaction; import org.hibernate.criterion.MatchMode; import org.hibernate.criterion.Restrictions; -import com.raytheon.edex.plugin.gfe.isc.IscSendRecordPK.IscSendState; +import com.raytheon.edex.plugin.gfe.isc.IscSendRecord.IscSendState; +import com.raytheon.uf.common.dataplugin.gfe.db.objects.ParmID; import com.raytheon.uf.common.serialization.SerializationException; import com.raytheon.uf.common.serialization.SerializationUtil; import com.raytheon.uf.common.status.IUFStatusHandler; @@ -58,6 +59,8 @@ import com.raytheon.uf.edex.database.dao.DaoConfig; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * Oct 20, 2011 dgilling Initial creation + * May 08, 2012 #600 dgilling Re-work logic for handling PENDING + * records. * * * @@ -67,12 +70,84 @@ import com.raytheon.uf.edex.database.dao.DaoConfig; public class IscSendQueue { + // how we'll organize the temporary queue + private class JobSetQueueKey { + + private ParmID pid; + + private IscSendState state; + + public JobSetQueueKey(ParmID pid, IscSendState state) { + this.pid = pid; + this.state = state; + } + + /* + * (non-Javadoc) + * + * @see java.lang.Object#hashCode() + */ + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + ((pid == null) ? 0 : pid.hashCode()); + result = prime * result + ((state == null) ? 0 : state.hashCode()); + return result; + } + + /* + * (non-Javadoc) + * + * @see java.lang.Object#equals(java.lang.Object) + */ + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + + JobSetQueueKey other = (JobSetQueueKey) obj; + if (pid == null) { + if (other.pid != null) { + return false; + } + } else if (!pid.equals(other.pid)) { + return false; + } + if (state != other.state) { + return false; + } + return true; + } + + /** + * @return the pid + */ + public ParmID getPid() { + return pid; + } + + /** + * @return the state + */ + public IscSendState getState() { + return state; + } + } + private static final transient IUFStatusHandler handler = UFStatus .getHandler(IscSendQueue.class); private int timeoutMillis = 60000; - private Map jobSet = new HashMap(); + private Map> jobSet = new HashMap>(); private static final IscSendQueue instance = new IscSendQueue(); @@ -118,41 +193,97 @@ public class IscSendQueue { private void mergeSendJobs(Collection newSendJobs) { synchronized (this) { for (IscSendRecord job : newSendJobs) { - // in AWIPS1 if a QUEUED job matched any PENDING jobs, the - // pending job was removed. - if (job.getId().getState().equals(IscSendState.QUEUED)) { - try { - IscSendRecordPK recToDelete = (IscSendRecordPK) job - .getId().clone(); - recToDelete.setState(IscSendState.PENDING); - jobSet.remove(recToDelete); - } catch (CloneNotSupportedException e) { - handler.handle(Priority.WARN, - "Clone of IscSendRecordPK failed.", e); - } - } + if (job.getState().equals(IscSendState.QUEUED)) { + addToJobSetQueue(job); - // additionally, AWIPS1 merged records with matching parm and - // xmlDest info, if the TimeRanges of data to be sent could be - // merged together into one contiguous TimeRange - IscSendRecordPK mergeId = null; - for (IscSendRecordPK id : jobSet.keySet()) { - if (job.getId().isMergeableWith(id)) { - mergeId = id; - break; + // remove any matches from pending queue + // remove the pending entry if no times remain. + if (job.getXmlDest().isEmpty()) { + JobSetQueueKey key = new JobSetQueueKey( + job.getParmID(), IscSendState.PENDING); + List pending = jobSet.get(key); + if (pending != null) { + removeTime(pending, job.getTimeRange()); + + if (pending.isEmpty()) { + jobSet.remove(key); + } + } + } + } else { + JobSetQueueKey key = new JobSetQueueKey(job.getParmID(), + IscSendState.PENDING); + List pending = jobSet.get(key); + boolean found = false; + if (pending != null) { + found = mergeTime(pending, job.getTimeRange()); + } + + if (!found) { + addToJobSetQueue(job); } } - if (mergeId != null) { - IscSendRecord oldRecord = jobSet.get(mergeId); - Date newInsertTime = job.getInsertTime(); - if (oldRecord.getInsertTime().compareTo(newInsertTime) < 0) { - oldRecord.setInsertTime(newInsertTime); - } - TimeRange newTR = oldRecord.getId().getTimeRange() - .combineWith(job.getId().getTimeRange()); - oldRecord.getId().setTimeRange(newTR); + } + } + } + + private boolean mergeTime(List pending, + TimeRange replacementTR) { + for (IscSendRecord record : pending) { + TimeRange origTimeRange = record.getTimeRange(); + if (replacementTR.overlaps(origTimeRange) + || replacementTR.isAdjacentTo(origTimeRange)) { + TimeRange combinedTR = replacementTR.join(origTimeRange); + record.setTimeRange(combinedTR); + record.setInsertTime(new Date()); + return true; + } + } + + return false; + } + + private void removeTime(List records, TimeRange replacementTR) { + // go backwards since we are deleting entries + for (int i = records.size() - 1; i >= 0; i--) { + IscSendRecord record = records.get(i); + TimeRange origTimeRange = record.getTimeRange(); + if (origTimeRange.overlaps(replacementTR)) { + // what is remaining? + TimeRange itime = origTimeRange.intersection(replacementTR); + + // entire range matched + if (itime.equals(origTimeRange)) { + records.remove(i); + } else if (origTimeRange.getStart().equals(itime.getStart())) { + // match at beginning + record.setTimeRange((new TimeRange(itime.getEnd(), + origTimeRange.getEnd()))); + } else if (origTimeRange.getEnd().equals(itime.getEnd())) { + // match at end + record.setTimeRange(new TimeRange(origTimeRange.getStart(), + itime.getStart())); } else { - jobSet.put(job.getId(), job); + // match in the middle, requires a split + TimeRange t1 = new TimeRange(origTimeRange.getStart(), + itime.getStart()); + TimeRange t2 = new TimeRange(itime.getEnd(), + origTimeRange.getEnd()); + records.remove(i); + + try { + IscSendRecord before = record.clone(); + before.setTimeRange(t1); + before.setInsertTime(new Date()); + records.add(before); + + IscSendRecord after = record.clone(); + after.setTimeRange(t2); + after.setInsertTime(new Date()); + records.add(after); + } catch (CloneNotSupportedException e) { + // no-op + } } } } @@ -167,11 +298,15 @@ public class IscSendQueue { * 2 is send state (one is QUEUED and the other is PENDING), then the * PENDING state job will be removed. */ + @SuppressWarnings("unchecked") public void fireSendJobs() { List newJobs = Collections.emptyList(); synchronized (this) { if (!jobSet.isEmpty()) { - newJobs = new ArrayList(jobSet.values()); + newJobs = new ArrayList(); + for (List recordList : jobSet.values()) { + newJobs.addAll(recordList); + } jobSet.clear(); } } @@ -190,48 +325,50 @@ public class IscSendQueue { // find any exact dupe records and simply refresh the // insert time - oldRecord = (IscSendRecord) s.get(IscSendRecord.class, - record.getId(), LockOptions.UPGRADE); - if (oldRecord != null) { - Date newInsertTime = record.getInsertTime(); - if (oldRecord.getInsertTime().compareTo(newInsertTime) < 0) { - oldRecord.setInsertTime(newInsertTime); - } - s.update(oldRecord); - foundDupe = true; - } + Criteria dupeCrit = s.createCriteria(IscSendRecord.class); + Map critMap = new HashMap(5); + critMap.put("parmID", record.getParmID()); + critMap.put("state", record.getState()); + critMap.put("xmlDest", record.getXmlDest()); + critMap.put("timeRange.start", record.getTimeRange().getStart()); + critMap.put("timeRange.end", record.getTimeRange().getEnd()); + dupeCrit.add(Restrictions.allEq(critMap)); + List dupes = dupeCrit.list(); - // as in the mergeSendJobs(), delete any matching - // PENDING records - if (record.getId().getState().equals(IscSendState.QUEUED)) { - try { - IscSendRecordPK recToDelete = (IscSendRecordPK) record - .getId().clone(); - recToDelete.setState(IscSendState.PENDING); - IscSendRecord toDelete = (IscSendRecord) s.get( - IscSendRecord.class, recToDelete, - LockOptions.UPGRADE); - if (toDelete != null) { - s.delete(toDelete); + for (IscSendRecord dupe : dupes) { + oldRecord = (IscSendRecord) s.get(IscSendRecord.class, + dupe.getKey(), LockOptions.UPGRADE); + if (oldRecord != null) { + Date newInsertTime = record.getInsertTime(); + if (oldRecord.getInsertTime().compareTo(newInsertTime) < 0) { + oldRecord.setInsertTime(newInsertTime); } - } catch (CloneNotSupportedException e) { - handler.handle(Priority.WARN, - "Clone of IscSendRecordPK failed.", e); + s.update(oldRecord); + foundDupe = true; } } - // find any jobs that can be merged with this one - if (!foundDupe) { - foundMerge = mergeRecordIntoDb(record, s); - if (!foundMerge) { - s.save(record); + // as in the mergeSendJobs(), remove time from any matching + // PENDING records + // And merge TimeRanges of PENDING records with existing PENDING + // records + if (record.getState().equals(IscSendState.QUEUED)) { + if (record.getXmlDest().isEmpty()) { + removeTimeFromDbPending(record, s); } + } else { + // find any jobs that can be merged with this one + foundMerge = mergeRecordIntoDb(record, s); + } + + if (!foundDupe && !foundMerge) { + s.save(record); } tx.commit(); } catch (Throwable t) { handler.handle(Priority.ERROR, "Error adding ISC send job [" - + record.getId() + "] to database queue", t); + + record.toString() + "] to database queue", t); if (tx != null) { try { @@ -256,50 +393,126 @@ public class IscSendQueue { } } + @SuppressWarnings("unchecked") + private void removeTimeFromDbPending(IscSendRecord record, Session s) { + Criteria pendingCrit = s.createCriteria(IscSendRecord.class); + Map critMap = new HashMap(3); + critMap.put("parmID", record.getParmID()); + critMap.put("state", IscSendState.PENDING); + critMap.put("xmlDest", record.getXmlDest()); + pendingCrit.add(Restrictions.allEq(critMap)); + TimeRange replacementTR = record.getTimeRange(); + pendingCrit.add(Restrictions.and( + Restrictions.le("timeRange.start", replacementTR.getEnd()), + Restrictions.ge("timeRange.end", replacementTR.getStart()))); + List overlappingRecords = pendingCrit.list(); + + for (IscSendRecord overlapRec : overlappingRecords) { + IscSendRecord recToModify = (IscSendRecord) s.get( + IscSendRecord.class, overlapRec.getKey(), + LockOptions.UPGRADE); + if (recToModify != null) { + TimeRange origTR = recToModify.getTimeRange(); + TimeRange itime = origTR.intersection(replacementTR); + + if (itime.equals(origTR)) { + s.delete(recToModify); + } else if (itime.getStart().equals(origTR.getStart())) { + recToModify.setTimeRange(new TimeRange(itime.getEnd(), + origTR.getEnd())); + s.update(recToModify); + } else if (itime.getEnd().equals(origTR.getEnd())) { + recToModify.setTimeRange(new TimeRange(origTR.getStart(), + itime.getStart())); + s.update(recToModify); + } else { + try { + IscSendRecord before = recToModify.clone(); + before.setTimeRange(new TimeRange(origTR.getStart(), + itime.getStart())); + before.setInsertTime(new Date()); + + IscSendRecord after = recToModify.clone(); + after.setTimeRange(new TimeRange(itime.getEnd(), origTR + .getEnd())); + after.setInsertTime(new Date()); + + s.save(before); + s.save(after); + } catch (CloneNotSupportedException e) { + // no-op + } + + s.delete(recToModify); + } + } + } + } + @SuppressWarnings("unchecked") private boolean mergeRecordIntoDb(IscSendRecord record, Session s) { Criteria mergeCrit = s.createCriteria(IscSendRecord.class); Map critMap = new HashMap(3); - critMap.put("id.parmID", record.getId().getParmID()); - critMap.put("id.state", record.getId().getState()); - critMap.put("id.xmlDest", record.getId().getXmlDest()); + critMap.put("parmID", record.getParmID()); + critMap.put("state", record.getState()); + critMap.put("xmlDest", record.getXmlDest()); mergeCrit.add(Restrictions.allEq(critMap)); List possibleMerges = mergeCrit.list(); for (IscSendRecord rec : possibleMerges) { - TimeRange trToMerge = record.getId().getTimeRange(); - TimeRange trExisting = rec.getId().getTimeRange(); + TimeRange trToMerge = record.getTimeRange(); + TimeRange trExisting = rec.getTimeRange(); if (trToMerge.isAdjacentTo(trExisting) || trToMerge.overlaps(trExisting)) { IscSendRecord oldRecord = (IscSendRecord) s.get( - IscSendRecord.class, rec.getId(), LockOptions.UPGRADE); + IscSendRecord.class, rec.getKey(), LockOptions.UPGRADE); if (oldRecord != null) { try { s.delete(oldRecord); - IscSendRecord newRecord = (IscSendRecord) oldRecord - .clone(); + IscSendRecord newRecord = oldRecord.clone(); TimeRange mergedTR = trExisting.combineWith(trToMerge); - newRecord.getId().setTimeRange(mergedTR); + newRecord.setTimeRange(mergedTR); newRecord.setInsertTime(record.getInsertTime()); // ensure we have not created a duplicate record by // merging the time ranges - IscSendRecord dupeRecord = (IscSendRecord) s.get( - IscSendRecord.class, newRecord.getId(), - LockOptions.UPGRADE); - if (dupeRecord != null) { - Date newInsertTime = newRecord.getInsertTime(); - if (dupeRecord.getInsertTime().compareTo( - newInsertTime) < 0) { - dupeRecord.setInsertTime(newInsertTime); + Criteria dupeCrit = s + .createCriteria(IscSendRecord.class); + Map dupeCritMap = new HashMap( + 5); + dupeCritMap.put("parmID", record.getParmID()); + dupeCritMap.put("state", record.getState()); + dupeCritMap.put("xmlDest", record.getXmlDest()); + dupeCritMap.put("timeRange.start", record + .getTimeRange().getStart()); + dupeCritMap.put("timeRange.end", record.getTimeRange() + .getEnd()); + dupeCrit.add(Restrictions.allEq(critMap)); + List dupes = dupeCrit.list(); + + boolean foundDupe = false; + for (IscSendRecord dupe : dupes) { + IscSendRecord dupeRecord = (IscSendRecord) s.get( + IscSendRecord.class, dupe.getKey(), + LockOptions.UPGRADE); + if (dupeRecord != null) { + Date newInsertTime = newRecord.getInsertTime(); + if (dupeRecord.getInsertTime().compareTo( + newInsertTime) < 0) { + dupeRecord.setInsertTime(newInsertTime); + } + s.update(dupeRecord); + foundDupe = true; } - s.update(dupeRecord); - } else { + } + + if (!foundDupe) { s.save(newRecord); } } catch (Exception e) { handler.handle(Priority.WARN, "IscSendRecord merge failed.", e); + return false; } return true; @@ -314,15 +527,15 @@ public class IscSendQueue { public void sendPending(String siteId) { synchronized (this) { // update records not yet flushed to the database - for (IscSendRecordPK key : jobSet.keySet()) { + for (JobSetQueueKey key : jobSet.keySet()) { if ((key.getState().equals(IscSendState.PENDING)) - && (key.getParmID().getDbId().getSiteId() - .equals(siteId))) { - IscSendRecord record = jobSet.remove(key); - key.setState(IscSendState.QUEUED); - record.setId(key); - record.setInsertTime(new Date()); - jobSet.put(key, record); + && (key.getPid().getDbId().getSiteId().equals(siteId))) { + List recordList = jobSet.remove(key); + for (IscSendRecord record : recordList) { + record.setState(IscSendState.QUEUED); + record.setInsertTime(new Date()); + addToJobSetQueue(record); + } } } } @@ -336,8 +549,8 @@ public class IscSendQueue { Criteria pendingCrit = lookupSess .createCriteria(IscSendRecord.class); - pendingCrit.add(Restrictions.and(Restrictions.eq("id.state", - IscSendState.PENDING), Restrictions.like("id.parmID", ":" + pendingCrit.add(Restrictions.and(Restrictions.eq("state", + IscSendState.PENDING), Restrictions.like("parmID", ":" + siteId + "_", MatchMode.ANYWHERE))); pendingToSending = pendingCrit.list(); } catch (Throwable t) { @@ -368,11 +581,11 @@ public class IscSendQueue { tx = dbModSess.beginTransaction(); IscSendRecord oldRecord = (IscSendRecord) dbModSess.get( - IscSendRecord.class, rec.getId(), LockOptions.UPGRADE); + IscSendRecord.class, rec.getKey(), LockOptions.UPGRADE); if (oldRecord != null) { - IscSendRecord sendRec = (IscSendRecord) oldRecord.clone(); + IscSendRecord sendRec = oldRecord.clone(); dbModSess.delete(oldRecord); - sendRec.getId().setState(IscSendState.QUEUED); + sendRec.setState(IscSendState.QUEUED); sendRec.setInsertTime(new Date()); sendRecords.add(sendRec); } @@ -408,6 +621,17 @@ public class IscSendQueue { mergeSendJobs(sendRecords); } + private void addToJobSetQueue(IscSendRecord record) { + JobSetQueueKey key = new JobSetQueueKey(record.getParmID(), + record.getState()); + List recordList = jobSet.get(key); + if (recordList == null) { + recordList = new ArrayList(); + jobSet.put(key, recordList); + } + recordList.add(record); + } + public void setTimeoutMillis(int timeoutMillis) { this.timeoutMillis = timeoutMillis; } diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/isc/IscSendRecord.java b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/isc/IscSendRecord.java index 446a0c5c59..4afadd98ca 100644 --- a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/isc/IscSendRecord.java +++ b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/isc/IscSendRecord.java @@ -23,14 +23,18 @@ import java.io.Serializable; import java.util.Date; import javax.persistence.Column; +import javax.persistence.Embedded; import javax.persistence.Entity; +import javax.persistence.EnumType; +import javax.persistence.Enumerated; +import javax.persistence.GeneratedValue; import javax.persistence.Id; import javax.persistence.Table; import javax.persistence.UniqueConstraint; import org.hibernate.annotations.Index; +import org.hibernate.annotations.Type; -import com.raytheon.edex.plugin.gfe.isc.IscSendRecordPK.IscSendState; import com.raytheon.uf.common.dataplugin.gfe.db.objects.ParmID; import com.raytheon.uf.common.dataplugin.persist.IPersistableDataObject; import com.raytheon.uf.common.serialization.ISerializableObject; @@ -49,6 +53,7 @@ import com.raytheon.uf.common.time.TimeRange; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * Oct 20, 2011 dgilling Initial creation + * May 08, 2012 #600 dgilling Restructure. * * * @@ -65,9 +70,32 @@ public class IscSendRecord implements IPersistableDataObject, Serializable, private static final long serialVersionUID = 1L; + public enum IscSendState { + QUEUED, PENDING, RUNNING + }; + @Id + @GeneratedValue() + private int key; + @DynamicSerializeElement - private IscSendRecordPK id; + @Column(nullable = false) + @Type(type = "com.raytheon.uf.common.dataplugin.gfe.db.type.ParmIdType") + @Index(name = "iscParmIdIndex") + private ParmID parmID; + + @DynamicSerializeElement + @Embedded + private TimeRange timeRange; + + @DynamicSerializeElement + @Column(nullable = false, length = 10) + @Enumerated(EnumType.STRING) + private IscSendState state; + + @Column(columnDefinition = "text") + @DynamicSerializeElement + private String xmlDest; @Column @DynamicSerializeElement @@ -78,11 +106,33 @@ public class IscSendRecord implements IPersistableDataObject, Serializable, // no-op, needed for dynamic serialize/hibernate } - public IscSendRecord(ParmID parmId, TimeRange sendTR, String xmlDest, - boolean sendNow) { + public IscSendRecord(ParmID parmId, TimeRange sendTR, boolean sendNow) { + this.parmID = parmId; + this.timeRange = sendTR; + this.xmlDest = ""; IscSendState state = (sendNow ? IscSendState.QUEUED : IscSendState.PENDING); - this.id = new IscSendRecordPK(parmId, sendTR, state, xmlDest); + this.state = state; + this.insertTime = new Date(); + } + + public IscSendRecord(ParmID parmId, TimeRange sendTR, String xmlDest, + boolean sendNow) { + this.parmID = parmId; + this.timeRange = sendTR; + this.xmlDest = xmlDest; + IscSendState state = (sendNow ? IscSendState.QUEUED + : IscSendState.PENDING); + this.state = state; + this.insertTime = new Date(); + } + + public IscSendRecord(ParmID parmId, TimeRange sendTR, String xmlDest, + IscSendState state) { + this.parmID = parmId; + this.timeRange = sendTR; + this.xmlDest = xmlDest; + this.state = state; this.insertTime = new Date(); } @@ -94,23 +144,108 @@ public class IscSendRecord implements IPersistableDataObject, Serializable, */ @Override public Object getIdentifier() { - return id; + return key; } + /* + * (non-Javadoc) + * + * @see java.lang.Object#clone() + */ @Override - protected Object clone() throws CloneNotSupportedException { - IscSendRecord rval = new IscSendRecord(); - rval.id = (IscSendRecordPK) this.id.clone(); - rval.insertTime = (Date) this.insertTime.clone(); + public IscSendRecord clone() throws CloneNotSupportedException { + IscSendRecord rval = new IscSendRecord(this.parmID.clone(), + this.timeRange.clone(), this.xmlDest, this.state); + rval.setInsertTime((Date) this.insertTime.clone()); return rval; } - public IscSendRecordPK getId() { - return id; + /* + * (non-Javadoc) + * + * @see java.lang.Object#hashCode() + */ + @Override + public int hashCode() { + final int prime = 31; + int result = 1; + result = prime * result + + ((insertTime == null) ? 0 : insertTime.hashCode()); + result = prime * result + ((parmID == null) ? 0 : parmID.hashCode()); + result = prime * result + ((state == null) ? 0 : state.hashCode()); + result = prime * result + + ((timeRange == null) ? 0 : timeRange.hashCode()); + result = prime * result + ((xmlDest == null) ? 0 : xmlDest.hashCode()); + return result; } - public void setId(IscSendRecordPK id) { - this.id = id; + /* + * (non-Javadoc) + * + * @see java.lang.Object#equals(java.lang.Object) + */ + @Override + public boolean equals(Object obj) { + if (this == obj) { + return true; + } + if (obj == null) { + return false; + } + if (getClass() != obj.getClass()) { + return false; + } + IscSendRecord other = (IscSendRecord) obj; + if (insertTime == null) { + if (other.insertTime != null) { + return false; + } + } else if (!insertTime.equals(other.insertTime)) { + return false; + } + if (parmID == null) { + if (other.parmID != null) { + return false; + } + } else if (!parmID.equals(other.parmID)) { + return false; + } + if (state != other.state) { + return false; + } + if (timeRange == null) { + if (other.timeRange != null) { + return false; + } + } else if (!timeRange.equals(other.timeRange)) { + return false; + } + if (xmlDest == null) { + if (other.xmlDest != null) { + return false; + } + } else if (!xmlDest.equals(other.xmlDest)) { + return false; + } + return true; + } + + /* + * (non-Javadoc) + * + * @see java.lang.Object#toString() + */ + @Override + public String toString() { + StringBuilder builder = new StringBuilder(); + builder.append("IscSendRecord [parmID="); + builder.append(parmID); + builder.append(", timeRange="); + builder.append(timeRange); + builder.append(", state="); + builder.append(state); + builder.append("]"); + return builder.toString(); } public Date getInsertTime() { @@ -120,4 +255,40 @@ public class IscSendRecord implements IPersistableDataObject, Serializable, public void setInsertTime(Date insertTime) { this.insertTime = insertTime; } + + public ParmID getParmID() { + return parmID; + } + + public void setParmID(ParmID parmID) { + this.parmID = parmID; + } + + public TimeRange getTimeRange() { + return timeRange; + } + + public void setTimeRange(TimeRange timeRange) { + this.timeRange = timeRange; + } + + public IscSendState getState() { + return state; + } + + public void setState(IscSendState state) { + this.state = state; + } + + public String getXmlDest() { + return xmlDest; + } + + public void setXmlDest(String xmlDest) { + this.xmlDest = xmlDest; + } + + public int getKey() { + return key; + } } diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/isc/IscSendRecordPK.java b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/isc/IscSendRecordPK.java deleted file mode 100644 index 4252c45786..0000000000 --- a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/isc/IscSendRecordPK.java +++ /dev/null @@ -1,231 +0,0 @@ -/** - * 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.edex.plugin.gfe.isc; - -import java.io.Serializable; - -import javax.persistence.Column; -import javax.persistence.Embeddable; -import javax.persistence.Embedded; -import javax.persistence.EnumType; -import javax.persistence.Enumerated; -import javax.persistence.Transient; - -import org.hibernate.annotations.Type; - -import com.raytheon.uf.common.dataplugin.gfe.db.objects.ParmID; -import com.raytheon.uf.common.serialization.ISerializableObject; -import com.raytheon.uf.common.serialization.annotations.DynamicSerialize; -import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; -import com.raytheon.uf.common.time.TimeRange; - -/** - * Primary key for a ISCSendRecord. - * - *
- * 
- * SOFTWARE HISTORY
- * 
- * Date         Ticket#    Engineer    Description
- * ------------ ---------- ----------- --------------------------
- * Oct 20, 2011            dgilling     Initial creation
- * 
- * 
- * - * @author dgilling - * @version 1.0 - */ - -@Embeddable -@DynamicSerialize -public class IscSendRecordPK implements ISerializableObject, Serializable, - Cloneable { - - private static final long serialVersionUID = 1L; - - public enum IscSendState { - QUEUED, PENDING, RUNNING - }; - - @DynamicSerializeElement - @Column(nullable = false) - @Type(type = "com.raytheon.uf.common.dataplugin.gfe.db.type.ParmIdType") - private ParmID parmID; - - @DynamicSerializeElement - @Embedded - private TimeRange timeRange; - - @DynamicSerializeElement - @Column(nullable = false, length = 10) - @Enumerated(EnumType.STRING) - private IscSendState state; - - @Column(columnDefinition = "text") - @DynamicSerializeElement - private String xmlDest; - - @Transient - private transient int hashCode; - - public IscSendRecordPK() { - this.state = IscSendState.QUEUED; - this.setXmlDest(""); - } - - public IscSendRecordPK(ParmID parmID, TimeRange tr) { - this(); - this.parmID = parmID; - this.timeRange = tr; - generateHashCode(); - } - - public IscSendRecordPK(ParmID parmID, TimeRange tr, IscSendState state, - String xmlDest) { - this.state = state; - this.parmID = parmID; - this.timeRange = tr; - this.xmlDest = xmlDest; - generateHashCode(); - } - - @Override - public int hashCode() { - return hashCode; - } - - private void generateHashCode() { - final int prime = 31; - int result = 1; - result = prime * result + ((parmID == null) ? 0 : parmID.hashCode()); - result = prime * result + ((state == null) ? 0 : state.hashCode()); - result = prime * result - + ((timeRange == null) ? 0 : timeRange.hashCode()); - result = prime * result + ((xmlDest == null) ? 0 : xmlDest.hashCode()); - hashCode = result; - } - - @Override - public boolean equals(Object obj) { - if (this == obj) - return true; - if (obj == null) - return false; - if (getClass() != obj.getClass()) - return false; - IscSendRecordPK other = (IscSendRecordPK) obj; - if (parmID == null) { - if (other.parmID != null) - return false; - } else if (!parmID.equals(other.parmID)) - return false; - if (state == null) { - if (other.state != null) - return false; - } else if (!state.equals(other.state)) - return false; - if (timeRange == null) { - if (other.timeRange != null) - return false; - } else if (!timeRange.equals(other.timeRange)) - return false; - if (xmlDest == null) { - if (other.xmlDest != null) - return false; - } else if (!xmlDest.equals(other.xmlDest)) - return false; - return true; - } - - @Override - protected Object clone() throws CloneNotSupportedException { - return new IscSendRecordPK(parmID, timeRange.clone(), state, - new String(xmlDest)); - } - - @Override - public String toString() { - StringBuilder tmp = new StringBuilder(); - tmp.append(parmID.toString()); - tmp.append(" TimeRange: "); - if (timeRange != null) { - tmp.append(timeRange.toString()); - } else { - tmp.append("null"); - } - return tmp.toString(); - } - - public ParmID getParmID() { - return parmID; - } - - public void setParmID(ParmID parmID) { - this.parmID = parmID; - } - - public TimeRange getTimeRange() { - return timeRange; - } - - public void setTimeRange(TimeRange timeRange) { - this.timeRange = timeRange; - } - - public IscSendState getState() { - return state; - } - - public void setState(IscSendState state) { - this.state = state; - } - - public void setXmlDest(String xmlDest) { - this.xmlDest = xmlDest; - } - - public String getXmlDest() { - return xmlDest; - } - - /** - * Determines whether a given record can be merged with this record. Records - * are mergeable if and only if: - *
    - *
  • The ParmIDs is the same. - *
  • The send state is the same. - *
  • The XML destinations data is the same. - *
  • The time range is adjacent to or overlaps our time range. - *
- * - * @param other - * The object to compare with. - * @return Whether or not the given record can be merged together with this - * record. - */ - public boolean isMergeableWith(IscSendRecordPK other) { - if ((parmID.equals(other.parmID)) && (state.equals(other.state)) - && xmlDest.equals(other.xmlDest)) { - return (timeRange.isAdjacentTo(other.timeRange) || timeRange - .overlaps(other.timeRange)); - } - return false; - } -} diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/isc/SendIscTransactions.java b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/isc/SendIscTransactions.java index b3452b31a6..5746b6e3dd 100644 --- a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/isc/SendIscTransactions.java +++ b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/isc/SendIscTransactions.java @@ -33,7 +33,7 @@ import org.hibernate.criterion.Criterion; import org.hibernate.criterion.Order; import org.hibernate.criterion.Restrictions; -import com.raytheon.edex.plugin.gfe.isc.IscSendRecordPK.IscSendState; +import com.raytheon.edex.plugin.gfe.isc.IscSendRecord.IscSendState; import com.raytheon.uf.common.dataplugin.gfe.db.objects.ParmID; import com.raytheon.uf.common.status.IUFStatusHandler; import com.raytheon.uf.common.status.UFStatus; @@ -51,6 +51,8 @@ import com.raytheon.uf.edex.database.dao.DaoConfig; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * Oct 20, 2011 dgilling Initial creation + * May 08, 2012 #600 dgilling Refactor to match IscSendRecord + * changes. * * * @@ -84,7 +86,7 @@ public class SendIscTransactions { // check the currently send jobs Criteria runningCrit = sess.createCriteria(IscSendRecord.class); - Criterion stateRunningCrit = Restrictions.eq("id.state", + Criterion stateRunningCrit = Restrictions.eq("state", IscSendState.RUNNING); runningCrit.add(stateRunningCrit); runningCrit.addOrder(Order.asc("insertTime")); @@ -99,12 +101,13 @@ public class SendIscTransactions { // lock the row to ensure no one else will run the // upgrade/delete the row record = (IscSendRecord) sess.get(IscSendRecord.class, - record.getId(), LockOptions.UPGRADE); + record.getKey(), LockOptions.UPGRADE); // double check to make sure another process hasn't // already grabbed it and the run didn't finish if (record != null && record.getInsertTime().getTime() < timeOutCheck) { - handler.info("Running IscSendJob " + record.getId() + handler.info("Running IscSendJob " + + record.getKey() + " timed out. Rerunning IscSendJob."); record.setInsertTime(new Date()); sess.update(record); @@ -118,19 +121,18 @@ public class SendIscTransactions { // query the pending table for available send jobs Criteria queuedCrit = sess.createCriteria(IscSendRecord.class); queuedCrit.addOrder(Order.asc("insertTime")); - Criterion baseCrit = Restrictions.eq("id.state", - IscSendState.QUEUED); + Criterion baseCrit = Restrictions.eq("state", IscSendState.QUEUED); if (!currentlyRunning.isEmpty()) { // exclude the running send jobs Collection runningInits = new ArrayList( currentlyRunning.size()); for (IscSendRecord record : currentlyRunning) { - runningInits.add(record.getId().getParmID()); + runningInits.add(record.getParmID()); } baseCrit = Restrictions.and(baseCrit, Restrictions - .not(Restrictions.in("id.parmID", runningInits))); + .not(Restrictions.in("parmID", runningInits))); } queuedCrit.add(baseCrit); @@ -141,15 +143,15 @@ public class SendIscTransactions { for (IscSendRecord record : queuedRecords) { // lock the record record = (IscSendRecord) sess.get(IscSendRecord.class, - record.getId(), LockOptions.UPGRADE); + record.getKey(), LockOptions.UPGRADE); // double check its still valid if (record != null) { sess.delete(record); // can we update primary key in place?? or do we need to // delete then add - record = (IscSendRecord) record.clone(); - record.getId().setState(IscSendState.RUNNING); + record = record.clone(); + record.setState(IscSendState.RUNNING); record.setInsertTime(new Date()); sess.save(record); trans.commit(); @@ -195,7 +197,7 @@ public class SendIscTransactions { // lock the row to ensure no one else will run the // upgrade/delete the row record = (IscSendRecord) sess.get(IscSendRecord.class, - record.getId(), LockOptions.UPGRADE); + record.getKey(), LockOptions.UPGRADE); if (record != null) { sess.delete(record); diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/reference/MapManager.java b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/reference/MapManager.java index 1fecb85087..678fad49d9 100644 --- a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/reference/MapManager.java +++ b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/reference/MapManager.java @@ -334,6 +334,7 @@ public class MapManager { for (ShapeFile map : maps) { File shapePath = map.getFile().getParentFile().getAbsoluteFile(); File[] shapeFiles = shapePath.listFiles(new FileFilter() { + @Override public boolean accept(File file) { return file.isFile(); } @@ -362,6 +363,7 @@ public class MapManager { File dir = new File(directory); if (dir.exists()) { editAreaFiles = dir.listFiles(new FileFilter() { + @Override public boolean accept(File file) { return file.isFile(); } @@ -371,6 +373,7 @@ public class MapManager { if (editAreaFiles != null) { if (editAreaFiles.length > 0) { Arrays.sort(editAreaFiles, new Comparator() { + @Override public int compare(File f1, File f2) { return Long.valueOf(f1.lastModified()).compareTo( f2.lastModified()); @@ -397,8 +400,7 @@ public class MapManager { @SuppressWarnings("unused") WsId fakeBase = null; try { - fakeBase = new WsId(InetAddress.getLocalHost(), "BASE", - "ifpServer", 0); + fakeBase = new WsId(InetAddress.getLocalHost(), "BASE", "ifpServer"); } catch (UnknownHostException e1) { theLogger.error("Unable to get IP address for localhost"); } diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/GridParm.java b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/GridParm.java index 1f448874ba..799f2db1f1 100644 --- a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/GridParm.java +++ b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/GridParm.java @@ -346,7 +346,7 @@ public class GridParm { trs = ssr.getPayload(); // Get the lock table - WsId wsId = new WsId(null, "timePurge", "EDEX", 0); + WsId wsId = new WsId(null, "timePurge", "EDEX"); List lts = new ArrayList(); LockTableRequest lockreq = new LockTableRequest(this.id); diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/database/ClimoDatabase.java b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/database/ClimoDatabase.java index 1eebec5e90..79a38adc40 100644 --- a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/database/ClimoDatabase.java +++ b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/database/ClimoDatabase.java @@ -162,7 +162,7 @@ public class ClimoDatabase extends IFPGridDatabase { ServerResponse sr = saveGridData(parmId, TimeRange.allTimes(), new ArrayList(), - new WsId(null, "initialization", "ClimoDatabase", 0)); + new WsId(null, "initialization", "ClimoDatabase")); if (!sr.isOkay()) { StringBuilder tmp = new StringBuilder(200); tmp.append("Error occurred saving climo parm:"); diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/database/HLSTopoDatabase.java b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/database/HLSTopoDatabase.java index cc7a427812..5105ef37d4 100644 --- a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/database/HLSTopoDatabase.java +++ b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/database/HLSTopoDatabase.java @@ -182,7 +182,7 @@ public class HLSTopoDatabase extends IFPGridDatabase { ServerResponse sr = saveGridData(parmId, allTimes, new ArrayList(), new WsId(null, - "initialization", "HLSTopoDatabase", 0)); + "initialization", "HLSTopoDatabase")); if (!sr.isOkay()) { StringBuilder tmp = new StringBuilder(); ArrayList messages = sr.getMessages(); diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/database/IFPGridDatabase.java b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/database/IFPGridDatabase.java index 15d951f8d6..b82c54aebc 100644 --- a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/database/IFPGridDatabase.java +++ b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/database/IFPGridDatabase.java @@ -977,51 +977,9 @@ public class IFPGridDatabase extends GridDatabase { } else { existing.setMessageData(rec.getMessageData()); - if (!parmId.getDbId().getModelName().equals("ISC")) { - GridDataHistory existHist = existing.getGridHistory() - .get(0); - GridDataHistory newHist = rec.getGridHistory().get(0); - existHist.replaceValues(newHist); - } else { - List existHist = existing.getGridHistory(); - List newHist = rec.getGridHistory(); - - for (GridDataHistory newHistory : newHist) { - boolean found = false; - for (GridDataHistory existHistory : existHist) { - // if the parm name + level + time range + site id - // are all equal, then replace the existing history - // with the updated history - if (existHistory - .getOriginParm() - .getParmName() - .equals(newHistory.getOriginParm() - .getParmName()) - && existHistory - .getOriginParm() - .getParmLevel() - .equals(newHistory.getOriginParm() - .getParmLevel()) - && existHistory - .getOriginParm() - .getDbId() - .getSiteId() - .equals(newHistory.getOriginParm() - .getDbId().getSiteId()) - && existHistory.getOriginTimeRange() - .equals(newHistory - .getOriginTimeRange())) { - found = true; - existHistory.replaceValues(newHistory); - break; - } - } - - if (!found) { - existHist.add(newHistory); - } - } - } + List existHist = existing.getGridHistory(); + List newHist = rec.getGridHistory(); + dao.consolidateHistories(existHist, newHist); consolidated.add(existing); } diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/database/TopoDatabase.java b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/database/TopoDatabase.java index cde3d17f3f..f70fdaeb00 100644 --- a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/database/TopoDatabase.java +++ b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/database/TopoDatabase.java @@ -161,7 +161,7 @@ public class TopoDatabase extends IFPGridDatabase { ServerResponse sr = saveGridData(parmId, TR, new ArrayList(), new WsId(null, - "initialization", "TopoDatabase", 0)); + "initialization", "TopoDatabase")); if (!sr.isOkay()) { StringBuilder tmp = new StringBuilder(); ArrayList messages = sr.getMessages(); diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/lock/LockDatabase.java b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/lock/LockDatabase.java deleted file mode 100644 index 33a8a26ccc..0000000000 --- a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/lock/LockDatabase.java +++ /dev/null @@ -1,129 +0,0 @@ -/** - * 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.edex.plugin.gfe.server.lock; - -import java.util.ArrayList; -import java.util.List; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; - -import com.raytheon.edex.plugin.gfe.db.dao.GFELockDao; -import com.raytheon.edex.plugin.gfe.exception.GfeLockException; -import com.raytheon.uf.common.dataplugin.gfe.server.lock.Lock; -import com.raytheon.uf.common.dataplugin.gfe.server.lock.LockTable; -import com.raytheon.uf.common.dataplugin.gfe.server.message.ServerResponse; -import com.raytheon.uf.edex.database.DataAccessLayerException; - -/** - * Port of the existing LockDatabase. This class maintains the locks. - * - *
- * SOFTWARE HISTORY
- * Date         Ticket#    Engineer    Description
- * ------------ ---------- ----------- --------------------------
- * 06/17/08     #940       bphillip    Implemented GFE Locking
- * 
- * 
- * - * @author bphillip - * @version 1.0 - */ -public class LockDatabase { - - /** The logger */ - protected Log logger = LogFactory.getLog(getClass()); - - /** The singleton instance */ - private static LockDatabase instance; - - /** - * Gets the singleton instance - * - * @return The singleton instance - */ - public synchronized static LockDatabase getInstance() { - if (instance == null) { - instance = new LockDatabase(); - } - return instance; - } - - /** - * Returns all the locks currently held - * - * @return All locks - * @throws GfeLockException - * If errors occur during querying - */ - public synchronized ServerResponse> getDatabase() { - ServerResponse> sr = new ServerResponse>(); - List tables = new ArrayList(); - GFELockDao dao = new GFELockDao(); - - List locks = null; - try { - locks = dao.getAllLocks(); - } catch (DataAccessLayerException e) { - sr.addMessage("Error get locked records from the database"); - logger.error("Error get locked records from the database", e); - } - - for (Lock lock : locks) { - addEntry(tables, lock); - } - sr.setPayload(tables); - return sr; - } - - /** - * Adds an entry to the lock database - * - * @param tables - * The list of tables - * @param pid - * The parm ID of the lock table to add - * @param locker - * The workstation ID of the lock owner - * @param timeRange - * The time range of the lock - */ - private void addEntry(List tables, Lock lock) { - - int index = -1; - // find the lock table. If not available, create one - for (int i = 0; i < tables.size(); i++) { - if (tables.get(i).getParmId().equals(lock.getParmId())) { - index = i; - break; - } - } - - // need a new LockTable - if (index == -1) { - tables.add(new LockTable(lock.getParmId(), new ArrayList(), - null)); - index = tables.size() - 1; - } - LockTable lockTable = tables.get(index); - lockTable.addLock(lock); - } -} diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/lock/LockManager.java b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/lock/LockManager.java index ef7e2a65f4..4c27b184cd 100644 --- a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/lock/LockManager.java +++ b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/lock/LockManager.java @@ -21,9 +21,12 @@ package com.raytheon.edex.plugin.gfe.server.lock; import java.util.ArrayList; -import java.util.Date; +import java.util.Collections; +import java.util.Comparator; +import java.util.HashSet; import java.util.List; import java.util.Map; +import java.util.Set; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -68,12 +71,11 @@ public class LockManager { /** The logger */ private Log logger = LogFactory.getLog(getClass()); + private LockComparator startTimeComparator = new LockComparator(); + /** The singleton instance of the LockManager */ private static LockManager instance; - /** The workstation ID of the owner of the lock table */ - private WsId wsId; - /** * Gets the singleton instance of the LockManager * @@ -104,11 +106,9 @@ public class LockManager { * @throws GfeException * If errors occur while querying the database */ - public synchronized ServerResponse> getLockTables( + public ServerResponse> getLockTables( List request, WsId requestor, String siteID) { ServerResponse> sr = new ServerResponse>(); - List lockTables = new ArrayList(); - this.wsId = requestor; if (request.size() == 0) { sr.addMessage("No Lock Table Requests"); @@ -119,16 +119,14 @@ public class LockManager { List parmIds = new ArrayList(); sr.addMessages(extractParmIds(request, parmIds, siteID)); - // now get the lock tables - boolean includeAllLockedParms = false; - sr.addMessages(getSpecificLockTables(parmIds, lockTables, - includeAllLockedParms)); - - // modify lock tables to have the requestor's id - for (int i = 0; i < lockTables.size(); i++) { - lockTables.get(i).resetWsId(requestor); + try { + sr.setPayload(new ArrayList(new GFELockDao().getLocks( + parmIds, requestor).values())); + } catch (DataAccessLayerException e) { + sr.addMessage("Error getting lock tables for " + parmIds); + sr.setPayload(new ArrayList()); } - sr.setPayload(lockTables); + return sr; } @@ -143,36 +141,17 @@ public class LockManager { * @throws GfeException * If errors occur while retrieving locks */ - public synchronized ServerResponse> getLockTables( + public ServerResponse> getLockTables( LockTableRequest request, WsId wsId, String siteID) { List requests = new ArrayList(); requests.add(request); return getLockTables(requests, wsId, siteID); } - /** - * Gets all lock tables for all parmIDs in the database - * - * @param wsId - * The workstation ID of the requestor - * @return All lock tables for all ParmIDs in the database - * @throws GfeException - * If errors occur while querying the database - */ - public synchronized List getAllLockTables(WsId requestor) { - - List lts = LockDatabase.getInstance().getDatabase() - .getPayload(); - for (LockTable lt : lts) { - lt.resetWsId(requestor); - } - return lts; - } - - public synchronized ServerResponse> requestLockChange( + public ServerResponse> requestLockChange( LockRequest request, WsId requestor, String siteID) throws GfeLockException { - return requestLockChange(request,requestor,siteID,true); + return requestLockChange(request, requestor, siteID, true); } /** @@ -185,19 +164,19 @@ public class LockManager { * @throws GfeException * If errors occur during database interaction */ - public synchronized ServerResponse> requestLockChange( - LockRequest request, WsId requestor, String siteID, boolean combineLocks) - throws GfeLockException { + public ServerResponse> requestLockChange( + LockRequest request, WsId requestor, String siteID, + boolean combineLocks) throws GfeLockException { List requests = new ArrayList(); requests.add(request); - return requestLockChange(requests, requestor, siteID,combineLocks); + return requestLockChange(requests, requestor, siteID, combineLocks); } - public synchronized ServerResponse> requestLockChange( - List requests, WsId requestor, String siteID){ - return requestLockChange(requests,requestor,siteID,true); + public ServerResponse> requestLockChange( + List requests, WsId requestor, String siteID) { + return requestLockChange(requests, requestor, siteID, true); } - + /** * Makes a change to a lock in the database. * @@ -208,8 +187,9 @@ public class LockManager { * @throws GfeException * If errors occur during database interaction */ - public synchronized ServerResponse> requestLockChange( - List requests, WsId requestor, String siteID, boolean combineLocks) { + public ServerResponse> requestLockChange( + List requests, WsId requestor, String siteID, + boolean combineLocks) { List lockTablesAffected = new ArrayList(); List gridUpdatesAffected = new ArrayList(); @@ -237,52 +217,41 @@ public class LockManager { List parmIds = new ArrayList(); sr.addMessages(extractParmIdsFromLockReq(req, parmIds, siteID)); - // get the locktables specific to the extracted parmIds - List tables = new ArrayList(); - getSpecificLockTables(parmIds, tables, true); - - if (!sr.isOkay()) { - sr.addMessage("Request Lock changed failed"); + // get the lock tables specific to the extracted parmIds + Map lockTableMap; + try { + lockTableMap = new GFELockDao().getLocks(parmIds, requestor); + } catch (DataAccessLayerException e) { + sr.addMessage("Error getting lock tables for " + parmIds); return sr; } // process each modified lock request, these are all parm-type requests - for (int i = 0; i < req.size(); i++) { + ParmID currentParmId = null; + for (LockRequest currentRequest : req) { + currentParmId = currentRequest.getParmId(); // get table from sequence - int ltIndex = -1; - for (int z = 0; z < tables.size(); z++) { - if (tables.get(z).getParmId().equals(req.get(i).getParmId())) { - ltIndex = z; - break; - } - } - - // no table found -- so create a new one - if (ltIndex == -1) { - sr.addMessage("No locktable match for parm, request lock change failed: " - + req.get(i)); - lockTablesAffected.clear(); - gridUpdatesAffected.clear(); - return sr; - } - - LockTable lt = tables.get(ltIndex); + LockTable lt = lockTableMap.get(currentParmId); LockTable prevLT = lt.clone(); try { // Change Lock - if (!changeLock(lt, req.get(i).getTimeRange(), requestor, req - .get(i).getMode(),combineLocks)) { + if (!changeLock(lt, currentRequest.getTimeRange(), requestor, + currentRequest.getMode(), combineLocks)) { sr.addMessage("Requested change lock failed - Lock is owned by another user - " - + req.get(i) + " LockTable=" + lt); + + currentRequest + " LockTable=" + lt); lockTablesAffected.clear(); gridUpdatesAffected.clear(); return sr; } } catch (Exception e) { - sr.addMessage("Requested change lock failed - Exception thrown - " + req.get(i) - + " LockTable=" + lt+ " Exception: "+e.getLocalizedMessage()); + sr.addMessage("Requested change lock failed - Exception thrown - " + + currentRequest + + " LockTable=" + + lt + + " Exception: " + + e.getLocalizedMessage()); lockTablesAffected.clear(); gridUpdatesAffected.clear(); return sr; @@ -299,8 +268,7 @@ public class LockManager { LockTable tableToRemove = null; for (int j = 0; j < lockTablesAffected.size(); j++) { - if (lockTablesAffected.get(j).getParmId() - .equals(req.get(i).getParmId())) { + if (lockTablesAffected.get(j).getParmId().equals(currentParmId)) { tableToRemove = lockTablesAffected.get(j); break; } @@ -313,10 +281,10 @@ public class LockManager { // assemble a grid update notification since the lock table has // changed - IF this is BREAK LOCK request - if (req.get(i).getMode().equals(LockTable.LockMode.BREAK_LOCK)) { + if (currentRequest.getMode().equals(LockTable.LockMode.BREAK_LOCK)) { List trs = new ArrayList(); ServerResponse> ssr = GridParmManager - .getGridInventory(req.get(i).getParmId()); + .getGridInventory(currentParmId); sr.addMessages(ssr); trs = ssr.getPayload(); if (!sr.isOkay()) { @@ -326,21 +294,21 @@ public class LockManager { } List updatedGridsTR = new ArrayList(); for (int p = 0; p < trs.size(); p++) { - if (trs.get(p).overlaps(req.get(i).getTimeRange())) { + if (trs.get(p).overlaps(currentRequest.getTimeRange())) { updatedGridsTR.add(trs.get(p)); } } ServerResponse>> sr1 = GridParmManager - .getGridHistory(req.get(i).getParmId(), updatedGridsTR); + .getGridHistory(currentParmId, updatedGridsTR); Map> histories = null; if (sr1.isOkay()) { histories = sr1.getPayload(); } - gridUpdatesAffected.add(new GridUpdateNotification(req.get(i) - .getParmId(), req.get(i).getTimeRange(), histories, - requestor, siteID)); + gridUpdatesAffected.add(new GridUpdateNotification( + currentParmId, currentRequest.getTimeRange(), + histories, requestor, siteID)); } } @@ -369,7 +337,8 @@ public class LockManager { * If the lock could not be changed */ private boolean changeLock(LockTable lt, TimeRange timeRange, - WsId requestorId, LockMode lockMode, boolean combineLocks) throws GfeLockException { + WsId requestorId, LockMode lockMode, boolean combineLocks) + throws GfeLockException { LockTable.LockStatus ls = lt.checkLock(timeRange, requestorId); @@ -406,7 +375,7 @@ public class LockManager { lt.addLock(newLock); } - if(combineLocks){ + if (combineLocks) { combineLocks(lt); } } @@ -456,97 +425,49 @@ public class LockManager { return true; } - private void combineLocks(LockTable lt) throws GfeLockException { - List locksToDelete = new ArrayList(); - List locksToAdd = new ArrayList(); - GFELockDao dao = new GFELockDao(); - + /** + * Examines the locks contained in a given lock table and combines locks if + * possible. + * + * @param lt + * The lock table to examine + * @throws GfeLockException + * If errors occur when updating the locks in the database + */ + private void combineLocks(final LockTable lt) throws GfeLockException { + Set added = new HashSet(); + Set deleted = new HashSet(); + List locks = null; + Lock currentLock = null; + Lock nextLock = null; boolean lockCombined = true; while (lockCombined) { lockCombined = false; - List currentLocks = lt.getLocks(); - for (int i = 0; i < currentLocks.size() && !lockCombined; i++) { - for (int j = 0; j < currentLocks.size() && !lockCombined; j++) { - if (i == j) { - continue; - } - - ParmID lock1Parm = currentLocks.get(i).getParmId(); - TimeRange lock1TimeRange = currentLocks.get(i) - .getTimeRange(); - Date lock1Start = lock1TimeRange.getStart(); - Date lock1End = lock1TimeRange.getEnd(); - WsId lock1WsId = currentLocks.get(i).getWsId(); - - ParmID lock2Parm = currentLocks.get(j).getParmId(); - TimeRange lock2TimeRange = currentLocks.get(j) - .getTimeRange(); - Date lock2Start = lock2TimeRange.getStart(); - Date lock2End = lock2TimeRange.getEnd(); - WsId lock2WsId = currentLocks.get(j).getWsId(); - - boolean combineTimes = lock1Start.equals(lock2End) - || lock2Start.equals(lock1End) - || lock1Start.equals(lock2Start) - || lock1End.equals(lock2End) - || lock1TimeRange.overlaps(lock2TimeRange); - if (combineTimes - && lock1WsId.equalForLockComparison(lock2WsId) - && lock1Parm.equals(lock2Parm)) { - - Date start = lock1Start.before(lock2Start) ? lock1Start - : lock2Start; - Date end = lock1End.after(lock2End) ? lock1End - : lock2End; - Lock lockToAdd = new Lock(new TimeRange(start, end), - lock1WsId); - lockToAdd.setParmId(lt.getParmId()); - locksToAdd.add(lockToAdd); - locksToDelete.add(currentLocks.get(i)); - locksToDelete.add(currentLocks.get(j)); - lockCombined = true; - - } else { - lockCombined = false; - } + lt.addLocks(added); + lt.removeLocks(deleted); + Collections.sort(lt.getLocks(), startTimeComparator); + locks = lt.getLocks(); + for (int i = 0; i < locks.size() - 1; i++) { + currentLock = locks.get(i); + nextLock = locks.get(i + 1); + if (currentLock.getEndTime() >= nextLock.getStartTime() && currentLock.getWsId().equals(nextLock.getWsId())) { + lockCombined = true; + deleted.add(currentLock); + deleted.add(nextLock); + Lock newLock = new Lock(new TimeRange( + currentLock.getStartTime(), nextLock.getEndTime()), + lt.getWsId()); + newLock.setParmId(lt.getParmId()); + added.add(newLock); + break; } } - for (Lock deleteLock : locksToDelete) { - if (deleteLock.getKey() == 0) { - try { - Lock dbLock = dao - .getLock(deleteLock.getParmId(), - deleteLock.getTimeRange(), - deleteLock.getWsId()); - dao.delete(dbLock); - lt.removeLock(deleteLock); - } catch (DataAccessLayerException e) { - throw new GfeLockException( - "Unable to sync lock from database", e); - } - } else { - dao.delete(deleteLock); - lt.removeLock(deleteLock); - } - - } - for (Lock addLock : locksToAdd) { - dao.persist(addLock); - if (addLock.getKey() == 0) { - try { - addLock = dao.getLock(addLock.getParmId(), - addLock.getTimeRange(), addLock.getWsId()); - } catch (DataAccessLayerException e) { - throw new GfeLockException( - "Unable to sync lock from database", e); - } - } - lt.addLock(addLock); - } - locksToDelete.clear(); - locksToAdd.clear(); } - + try { + new GFELockDao().updateCombinedLocks(deleted, added); + } catch (DataAccessLayerException e) { + throw new GfeLockException("Error combining locks", e); + } } /** @@ -561,7 +482,7 @@ public class LockManager { * * @param deletions */ - public synchronized void databaseDeleted(List deletions) { + public void databaseDeleted(List deletions) { // TODO: Implement database deletion } @@ -854,78 +775,6 @@ public class LockManager { return sr; } - /** - * Utility routine to return a list of LockTables for a given list of - * ParmIds. - * - * If the no LockTable for a given ParmId, an empty LockTable is appended - * for it. - * - * @param parmIds - * The ParmIDs to get lock tables for - * @param includeAllLockedParms - * If all locked parms are included - * @return The lock tables - * @throws GfeLockException - * If errors occur - */ - private ServerResponse getSpecificLockTables(List parmIds, - List lts, boolean includeAllLockedParms) { - - ServerResponse sr = new ServerResponse(); - - // process each parmId - List lockDbTables = LockDatabase.getInstance().getDatabase() - .getPayload(); - - // if includeAllLockedParms is true, all the previous locks should be - // kept - if (includeAllLockedParms) { - lts.addAll(lockDbTables); - - // look at each parm - for (int i = 0; i < parmIds.size(); i++) { - // is the parmId in the list of locked tables? - boolean found = false; - for (int j = 0; j < lts.size(); j++) { - // if already in list, do nothing - if (lts.get(j).getParmId().equals(parmIds.get(i))) { - found = true; - break; - } - } - // not found in the list, so append an empty one - if (!found) { - lts.add(new LockTable(parmIds.get(i), - new ArrayList(), wsId)); - } - } - } - - // if includeAllLockedParms is false, no previous lock should be kept - else { - for (int i = 0; i < parmIds.size(); i++) { - boolean found = false; - // is the parmId in the list of locked tables? - for (int j = 0; j < lockDbTables.size(); j++) { - if (parmIds.get(i).equals(lockDbTables.get(j).getParmId())) { - // in list, so append it - lts.add(lockDbTables.get(j)); - found = true; - break; - } - } - if (!found) { - // if not in the list, so append an empty one - lts.add(new LockTable(parmIds.get(i), - new ArrayList(), wsId)); - } - } - } - - return sr; - } - /** * Checks for lock requests containing official database locks. The requests * may be a mix of parm and database type @@ -979,4 +828,17 @@ public class LockManager { } return sr; } + + private class LockComparator implements Comparator { + @Override + public int compare(Lock o1, Lock o2) { + if (o1.getStartTime() < o2.getStartTime()) { + return -1; + } + if (o1.getStartTime() > o2.getStartTime()) { + return 1; + } + return 0; + } + } } diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/notify/GfeIngestNotificationFilter.java b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/notify/GfeIngestNotificationFilter.java index aa8ca97b26..290660fd8a 100644 --- a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/notify/GfeIngestNotificationFilter.java +++ b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/server/notify/GfeIngestNotificationFilter.java @@ -54,6 +54,7 @@ import com.raytheon.uf.common.dataplugin.gfe.db.objects.ParmID; import com.raytheon.uf.common.dataplugin.gfe.server.notify.DBInvChangeNotification; import com.raytheon.uf.common.dataplugin.gfe.server.notify.GfeNotification; import com.raytheon.uf.common.dataplugin.gfe.server.notify.GridUpdateNotification; +import com.raytheon.uf.common.message.WsId; import com.raytheon.uf.common.serialization.SerializationUtil; import com.raytheon.uf.common.status.IUFStatusHandler; import com.raytheon.uf.common.status.UFStatus; @@ -180,12 +181,17 @@ public class GfeIngestNotificationFilter { } for (ParmID parmId : gridInv.keySet()) { - Map> hist; + Map> hist = new HashMap>(); try { List trs = gridInv.get(parmId); Collections.sort(trs); - hist = GridParmManager.getDb(parmId.getDbId()) - .getGridHistory(parmId, trs).getPayload(); + for (TimeRange time : trs) { + List histList = new ArrayList(); + histList.add(new GridDataHistory( + GridDataHistory.OriginType.INITIALIZED, + parmId, time, null, (WsId) null)); + hist.put(time, histList); + } guns.add(new GridUpdateNotification(parmId, new TimeRange(trs.get(0).getStart(), trs.get( trs.size() - 1).getEnd()), hist, null, diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/smartinit/IFPWE.java b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/smartinit/IFPWE.java index e6e6b8c47c..bb5f791f50 100644 --- a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/smartinit/IFPWE.java +++ b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/smartinit/IFPWE.java @@ -105,7 +105,7 @@ public class IFPWE { parmId = parm; siteId = parm.getDbId().getSiteId(); gpi = GridParmManager.getGridParmInfo(parmId).getPayload(); - wsId = new WsId(null, userName, "EDEX", 0); + wsId = new WsId(null, userName, "EDEX"); } /** diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/smartinit/SmartInitQueue.java b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/smartinit/SmartInitQueue.java index 9566c90cd5..7cfc9e940d 100644 --- a/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/smartinit/SmartInitQueue.java +++ b/edexOsgi/com.raytheon.edex.plugin.gfe/src/com/raytheon/edex/plugin/gfe/smartinit/SmartInitQueue.java @@ -48,7 +48,7 @@ import com.raytheon.uf.edex.database.dao.DaoConfig; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * Dec 11, 2008 njensen Initial creation - * Oct 6, 2009 3172 njensen Based on GribNotifyMessages + * Oct 6, 2009 3172 njensen Based on GribNotifyMessages * * * @author njensen @@ -56,131 +56,140 @@ import com.raytheon.uf.edex.database.dao.DaoConfig; */ public class SmartInitQueue { - private int smartInitTimeoutMillis = 60000; + private int smartInitTimeoutMillis = 60000; - private Map initSet = new HashMap(); + private Map initSet = new HashMap(); - protected static final transient IUFStatusHandler handler = UFStatus - .getHandler(SmartInitQueue.class); + protected static final transient IUFStatusHandler handler = UFStatus + .getHandler(SmartInitQueue.class); - public void addInits(Collection initsToAdd) { - // event driven start route etc - mergeInits(initsToAdd); - } + public void addInits(Collection initsToAdd) { + // event driven start route etc + mergeInits(initsToAdd); + } - private void mergeInits(Collection inits) { - synchronized (this) { - for (SmartInitRecord record : inits) { - try { - DatabaseID toAdd = new DatabaseID(record.getDbName()); - IFPServerConfig config = IFPServerConfigManager - .getServerConfig(toAdd.getSiteId()); - Calendar modelTime = Calendar.getInstance(); - modelTime.setTime(toAdd.getModelTimeAsDate()); - if (config.initSkip(toAdd.getModelName(), - modelTime.get(Calendar.HOUR_OF_DAY))) { - continue; - } + private void mergeInits(Collection inits) { + for (SmartInitRecord record : inits) { + try { + DatabaseID toAdd = new DatabaseID(record.getDbName()); + IFPServerConfig config = IFPServerConfigManager + .getServerConfig(toAdd.getSiteId()); + Calendar modelTime = Calendar.getInstance(); + modelTime.setTime(toAdd.getModelTimeAsDate()); + if (config.initSkip(toAdd.getModelName(), + modelTime.get(Calendar.HOUR_OF_DAY))) { + continue; + } + } catch (GfeConfigurationException e) { + handler.handle(Priority.ERROR, e.getLocalizedMessage(), e); + continue; + } - } catch (GfeConfigurationException e) { - handler.handle(Priority.ERROR, e.getLocalizedMessage(), e); - continue; - } + synchronized (this) { + SmartInitRecordPK id = record.getId(); + SmartInitRecord oldRecord = initSet.get(id); + if (oldRecord == null) { + initSet.put(id, record); + } else { + Date newInsertTime = record.getInsertTime(); + if (newInsertTime.getTime() > oldRecord.getInsertTime() + .getTime()) { + oldRecord.setInsertTime(newInsertTime); + } + oldRecord.setManual(oldRecord.isManual() + || record.isManual()); + oldRecord.setPriority(Math.min(oldRecord.getPriority(), + record.getPriority())); + } + } + } + } - SmartInitRecordPK id = record.getId(); - SmartInitRecord oldRecord = initSet.get(id); - if (oldRecord == null) { - initSet.put(id, record); - } else { - Date newInsertTime = record.getInsertTime(); - if (newInsertTime.getTime() > oldRecord.getInsertTime() - .getTime()) { - oldRecord.setInsertTime(newInsertTime); - } - oldRecord.setManual(oldRecord.isManual() - || record.isManual()); - } - } - } - } + public void addManualInit(String init) { + Collection manualInits = InitModules.splitManual(init); + mergeInits(manualInits); + // force update the tables + fireSmartInit(); + } - public void addManualInit(String init) { - Collection manualInits = InitModules.splitManual(init); - mergeInits(manualInits); - // force update the tables - fireSmartInit(); - } + public void fireSmartInit() { + Map initsToStore = null; - public void fireSmartInit() { - synchronized (this) { - if (initSet.size() > 0) { - CoreDao cd = new CoreDao(DaoConfig.DEFAULT); - Session s = null; - Transaction tx = null; - SmartInitRecord oldRecord = null; + // copy off inits to store, allowing other threads to continue + // accumulating + synchronized (this) { + if (initSet.size() > 0) { + initsToStore = initSet; + initSet = new HashMap( + (int) (initsToStore.size() * 1.25) + 1); + } + } - for (SmartInitRecord record : initSet.values()) { - try { - s = cd.getHibernateTemplate().getSessionFactory() - .openSession(); - tx = s.beginTransaction(); + if (initsToStore != null) { + CoreDao cd = new CoreDao(DaoConfig.DEFAULT); + Session s = null; + Transaction tx = null; + SmartInitRecord oldRecord = null; - oldRecord = (SmartInitRecord) s.get( - SmartInitRecord.class, record.getId(), - LockOptions.UPGRADE); + for (SmartInitRecord record : initsToStore.values()) { + try { + s = cd.getHibernateTemplate().getSessionFactory() + .openSession(); + tx = s.beginTransaction(); - if (oldRecord == null) { - s.save(record); - } else { - Date newInsertTime = record.getInsertTime(); - if (oldRecord.getInsertTime().getTime() < newInsertTime - .getTime()) { - oldRecord.setInsertTime(newInsertTime); - } - oldRecord.setManual(oldRecord.isManual() - || record.isManual()); - s.update(oldRecord); - } - tx.commit(); - } catch (Throwable t) { - handler.handle(Priority.ERROR, - "Error adding smartInit [" + record.getId() - + "] to database queue", t); + oldRecord = (SmartInitRecord) s.get(SmartInitRecord.class, + record.getId(), LockOptions.UPGRADE); - if (tx != null) { - try { - tx.rollback(); - } catch (HibernateException e) { - handler.handle( - Priority.ERROR, - "Error rolling back smart init lock transaction", - e); - } - } - } finally { - if (s != null) { - try { - s.close(); - } catch (HibernateException e) { - handler.handle( - Priority.ERROR, - "Error closing smart init lock session", - e); - } - } - } - } - initSet.clear(); - } - } - } + if (oldRecord == null) { + s.save(record); + } else { + Date newInsertTime = record.getInsertTime(); + oldRecord.setPriority(Math.min(oldRecord.getPriority(), + record.getPriority())); + if (oldRecord.getInsertTime().getTime() < newInsertTime + .getTime()) { + oldRecord.setInsertTime(newInsertTime); + } + oldRecord.setManual(oldRecord.isManual() + || record.isManual()); + s.update(oldRecord); + } + tx.commit(); + } catch (Throwable t) { + handler.handle(Priority.ERROR, "Error adding smartInit [" + + record.getId() + "] to database queue", t); - public int getSmartInitTimeoutMillis() { - return smartInitTimeoutMillis; - } + if (tx != null) { + try { + tx.rollback(); + } catch (HibernateException e) { + handler.handle( + Priority.ERROR, + "Error rolling back smart init lock transaction", + e); + } + } + } finally { + if (s != null) { + try { + s.close(); + } catch (HibernateException e) { + handler.handle(Priority.ERROR, + "Error closing smart init lock session", e); + } + } + } + } + } - public void setSmartInitTimeoutMillis(int smartInitTimeoutMillis) { - this.smartInitTimeoutMillis = smartInitTimeoutMillis; - } + } + + public int getSmartInitTimeoutMillis() { + return smartInitTimeoutMillis; + } + + public void setSmartInitTimeoutMillis(int smartInitTimeoutMillis) { + this.smartInitTimeoutMillis = smartInitTimeoutMillis; + } } diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/gfe/isc/ifpnetCDF.py b/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/gfe/isc/ifpnetCDF.py index b5b35a4939..5dedfb169c 100644 --- a/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/gfe/isc/ifpnetCDF.py +++ b/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/gfe/isc/ifpnetCDF.py @@ -21,7 +21,13 @@ import string, getopt, sys, time, gzip, os, LogStream, stat, traceback import numpy -import pupynere as netcdf +#import pupynere as NetCDF +try: + # dev environment + from Scientific.IO import NetCDF +except: + # runtime we don't have the whole scientific package + import NetCDF import JUtil import iscUtil @@ -737,7 +743,7 @@ def storeGridDataHistory(file, we, wec, trList, timeRange): def calcKrunchValues(we): #Based on the weather element, will return information pertaining #to the dataType, multiplier, offset, and missing value to use for this - #element. Returns (dataType, multipler, offset, missingValue, pythonType) + #element. Returns (dataType, multiplier, offset, missingValue, pythonType) maxV = we.getGpi().getMaxValue() minV = we.getGpi().getMinValue() @@ -747,40 +753,40 @@ def calcKrunchValues(we): # check for byte possibilities if nentries <= pow(2, 8) - 1: - multipler = precision + multiplier = precision offset = 0 minVarValue = -126 maxVarValue = 127 - if minV * multipler < minVarValue: - offset = minV - minVarValue / multipler - if maxV * multipler > maxVarValue: - offset = maxV - maxVarValue / multipler + if minV * multiplier < minVarValue: + offset = minV - minVarValue / multiplier + if maxV * multiplier > maxVarValue: + offset = maxV - maxVarValue / multiplier missingValue = -127 format = "b" pythonType = numpy.int8 # check for short possibilities elif nentries <= pow(2, 16) - 2: - multipler = precision + multiplier = precision offset = 0 maxVarValue = pow(2, 15) - 1 minVarValue = -(pow(2, 15) - 2) - if minV * multipler < minVarValue: - offset = minV - minVarValue / multipler - if maxV * multipler > maxVarValue: - offset = maxV - maxVarValue / multipler + if minV * multiplier < minVarValue: + offset = minV - minVarValue / multiplier + if maxV * multiplier > maxVarValue: + offset = maxV - maxVarValue / multiplier missingValue = minVarValue - 1 format = "h" pythonType = numpy.int16 # else full 32-bit float processing, no krunching needed else: - multipler = None + multiplier = None offset = None format = "f" missingValue = -30000.0 pythonType = numpy.float32 - return (format, multipler, offset, missingValue, pythonType) + return (format, multiplier, offset, missingValue, pythonType) ###-------------------------------------------------------------------------### @@ -883,83 +889,87 @@ def storeScalarWE(we, trList, file, timeRange, databaseID, # get the data and store it in a Numeric array. cube = [] timeList = [] - times = [] wec = WECache(we, trList) for t in trList: interTR = intersection(t, timeRange) if interTR is not None: - times.append(t) + grid = clipToExtrema(wec[t][0], clipArea) + #adjust for time changes + if we.getGpi().isRateParm(): + durRatio = (float(interTR[1]-interTR[0]))/float((t[1]-t[0])) + grid = (grid * durRatio).astype(numpy.float32) + cube.append(grid) timeList.append(interTR[0]) timeList.append(interTR[1]) - ### Make sure we found some grids - varName = we.getParmid().getParmName() + "_" + we.getParmid().getParmLevel() - gridCount = len(timeList) / 2 + cube = numpy.array(cube).astype(numpy.float32) - if gridCount == 0: + ### Make sure we found some grids + # make the variable name + varName = we.getParmid().getParmName() + "_" + we.getParmid().getParmLevel() + + if len(cube) == 0: logVerbose("No", varName, "grids found") # clipped size clipSize = (clipArea[1] - clipArea[0] + 1, clipArea[3] - clipArea[2] + 1) + gridCount = len(timeList) / 2 + newsize = (gridCount, clipSize[1], clipSize[0]) #y,x + cube = numpy.resize(cube, newsize) # necessary when no grids + #get the dimension List dimNames = ["ngrids_" + varName, "y", "x"] - dims = getDims(file, (gridCount, clipSize[1], clipSize[0]), dimNames) + dims = getDims(file, cube.shape, dimNames) - for idx in range(0,len(times)): - cube = clipToExtrema(wec[times[idx]][0], clipArea) - # adjust for time changes - if we.getGpi().isRateParm(): - durRatio = (float(times[idx][1] - times[idx][0])) / float((times[idx][1] - times[idx][0])) - cube = (cube * durRatio).astype(numpy.float32) - cube = numpy.resize(cube, (clipSize[1],clipSize[0])) - # Round the values according to the precision - if trim: - precision = pow(10, we.getGpi().getPrecision()) - - if krunch: - format, multipler, offset, fillValue, pythonType = \ - calcKrunchValues(we) - else: - format, multipler, offset, fillValue, pythonType = \ - ('f', None, None, -30000.0, numpy.float32) - - # krunch - if multipler is not None: - cube = ((cube - offset) * multipler) - roundMask = numpy.where(numpy.greater(cube, 0), 1.0, -1.0) - cube = (cube + (0.5 * roundMask)).astype(pythonType) - # normal trim - else: - roundMask = numpy.where(numpy.greater(cube, 0), 1.0, -1.0) - trimmed = (cube * precision + (0.5 * roundMask)) - trimmed = numpy.array(trimmed).astype(numpy.int32) - cube = numpy.array(trimmed).astype(numpy.float32) - cube = numpy.array(cube / precision).astype(numpy.float32) - + # Round the values according to the precision + if trim: + precision = pow(10, we.getGpi().getPrecision()) + + if krunch: + format, multiplier, offset, fillValue, pythonType = \ + calcKrunchValues(we) else: - format, multipler, offset, fillValue, pythonType = \ + format, multiplier, offset, fillValue, pythonType = \ ('f', None, None, -30000.0, numpy.float32) - - # mask the data - cube = numpy.where(mask, cube, fillValue).astype(pythonType) - - if(idx == 0): - # create the variable - var = file.createVariable(varName, format, dims) - if multipler is not None: - setattr(var, "dataMultiplier", 1.0 / multipler) - setattr(var, "dataOffset", offset) - - # Store the attributes - storeWEAttributes(var, we, timeList, databaseID, clipArea) - setattr(var, "fillValue", fillValue) - - ## Extract the GridDataHistory info and save it - storeGridDataHistory(file, we, wec, trList, timeRange) - # Save the grids to the netCDF file - var[idx] = numpy.flipud(cube) + # krunch + if multiplier is not None: + cube = ((cube - offset) * multiplier) + roundMask = numpy.where(numpy.greater(cube, 0), 1.0, -1.0) + cube = (cube + (0.5 * roundMask)).astype(pythonType) + # normal trim + else: + roundMask = numpy.where(numpy.greater(cube, 0), 1.0, -1.0) + trimmed = (cube * precision + (0.5 * roundMask)) + trimmed = numpy.array(trimmed).astype(numpy.int32) + cube = numpy.array(trimmed).astype(numpy.float32) + cube = numpy.array(cube / precision).astype(numpy.float32) + + else: + format, multiplier, offset, fillValue, pythonType = \ + ('f', None, None, -30000.0, numpy.float32) + + # mask the data + cube = numpy.where(mask, cube, fillValue).astype(pythonType) + + # create the variable + var = file.createVariable(varName, format, dims) + if multiplier is not None: + setattr(var, "dataMultiplier", 1.0 / multiplier) + setattr(var, "dataOffset", offset) + + # Save the grids to the netCDF file + for i in range(len(cube)): + var[i] = numpy.flipud(cube[i]) + + # Store the attributes + storeWEAttributes(var, we, timeList, databaseID, clipArea) + setattr(var, "fillValue", fillValue) + + ## Extract the GridDataHistory info and save it + storeGridDataHistory(file, we, wec, trList, timeRange) + logEvent("Saved ", gridCount, " ", varName, " grids") return gridCount @@ -975,133 +985,133 @@ def storeVectorWE(we, trList, file, timeRange, magCube = [] dirCube = [] timeList = [] - times = [] wec = WECache(we, trList) for t in trList: interTR = intersection(t, timeRange) if interTR is not None: - times.append(t) + vecData = wec[t][0] + mag = clipToExtrema(vecData[0], clipArea) + dir = clipToExtrema(vecData[1], clipArea) + if we.getGpi().isRateParm(): + durRatio = (float(interTR[1]-interTR[0]))/float((t[1]-t[0])) + mag = (mag * durRatio).astype(numpy.float32) + magCube.append(mag) + dirCube.append(dir) timeList.append(interTR[0]) timeList.append(interTR[1]) + magCube = numpy.array(magCube).astype(numpy.float32) + dirCube = numpy.array(dirCube).astype(numpy.float32) varName = we.getParmid().getParmName() + "_" + we.getParmid().getParmLevel() - gridCount = len(timeList) / 2 ### Make sure we found some grids - if gridCount == 0: + if len(magCube) == 0: logVerbose("No", varName, "grids found") # clipped size clipSize = (clipArea[1] - clipArea[0] + 1, clipArea[3] - clipArea[2] + 1) + gridCount = len(timeList) / 2 + newsize = (gridCount, clipSize[1], clipSize[0]) #y,x + magCube = numpy.resize(magCube, newsize) # necessary when no grids + dirCube = numpy.resize(dirCube, newsize) # necessary when no grids + # make the variable name magVarName = we.getParmid().getParmName() + "_Mag_" + we.getParmid().getParmLevel() dirVarName = we.getParmid().getParmName() + "_Dir_" + we.getParmid().getParmLevel() - varName = we.getParmid().getParmName() + "_" + we.getParmid().getParmLevel() #get the dimension List dimNames = ["ngrids_" + varName, "y", "x"] - dims = getDims(file, (gridCount, clipSize[1], clipSize[0]), dimNames) + dims = getDims(file, magCube.shape, dimNames) - for idx in range(0,len(times)): - vecData = wec[times[idx]][0] - mag = clipToExtrema(vecData[0], clipArea) - dir = clipToExtrema(vecData[1], clipArea) - if we.getGpi().isRateParm(): - durRatio = (float(times[idx][1] - times[idx][0])) / float((times[idx][1] - times[idx][0])) - mag = (mag * durRatio).astype(numpy.float32) - mag = numpy.resize(mag, (clipSize[1],clipSize[0])) - dir = numpy.resize(dir, (clipSize[1],clipSize[0])) + # Round the values according to the precision + if trim: + mprecision = pow(10, we.getGpi().getPrecision()) - # Round the values according to the precision - if trim: - mprecision = pow(10, we.getGpi().getPrecision()) - - if krunch: - mformat, mmultipler, moffset, mfillValue, mpythonType = \ - calcKrunchValues(we) - dformat, dmultipler, doffset, dfillValue, dpythonType = \ - ('b', 0.1, 0.0, -127, numpy.dtype(numpy.int8)) - else: - mformat, mmultipler, moffset, mfillValue, mpythonType = \ - ('f', None, None, -30000.0, numpy.dtype(numpy.float32)) - dformat, dmultipler, doffset, dfillValue, dpythonType = \ - ('f', None, None, -30000.0, numpy.dtype(numpy.float32)) - - # krunch magnitude - if mmultipler is not None: - mag = ((mag - moffset) * mmultipler) - roundMask = numpy.where(numpy.greater(mag, 0), 1.0, -1.0) - mag = (mag + (0.5 * roundMask)).astype(mpythonType) - # normal trim for magnitude - else: - roundMask = numpy.where(numpy.greater(mag, 0), 1.0, -1.0) - trimmed = (mag * mprecision + (0.5 * roundMask)) - trimmed = numpy.array(trimmed).astype(numpy.int32) - mag = numpy.array(trimmed).astype(numpy.float32) - mag = numpy.array(mag / mprecision).astype(numpy.float32) - - # krunch direction - if dmultipler is not None: - dir = ((dir - doffset) * dmultipler) - roundMask = numpy.where(numpy.greater(dir, 0), 1.0, -1.0) - dir = (dir + (0.5 * roundMask)).astype(dpythonType) - - # normal trim for direction - else: - dir = numpy.array((dir + (0.5 * 10)) / 10).astype(numpy.int32) - dir = numpy.array(dir * 10).astype(numpy.float32) - mask360 = numpy.greater_equal(dir, 360.0) - dir = numpy.where(mask360, dir - 360.0, dir).astype(numpy.float32) - + if krunch: + mformat, mmultiplier, moffset, mfillValue, mpythonType = \ + calcKrunchValues(we) + dformat, dmultiplier, doffset, dfillValue, dpythonType = \ + ('b', 0.1, 0.0, -127, numpy.int8) else: - mformat, mmultipler, moffset, mfillValue, mpythonType = \ - ('f', None, None, -30000.0, numpy.dtype(numpy.float32)) - dformat, dmultipler, doffset, dfillValue, dpythonType = \ - ('f', None, None, -30000.0, numpy.dtype(numpy.float32)) + mformat, mmultiplier, moffset, mfillValue, mpythonType = \ + ('f', None, None, -30000.0, numpy.dtype(numpy.float32)) + dformat, dmultiplier, doffset, dfillValue, dpythonType = \ + ('f', None, None, -30000.0, numpy.float32) - - mag = numpy.where(mask, mag, mfillValue).astype(mpythonType) - dir = numpy.where(mask, dir, dfillValue).astype(dpythonType) + # krunch magnitude + if mmultiplier is not None: + magCube = ((magCube - moffset) * mmultiplier) + roundMask = numpy.where(numpy.greater(magCube, 0), 1.0, -1.0) + magCube = (magCube + (0.5 * roundMask)).astype(mpythonType) + # normal trim for magnitude + else: + roundMask = numpy.where(numpy.greater(magCube, 0), 1.0, -1.0) + trimmed = (magCube * mprecision + (0.5 * roundMask)) + trimmed = numpy.array(trimmed).astype(numpy.int32) + magCube = numpy.array(trimmed).astype(numpy.float32) + magCube = numpy.array(magCube / mprecision).astype(numpy.float32) + + # krunch direction + if dmultiplier is not None: + dirCube = ((dirCube - doffset) * dmultiplier) + roundMask = numpy.where(numpy.greater(dirCube, 0), 1.0, -1.0) + dirCube = (dirCube + (0.5 * roundMask)).astype(dpythonType) + + # normal trim for direction + else: + dirCube = numpy.array((dirCube + (0.5 * 10)) / 10).astype(numpy.int32) + dirCube = numpy.array(dirCube * 10).astype(numpy.float32) + mask360 = numpy.greater_equal(dirCube, 360.0) + dirCube = numpy.where(mask360, dirCube - 360.0, dirCube).astype(numpy.float32) + + else: + mformat, mmultiplier, moffset, mfillValue, mpythonType = \ + ('f', None, None, -30000.0, numpy.float32) + dformat, dmultiplier, doffset, dfillValue, dpythonType = \ + ('f', None, None, -30000.0, numpy.float32) - if(idx == 0): - # create the variable - magVar = file.createVariable(magVarName, numpy.dtype(mpythonType), dims) - dirVar = file.createVariable(dirVarName, numpy.dtype(dpythonType), dims) - if mmultipler is not None: - setattr(magVar, "dataMultiplier", 1.0 / mmultipler) - setattr(magVar, "dataOffset", moffset) - if dmultipler is not None: - setattr(dirVar, "dataMultiplier", 1.0 / dmultipler) - setattr(dirVar, "dataOffset", doffset) - + magCube = numpy.where(mask, magCube, mfillValue).astype(mpythonType) + dirCube = numpy.where(mask, dirCube, dfillValue).astype(dpythonType) + + # create the variable + magVar = file.createVariable(magVarName, mformat, dims) + dirVar = file.createVariable(dirVarName, dformat, dims) + if mmultiplier is not None: + setattr(magVar, "dataMultiplier", 1.0 / mmultiplier) + setattr(magVar, "dataOffset", moffset) + if dmultiplier is not None: + setattr(dirVar, "dataMultiplier", 1.0 / dmultiplier) + setattr(dirVar, "dataOffset", doffset) + + # Save the grid to the netCDF file + for i in range(len(magCube)): + magVar[i] = numpy.flipud(magCube[i]) + dirVar[i] = numpy.flipud(dirCube[i]) - # Store the attributes - overwrite some for mag and dir - storeWEAttributes(magVar, we, timeList, databaseID, clipArea) - - # Change the descriptive name - setattr(magVar, "descriptiveName", we.getGpi().getDescriptiveName() + " Magnitude") - setattr(magVar, "fillValue", mfillValue) - storeWEAttributes(dirVar, we, timeList, databaseID, clipArea) - - # Special case attributes for wind direction - setattr(dirVar, "minMaxAllowedValues", (0.0, 360.0)) - setattr(dirVar, "descriptiveName", we.getGpi().getDescriptiveName() + " Direction") - setattr(dirVar, "units", "degrees") - if trim: - dirPrecision = -1 - else: - dirPrecision = 0 - setattr(dirVar, "precision", dirPrecision) - setattr(dirVar, "fillValue", dfillValue) + # Store the attributes - overwrite some for mag and dir + storeWEAttributes(magVar, we, timeList, databaseID, clipArea) + + # Change the descriptive name + setattr(magVar, "descriptiveName", we.getGpi().getDescriptiveName() + " Magnitude") + setattr(magVar, "fillValue", mfillValue) + storeWEAttributes(dirVar, we, timeList, databaseID, clipArea) + + # Special case attributes for wind direction + setattr(dirVar, "minMaxAllowedValues", (0.0, 360.0)) + setattr(dirVar, "descriptiveName", we.getGpi().getDescriptiveName() + " Direction") + setattr(dirVar, "units", "degrees") + if trim: + dirPrecision = -1 + else: + dirPrecision = 0 + setattr(dirVar, "precision", dirPrecision) + setattr(dirVar, "fillValue", dfillValue) + + ## Extract the GridDataHistory info and save it + storeGridDataHistory(file, we, wec, trList, timeRange) - ## Extract the GridDataHistory info and save it - storeGridDataHistory(file, we, wec, trList, timeRange) - # Save the grid to the netCDF file - magVar[idx] = numpy.flipud(mag) - dirVar[idx] = numpy.flipud(dir) - logEvent("Saved", gridCount, varName, "grids") return gridCount * 2 #vector has two grids @@ -1148,36 +1158,54 @@ def storeWeatherWE(we, trList, file, timeRange, databaseID, mask, clipArea): byteCube = [] keyList = [] timeList = [] - times = [] wec = WECache(we, trList) for t in trList: interTR = intersection(t, timeRange) if interTR is not None: - times.append(t) - wx = wec[t] + wx = wec[t][0] + grid = clipToExtrema(wx[0], clipArea) + byteCube.append(grid) # Save times for these grids in a list timeList.append(interTR[0]) timeList.append(interTR[1]) - keyList.append(wx[0][1]) + keyList.append(wx[1]) + + byteCube = numpy.array(byteCube).astype(numpy.int8) # make the variable name varName = we.getParmid().getParmName() + "_" + we.getParmid().getParmLevel() - gridCount = len(timeList) / 2 ### Make sure we found some grids - if gridCount == 0: + if len(byteCube) == 0: logVerbose("No", varName, "grids found") # clipped size clipSize = (clipArea[1] - clipArea[0] + 1, clipArea[3] - clipArea[2] + 1) + gridCount = len(timeList) / 2 + newsize = (gridCount, clipSize[1], clipSize[0]) #y,x + byteCube = numpy.resize(byteCube, newsize) + #get the dimension List dimNames = ["ngrids_" + varName, "y", "x"] - dims = getDims(file, (gridCount, clipSize[1], clipSize[0]), dimNames) + dims = getDims(file, byteCube.shape, dimNames) # create the netCDF variable - 'b' for byte type var = file.createVariable(varName, 'b', dims) + + # Process the weather keys so we store only what is necessary + + for g in range(byteCube.shape[0]): + (keyList[g], byteCube[g]) = collapseKey(keyList[g], byteCube[g]) + + # Mask the values fillValue = -127 + byteCube = numpy.where(mask, byteCube, fillValue).astype(numpy.int8) + + # Save the grids to the netCDF file + for i in range(len(byteCube)): + var[i] = numpy.flipud(byteCube[i]) + # Find the max number of keys and max length for all keys maxKeyCount = 1 maxKeySize = 0 @@ -1197,35 +1225,23 @@ def storeWeatherWE(we, trList, file, timeRange, databaseID, mask, clipArea): dims = getDims(file, wxShape, dimNames) keyVarName = we.getParmid().getParmName() + "_" + we.getParmid().getParmLevel() + "_wxKeys" keyVar = file.createVariable(keyVarName, 'c', dims) + chars = numpy.zeros(wxShape, 'c') - for idx in range(0,len(times)): - byteCube = clipToExtrema(wec[times[idx]][0][0], clipArea) - byteCube = numpy.resize(byteCube, (clipSize[1],clipSize[0])) + # now save the weather keys in the netCDF file + for g in range(0, gridCount): + for k in range(0, len(keyList[g])): + for c in range(0, len(keyList[g][k])): + chars[g][k][c] = keyList[g][k][c] + if len(byteCube): + keyVar[:] = chars - # Process the weather keys so we store only what is necessary - (keyList[idx], byteCube) = collapseKey(keyList[idx], byteCube) + # Store the attributes + storeWEAttributes(var, we, timeList, databaseID, clipArea) + setattr(var, "fillValue", fillValue) - # Mask the values - byteCube = numpy.where(mask, byteCube, fillValue).astype(numpy.int8) - - # Save the grids to the netCDF file - var[idx] = numpy.flipud(byteCube) - - # now save the weather keys in the netCDF file - for k in range(0, len(keyList[idx])): - for c in range(0, len(keyList[idx][k])): - chars[idx][k][c] = keyList[idx][k][c] - if len(byteCube): - keyVar[idx:] = chars[idx] - - if idx == 0: - # Store the attributes - storeWEAttributes(var, we, timeList, databaseID, clipArea) - setattr(var, "fillValue", fillValue) - - ## Extract the GridDataHistory info and save it - storeGridDataHistory(file, we, wec, trList, timeRange) + ## Extract the GridDataHistory info and save it + storeGridDataHistory(file, we, wec, trList, timeRange) logEvent("Saved", gridCount, varName, "grids") @@ -1241,40 +1257,57 @@ def storeDiscreteWE(we, trList, file, timeRange, databaseID, mask, clipArea): byteCube = [] keyList = [] timeList = [] - times = [] wec = WECache(we, trList) for t in trList: interTR = intersection(t, timeRange) if interTR is not None: - times.append(t) dis = wec[t][0] + grid = clipToExtrema(dis[0], clipArea) + byteCube.append(grid) # Save times for these grids in a list timeList.append(interTR[0]) timeList.append(interTR[1]) keyList.append(dis[1]) + byteCube = numpy.array(byteCube).astype(numpy.int8) + # make the variable name varName = we.getParmid().getParmName() + "_" + we.getParmid().getParmLevel() - gridCount = len(timeList) / 2 ### Make sure we found some grids - if gridCount == 0: + if len(byteCube) == 0: logVerbose("No", varName, "grids found") # clipped size clipSize = (clipArea[1] - clipArea[0] + 1, clipArea[3] - clipArea[2] + 1) + gridCount = len(timeList) / 2 + newsize = (gridCount, clipSize[1], clipSize[0]) #y,x + byteCube = numpy.resize(byteCube, newsize) # necessary when no grids + #get the dimension List dimNames = ["ngrids_" + varName, "y", "x"] - dims = getDims(file, (gridCount, clipSize[1], clipSize[0]), dimNames) + dims = getDims(file, byteCube.shape, dimNames) # create the netCDF variable - 'b' for byte type var = file.createVariable(varName, 'b', dims) + + # Process the discrete keys so we store only what is necessary + + for g in range(byteCube.shape[0]): + (keyList[g], byteCube[g]) = collapseKey(keyList[g], byteCube[g]) + + # Mask the values fillValue = -127 + byteCube = numpy.where(mask, byteCube, fillValue).astype(numpy.int8) + + # Save the grids to the netCDF file + for i in range(len(byteCube)): + var[i] = numpy.flipud(byteCube[i]) + # Find the max number of keys and max length for all keys maxKeyCount = 1 maxKeySize = 0 - for k in keyList: if len(k) > maxKeyCount: maxKeyCount = len(k) @@ -1289,34 +1322,23 @@ def storeDiscreteWE(we, trList, file, timeRange, databaseID, mask, clipArea): dims = getDims(file, disShape, dimNames) keyVarName = we.getParmid().getParmName() + "_" + we.getParmid().getParmLevel() + "_keys" keyVar = file.createVariable(keyVarName, 'c', dims) + chars = numpy.zeros(disShape, 'c') - for idx in range(0,len(times)): - byteCube = clipToExtrema(wec[times[idx]][0][0], clipArea) - byteCube = numpy.resize(byteCube, (clipSize[1],clipSize[0])) - # Process the discrete keys so we store only what is necessary - (keyList[idx], byteCube) = collapseKey(keyList[idx], byteCube) + # now save the discrete keys in the netCDF file + for g in range(0, gridCount): + for k in range(0, len(keyList[g])): + for c in range(0, len(keyList[g][k])): + chars[g][k][c] = keyList[g][k][c] + if len(byteCube): + keyVar[:] = chars - # Mask the values - byteCube = numpy.where(mask, byteCube, fillValue).astype(numpy.int8) + # Store the attributes + storeWEAttributes(var, we, timeList, databaseID, clipArea) + setattr(var, "fillValue", fillValue) - # Save the grids to the netCDF file - var[idx] = numpy.flipud(byteCube) - - # now save the discrete keys in the netCDF file - for k in range(0, len(keyList[idx])): - for c in range(0, len(keyList[idx][k])): - chars[idx][k][c] = keyList[idx][k][c] - if len(byteCube): - keyVar[idx:] = chars[idx] - - if idx == 0: - # Store the attributes - storeWEAttributes(var, we, timeList, databaseID, clipArea) - setattr(var, "fillValue", fillValue) - - ## Extract the GridDataHistory info and save it - storeGridDataHistory(file, we, wec, trList, timeRange) + ## Extract the GridDataHistory info and save it + storeGridDataHistory(file, we, wec, trList, timeRange) logEvent("Saved", gridCount, varName, "grids") @@ -1495,7 +1517,7 @@ def executeIfpNetCDF(host, port, outputFilename, parmList, databaseID, startTime logVerbose("Sampling Definition:", samplingDef) # Open the netCDF file - file = netcdf.netcdf_file(argDict['outputFilename'], 'w') + file = NetCDF.NetCDFFile(argDict['outputFilename'], 'w') totalGrids = 0 for p in argDict['parmList']: @@ -1504,30 +1526,29 @@ def executeIfpNetCDF(host, port, outputFilename, parmList, databaseID, startTime #determine inventory that we want to keep weInv = determineSamplingValues(samplingDef, p, we.getKeys(), start) - if len(weInv) != 0: - gridType = str(we.getGpi().getGridType()) - - if gridType == "SCALAR": - nGrids = storeScalarWE(we, weInv, file, timeRange, - argDict['databaseID'], maskGrid, argDict['trim'], clipArea, - argDict['krunch']) - elif gridType == "VECTOR": - nGrids = storeVectorWE(we, weInv, file, timeRange, - argDict['databaseID'], maskGrid, argDict['trim'], clipArea, - argDict['krunch']) - elif gridType == "WEATHER": - nGrids = storeWeatherWE(we, weInv, file, timeRange, - argDict['databaseID'], maskGrid, clipArea) - elif gridType == "DISCRETE": - nGrids = storeDiscreteWE(we, weInv, file, timeRange, - argDict['databaseID'], maskGrid, clipArea) - else: - s = "Grids of type: " + we.gridType + " are not supported, " + \ - "parm=" + p - logProblem(s) - raise Exception, s - - totalGrids = totalGrids + nGrids + + gridType = str(we.getGpi().getGridType()) + if gridType == "SCALAR": + nGrids = storeScalarWE(we, weInv, file, timeRange, + argDict['databaseID'], maskGrid, argDict['trim'], clipArea, + argDict['krunch']) + elif gridType == "VECTOR": + nGrids = storeVectorWE(we, weInv, file, timeRange, + argDict['databaseID'], maskGrid, argDict['trim'], clipArea, + argDict['krunch']) + elif gridType == "WEATHER": + nGrids = storeWeatherWE(we, weInv, file, timeRange, + argDict['databaseID'], maskGrid, clipArea) + elif gridType == "DISCRETE": + nGrids = storeDiscreteWE(we, weInv, file, timeRange, + argDict['databaseID'], maskGrid, clipArea) + else: + s = "Grids of type: " + we.gridType + " are not supported, " + \ + "parm=" + p + logProblem(s) + raise Exception, s + + totalGrids = totalGrids + nGrids # store the topo and lat, lon grids if the -g was present if argDict["geoInfo"]: diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/gfe/isc/iscMosaic.py b/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/gfe/isc/iscMosaic.py index 1a1ef4c91f..2703d3c280 100644 --- a/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/gfe/isc/iscMosaic.py +++ b/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/gfe/isc/iscMosaic.py @@ -21,7 +21,13 @@ import os, stat, time, string, bisect, getopt, sys, traceback import LogStream, iscTime, iscUtil, mergeGrid -import pupynere as netcdf +#import pupynere as netcdf +try: + # dev environment + from Scientific.IO import NetCDF +except: + # runtime we don't have the whole scientific package + import NetCDF import numpy import JUtil @@ -367,11 +373,7 @@ class IscMosaic: unzippedFile.close() os.remove(unzippedFile.name) - # TODO: Remove False flag passed to constructor to resolve memory - # allocation error found in #7788. If AWIPS2 ever moves to 64-bit - # we'll probably have enough address space to allow the file to be - # memory-mapped. - file = netcdf.netcdf_file(filename, "r", False) + file = NetCDF.NetCDFFile(filename, "r") # check version fileV = getattr(file, 'fileFormatVersion') diff --git a/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/gfe/isc/mergeGrid.py b/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/gfe/isc/mergeGrid.py index b513193bb7..b8f7b946d3 100644 --- a/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/gfe/isc/mergeGrid.py +++ b/edexOsgi/com.raytheon.edex.plugin.gfe/utility/edex_static/base/gfe/isc/mergeGrid.py @@ -113,7 +113,7 @@ class MergeGrid: # removal any old entry if historyB is not None: for h in historyB: - index = string.find(h, self.__siteID + "_GRID") + index = string.find(h, ":"+ self.__siteID + "_GRID") if index == -1: out.append(h) diff --git a/edexOsgi/com.raytheon.edex.plugin.grib/res/spring/grib-ingest.xml b/edexOsgi/com.raytheon.edex.plugin.grib/res/spring/grib-ingest.xml index 9f657f63d2..eca745d9dd 100644 --- a/edexOsgi/com.raytheon.edex.plugin.grib/res/spring/grib-ingest.xml +++ b/edexOsgi/com.raytheon.edex.plugin.grib/res/spring/grib-ingest.xml @@ -8,8 +8,10 @@ - + + + @@ -65,9 +67,10 @@ + - + @@ -88,10 +91,8 @@
- - - - + + @@ -100,7 +101,7 @@ - +
diff --git a/edexOsgi/com.raytheon.edex.plugin.grib/src/com/raytheon/edex/plugin/grib/GribInitializer.java b/edexOsgi/com.raytheon.edex.plugin.grib/src/com/raytheon/edex/plugin/grib/GribInitializer.java index c0d1a8da61..1bb247a0bb 100644 --- a/edexOsgi/com.raytheon.edex.plugin.grib/src/com/raytheon/edex/plugin/grib/GribInitializer.java +++ b/edexOsgi/com.raytheon.edex.plugin.grib/src/com/raytheon/edex/plugin/grib/GribInitializer.java @@ -45,26 +45,26 @@ import com.raytheon.uf.common.dataplugin.grib.util.GribModelLookup; */ public class GribInitializer extends DefaultPluginInitializer { - /** The logger */ - protected transient Log logger = LogFactory.getLog(getClass()); + /** The logger */ + protected transient Log logger = LogFactory.getLog(getClass()); - /** - * Creates a new GribInitializer instance - * - * @param pluginName - * "grib" - */ - public GribInitializer(String pluginName) { - super(pluginName); - } + /** + * Creates a new GribInitializer instance + * + * @param pluginName + * "grib" + */ + public GribInitializer(String pluginName) { + super(pluginName); + } - @Override - public void initializePlugin() throws Exception { - super.initializePlugin(); - logger.info("Initializing grib plugin"); - GribSpatialCache.getInstance(); - GribModelLookup.getInstance(); - logger.info("Grib plugin initialized"); - } + @Override + public void initializePlugin() throws Exception { + super.initializePlugin(); + logger.info("Initializing grib plugin"); + GribModelLookup.getInstance(); + GribSpatialCache.getInstance(); + logger.info("Grib plugin initialized"); + } } diff --git a/edexOsgi/com.raytheon.edex.plugin.grib/src/com/raytheon/edex/plugin/grib/notify/GribNotifyQueue.java b/edexOsgi/com.raytheon.edex.plugin.grib/src/com/raytheon/edex/plugin/grib/notify/GribNotifyQueue.java new file mode 100644 index 0000000000..5fe4dbc5b4 --- /dev/null +++ b/edexOsgi/com.raytheon.edex.plugin.grib/src/com/raytheon/edex/plugin/grib/notify/GribNotifyQueue.java @@ -0,0 +1,146 @@ +/** + * 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.edex.plugin.grib.notify; + +import java.util.ArrayList; +import java.util.List; + +import com.raytheon.uf.common.dataplugin.PluginDataObject; +import com.raytheon.uf.common.dataplugin.grib.GribRecord; +import com.raytheon.uf.common.serialization.SerializationException; +import com.raytheon.uf.common.serialization.SerializationUtil; +import com.raytheon.uf.common.status.IUFStatusHandler; +import com.raytheon.uf.common.status.UFStatus; +import com.raytheon.uf.edex.core.EDEXUtil; +import com.raytheon.uf.edex.core.EdexException; + +/** + * Smart Init Aggregator/Queue for Camel + * + *
+ * SOFTWARE HISTORY
+ * Date         Ticket#    Engineer    Description
+ * ------------ ---------- ----------- --------------------------
+ * Dec 11, 2008            njensen     Initial creation
+ * Oct 6, 2009    3172     njensen    Based on GribNotifyMessages
+ * 
+ * + * @author njensen + * @version 1.0 + */ + +public class GribNotifyQueue { + protected static final transient IUFStatusHandler handler = UFStatus + .getHandler(GribNotifyQueue.class); + + private final Object syncObj = new Object(); + + private List queuedRecord = new ArrayList(35); + + private String destinationUri = null; + + private GribNotifySendThread sendThread = new GribNotifySendThread( + "gribNotifySend"); + + public GribNotifyQueue() { + sendThread.start(); + } + + public void addRecords(PluginDataObject[] gribs) { + if (gribs != null && gribs.length > 0) { + synchronized (syncObj) { + if (gribs.length > 0) { + for (PluginDataObject grib : gribs) { + queuedRecord.add((GribRecord) grib); + } + } else { + queuedRecord.add((GribRecord) gribs[0]); + } + + syncObj.notifyAll(); + } + } + } + + public String getDestinationUri() { + return destinationUri; + } + + public void setDestinationUri(String destinationUri) { + this.destinationUri = destinationUri; + } + + private class GribNotifySendThread extends Thread { + public GribNotifySendThread(String name) { + super(name); + } + + public void run() { + while (true) { + List recordsToSend = null; + + // small sleep to allow messages to accumulate + try { + Thread.sleep(1000); + } catch (InterruptedException e) { + + } + + try { + synchronized (syncObj) { + while (queuedRecord.size() == 0) { + try { + syncObj.wait(); + } catch (InterruptedException e) { + } + } + + recordsToSend = queuedRecord; + queuedRecord = new ArrayList(35); + } + + GribNotifyContainer msg = GribNotifyTransform + .transformToMessages(recordsToSend); + try { + byte[] data = SerializationUtil.transformToThrift(msg); + EDEXUtil.getMessageProducer().sendAsyncUri( + destinationUri, data); + } catch (SerializationException e) { + handler.error( + "Failed to serialize grib notification message. Notification msg for " + + recordsToSend.size() + + " records won't be sent", e); + } catch (EdexException e) { + handler.error( + "Failed to send grib notification message. Notification msg for " + + recordsToSend.size() + + " records won't be sent", e); + } + } catch (Throwable e) { + handler.error( + "Error occurred in GribNotificationSend process. Notification msg for " + + (recordsToSend == null ? 0 + : recordsToSend.size()) + + " records won't be sent", e); + } + } + } + } +} diff --git a/edexOsgi/com.raytheon.edex.plugin.grib/src/com/raytheon/edex/plugin/grib/notify/GribNotifyTransform.java b/edexOsgi/com.raytheon.edex.plugin.grib/src/com/raytheon/edex/plugin/grib/notify/GribNotifyTransform.java index ccffb541f3..a3f12af57a 100644 --- a/edexOsgi/com.raytheon.edex.plugin.grib/src/com/raytheon/edex/plugin/grib/notify/GribNotifyTransform.java +++ b/edexOsgi/com.raytheon.edex.plugin.grib/src/com/raytheon/edex/plugin/grib/notify/GribNotifyTransform.java @@ -19,10 +19,8 @@ **/ package com.raytheon.edex.plugin.grib.notify; -import java.util.ArrayList; import java.util.List; -import com.raytheon.uf.common.dataplugin.PluginDataObject; import com.raytheon.uf.common.dataplugin.grib.GribModel; import com.raytheon.uf.common.dataplugin.grib.GribRecord; @@ -44,38 +42,36 @@ import com.raytheon.uf.common.dataplugin.grib.GribRecord; public class GribNotifyTransform { - /** - * Translates the grib records into messages that have specific readable - * data about what was ingested. - * - * @param gribs - * @return - */ - public static GribNotifyContainer transformToMessages( - PluginDataObject[] gribs) { - GribNotifyContainer container = new GribNotifyContainer(); - List msgList = new ArrayList(); - for (PluginDataObject pdo : gribs) { - GribRecord grib = (GribRecord) pdo; - GribModel modelInfo = grib.getModelInfo(); - // String level = GridTranslator.getShortLevelName( - // modelInfo.getLevelName(), modelInfo.getLevelOneValue(), - // modelInfo.getLevelTwoValue()); + /** + * Translates the grib records into messages that have specific readable + * data about what was ingested. + * + * @param gribs + * @return + */ + public static GribNotifyContainer transformToMessages(List gribs) { + GribNotifyContainer container = new GribNotifyContainer(); + GribNotifyMessage[] msgs = new GribNotifyMessage[gribs.size()]; + int index = 0; + for (GribRecord grib : gribs) { + GribModel modelInfo = grib.getModelInfo(); + // String level = GridTranslator.getShortLevelName( + // modelInfo.getLevelName(), modelInfo.getLevelOneValue(), + // modelInfo.getLevelTwoValue()); - GribNotifyMessage msg = new GribNotifyMessage(); - msg.setInsertTime(grib.getInsertTime().getTime()); - msg.setDataTime(grib.getDataTime()); - msg.setModel(modelInfo.getModelName()); - msg.setLevelName(modelInfo.getLevelName()); - msg.setLevelOne(modelInfo.getLevelOneValue()); - msg.setLevelTwo(modelInfo.getLevelTwoValue()); - msg.setParamAbbreviation(grib.getModelInfo() - .getParameterAbbreviation()); - msg.setDataURI(grib.getDataURI()); - msgList.add(msg); - } - container.setMessages(msgList.toArray(new GribNotifyMessage[msgList - .size()])); - return container; - } + GribNotifyMessage msg = new GribNotifyMessage(); + msg.setInsertTime(grib.getInsertTime().getTime()); + msg.setDataTime(grib.getDataTime()); + msg.setModel(modelInfo.getModelName()); + msg.setLevelName(modelInfo.getLevelName()); + msg.setLevelOne(modelInfo.getLevelOneValue()); + msg.setLevelTwo(modelInfo.getLevelTwoValue()); + msg.setParamAbbreviation(grib.getModelInfo() + .getParameterAbbreviation()); + msg.setDataURI(grib.getDataURI()); + msgs[index++] = msg; + } + container.setMessages(msgs); + return container; + } } diff --git a/edexOsgi/com.raytheon.edex.plugin.grib/src/com/raytheon/edex/plugin/grib/spatial/FileDataList.java b/edexOsgi/com.raytheon.edex.plugin.grib/src/com/raytheon/edex/plugin/grib/spatial/FileDataList.java index 962b840ada..2cda36d385 100644 --- a/edexOsgi/com.raytheon.edex.plugin.grib/src/com/raytheon/edex/plugin/grib/spatial/FileDataList.java +++ b/edexOsgi/com.raytheon.edex.plugin.grib/src/com/raytheon/edex/plugin/grib/spatial/FileDataList.java @@ -52,16 +52,15 @@ import com.raytheon.uf.common.localization.LocalizationFile; @XmlAccessorType(XmlAccessType.NONE) @XmlRootElement(name = "FileListings") public class FileDataList { - @XmlElements({ @XmlElement(name = "CoverageFiles", type = FileData.class) }) private List coverageFileList; - @XmlElements({ @XmlElement(name = "SubGridFiles", type = FileData.class) }) private List subGridFileList; private Map coverageFileMap; private Map subGridFileMap; + @XmlElements({ @XmlElement(name = "CoverageFiles", type = FileData.class) }) public List getCoverageFileList() { if (coverageFileList == null && coverageFileMap != null) { coverageFileList = new ArrayList(coverageFileMap.values()); @@ -75,6 +74,7 @@ public class FileDataList { coverageFileMap = null; } + @XmlElements({ @XmlElement(name = "SubGridFiles", type = FileData.class) }) public List getSubGridFileList() { if (subGridFileList == null && subGridFileMap != null) { subGridFileList = new ArrayList(subGridFileMap.values()); @@ -172,8 +172,11 @@ public class FileDataList { for (LocalizationFile lf : subGridFiles) { File f = lf.getFile(); - FileData data = new FileData(f); - subGridFileMap.put(f.getName(), data); + + if (!subGridFileMap.containsKey(f.getName())) { + FileData data = new FileData(f); + subGridFileMap.put(f.getName(), data); + } } } diff --git a/edexOsgi/com.raytheon.edex.plugin.grib/src/com/raytheon/edex/plugin/grib/spatial/GribSpatialCache.java b/edexOsgi/com.raytheon.edex.plugin.grib/src/com/raytheon/edex/plugin/grib/spatial/GribSpatialCache.java index 628f4c4345..feac8b8fa9 100644 --- a/edexOsgi/com.raytheon.edex.plugin.grib/src/com/raytheon/edex/plugin/grib/spatial/GribSpatialCache.java +++ b/edexOsgi/com.raytheon.edex.plugin.grib/src/com/raytheon/edex/plugin/grib/spatial/GribSpatialCache.java @@ -1,698 +1,750 @@ -/** - * 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.edex.plugin.grib.spatial; - -import java.io.File; -import java.util.HashMap; -import java.util.HashSet; -import java.util.Iterator; -import java.util.LinkedList; -import java.util.List; -import java.util.Map; - -import org.apache.commons.logging.Log; -import org.apache.commons.logging.LogFactory; -import org.opengis.metadata.spatial.PixelOrientation; - -import com.raytheon.edex.plugin.grib.dao.GribModelDao; -import com.raytheon.edex.plugin.grib.dao.GridCoverageDao; -import com.raytheon.edex.plugin.grib.dao.IGridCoverageDao; -import com.raytheon.edex.site.SiteUtil; -import com.raytheon.uf.common.awipstools.GetWfoCenterPoint; -import com.raytheon.uf.common.dataplugin.grib.exception.GribException; -import com.raytheon.uf.common.dataplugin.grib.spatial.projections.GridCoverage; -import com.raytheon.uf.common.dataplugin.grib.subgrid.SubGrid; -import com.raytheon.uf.common.dataplugin.grib.subgrid.SubGridDef; -import com.raytheon.uf.common.dataplugin.grib.util.GribModelLookup; -import com.raytheon.uf.common.dataplugin.grib.util.GridModel; -import com.raytheon.uf.common.geospatial.MapUtil; -import com.raytheon.uf.common.localization.IPathManager; -import com.raytheon.uf.common.localization.LocalizationContext; -import com.raytheon.uf.common.localization.LocalizationContext.LocalizationLevel; -import com.raytheon.uf.common.localization.LocalizationContext.LocalizationType; -import com.raytheon.uf.common.localization.LocalizationFile; -import com.raytheon.uf.common.localization.PathManagerFactory; -import com.raytheon.uf.common.serialization.SerializationUtil; -import com.raytheon.uf.edex.awipstools.GetWfoCenterHandler; -import com.raytheon.uf.edex.core.EDEXUtil; -import com.raytheon.uf.edex.database.DataAccessLayerException; -import com.raytheon.uf.edex.database.cluster.ClusterLockUtils; -import com.raytheon.uf.edex.database.cluster.ClusterLockUtils.LockState; -import com.raytheon.uf.edex.database.cluster.ClusterTask; -import com.raytheon.uf.edex.database.dao.CoreDao; -import com.raytheon.uf.edex.database.dao.DaoConfig; -import com.vividsolutions.jts.geom.Coordinate; - -/** - * Cache used for holding GridCoverage objects. Since creating geometries and - * CRS objects are expensive operations, this cache is used to store - * GridCoverages as they are produced. - * - *
- * 
- * SOFTWARE HISTORY
- * 
- * Date         Ticket#     Engineer    Description
- * ------------ ----------  ----------- --------------------------
- * 4/7/09       1994        bphillip    Initial Creation
- * 
- * 
- * - * @author bphillip - * @version 1 - */ -public class GribSpatialCache { - - /** The logger */ - protected transient Log logger = LogFactory.getLog(getClass()); - - /** The singleton instance */ - private static GribSpatialCache instance = new GribSpatialCache(); - - /** - * Map containing the GridCoverages
- * The key for this map is the id field of the GridCoverage object stored as - * the value of the map - */ - private Map spatialMap; - - /** - * Map containing the GridCoverages
- * The key for this map is the name field of the GridCoverage object stored - * as the value of the map. This is only used internally for lookup of a - * coverage by name aka gridId. - */ - private Map spatialNameMap; - - /** - * Map containing the subGrid coverage based on a model name. - */ - private Map subGridCoverageMap; - - /** - * Map containing the subGrid definition based on a model name. - */ - private Map definedSubGridMap; - - /** - * Gets the singleton instance of GribSpatialCache - * - * @return The singleton instance of the GribSpatialCache - */ - public static GribSpatialCache getInstance() { - return instance; - } - - /** - * Creates a new GribSpatialCache - */ - private GribSpatialCache() { - spatialMap = new HashMap(); - spatialNameMap = new HashMap(); - definedSubGridMap = new HashMap(); - subGridCoverageMap = new HashMap(); - initializeGrids(); - } - - /** - * Retrieves a grid from the map. If the grid does not exist, null is - * returned - * - * @param id - * The id of the GridCoverage to retrieve - * @return The GridCoverage object, null if not present - * @throws GribException - * @throws DataAccessLayerException - */ - public GridCoverage getGrid(GridCoverage coverage) throws GribException { - GridCoverage retVal = spatialMap.get(coverage.getId()); - - if (retVal == null) { - /* - * Coverage not found in cache, but the values provided in the GDS - * may be slightly different than those for the grid in the cache. - * Check the database to be sure. - */ - try { - retVal = ((IGridCoverageDao) EDEXUtil.getESBComponent(coverage - .getProjectionType().replaceAll(" ", "") + "Dao")) - .checkGrid(coverage); - } catch (DataAccessLayerException e) { - throw new GribException("Error querying for grib coverage!", e); - } - - if (retVal != null) { - spatialMap.put(coverage.getId(), retVal); - spatialNameMap.put(coverage.getName(), retVal); - } - - } - - return retVal; - } - - public GridCoverage getGrid(int id) { - return spatialMap.get(id); - } - - public GridCoverage getGrid(String modelName) { - GridCoverage rval = null; - - if (modelName != null) { - if (subGridCoverageMap.containsKey(modelName)) { - rval = spatialMap.get(subGridCoverageMap.get(modelName)); - } else { - GridModel model = GribModelLookup.getInstance().getModelByName( - modelName); - if (model != null) { - rval = spatialNameMap.get(model.getGrid().toString()); - } - } - } - - return rval; - } - - public GridCoverage getGridByName(String name) { - return spatialNameMap.get(name); - } - - /** - * Puts a grid into the GribSpatialCache. - * - * @param grid - * The grid to store - * @param persistToDb - * True if this GridCoverage object is to be persisted to the - * database - * @throws GribException - * If problems occur while initializing the grid - */ - public void putGrid(GridCoverage grid, boolean initializeGrid, - boolean persistToDb) throws GribException { - if (initializeGrid) { - /* - * Prepare the grid to be stored into the cache. Initializes the - * geometry and crs objects and generates the id field - */ - grid.initialize(); - if (grid.getName() == null) { - grid.generateName(); - } - } - - // Persist to the database if desired - if (persistToDb) { - new CoreDao(DaoConfig.DEFAULT).saveOrUpdate(grid); - } - - spatialMap.put(grid.getId(), grid); - spatialNameMap.put(grid.getName(), grid); - } - - public SubGrid getSubGrid(String modelName) { - return definedSubGridMap.get(modelName); - } - - public GridCoverage getSubGridCoverage(String modelName) { - GridCoverage rval = null; - - if (subGridCoverageMap.containsKey(modelName)) { - rval = spatialMap.get(subGridCoverageMap.get(modelName)); - } - - return rval; - } - - /** - * Initializes the predefined set of grids. The grids are stored in xml - * format in the utility folder so the localization service has access to - * them.
- * GridCoverage are created from the xml via JaxB and placed in the cache - */ - private void initializeGrids() { - ClusterTask ct = null; - - do { - ct = ClusterLockUtils.lock("grib", "spatialCache", 120000, true); - } while (!LockState.SUCCESSFUL.equals(ct.getLockState())); - - try { - // pull all the coverage from the database - GridCoverageDao dao = new GridCoverageDao(); - FileDataList previousFdl = getPreviousFileDataList(); - FileDataList currentFdl = generateFileDataList(); - - if (isDefintionChanged(previousFdl, currentFdl)) { - processBaseGridsChanged(dao, currentFdl); - saveFileDataList(currentFdl); - } else { - List baseCoverages = dao - .loadBaseGrids(); - - for (Object obj : baseCoverages) { - try { - putGrid((GridCoverage) obj, false, false); - } catch (Exception e) { - // Log error but do not throw exception, technically is - // only from initialize which isn't being called - logger.error("Unable to load grid coverage into cache " - + obj, e); - } - } - } - - processUnknownGrids(dao); - processSubGrids(dao, currentFdl); - } finally { - ClusterLockUtils.unlock(ct, false); - } - } - - /** - * A non subgridded definition has been added, deleted, or changed. - * Changed/delete both delete all records, models, and coverage defintion. - * Then Change/Add put in a new coverage definition. - * - * TODO: Post process Unknown definitions to see if they are now known. If - * now known delete definitions of unknown. - * - * @param dao - * @param currentFdl - */ - private void processBaseGridsChanged(GridCoverageDao dao, - FileDataList currentFdl) { - List baseCoverages = dao.loadBaseGrids(); - Map fileCoverageMap = loadGridDefinitionsFromDisk(currentFdl); - - // update needs to delete all hdf5 same as delete, so update is - // a delete and then an add to simplify logic and handle primary - // key changes. - List coveragesToDelete = new LinkedList(); - HashSet validDbCoverageNames = new HashSet( - (int) (baseCoverages.size() * 1.25) + 1); - - Iterator iter = baseCoverages.iterator(); - while (iter.hasNext()) { - GridCoverage dbCov = iter.next(); - GridCoverage fileCoverage = fileCoverageMap.get(dbCov.getName()); - if (!dbCov.equals(fileCoverage)) { - // coverage not in flat file or coverage has changed, - // delete coverage old coverage - coveragesToDelete.add(dbCov); - iter.remove(); - } else { - // current coverage still valid - validDbCoverageNames.add(dbCov.getName()); - } - } - - // delete grids, models, coverages, and hdf5 for namesToDelete. - for (GridCoverage cov : coveragesToDelete) { - logger.info("GridCoverage " + cov.getName() - + " has changed. Deleting out of date data"); - if (!dao.deleteCoverageAssociatedData(cov, true)) { - logger.warn("Failed to delete GridCoverage " + cov.getName() - + ". Manual intervention required."); - } else { - logger.info("GridCoverage successfully deleted"); - } - } - - // remove the valid db coverages from the map - fileCoverageMap.keySet().removeAll(validDbCoverageNames); - - // add new grids in bulk - for (GridCoverage cov : fileCoverageMap.values()) { - try { - putGrid(cov, true, false); - } catch (Exception e) { - logger.error( - "Failed to initialize grid definition " + cov.getName(), - e); - } - } - - // bulk persist the spatial maps - if (spatialMap.size() > 0) { - dao.persistAll(spatialMap.values()); - } - - for (GridCoverage cov : baseCoverages) { - try { - putGrid(cov, false, false); - } catch (Exception e) { - logger.error( - "Failed to initialize grid definition " + cov.getName(), - e); - } - } - } - - /** - * A non subGridd definition has been added, deleted, or changed. - * Changed/delete both delete all records, models, and coverage defintion. - * Then Change/Add put in a new coverage definition, and also delete any - * data associated with base model definition. - * - * @param dao - * @param currentFdl - */ - private void processSubGrids(GridCoverageDao dao, FileDataList currentFdl) { - List oldSubGridCoverages = dao.loadSubGrids(); - Map fileSubGridCoverageMap = loadSubGridDefinitionsFromDisk(currentFdl); - - // update needs to delete all hdf5 same as delete, so update is - // a delete and then an add to simplify logic and handle primary - // key changes. - List coveragesToDelete = new LinkedList(); - HashSet validDbCoverageNames = new HashSet( - (int) (oldSubGridCoverages.size() * 1.25) + 1); - - Iterator iter = oldSubGridCoverages.iterator(); - while (iter.hasNext()) { - GridCoverage dbCov = iter.next(); - GridCoverage fileCoverage = fileSubGridCoverageMap.get(dbCov - .getName()); - if (!dbCov.equals(fileCoverage)) { - // coverage not in flat file or coverage has changed, - // delete coverage - coveragesToDelete.add(dbCov); - iter.remove(); - } else { - // current coverage still valid - validDbCoverageNames.add(dbCov.getName()); - } - } - - // delete grids, models, coverages, and hdf5 for namesToDelete. - for (GridCoverage cov : coveragesToDelete) { - logger.info("Model " - + cov.getSubGridModel() - + " has changed subGrid definition, deleting out of date data"); - if (!dao.deleteCoverageAssociatedData(cov, true)) { - logger.warn("Failed to delete GridCoverage " + cov.getName() - + ". Manual intervention required."); - } else { - logger.info("GridModel successfully deleted"); - } - } - - // remove the valid db coverages from the map - fileSubGridCoverageMap.keySet().removeAll(validDbCoverageNames); - - // need to delete model information for new adds, as old grid may not - // have been subgridded - GribModelDao modelDao = new GribModelDao(); - for (GridCoverage cov : fileSubGridCoverageMap.values()) { - logger.info("Model " - + cov.getSubGridModel() - + " has changed subGrid definition, deleting out of date data"); - // look up parent - if (modelDao.deleteModelAndAssociatedData(cov.getSubGridModel()) < 0) { - logger.warn("Failed to delete SubGrid Model " - + cov.getSubGridModel() - + ". Manual intervention required."); - } else { - logger.info("GridModel successfully deleted"); - } - } - - // add new grids, persisting individually - for (GridCoverage cov : fileSubGridCoverageMap.values()) { - try { - putGrid(cov, true, true); - subGridCoverageMap.put(cov.getSubGridModel(), cov.getId()); - } catch (Exception e) { - logger.error( - "Failed to initialize grid definition " + cov.getName(), - e); - } - } - - // put database grids into map - for (GridCoverage cov : oldSubGridCoverages) { - try { - putGrid(cov, true, true); - subGridCoverageMap.put(cov.getSubGridModel(), cov.getId()); - } catch (Exception e) { - logger.error( - "Failed to initialize grid definition " + cov.getName(), - e); - } - } - } - - private void processUnknownGrids(GridCoverageDao dao) { - List unknownGrids = dao.loadUnknownGrids(); - for (GridCoverage cov : unknownGrids) { - try { - GridCoverage dbCov = getGrid(cov); - if (cov.equals(dbCov) && !cov.getName().equals(dbCov.getName())) { - logger.info("Unknown grid " + cov.getName() - + " is now mapped by " + dbCov.getName() - + ". Deleting unknown grid"); - dao.deleteCoverageAssociatedData(cov, true); - } - } catch (Exception e) { - logger.error("Erro occurred scanning unknown grids", e); - } - } - } - - private Map loadSubGridDefinitionsFromDisk( - FileDataList currentFdl) { - GribModelLookup gribModelLUT = GribModelLookup.getInstance(); - List subGridDefs = currentFdl.getSubGridFileList(); - Map subGrids = null; - - if (subGridDefs != null && subGridDefs.size() > 0) { - subGrids = new HashMap(subGridDefs.size() * 3); - Coordinate wfoCenterPoint = null; - String wfo = SiteUtil.getSite(); - GetWfoCenterPoint centerPointRequest = new GetWfoCenterPoint(wfo); - try { - wfoCenterPoint = new GetWfoCenterHandler() - .handleRequest(centerPointRequest); - } catch (Exception e) { - logger.error( - "Failed to generate sub grid definitions. Unable to lookup WFO Center Point", - e); - return new HashMap(0); - } - - for (FileData fd : subGridDefs) { - try { - SubGridDef subGridDef = (SubGridDef) SerializationUtil - .jaxbUnmarshalFromXmlFile(fd.getFilePath()); - String referenceModel = subGridDef.getReferenceModel(); - - GridCoverage gridCoverage = getGrid(referenceModel); - - Coordinate wfoCenter = MapUtil.latLonToGridCoordinate( - wfoCenterPoint, PixelOrientation.CENTER, - gridCoverage); - - double xCenterPoint = wfoCenter.x; - double yCenterPoint = wfoCenter.y; - - double xDistance = subGridDef.getNx() / 2; - double yDistance = subGridDef.getNy() / 2; - Coordinate lowerLeftPosition = new Coordinate(xCenterPoint - - xDistance, yCenterPoint + yDistance); - Coordinate upperRightPosition = new Coordinate(xCenterPoint - + xDistance, yCenterPoint - yDistance); - - lowerLeftPosition = MapUtil.gridCoordinateToLatLon( - lowerLeftPosition, PixelOrientation.CENTER, - gridCoverage); - upperRightPosition = MapUtil.gridCoordinateToLatLon( - upperRightPosition, PixelOrientation.CENTER, - gridCoverage); - - subGridDef.setLowerLeftLon(lowerLeftPosition.x); - subGridDef.setLowerLeftLat(lowerLeftPosition.y); - subGridDef.setUpperRightLon(upperRightPosition.x); - subGridDef.setUpperRightLat(upperRightPosition.y); - - // verify numbers in -180 -> 180 range - subGridDef.setLowerLeftLon(MapUtil.correctLon(subGridDef - .getLowerLeftLon())); - subGridDef.setUpperRightLon(MapUtil.correctLon(subGridDef - .getUpperRightLon())); - - // do a reverse lookup of the model name to get its - // associated grid id - - for (String modelName : subGridDef.getModelNames()) { - GridModel model = gribModelLUT - .getModelByName(modelName); - if (model != null) { - GridCoverage baseCoverage = spatialNameMap - .get(model.getGrid().toString()); - - if (baseCoverage != null) { - SubGrid subGrid = new SubGrid(); - subGrid.setModelName(modelName); - GridCoverage subGridCoverage = baseCoverage - .trim(subGridDef, subGrid); - if (subGridCoverage != null) { - subGrids.put(subGridCoverage.getName(), - subGridCoverage); - definedSubGridMap.put(modelName, subGrid); - } - } - } - } - - } catch (Exception e) { - // Log error but do not throw exception - logger.error( - "Failed processing sub grid file: " - + fd.getFilePath(), e); - } - } - } else { - subGrids = new HashMap(0); - } - - return subGrids; - } - - private static boolean isDefintionChanged(FileDataList previousFdl, - FileDataList currentFdl) { - boolean rval = true; - if (currentFdl != null) { - rval = !currentFdl.equals(previousFdl); - } else { - rval = previousFdl != null; - } - - return rval; - } - - private FileDataList generateFileDataList() { - /* - * Retrieve the list of files from the localization service - */ - IPathManager pm = PathManagerFactory.getPathManager(); - FileDataList fileList = new FileDataList(); - LocalizationContext[] contexts = pm - .getLocalSearchHierarchy(LocalizationType.EDEX_STATIC); - fileList.addCoverageFiles(pm.listFiles(contexts, "/grib/grids", - new String[] { "xml" }, true, true)); - fileList.addSubGridFiles(pm.listFiles(contexts, "/grib/subgrids", - new String[] { "xml" }, true, true)); - - return fileList; - } - - private FileDataList getPreviousFileDataList() { - IPathManager pm = PathManagerFactory.getPathManager(); - File previousFileData = pm.getFile(pm.getContext( - LocalizationType.EDEX_STATIC, LocalizationLevel.CONFIGURED), - "/grib/gridDefFileListing.xml"); - FileDataList rval = null; - - if (previousFileData.exists() && previousFileData.length() > 0) { - try { - Object obj = SerializationUtil - .jaxbUnmarshalFromXmlFile(previousFileData); - if (obj instanceof FileDataList) { - rval = (FileDataList) obj; - } else { - logger.error("Error occurred deserializing " - + previousFileData.getAbsolutePath() - + ", expected type " + FileDataList.class - + " received " + obj.getClass()); - } - } catch (Exception e) { - logger.error( - "Error occurred deserializing " - + previousFileData.getAbsolutePath(), e); - } - } - return rval; - } - - private Map loadGridDefinitionsFromDisk( - FileDataList currentFdl) { - List coverageFiles = currentFdl.getCoverageFileList(); - Map fileCoverageMap = new HashMap( - (int) (coverageFiles.size() * 1.25) + 1); - - /* - * Iterate over file list. Unmarshal to GridCoverage object - */ - for (FileData fd : coverageFiles) { - try { - GridCoverage grid = (GridCoverage) SerializationUtil - .jaxbUnmarshalFromXmlFile(fd.getFilePath()); - GridCoverage previousGrid = fileCoverageMap.put(grid.getName(), - grid); - if (previousGrid != null) { - for (FileData fd2 : coverageFiles) { - GridCoverage grid2 = (GridCoverage) SerializationUtil - .jaxbUnmarshalFromXmlFile(fd2.getFilePath()); - if (grid.getName().equals(grid2.getName())) { - logger.error("Grid " + grid.getName() - + " has already been defined. " - + fd.getFilePath() + " and " - + fd2.getFilePath() - + " have same name. Using " - + fd2.getFilePath()); - break; - } - } - } - } catch (Exception e) { - // Log error but do not throw exception - logger.error( - "Unable to read default grids file: " - + fd.getFilePath(), e); - } - } - - return fileCoverageMap; - } - - private void saveFileDataList(FileDataList fdl) { - try { - IPathManager pm = PathManagerFactory.getPathManager(); - LocalizationFile lf = pm.getLocalizationFile( - pm.getContext(LocalizationType.EDEX_STATIC, - LocalizationLevel.CONFIGURED), - "/grib/gridDefFileListing.xml"); - SerializationUtil.jaxbMarshalToXmlFile(fdl, lf.getFile() - .getAbsolutePath()); - lf.save(); - } catch (Exception e) { - logger.error( - "Failed to save coverage file data list, coverages may be reloaded on next restart", - e); - } - } - - public static void reinitialize() { - GribSpatialCache newInstance = new GribSpatialCache(); - instance = newInstance; - } -} +/** + * 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.edex.plugin.grib.spatial; + +import java.io.File; +import java.util.HashMap; +import java.util.HashSet; +import java.util.Iterator; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; + +import org.apache.commons.logging.Log; +import org.apache.commons.logging.LogFactory; +import org.opengis.metadata.spatial.PixelOrientation; + +import com.raytheon.edex.plugin.grib.dao.GribModelDao; +import com.raytheon.edex.plugin.grib.dao.GridCoverageDao; +import com.raytheon.edex.plugin.grib.dao.IGridCoverageDao; +import com.raytheon.edex.site.SiteUtil; +import com.raytheon.uf.common.awipstools.GetWfoCenterPoint; +import com.raytheon.uf.common.dataplugin.grib.exception.GribException; +import com.raytheon.uf.common.dataplugin.grib.spatial.projections.GridCoverage; +import com.raytheon.uf.common.dataplugin.grib.subgrid.SubGrid; +import com.raytheon.uf.common.dataplugin.grib.subgrid.SubGridDef; +import com.raytheon.uf.common.dataplugin.grib.util.GribModelLookup; +import com.raytheon.uf.common.dataplugin.grib.util.GridModel; +import com.raytheon.uf.common.geospatial.MapUtil; +import com.raytheon.uf.common.localization.IPathManager; +import com.raytheon.uf.common.localization.LocalizationContext; +import com.raytheon.uf.common.localization.LocalizationContext.LocalizationLevel; +import com.raytheon.uf.common.localization.LocalizationContext.LocalizationType; +import com.raytheon.uf.common.localization.LocalizationFile; +import com.raytheon.uf.common.localization.PathManagerFactory; +import com.raytheon.uf.common.serialization.SerializationException; +import com.raytheon.uf.common.serialization.SerializationUtil; +import com.raytheon.uf.edex.awipstools.GetWfoCenterHandler; +import com.raytheon.uf.edex.core.EDEXUtil; +import com.raytheon.uf.edex.database.DataAccessLayerException; +import com.raytheon.uf.edex.database.cluster.ClusterLockUtils; +import com.raytheon.uf.edex.database.cluster.ClusterLockUtils.LockState; +import com.raytheon.uf.edex.database.cluster.ClusterTask; +import com.raytheon.uf.edex.database.dao.CoreDao; +import com.raytheon.uf.edex.database.dao.DaoConfig; +import com.vividsolutions.jts.geom.Coordinate; + +/** + * Cache used for holding GridCoverage objects. Since creating geometries and + * CRS objects are expensive operations, this cache is used to store + * GridCoverages as they are produced. + * + *
+ * 
+ * SOFTWARE HISTORY
+ * 
+ * Date         Ticket#     Engineer    Description
+ * ------------ ----------  ----------- --------------------------
+ * 4/7/09       1994        bphillip    Initial Creation
+ * 
+ * 
+ * + * @author bphillip + * @version 1 + */ +public class GribSpatialCache { + + /** The logger */ + protected transient Log logger = LogFactory.getLog(getClass()); + + /** The singleton instance */ + private static GribSpatialCache instance = new GribSpatialCache(); + + /** + * Map containing the GridCoverages
+ * The key for this map is the id field of the GridCoverage object stored as + * the value of the map + */ + private Map spatialMap; + + /** + * Map containing the GridCoverages
+ * The key for this map is the name field of the GridCoverage object stored + * as the value of the map. This is only used internally for lookup of a + * coverage by name aka gridId. + */ + private Map spatialNameMap; + + /** + * Map containing the subGrid coverage based on a model name. + */ + private Map subGridCoverageMap; + + /** + * Map containing the subGrid definition based on a model name. + */ + private Map definedSubGridMap; + + /** + * Gets the singleton instance of GribSpatialCache + * + * @return The singleton instance of the GribSpatialCache + */ + public static GribSpatialCache getInstance() { + return instance; + } + + /** + * Creates a new GribSpatialCache + */ + private GribSpatialCache() { + spatialMap = new HashMap(); + spatialNameMap = new HashMap(); + definedSubGridMap = new HashMap(); + subGridCoverageMap = new HashMap(); + initializeGrids(); + } + + /** + * Retrieves a grid from the map. If the grid does not exist, null is + * returned + * + * @param id + * The id of the GridCoverage to retrieve + * @return The GridCoverage object, null if not present + * @throws GribException + * @throws DataAccessLayerException + */ + public GridCoverage getGrid(GridCoverage coverage) throws GribException { + GridCoverage retVal = spatialMap.get(coverage.getId()); + + if (retVal == null) { + /* + * Coverage not found in cache, but the values provided in the GDS + * may be slightly different than those for the grid in the cache. + * Check the database to be sure. + */ + try { + retVal = ((IGridCoverageDao) EDEXUtil.getESBComponent(coverage + .getProjectionType().replaceAll(" ", "") + "Dao")) + .checkGrid(coverage); + } catch (DataAccessLayerException e) { + throw new GribException("Error querying for grib coverage!", e); + } + + if (retVal != null) { + spatialMap.put(coverage.getId(), retVal); + spatialNameMap.put(coverage.getName(), retVal); + } + + } + + return retVal; + } + + public GridCoverage getGrid(int id) { + return spatialMap.get(id); + } + + public GridCoverage getGrid(String modelName) { + GridCoverage rval = null; + + if (modelName != null) { + if (subGridCoverageMap.containsKey(modelName)) { + rval = spatialMap.get(subGridCoverageMap.get(modelName)); + } else { + GridModel model = GribModelLookup.getInstance().getModelByName( + modelName); + if (model != null) { + rval = spatialNameMap.get(model.getGrid().toString()); + } + } + } + + return rval; + } + + public GridCoverage getGridByName(String name) { + return spatialNameMap.get(name); + } + + /** + * Puts a grid into the GribSpatialCache. + * + * @param grid + * The grid to store + * @param persistToDb + * True if this GridCoverage object is to be persisted to the + * database + * @throws GribException + * If problems occur while initializing the grid + */ + public void putGrid(GridCoverage grid, boolean initializeGrid, + boolean persistToDb) throws GribException { + if (initializeGrid) { + /* + * Prepare the grid to be stored into the cache. Initializes the + * geometry and crs objects and generates the id field + */ + grid.initialize(); + if (grid.getName() == null) { + grid.generateName(); + } + } + + // Persist to the database if desired + if (persistToDb) { + new CoreDao(DaoConfig.DEFAULT).saveOrUpdate(grid); + } + + spatialMap.put(grid.getId(), grid); + spatialNameMap.put(grid.getName(), grid); + } + + public SubGrid getSubGrid(String modelName) { + return definedSubGridMap.get(modelName); + } + + public GridCoverage getSubGridCoverage(String modelName) { + GridCoverage rval = null; + + if (subGridCoverageMap.containsKey(modelName)) { + rval = spatialMap.get(subGridCoverageMap.get(modelName)); + } + + return rval; + } + + /** + * Initializes the predefined set of grids. The grids are stored in xml + * format in the utility folder so the localization service has access to + * them.
+ * GridCoverage are created from the xml via JaxB and placed in the cache + */ + private void initializeGrids() { + ClusterTask ct = null; + + do { + ct = ClusterLockUtils.lock("grib", "spatialCache", 120000, true); + } while (!LockState.SUCCESSFUL.equals(ct.getLockState())); + + try { + // pull all the coverage from the database + GridCoverageDao dao = new GridCoverageDao(); + FileDataList previousFdl = getPreviousFileDataList(); + FileDataList currentFdl = generateFileDataList(); + + if (isDefintionChanged(previousFdl, currentFdl)) { + processBaseGridsChanged(dao, currentFdl); + saveFileDataList(currentFdl); + } else { + List baseCoverages = dao + .loadBaseGrids(); + + if (baseCoverages != null && baseCoverages.size() > 0) { + for (Object obj : baseCoverages) { + try { + putGrid((GridCoverage) obj, false, false); + } catch (Exception e) { + // Log error but do not throw exception, technically + // is + // only from initialize which isn't being called + logger.error( + "Unable to load grid coverage into cache " + + obj, e); + } + } + } else { + // database wiped/plugin re-initialized need to repopulate + processBaseGridsChanged(dao, currentFdl); + saveFileDataList(currentFdl); + } + } + + processUnknownGrids(dao); + processSubGrids(dao, currentFdl); + } finally { + ClusterLockUtils.unlock(ct, false); + } + } + + /** + * A non subgridded definition has been added, deleted, or changed. + * Changed/delete both delete all records, models, and coverage defintion. + * Then Change/Add put in a new coverage definition. + * + * TODO: Post process Unknown definitions to see if they are now known. If + * now known delete definitions of unknown. + * + * @param dao + * @param currentFdl + */ + private void processBaseGridsChanged(GridCoverageDao dao, + FileDataList currentFdl) { + List baseCoverages = dao.loadBaseGrids(); + Map fileCoverageMap = loadGridDefinitionsFromDisk(currentFdl); + + // update needs to delete all hdf5 same as delete, so update is + // a delete and then an add to simplify logic and handle primary + // key changes. + List coveragesToDelete = new LinkedList(); + HashSet validDbCoverageNames = new HashSet( + (int) (baseCoverages.size() * 1.25) + 1); + + Iterator iter = baseCoverages.iterator(); + while (iter.hasNext()) { + GridCoverage dbCov = iter.next(); + GridCoverage fileCoverage = fileCoverageMap.get(dbCov.getName()); + if (!dbCov.equals(fileCoverage)) { + // coverage not in flat file or coverage has changed, + // delete coverage old coverage + coveragesToDelete.add(dbCov); + iter.remove(); + } else { + // current coverage still valid + validDbCoverageNames.add(dbCov.getName()); + } + } + + // delete grids, models, coverages, and hdf5 for namesToDelete. + for (GridCoverage cov : coveragesToDelete) { + logger.info("GridCoverage " + cov.getName() + + " has changed. Deleting out of date data"); + if (!dao.deleteCoverageAssociatedData(cov, true)) { + logger.warn("Failed to delete GridCoverage " + cov.getName() + + ". Manual intervention required."); + } else { + logger.info("GridCoverage successfully deleted"); + } + } + + // remove the valid db coverages from the map + fileCoverageMap.keySet().removeAll(validDbCoverageNames); + + // add new grids in bulk + for (GridCoverage cov : fileCoverageMap.values()) { + try { + putGrid(cov, true, false); + } catch (Exception e) { + logger.error( + "Failed to initialize grid definition " + cov.getName(), + e); + } + } + + // bulk persist the spatial maps + if (spatialMap.size() > 0) { + dao.persistAll(spatialMap.values()); + } + + for (GridCoverage cov : baseCoverages) { + try { + putGrid(cov, false, false); + } catch (Exception e) { + logger.error( + "Failed to initialize grid definition " + cov.getName(), + e); + } + } + } + + /** + * A non subGridd definition has been added, deleted, or changed. + * Changed/delete both delete all records, models, and coverage defintion. + * Then Change/Add put in a new coverage definition, and also delete any + * data associated with base model definition. + * + * @param dao + * @param currentFdl + */ + private void processSubGrids(GridCoverageDao dao, FileDataList currentFdl) { + List oldSubGridCoverages = dao.loadSubGrids(); + Map fileSubGridCoverageMap = loadSubGridDefinitionsFromDisk(currentFdl); + + // update needs to delete all hdf5 same as delete, so update is + // a delete and then an add to simplify logic and handle primary + // key changes. + List coveragesToDelete = new LinkedList(); + HashSet validDbCoverageNames = new HashSet( + (int) (oldSubGridCoverages.size() * 1.25) + 1); + + Iterator iter = oldSubGridCoverages.iterator(); + while (iter.hasNext()) { + GridCoverage dbCov = iter.next(); + GridCoverage fileCoverage = fileSubGridCoverageMap.get(dbCov + .getName()); + if (!dbCov.equals(fileCoverage)) { + // coverage not in flat file or coverage has changed, + // delete coverage + coveragesToDelete.add(dbCov); + iter.remove(); + } else { + // current coverage still valid + validDbCoverageNames.add(dbCov.getName()); + } + } + + // delete grids, models, coverages, and hdf5 for namesToDelete. + for (GridCoverage cov : coveragesToDelete) { + logger.info("Model " + + cov.getSubGridModel() + + " has changed subGrid definition, deleting out of date data"); + if (!dao.deleteCoverageAssociatedData(cov, true)) { + logger.warn("Failed to delete GridCoverage " + cov.getName() + + ". Manual intervention required."); + } else { + logger.info("GridModel successfully deleted"); + } + } + + // remove the valid db coverages from the map + fileSubGridCoverageMap.keySet().removeAll(validDbCoverageNames); + + // need to delete model information for new adds, as old grid may not + // have been subgridded + GribModelDao modelDao = new GribModelDao(); + for (GridCoverage cov : fileSubGridCoverageMap.values()) { + logger.info("Model " + + cov.getSubGridModel() + + " has changed subGrid definition, deleting out of date data"); + // look up parent + if (modelDao.deleteModelAndAssociatedData(cov.getSubGridModel()) < 0) { + logger.warn("Failed to delete SubGrid Model " + + cov.getSubGridModel() + + ". Manual intervention required."); + } else { + logger.info("GridModel successfully deleted"); + } + } + + // add new grids, persisting individually + for (GridCoverage cov : fileSubGridCoverageMap.values()) { + try { + putGrid(cov, true, true); + subGridCoverageMap.put(cov.getSubGridModel(), cov.getId()); + } catch (Exception e) { + logger.error( + "Failed to initialize grid definition " + cov.getName(), + e); + } + } + + // put database grids into map + for (GridCoverage cov : oldSubGridCoverages) { + try { + putGrid(cov, true, true); + subGridCoverageMap.put(cov.getSubGridModel(), cov.getId()); + } catch (Exception e) { + logger.error( + "Failed to initialize grid definition " + cov.getName(), + e); + } + } + } + + private void processUnknownGrids(GridCoverageDao dao) { + List unknownGrids = dao.loadUnknownGrids(); + for (GridCoverage cov : unknownGrids) { + try { + GridCoverage dbCov = getGrid(cov); + if (!cov.getName().equals(dbCov.getName())) { + logger.info("Unknown grid " + cov.getName() + + " is now mapped by " + dbCov.getName() + + ". Deleting unknown grid"); + dao.deleteCoverageAssociatedData(cov, true); + } + } catch (Exception e) { + logger.error("Erro occurred scanning unknown grids", e); + } + } + } + + private Map loadSubGridDefinitionsFromDisk( + FileDataList currentFdl) { + GribModelLookup gribModelLUT = GribModelLookup.getInstance(); + List subGridDefs = currentFdl.getSubGridFileList(); + Map subGrids = null; + + if (subGridDefs != null && subGridDefs.size() > 0) { + subGrids = new HashMap(subGridDefs.size() * 3); + Coordinate wfoCenterPoint = null; + String wfo = SiteUtil.getSite(); + GetWfoCenterPoint centerPointRequest = new GetWfoCenterPoint(wfo); + try { + wfoCenterPoint = new GetWfoCenterHandler() + .handleRequest(centerPointRequest); + } catch (Exception e) { + logger.error( + "Failed to generate sub grid definitions. Unable to lookup WFO Center Point", + e); + return new HashMap(0); + } + + for (FileData fd : subGridDefs) { + try { + SubGridDef subGridDef = loadSubGridDef(fd.getFilePath()); + + if (subGridDef != null) { + String referenceModel = subGridDef.getReferenceModel(); + + GridCoverage gridCoverage = getGrid(referenceModel); + + if (gridCoverage != null) { + Coordinate wfoCenter = MapUtil + .latLonToGridCoordinate(wfoCenterPoint, + PixelOrientation.CENTER, + gridCoverage); + + double xCenterPoint = wfoCenter.x; + double yCenterPoint = wfoCenter.y; + + double xDistance = subGridDef.getNx() / 2; + double yDistance = subGridDef.getNy() / 2; + Coordinate lowerLeftPosition = new Coordinate( + xCenterPoint - xDistance, yCenterPoint + + yDistance); + Coordinate upperRightPosition = new Coordinate( + xCenterPoint + xDistance, yCenterPoint + - yDistance); + + lowerLeftPosition = MapUtil.gridCoordinateToLatLon( + lowerLeftPosition, PixelOrientation.CENTER, + gridCoverage); + upperRightPosition = MapUtil + .gridCoordinateToLatLon(upperRightPosition, + PixelOrientation.CENTER, + gridCoverage); + + subGridDef.setLowerLeftLon(lowerLeftPosition.x); + subGridDef.setLowerLeftLat(lowerLeftPosition.y); + subGridDef.setUpperRightLon(upperRightPosition.x); + subGridDef.setUpperRightLat(upperRightPosition.y); + + // verify numbers in -180 -> 180 range + subGridDef.setLowerLeftLon(MapUtil + .correctLon(subGridDef.getLowerLeftLon())); + subGridDef.setUpperRightLon(MapUtil + .correctLon(subGridDef.getUpperRightLon())); + + // do a reverse lookup of the model name to get its + // associated grid id + + for (String modelName : subGridDef.getModelNames()) { + GridModel model = gribModelLUT + .getModelByName(modelName); + if (model != null) { + GridCoverage baseCoverage = spatialNameMap + .get(model.getGrid().toString()); + + if (baseCoverage != null) { + SubGrid subGrid = new SubGrid(); + subGrid.setModelName(modelName); + GridCoverage subGridCoverage = baseCoverage + .trim(subGridDef, subGrid); + if (subGridCoverage != null) { + subGrids.put( + subGridCoverage.getName(), + subGridCoverage); + definedSubGridMap.put(modelName, + subGrid); + } + } + } + } + } else { + logger.error("Failed to generate sub grid for " + + fd.getFilePath() + + ". Unable to determine coverage for referenceModel [" + + referenceModel + "]"); + } + } + } catch (Exception e) { + // Log error but do not throw exception + logger.error( + "Failed processing sub grid file: " + + fd.getFilePath(), e); + } + } + } else { + subGrids = new HashMap(0); + } + + return subGrids; + } + + /** + * Loads and validates subGridDef pointed to by filePath. If definition + * empty/invalid returns null. + * + * @param filePath + * @return + */ + private SubGridDef loadSubGridDef(String filePath) { + SubGridDef rval = null; + File f = new File(filePath); + + if (f.length() > 0) { + try { + rval = (SubGridDef) SerializationUtil + .jaxbUnmarshalFromXmlFile(f); + if (rval.getReferenceModel() == null + || rval.getModelNames() == null + || rval.getModelNames().size() == 0) { + // sub grid didn't have required definitions + rval = null; + } + } catch (SerializationException e) { + logger.error("Failed reading sub grid file: " + filePath, e); + } + } + + return rval; + } + + private static boolean isDefintionChanged(FileDataList previousFdl, + FileDataList currentFdl) { + boolean rval = true; + if (currentFdl != null) { + rval = !currentFdl.equals(previousFdl); + } else { + rval = previousFdl != null; + } + + return rval; + } + + private FileDataList generateFileDataList() { + /* + * Retrieve the list of files from the localization service + */ + IPathManager pm = PathManagerFactory.getPathManager(); + FileDataList fileList = new FileDataList(); + LocalizationContext[] contexts = pm + .getLocalSearchHierarchy(LocalizationType.EDEX_STATIC); + fileList.addCoverageFiles(pm.listFiles(contexts, "/grib/grids", + new String[] { "xml" }, true, true)); + fileList.addSubGridFiles(pm.listFiles(contexts, "/grib/subgrids", + new String[] { "xml" }, true, true)); + + return fileList; + } + + private FileDataList getPreviousFileDataList() { + IPathManager pm = PathManagerFactory.getPathManager(); + File previousFileData = pm.getFile(pm.getContext( + LocalizationType.EDEX_STATIC, LocalizationLevel.CONFIGURED), + "/grib/gridDefFileListing.xml"); + FileDataList rval = null; + + if (previousFileData.exists() && previousFileData.length() > 0) { + try { + Object obj = SerializationUtil + .jaxbUnmarshalFromXmlFile(previousFileData); + if (obj instanceof FileDataList) { + rval = (FileDataList) obj; + } else { + logger.error("Error occurred deserializing " + + previousFileData.getAbsolutePath() + + ", expected type " + FileDataList.class + + " received " + obj.getClass()); + } + } catch (Exception e) { + logger.error( + "Error occurred deserializing " + + previousFileData.getAbsolutePath(), e); + } + } + return rval; + } + + private Map loadGridDefinitionsFromDisk( + FileDataList currentFdl) { + List coverageFiles = currentFdl.getCoverageFileList(); + Map fileCoverageMap = new HashMap( + (int) (coverageFiles.size() * 1.25) + 1); + + /* + * Iterate over file list. Unmarshal to GridCoverage object + */ + for (FileData fd : coverageFiles) { + try { + GridCoverage grid = (GridCoverage) SerializationUtil + .jaxbUnmarshalFromXmlFile(fd.getFilePath()); + GridCoverage previousGrid = fileCoverageMap.put(grid.getName(), + grid); + if (previousGrid != null) { + for (FileData fd2 : coverageFiles) { + GridCoverage grid2 = (GridCoverage) SerializationUtil + .jaxbUnmarshalFromXmlFile(fd2.getFilePath()); + if (grid.getName().equals(grid2.getName())) { + logger.error("Grid " + grid.getName() + + " has already been defined. " + + fd.getFilePath() + " and " + + fd2.getFilePath() + + " have same name. Using " + + fd2.getFilePath()); + break; + } + } + } + } catch (Exception e) { + // Log error but do not throw exception + logger.error( + "Unable to read default grids file: " + + fd.getFilePath(), e); + } + } + + return fileCoverageMap; + } + + private void saveFileDataList(FileDataList fdl) { + try { + IPathManager pm = PathManagerFactory.getPathManager(); + LocalizationFile lf = pm.getLocalizationFile( + pm.getContext(LocalizationType.EDEX_STATIC, + LocalizationLevel.CONFIGURED), + "/grib/gridDefFileListing.xml"); + SerializationUtil.jaxbMarshalToXmlFile(fdl, lf.getFile() + .getAbsolutePath()); + lf.save(); + } catch (Exception e) { + logger.error( + "Failed to save coverage file data list, coverages may be reloaded on next restart", + e); + } + } + + public static void reinitialize() { + GribSpatialCache newInstance = new GribSpatialCache(); + instance = newInstance; + } +} diff --git a/edexOsgi/com.raytheon.edex.plugin.grib/src/com/raytheon/edex/plugin/grib/topo/StaticTopoData.java b/edexOsgi/com.raytheon.edex.plugin.grib/src/com/raytheon/edex/plugin/grib/topo/StaticTopoData.java index aca194ab73..b16b36a17e 100644 --- a/edexOsgi/com.raytheon.edex.plugin.grib/src/com/raytheon/edex/plugin/grib/topo/StaticTopoData.java +++ b/edexOsgi/com.raytheon.edex.plugin.grib/src/com/raytheon/edex/plugin/grib/topo/StaticTopoData.java @@ -101,6 +101,7 @@ import com.vividsolutions.jts.geom.Envelope; * 10/08/2010 6394 bphillip Rewrote sections for optimal reading and writing performance * 09/19/2011 10955 rferrel Use RunProcess * 04/18/2012 DR 14694 D. Friedman Fixes for static topography generation + * 05/09/2012 DR 14939 D. Friedman Fix errors in DR 14694 * * * @@ -717,9 +718,9 @@ public class StaticTopoData { if ("world".equals(name)) { if (minx - DATA_MARGIN < 0 || - minx - DATA_MARGIN >= nx || + miny - DATA_MARGIN < 0 || maxx + DATA_MARGIN >= nx || - maxx + DATA_MARGIN < 0) { + maxy + DATA_MARGIN >= ny) { /* TODO: Have to do quite a bit more for minimal world * projection subset. Just load the whole thing for now. */ @@ -876,7 +877,7 @@ public class StaticTopoData { */ int oi = 0; for (int y = 0; y < targetHeight; ++y) { - for (int x = 0; x < targetWidth; ++x) { + for (int x = 0; x < targetWidth; ++x, ++oi) { coord[0] = x; coord[1] = y; try { @@ -945,9 +946,8 @@ public class StaticTopoData { } } if (tw != 0) { - output[oi++] = (float) (tv / tw); + output[oi] = (float) (tv / tw); } - } } diff --git a/edexOsgi/com.raytheon.edex.plugin.grib/utility/edex_static/base/grib/grids/grid12.xml b/edexOsgi/com.raytheon.edex.plugin.grib/utility/edex_static/base/grib/grids/grid12.xml index e5953e2e24..c71b1590ab 100644 --- a/edexOsgi/com.raytheon.edex.plugin.grib/utility/edex_static/base/grib/grids/grid12.xml +++ b/edexOsgi/com.raytheon.edex.plugin.grib/utility/edex_static/base/grib/grids/grid12.xml @@ -26,8 +26,8 @@ UpperLeft 301 331 - 0.167 - 0.167 + 0.166667 + 0.166667 degree 0.0 310.0 diff --git a/edexOsgi/com.raytheon.edex.plugin.grib/utility/edex_static/base/grib/grids/grid13.xml b/edexOsgi/com.raytheon.edex.plugin.grib/utility/edex_static/base/grib/grids/grid13.xml index 260560f7f5..3cc2967b66 100644 --- a/edexOsgi/com.raytheon.edex.plugin.grib/utility/edex_static/base/grib/grids/grid13.xml +++ b/edexOsgi/com.raytheon.edex.plugin.grib/utility/edex_static/base/grib/grids/grid13.xml @@ -27,8 +27,8 @@ UpperLeft 241 151 - 0.167 - 0.167 + 0.166667 + 0.166667 degree 25.0 250.0 diff --git a/edexOsgi/com.raytheon.edex.plugin.grib/utility/edex_static/base/grib/grids/grid14.xml b/edexOsgi/com.raytheon.edex.plugin.grib/utility/edex_static/base/grib/grids/grid14.xml index 810a6fd652..0a55412c18 100644 --- a/edexOsgi/com.raytheon.edex.plugin.grib/utility/edex_static/base/grib/grids/grid14.xml +++ b/edexOsgi/com.raytheon.edex.plugin.grib/utility/edex_static/base/grib/grids/grid14.xml @@ -28,8 +28,8 @@ UpperLeft 511 301 - 0.167 - 0.167 + 0.166667 + 0.166667 degree -20.0 215.0 diff --git a/edexOsgi/com.raytheon.edex.plugin.grib/utility/edex_static/base/grib/grids/grid15.xml b/edexOsgi/com.raytheon.edex.plugin.grib/utility/edex_static/base/grib/grids/grid15.xml index 95f39b3291..a1b1d82e3a 100644 --- a/edexOsgi/com.raytheon.edex.plugin.grib/utility/edex_static/base/grib/grids/grid15.xml +++ b/edexOsgi/com.raytheon.edex.plugin.grib/utility/edex_static/base/grib/grids/grid15.xml @@ -26,8 +26,8 @@ UpperLeft 401 187 - 0.25 - 0.167 + 0.250000 + 0.166667 degree 44.0 240.0 diff --git a/edexOsgi/com.raytheon.edex.plugin.grib/utility/edex_static/base/grib/grids/grid16.xml b/edexOsgi/com.raytheon.edex.plugin.grib/utility/edex_static/base/grib/grids/grid16.xml index 0062da16c3..1b5cf64914 100644 --- a/edexOsgi/com.raytheon.edex.plugin.grib/utility/edex_static/base/grib/grids/grid16.xml +++ b/edexOsgi/com.raytheon.edex.plugin.grib/utility/edex_static/base/grib/grids/grid16.xml @@ -27,8 +27,8 @@ UpperLeft 548 391 - 0.133 - 0.067 + 0.133333 + 0.066667 degree 48.0 237.933 diff --git a/edexOsgi/com.raytheon.edex.plugin.grib/utility/edex_static/base/grib/grids/grid17.xml b/edexOsgi/com.raytheon.edex.plugin.grib/utility/edex_static/base/grib/grids/grid17.xml index da14477d85..581e1b728a 100644 --- a/edexOsgi/com.raytheon.edex.plugin.grib/utility/edex_static/base/grib/grids/grid17.xml +++ b/edexOsgi/com.raytheon.edex.plugin.grib/utility/edex_static/base/grib/grids/grid17.xml @@ -27,8 +27,8 @@ UpperLeft 736 526 - 0.067 - 0.067 + 0.066667 + 0.066667 degree 15.0 244.0 diff --git a/edexOsgi/com.raytheon.edex.plugin.grib/utility/edex_static/base/grib/grids/grid18.xml b/edexOsgi/com.raytheon.edex.plugin.grib/utility/edex_static/base/grib/grids/grid18.xml index 23b77e2a2e..086d2577b0 100644 --- a/edexOsgi/com.raytheon.edex.plugin.grib/utility/edex_static/base/grib/grids/grid18.xml +++ b/edexOsgi/com.raytheon.edex.plugin.grib/utility/edex_static/base/grib/grids/grid18.xml @@ -27,8 +27,8 @@ UpperLeft 586 481 - 0.067 - 0.067 + 0.066667 + 0.066667 degree 15.0 300.0 diff --git a/edexOsgi/com.raytheon.edex.plugin.obs/src/com/raytheon/edex/plugin/obs/metar/MetarPointDataTransform.java b/edexOsgi/com.raytheon.edex.plugin.obs/src/com/raytheon/edex/plugin/obs/metar/MetarPointDataTransform.java index 36b63edda6..4fb363d1be 100644 --- a/edexOsgi/com.raytheon.edex.plugin.obs/src/com/raytheon/edex/plugin/obs/metar/MetarPointDataTransform.java +++ b/edexOsgi/com.raytheon.edex.plugin.obs/src/com/raytheon/edex/plugin/obs/metar/MetarPointDataTransform.java @@ -22,6 +22,7 @@ package com.raytheon.edex.plugin.obs.metar; import java.io.File; import java.util.ArrayList; import java.util.Calendar; +import java.util.Collections; import java.util.Date; import java.util.HashMap; import java.util.HashSet; @@ -52,8 +53,9 @@ import com.raytheon.uf.edex.decodertools.time.TimeTools; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * Jun 3, 2009 chammack Initial creation - * Jun 23, 2009 njensen Combined present weather - * Jun 29, 2009 2538 jsanchez Sorted the sky cover. + * Jun 23, 2009 njensen Combined present weather + * Jun 29, 2009 2538 jsanchez Sorted the sky cover. + * May 17, 2012 460 jkorman Modified to limit stored data to dimensioned size. * * * @@ -267,10 +269,15 @@ public class MetarPointDataTransform { pdv.setFloat(VISIBILITY, record.getVisibility()); if (record.getSkyCoverage() != null) { + int maxSize = container.getDescription(SKY_COVER) + .getDimensionAsInt(); record.sort(record.getSkyCoverage()); Iterator scIterator = record.getSkyCoverage().iterator(); int i = 0; while (scIterator.hasNext()) { + if(i >= maxSize) { + break; + } // TODO: storing duplicate info like this, needs to be resolved SkyCover sc = scIterator.next(); if (sc.getType() != null) { @@ -298,9 +305,21 @@ public class MetarPointDataTransform { // Write this data in "backwards" so that the plot model stuff // displays correctly. if (record.getWeatherCondition() != null) { - int i = record.getWeatherCondition().size() - 1; + List w = new ArrayList(); for (WeatherCondition wc : record.getWeatherCondition()) { - pdv.setString(PRES_WEATHER, wc.toCanonicalForm(), i--); + if (!"".equals(wc.toCanonicalForm())) { + w.add(wc); + } + } + Collections.reverse(w); + int maxSize = container.getDescription(PRES_WEATHER) + .getDimensionAsInt(); + while (w.size() > maxSize) { + w.remove(0); + } + int i = 0; + for (WeatherCondition wc : w) { + pdv.setString(PRES_WEATHER, wc.toCanonicalForm(), i++); } } diff --git a/edexOsgi/com.raytheon.edex.plugin.redbook/utility/edex_static/base/redbook/redbookFcstMap.xml b/edexOsgi/com.raytheon.edex.plugin.redbook/utility/edex_static/base/redbook/redbookFcstMap.xml index c6a51f14a8..6778640280 100644 --- a/edexOsgi/com.raytheon.edex.plugin.redbook/utility/edex_static/base/redbook/redbookFcstMap.xml +++ b/edexOsgi/com.raytheon.edex.plugin.redbook/utility/edex_static/base/redbook/redbookFcstMap.xml @@ -1186,5 +1186,10 @@
+ + PGNA00 + + + diff --git a/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/synoptic/AbstractSynopticDecoder.java b/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/synoptic/AbstractSynopticDecoder.java index 4df03d3846..c5c1af1540 100644 --- a/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/synoptic/AbstractSynopticDecoder.java +++ b/edexOsgi/com.raytheon.edex.plugin.sfcobs/src/com/raytheon/edex/plugin/sfcobs/decoder/synoptic/AbstractSynopticDecoder.java @@ -19,14 +19,17 @@ **/ package com.raytheon.edex.plugin.sfcobs.decoder.synoptic; +import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Calendar; +import java.util.TimeZone; import com.raytheon.edex.exception.DecoderException; import com.raytheon.edex.plugin.sfcobs.decoder.AbstractSfcObsDecoder; import com.raytheon.uf.common.dataplugin.PluginDataObject; import com.raytheon.uf.common.dataplugin.sfcobs.ObsCommon; import com.raytheon.uf.common.time.DataTime; +import com.raytheon.uf.edex.decodertools.time.ITimeService; import com.raytheon.uf.edex.decodertools.time.TimeTools; /** @@ -482,10 +485,10 @@ public abstract class AbstractSynopticDecoder extends AbstractSfcObsDecoder { } } } - if ((obsYear != null) && (obsMonth != null)) { - obsTime.set(Calendar.YEAR, obsYear); - obsTime.set(Calendar.MONTH, obsMonth - 1); - } +// if ((obsYear != null) && (obsMonth != null)) { +// obsTime.set(Calendar.YEAR, obsYear); +// obsTime.set(Calendar.MONTH, obsMonth - 1); +// } return obsTime; } @@ -518,4 +521,51 @@ public abstract class AbstractSynopticDecoder extends AbstractSfcObsDecoder { } return builder.toString(); } + + + public static final void main(String [] args) { + + ITimeService service = new ITimeService() { + @Override + public Calendar getCalendar() { + final Calendar c = Calendar.getInstance(); + c.setTimeZone(TimeZone.getTimeZone("GMT")); + c.set(Calendar.YEAR, 2012); + c.set(Calendar.MONTH, Calendar.JANUARY); + c.set(Calendar.DAY_OF_MONTH,1); + c.set(Calendar.HOUR_OF_DAY, 2); + c.set(Calendar.MINUTE, 15); + c.set(Calendar.SECOND, 32); + c.set(Calendar.MILLISECOND, 268); + + return c; + } + }; + TimeTools.setTimeService(service); + + + SimpleDateFormat TMFMT = new SimpleDateFormat( + "yyyy-MM-dd HH:mm:ss"); + TMFMT.setTimeZone(TimeZone.getTimeZone("GMT")); + + Integer obsYear = 2012; + Integer obsMonth = 1; + Integer obsDay = 31; + Integer obsHour = 21; + + Calendar currentClock = TimeTools.getSystemCalendar(obsYear, obsMonth, obsDay); + System.out.println(TMFMT.format(currentClock.getTime())); + + Calendar c = calculateObsDateTime(currentClock,obsDay,obsHour,obsYear,obsMonth); + System.out.println(TMFMT.format(c.getTime())); + + + + + + + } + + + } diff --git a/edexOsgi/com.raytheon.edex.plugin.shef/src/com/raytheon/edex/plugin/shef/ShefSeparator.java b/edexOsgi/com.raytheon.edex.plugin.shef/src/com/raytheon/edex/plugin/shef/ShefSeparator.java index 816d579e87..f1c704ca91 100644 --- a/edexOsgi/com.raytheon.edex.plugin.shef/src/com/raytheon/edex/plugin/shef/ShefSeparator.java +++ b/edexOsgi/com.raytheon.edex.plugin.shef/src/com/raytheon/edex/plugin/shef/ShefSeparator.java @@ -17,7 +17,6 @@ * See the AWIPS II Master Rights File ("Master Rights File.pdf") for * further licensing information. **/ - package com.raytheon.edex.plugin.shef; import static com.raytheon.uf.edex.decodertools.core.IDecoderConstants.WMO_HEADER; @@ -62,21 +61,12 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader; * @author bphillip * @version 1 */ - -/** - * Implementation of file separator for SHEF files - * - * @author bphillip - * - */ public class ShefSeparator extends AbstractRecordSeparator { private enum Continuation { - NONE, - CONTINUE, - ERROR; + NONE, CONTINUE, ERROR; } - + public static class ShefDecoderInput { public String record; @@ -112,7 +102,7 @@ public class ShefSeparator extends AbstractRecordSeparator { private static final Pattern P_SHEFEND = Pattern.compile(SHEFEND); private static final String LINE_FMT = "%s:%05d"; - + private static boolean removeLeadingComments = false; /** The WMO header */ @@ -195,7 +185,7 @@ public class ShefSeparator extends AbstractRecordSeparator { + wmoHeader.getWmoHeader()); } } - + public static ShefSeparator separate(byte[] data, Headers headers) { ShefSeparator separator = new ShefSeparator(); try { @@ -208,8 +198,7 @@ public class ShefSeparator extends AbstractRecordSeparator { } return separator; } - - + /** * * @return @@ -263,19 +252,19 @@ public class ShefSeparator extends AbstractRecordSeparator { reader.mark(0); StringBuilder buffer = null; StringBuilder bRecBuffer = null; - + String assemble = null; String mRevised = " "; String cRevised = " "; Continuation continued = Continuation.NONE; String lineData = null; boolean leadingSpaces = false; - + String currRec = null; // haven't seen the awips header (should be first line) so evaluate // for a possible awips header. int lineNumber = 1; - + while ((currRec = reader.readLine()) != null) { if (currRec.length() > 0) { String c = currRec.substring(0, 1); @@ -301,21 +290,20 @@ public class ShefSeparator extends AbstractRecordSeparator { boolean bData = false; while ((currRec = reader.readLine()) != null) { lineNumber++; + currRec = removeInternalComments(currRec); currLine = currRec; if (currRec.length() > 0) { // need to find out if this report is terminated with an '=' StringBuilder sb = new StringBuilder(currLine); - while ((sb.length() > 0)&&('=' == sb.charAt(sb.length()-1))) { + while ((sb.length() > 0) + && ('=' == sb.charAt(sb.length() - 1))) { endOfReport = true; sb.deleteCharAt(sb.length() - 1); } currRec = sb.toString(); if ((currRec.charAt(0) == '.') || ("B".equals(assemble))) { - // Now that we've established that this might be a well formed - // record i.e. starts with a "." remove all internal comments. - currRec = removeInternalComments(currRec); - - // Start by looking for a possible .END, makes it easier later + // Start by looking for a possible .END, makes it easier + // later // when looking for .E messages! m = P_SHEFEND.matcher(currRec); if (m.find()) { @@ -323,7 +311,7 @@ public class ShefSeparator extends AbstractRecordSeparator { if (m.group(1) == null) { if ("B".equals(assemble)) { // We are assembling a B Record - if(bRecBuffer != null) { + if (bRecBuffer != null) { buffer.append(bRecBuffer); } buffer.append("\n.END"); @@ -331,14 +319,17 @@ public class ShefSeparator extends AbstractRecordSeparator { } else { // We found an .END directive and didn't // expect one. - ERR_LOGGER.warning(getClass(), String.format(LINE_FMT, traceId, lineNumber)); + ERR_LOGGER.warning(getClass(), String + .format(LINE_FMT, traceId, + lineNumber)); ERR_LOGGER.warning(getClass(), currLine); ERR_LOGGER.warning(getClass(), " ?"); ERR_LOGGER.warning(getClass(), SHEFErrorCodes.LOG_068); } } else { - ERR_LOGGER.error(getClass(), String.format(LINE_FMT, traceId, lineNumber)); + ERR_LOGGER.error(getClass(), String.format( + LINE_FMT, traceId, lineNumber)); ERR_LOGGER.error(getClass(), currLine); ERR_LOGGER.error(getClass(), String.format("%s ?", m.group(1))); @@ -349,7 +340,9 @@ public class ShefSeparator extends AbstractRecordSeparator { buffer.append("\n.END"); records.add(buffer.toString()); } else { - ERR_LOGGER.warning(getClass(), String.format(LINE_FMT, traceId, lineNumber)); + ERR_LOGGER.warning(getClass(), String + .format(LINE_FMT, traceId, + lineNumber)); ERR_LOGGER.warning(getClass(), currRec); ERR_LOGGER.warning(getClass(), " ?"); ERR_LOGGER.warning(getClass(), @@ -367,12 +360,13 @@ public class ShefSeparator extends AbstractRecordSeparator { leadingSpaces = (m.group(1) != null); // No leading spaces on the line cRevised = (m.group(5) != null) ? "R" : " "; - // ss will receive the sequence number if it exists. + // ss will receive the sequence number if it + // exists. String ss = ("R".equals(cRevised)) ? m.group(6) : m.group(7); - + int len = (ss != null) ? ss.length() : -1; - + if ((len == 1) || (len == 2)) { continued = Continuation.CONTINUE; } else if (len > 2) { @@ -381,7 +375,7 @@ public class ShefSeparator extends AbstractRecordSeparator { continued = Continuation.NONE; } // are we starting a new record? - if(assemble == null) { + if (assemble == null) { mRevised = cRevised; cRevised = " "; } @@ -395,25 +389,17 @@ public class ShefSeparator extends AbstractRecordSeparator { // line and had been // assembling the B record // data section. - ERR_LOGGER - .warning( - getClass(), - String.format( - LINE_FMT, - traceId, - lineNumber)); - ERR_LOGGER - .warning( - getClass(), + ERR_LOGGER.warning(getClass(), + String.format(LINE_FMT, + traceId, + lineNumber)); + ERR_LOGGER.warning(getClass(), buffer.toString()); - ERR_LOGGER - .warning( - getClass(), - bRecBuffer.toString()); - ERR_LOGGER.warning( - getClass(), " ?"); - ERR_LOGGER.warning( - getClass(), + ERR_LOGGER.warning(getClass(), + bRecBuffer.toString()); + ERR_LOGGER.warning(getClass(), + " ?"); + ERR_LOGGER.warning(getClass(), SHEFErrorCodes.LOG_082); bRecBuffer = null; bData = false; @@ -424,24 +410,34 @@ public class ShefSeparator extends AbstractRecordSeparator { } // Is this continued record the same as // we are currently assembling? - if(assemble == null) { - // If we get here something is wrong. - - + if (assemble == null) { + // If we get here something is + // wrong. + } else if (assemble.equals(m.group(2))) { - if("R".equals(mRevised)) { + if ("R".equals(mRevised)) { buffer = assembleContinuedLines( buffer, lineData); - } else if(" ".equals(cRevised)) { - if("R".equals(mRevised)) { - // the revision on this continuation line is not - // the same as the main report. - ERR_LOGGER.error(getClass(), String.format(LINE_FMT, traceId, lineNumber)); - ERR_LOGGER.error(getClass(), - currRec); - ERR_LOGGER.error(getClass(), " ?"); - ERR_LOGGER.error(getClass(), - SHEFErrorCodes.LOG_010); + } else if (" ".equals(cRevised)) { + if ("R".equals(mRevised)) { + // the revision on this + // continuation line is not + // the same as the main + // report. + ERR_LOGGER + .error(getClass(), + String.format( + LINE_FMT, + traceId, + lineNumber)); + ERR_LOGGER + .error(getClass(), + currRec); + ERR_LOGGER.error( + getClass(), " ?"); + ERR_LOGGER + .error(getClass(), + SHEFErrorCodes.LOG_010); } else { buffer = assembleContinuedLines( buffer, lineData); @@ -451,7 +447,9 @@ public class ShefSeparator extends AbstractRecordSeparator { // We have a continuation line, but // its from a different record // type than we started with. - ERR_LOGGER.error(getClass(), String.format(LINE_FMT, traceId, lineNumber)); + ERR_LOGGER.error(getClass(), String + .format(LINE_FMT, traceId, + lineNumber)); ERR_LOGGER.error(getClass(), currRec); ERR_LOGGER.error(getClass(), " ?"); @@ -461,7 +459,9 @@ public class ShefSeparator extends AbstractRecordSeparator { } else { // We have a continuation line with no // data - ERR_LOGGER.warning(getClass(), String.format(LINE_FMT, traceId, lineNumber)); + ERR_LOGGER.warning(getClass(), String + .format(LINE_FMT, traceId, + lineNumber)); ERR_LOGGER.warning(getClass(), currRec); ERR_LOGGER.warning(getClass(), " ?"); ERR_LOGGER.warning(getClass(), @@ -469,16 +469,20 @@ public class ShefSeparator extends AbstractRecordSeparator { } } else if (continued.equals(Continuation.NONE)) { // Not a continuation line - - // Check to see if we were assembling a B record. - // if we get here with B then we didn't see an - // .END directive. complain, insert the .END and + + // Check to see if we were assembling a B + // record. + // if we get here with B then we didn't see + // an + // .END directive. complain, insert the .END + // and // continue as normal - if("B".equals(assemble)) { - ERR_LOGGER.warning(getClass(), String.format(LINE_FMT, traceId, lineNumber)); + if ("B".equals(assemble)) { + ERR_LOGGER.warning(getClass(), String + .format(LINE_FMT, traceId, + lineNumber)); ERR_LOGGER.warning(getClass(), currRec); - ERR_LOGGER.warning( - getClass()," ?"); + ERR_LOGGER.warning(getClass(), " ?"); ERR_LOGGER.warning(getClass(), SHEFErrorCodes.LOG_046); buffer.append("\n"); @@ -492,7 +496,8 @@ public class ShefSeparator extends AbstractRecordSeparator { bData = false; } assemble = m.group(2); - // need to check for revision here for the report level + // need to check for revision here for the + // report level mRevised = (m.group(5) != null) ? "R" : " "; if (!leadingSpaces) { if (buffer != null) { @@ -500,20 +505,22 @@ public class ShefSeparator extends AbstractRecordSeparator { } buffer = new StringBuilder(currRec); } else { - ERR_LOGGER.warning(getClass(), String.format(LINE_FMT, traceId, lineNumber)); + ERR_LOGGER.warning(getClass(), String + .format(LINE_FMT, traceId, + lineNumber)); ERR_LOGGER.warning(getClass(), currRec); - ERR_LOGGER.warning( - getClass()," ?"); + ERR_LOGGER.warning(getClass(), " ?"); ERR_LOGGER.warning(getClass(), SHEFErrorCodes.LOG_006); assemble = null; } } else { // continuation error - ERR_LOGGER.warning(getClass(), String.format(LINE_FMT, traceId, lineNumber)); + ERR_LOGGER.warning(getClass(), String + .format(LINE_FMT, traceId, + lineNumber)); ERR_LOGGER.warning(getClass(), currRec); - ERR_LOGGER.warning( - getClass()," ?"); + ERR_LOGGER.warning(getClass(), " ?"); ERR_LOGGER.warning(getClass(), SHEFErrorCodes.LOG_008); if (buffer != null) { @@ -525,11 +532,11 @@ public class ShefSeparator extends AbstractRecordSeparator { continued = Continuation.NONE; } } else { - if((currRec != null)&&(currRec.length() > 0)) { + if ((currRec != null) && (currRec.length() > 0)) { if ("B".equals(assemble)) { // We are assembling a B Record if (currRec != null) { - if(bRecBuffer == null) { + if (bRecBuffer == null) { bRecBuffer = new StringBuilder(); } bRecBuffer.append("\n"); @@ -539,12 +546,14 @@ public class ShefSeparator extends AbstractRecordSeparator { } else { if ((currRec.length() >= 1) && (currRec.charAt(0) != ':')) { - // Non-comment data embedded in 'A' or + // Non-comment data embedded in 'A' + // or // 'E' record. if ("A".equals(assemble) || "E".equals(assemble)) { if (buffer != null) { - records.add(buffer.toString()); + records.add(buffer + .toString()); } } buffer = null; @@ -559,10 +568,10 @@ public class ShefSeparator extends AbstractRecordSeparator { } else { } - if(endOfReport) { + if (endOfReport) { // close out anything that may have been in progress. - if(buffer != null) { - if("B".equals(assemble)) { + if (buffer != null) { + if ("B".equals(assemble)) { buffer.append("\n"); buffer.append(bRecBuffer); } @@ -596,24 +605,25 @@ public class ShefSeparator extends AbstractRecordSeparator { * @return */ private static String removeInternalComments(String dataLine) { - StringBuilder buffer = (dataLine != null) ? new StringBuilder( - dataLine.length()) : null; - if (buffer != null) { - boolean inComment = false; - for (int i = 0; i < dataLine.length(); i++) { - if (dataLine.charAt(i) != ':') { - if (!inComment) { - buffer.append(dataLine.charAt(i)); - } - } else { - // Toggle comments - inComment = !inComment; - } - } - } String s = null; - if ((buffer != null) && (buffer.length() > 0)) { - s = buffer.toString(); + if (dataLine != null) { + if (dataLine.startsWith(":")) { + s = new String(); + } else { + StringBuilder buffer = new StringBuilder(dataLine.length()); + boolean inComment = false; + for (int i = 0; i < dataLine.length(); i++) { + if (dataLine.charAt(i) != ':') { + if (!inComment) { + buffer.append(dataLine.charAt(i)); + } + } else { + // Toggle comments + inComment = !inComment; + } + } + s = buffer.toString(); + } } else { s = new String(); } @@ -1119,10 +1129,10 @@ public class ShefSeparator extends AbstractRecordSeparator { } private static void test6() { - String testData1 = "ASUS63 KARX 271430\n" + - ".B:REVISION:R MCI:KANSAS CITY: 08:AUG:10:TENTH: DH12:1200Z:/HG/PPP\n" + - "BB02:KANSAS CITY:23:MISSOURI: 4.8/1:ONE:.06:POINT 06\n" + - ".E:EEE:N:NNN:D:DDD\n"; + String testData1 = "ASUS63 KARX 271430\n" + + ".B:REVISION:R MCI:KANSAS CITY: 08:AUG:10:TENTH: DH12:1200Z:/HG/PPP\n" + + "BB02:KANSAS CITY:23:MISSOURI: 4.8/1:ONE:.06:POINT 06\n" + + ".E:EEE:N:NNN:D:DDD\n"; ShefSeparator sep = new ShefSeparator(); sep.setInTest(true); @@ -1134,11 +1144,10 @@ public class ShefSeparator extends AbstractRecordSeparator { System.out.println(inp.record); } } - + private static void test7() { - String testData1 = "ASUS63 KARX 271430\n" + - ".A AA0259 960714\n" + - ".A1 PCIRG 76.24\n"; + String testData1 = "ASUS63 KARX 271430\n" + ".A AA0259 960714\n" + + ".A1 PCIRG 76.24\n"; ShefSeparator sep = new ShefSeparator(); sep.setInTest(true); @@ -1150,12 +1159,11 @@ public class ShefSeparator extends AbstractRecordSeparator { System.out.println(inp.record); } } - + private static void test8() { String testData1 = "ASUS63 KARX 271430\n" - + ".A AA0145 821007 DH12/HG 5.5/\n" - + ".AR1 PP 9.99\n"; + + ".A AA0145 821007 DH12/HG 5.5/\n" + ".AR1 PP 9.99\n"; ShefSeparator sep = new ShefSeparator(); sep.setInTest(true); @@ -1167,39 +1175,35 @@ public class ShefSeparator extends AbstractRecordSeparator { System.out.println(inp.record); } } - + private static void test9() { - String [] testData = { - ".B AA0145 821007 DH12/HG 5.5/\n", + String[] testData = { ".B AA0145 821007 DH12/HG 5.5/\n", ".BR10 AA0145 821007 DH12/HG 5.5/\n", ".BR2 AA0145 821007 DH12/HG 5.5/\n", ".B1 AA0145 821007 DH12/HG 5.5/\n", }; - for(String s : testData) { + for (String s : testData) { Matcher m = P_SHEFTYPE.matcher(s); - if(m.find()) { - for(int i = 0;i <= m.groupCount();i++) { - System.out.println(String.format("%3d %s",i,m.group(i))); + if (m.find()) { + for (int i = 0; i <= m.groupCount(); i++) { + System.out.println(String.format("%3d %s", i, m.group(i))); } } System.out.println("--------------------------------------"); } - - - -// ShefSeparator sep = new ShefSeparator(); -// sep.setInTest(true); -// Headers headers = new Headers(); -// headers.put("ingestFileName", "DOSENTMATTER.20110315"); -// sep.setData(testData1.getBytes(), headers); -// while (sep.hasNext()) { -// ShefDecoderInput inp = sep.next(); -// System.out.println(inp.record); -// } + + // ShefSeparator sep = new ShefSeparator(); + // sep.setInTest(true); + // Headers headers = new Headers(); + // headers.put("ingestFileName", "DOSENTMATTER.20110315"); + // sep.setData(testData1.getBytes(), headers); + // while (sep.hasNext()) { + // ShefDecoderInput inp = sep.next(); + // System.out.println(inp.record); + // } } - - + /** * Test Function * @@ -1207,13 +1211,21 @@ public class ShefSeparator extends AbstractRecordSeparator { */ public static void main(String[] args) { // test1(); - test9(); + // test9(); -// Matcher m = P_SHEFTYPE.matcher(".A1 DH1430/PCIRG\t76.24==\n"); -// if (m.find()) { -// for (int i = 0; i <= m.groupCount(); i++) { -// System.out.println(String.format("%4d %s", i, m.group(i))); -// } -// } + String test = "THIS IS A TEST :=======: AND MORE DATA :================: AND THE END"; + + System.out.println("[" + removeInternalComments(test) + "]"); + + test = ":THIS IS A TEST :=======: AND MORE DATA :================: AND THE END"; + + System.out.println("[" + removeInternalComments(test) + "]"); + + // Matcher m = P_SHEFTYPE.matcher(".A1 DH1430/PCIRG\t76.24==\n"); + // if (m.find()) { + // for (int i = 0; i <= m.groupCount(); i++) { + // System.out.println(String.format("%4d %s", i, m.group(i))); + // } + // } } } diff --git a/edexOsgi/com.raytheon.edex.plugin.shef/src/com/raytheon/edex/plugin/shef/database/PostShef.java b/edexOsgi/com.raytheon.edex.plugin.shef/src/com/raytheon/edex/plugin/shef/database/PostShef.java index 60e5252cb2..56770b81c8 100644 --- a/edexOsgi/com.raytheon.edex.plugin.shef/src/com/raytheon/edex/plugin/shef/database/PostShef.java +++ b/edexOsgi/com.raytheon.edex.plugin.shef/src/com/raytheon/edex/plugin/shef/database/PostShef.java @@ -327,10 +327,6 @@ public class PostShef { // Check for bad data log.warn("No data stored for " + prodId); return; - } else { - if (dataLog) { - log.info("============================================"); - } } prevLid = locId; diff --git a/edexOsgi/com.raytheon.edex.plugin.shef/src/com/raytheon/edex/transform/shef/obs/ObsToSHEFOptions.java b/edexOsgi/com.raytheon.edex.plugin.shef/src/com/raytheon/edex/transform/shef/obs/ObsToSHEFOptions.java index 6d87002ece..8747c41a83 100644 --- a/edexOsgi/com.raytheon.edex.plugin.shef/src/com/raytheon/edex/transform/shef/obs/ObsToSHEFOptions.java +++ b/edexOsgi/com.raytheon.edex.plugin.shef/src/com/raytheon/edex/transform/shef/obs/ObsToSHEFOptions.java @@ -174,6 +174,8 @@ public class ObsToSHEFOptions { public static final String OPT_CENTURY = "optCentury"; + public static final String OPT_NO_HR_TRACE = "optNoHourTrace"; + // private static class PCReset { // // private final String stationId; @@ -355,6 +357,10 @@ public class ObsToSHEFOptions { // -y2k // output century in SHEF output CMDS.put("-y2k", new CmdLineData("-y2k", OPT_CENTURY, 0, Boolean.class)); + + // -notrace + // turn off trace precip for 1 hour data. + CMDS.put("-notrace", new CmdLineData("-notrace", OPT_NO_HR_TRACE, 0, Boolean.class)); } private Log logger = LogFactory.getLog(getClass()); @@ -705,6 +711,15 @@ public class ObsToSHEFOptions { return (Boolean) options.get(OPT_CENTURY); } + /** + * -notrace + * + * @return Should trace precip not be reported for hourly metars. + */ + public boolean isOptNoTrace() { + return (Boolean) options.get(OPT_NO_HR_TRACE); + } + // ***************************************************** /** diff --git a/edexOsgi/com.raytheon.edex.plugin.shef/src/com/raytheon/edex/transform/shef/obs/SHEF_Metar_Codes.java b/edexOsgi/com.raytheon.edex.plugin.shef/src/com/raytheon/edex/transform/shef/obs/SHEF_Metar_Codes.java index 7d14cf2613..13dbdbc855 100644 --- a/edexOsgi/com.raytheon.edex.plugin.shef/src/com/raytheon/edex/transform/shef/obs/SHEF_Metar_Codes.java +++ b/edexOsgi/com.raytheon.edex.plugin.shef/src/com/raytheon/edex/transform/shef/obs/SHEF_Metar_Codes.java @@ -242,7 +242,12 @@ public enum SHEF_Metar_Codes implements SHEF_Obs_Codes { Integer durTime = null; boolean processObs = false; + boolean tracePrecip = false; float value = report.getPrecip1Hour(); + if(!options.isOptNoTrace()) { + tracePrecip = (value == 0.0f); + } + float precip = -9999; if("METAR".equals(report.getReportType())) { processObs = true; @@ -306,10 +311,14 @@ public enum SHEF_Metar_Codes implements SHEF_Obs_Codes { pedtsep = checkPEDTSEP(pedtsep, options); if(precip > -9999) { if(durTime == null) { - if(precip >= 0.0f) { - buffer.append(String.format(format, pedtsep, precip)); + if(tracePrecip) { + buffer.append(String.format("%s T", pedtsep)); } else { - buffer.append(String.format("%s M", pedtsep)); + if(precip >= 0.0f) { + buffer.append(String.format(format, pedtsep, precip)); + } else { + buffer.append(String.format("%s M", pedtsep)); + } } } else { buffer.append(String.format("DVN%02d/" + format, durTime, pedtsep, precip)); diff --git a/edexOsgi/com.raytheon.edex.plugin.taf/src/com/raytheon/edex/plugin/taf/TafDecoder.java b/edexOsgi/com.raytheon.edex.plugin.taf/src/com/raytheon/edex/plugin/taf/TafDecoder.java index b504f934e5..2f65deae88 100644 --- a/edexOsgi/com.raytheon.edex.plugin.taf/src/com/raytheon/edex/plugin/taf/TafDecoder.java +++ b/edexOsgi/com.raytheon.edex.plugin.taf/src/com/raytheon/edex/plugin/taf/TafDecoder.java @@ -90,6 +90,13 @@ public class TafDecoder extends AbstractDecoder { record.setTraceId(traceId); record.setPluginName("taf"); record.constructDataURI(); + } else { + TAFParts parts = input.tafParts; + if(parts.getTafHeader() != null) { + logger.error("Could not parse TAF for input " + parts.getTafHeader() + " in file " + traceId); + } else { + logger.error("Could not parse file " + traceId); + } } } catch (DecoderException de) { logger.info(traceId + " -" + de.getMessage()); diff --git a/edexOsgi/com.raytheon.edex.plugin.taf/src/com/raytheon/edex/plugin/taf/common/TafPeriod.java b/edexOsgi/com.raytheon.edex.plugin.taf/src/com/raytheon/edex/plugin/taf/common/TafPeriod.java index aa5a9e58d9..0ec1f97fcd 100644 --- a/edexOsgi/com.raytheon.edex.plugin.taf/src/com/raytheon/edex/plugin/taf/common/TafPeriod.java +++ b/edexOsgi/com.raytheon.edex.plugin.taf/src/com/raytheon/edex/plugin/taf/common/TafPeriod.java @@ -506,8 +506,9 @@ public class TafPeriod implements Serializable, ISerializableObject { target.set(Calendar.SECOND, 0); target.set(Calendar.MILLISECOND, 0); - for (int i = 0; i < 3; i++) { - + // Back up at most 1 day. + target.add(Calendar.DAY_OF_MONTH, -1); + for (int i = 0; i < 4; i++) { int sDay = target.get(Calendar.DAY_OF_MONTH); if (sDay == day) { cal = TimeTools.copy(target); @@ -519,5 +520,27 @@ public class TafPeriod implements Serializable, ISerializableObject { } } return cal; + } + + public static final void main(String [] args) { + + + Calendar cA = TimeTools.getBaseCalendar(2012, 4, 1); + + Calendar cB = setDayHourMin(cA, 31, 23, 0); + + System.out.println(formatDate(cA)); + System.out.println(formatDate(cB)); + + + + } + + + + + + + } diff --git a/edexOsgi/com.raytheon.edex.plugin.taf/src/com/raytheon/edex/plugin/taf/decoder/TAFChangeGroupFactory.java b/edexOsgi/com.raytheon.edex.plugin.taf/src/com/raytheon/edex/plugin/taf/decoder/TAFChangeGroupFactory.java index a13949105f..0d008824ad 100644 --- a/edexOsgi/com.raytheon.edex.plugin.taf/src/com/raytheon/edex/plugin/taf/decoder/TAFChangeGroupFactory.java +++ b/edexOsgi/com.raytheon.edex.plugin.taf/src/com/raytheon/edex/plugin/taf/decoder/TAFChangeGroupFactory.java @@ -406,24 +406,22 @@ public class TAFChangeGroupFactory { } else { // No issue time found, so we'll have to create one from // the WMOHeader data. - int iDay = wmoHeader.getDay(); - int iHour = wmoHeader.getHour(); - int iMin = wmoHeader.getMinute(); - - issueTime = TimeTools.getSystemCalendar(wmoHeader.getYear(), - wmoHeader.getMonth(), wmoHeader.getDay()); - issueTime.add(Calendar.DAY_OF_MONTH, -1); - for (int i = 0; i < 3; i++) { - int sDay = issueTime.get(Calendar.DAY_OF_MONTH); - if (sDay == iDay) { - issueTime.set(Calendar.HOUR_OF_DAY, iHour); - issueTime.set(Calendar.MINUTE, iMin); - issueTime.set(Calendar.SECOND, 0); - issueTime.set(Calendar.MILLISECOND, 0); - success = true; - break; - } - } + issueTime = wmoHeader.getHeaderDate(); + +// issueTime = TimeTools.getSystemCalendar(wmoHeader.getYear(), +// wmoHeader.getMonth(), wmoHeader.getDay()); +// issueTime.add(Calendar.DAY_OF_MONTH, -1); +// for (int i = 0; i < 3; i++) { +// int sDay = issueTime.get(Calendar.DAY_OF_MONTH); +// if (sDay == iDay) { +// issueTime.set(Calendar.HOUR_OF_DAY, iHour); +// issueTime.set(Calendar.MINUTE, iMin); +// issueTime.set(Calendar.SECOND, 0); +// issueTime.set(Calendar.MILLISECOND, 0); +// success = true; +// break; +// } +// } } return success; @@ -538,6 +536,9 @@ public class TAFChangeGroupFactory { } record.setIssue_time(issueTime.getTime()); + if(issueTimeString == null) { + issueTimeString = String.format("%1$td%1$tH%1$tMZ",issueTime); + } record.setIssue_timeString(issueTimeString); record.setDataTime(new DataTime(issueTime.getTime().getTime(), record.getDataTime().getValidPeriod())); diff --git a/edexOsgi/com.raytheon.edex.plugin.text/src/com/raytheon/edex/plugin/text/dao/TextDao.java b/edexOsgi/com.raytheon.edex.plugin.text/src/com/raytheon/edex/plugin/text/dao/TextDao.java index ee6fd4319e..069873d95d 100644 --- a/edexOsgi/com.raytheon.edex.plugin.text/src/com/raytheon/edex/plugin/text/dao/TextDao.java +++ b/edexOsgi/com.raytheon.edex.plugin.text/src/com/raytheon/edex/plugin/text/dao/TextDao.java @@ -1,63 +1,72 @@ -/** - * 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.edex.plugin.text.dao; - -import com.raytheon.edex.db.dao.DefaultPluginDao; -import com.raytheon.edex.textdb.dbapi.impl.TextDB; -import com.raytheon.uf.common.dataplugin.PluginException; -import com.raytheon.uf.edex.database.purge.PurgeLogger; - -/** - * DAO for text products - * - *
- * 
- * SOFTWARE HISTORY
- * 
- * Date       	Ticket#		Engineer	Description
- * ------------	----------	-----------	--------------------------
- * Jul 10, 2009 2191        rjpeter     Update retention time handling.
- * Aug 18, 2009 2191        rjpeter     Changed to version purging.
- * 
- * - * @author - * @version 1 - */ -public class TextDao extends DefaultPluginDao { - - public TextDao(String pluginName) throws PluginException { - super(pluginName); - } - - @Override - public void purgeAllData() { - logger.warn("purgeAllPluginData not implemented for text. No data will be purged."); - } - - protected void loadScripts() throws PluginException { - // no op - } - - public void purgeExpiredData() throws PluginException { - int deletedRecords = TextDB.purgeStdTextProducts(); - PurgeLogger.logInfo("Purged " + deletedRecords + " items total.", - "text"); - } -} +/** + * 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.edex.plugin.text.dao; + +import java.util.Calendar; + +import com.raytheon.edex.db.dao.DefaultPluginDao; +import com.raytheon.edex.textdb.dbapi.impl.TextDB; +import com.raytheon.uf.common.dataplugin.PluginException; +import com.raytheon.uf.edex.database.purge.PurgeLogger; + +/** + * DAO for text products + * + *
+ * 
+ * SOFTWARE HISTORY
+ * 
+ * Date       	Ticket#		Engineer	Description
+ * ------------	----------	-----------	--------------------------
+ * Jul 10, 2009 2191        rjpeter     Update retention time handling.
+ * Aug 18, 2009 2191        rjpeter     Changed to version purging.
+ * 
+ * + * @author + * @version 1 + */ +public class TextDao extends DefaultPluginDao { + + public TextDao(String pluginName) throws PluginException { + super(pluginName); + } + + @Override + public void purgeAllData() { + logger.warn("purgeAllPluginData not implemented for text. No data will be purged."); + } + + protected void loadScripts() throws PluginException { + // no op + } + + public void purgeExpiredData() throws PluginException { + int deletedRecords = 0; + + // only do full purge every few hours since incremental purge runs every + // minute + if (Calendar.getInstance().get(Calendar.HOUR_OF_DAY) % 3 == 0) { + TextDB.purgeStdTextProducts(); + } + + PurgeLogger.logInfo("Purged " + deletedRecords + " items total.", + "text"); + } +} diff --git a/edexOsgi/com.raytheon.edex.plugin.text/src/com/raytheon/edex/plugin/text/impl/TextSeparatorFactory.java b/edexOsgi/com.raytheon.edex.plugin.text/src/com/raytheon/edex/plugin/text/impl/TextSeparatorFactory.java index ec276ccbc3..ecc16f93f3 100644 --- a/edexOsgi/com.raytheon.edex.plugin.text/src/com/raytheon/edex/plugin/text/impl/TextSeparatorFactory.java +++ b/edexOsgi/com.raytheon.edex.plugin.text/src/com/raytheon/edex/plugin/text/impl/TextSeparatorFactory.java @@ -19,6 +19,9 @@ **/ package com.raytheon.edex.plugin.text.impl; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -59,6 +62,8 @@ public class TextSeparatorFactory { private static final TextDBStaticData staticData = TextDBStaticData .instance(siteId); + private static Pattern TAF_PTRN = Pattern.compile("[\n\r]?TAF"); + /** * * @param messageData @@ -181,6 +186,11 @@ public class TextSeparatorFactory { msgType = WMOMessageType.MSG_DISCARD; } + Matcher m = TAF_PTRN.matcher(startOfMessage); + if (m.find()) { + msgType = WMOMessageType.STD_COLLECTIVE; + } + if (msgType == null) { String stdAfosId = null; diff --git a/edexOsgi/com.raytheon.edex.plugin.text/src/com/raytheon/edex/plugin/text/impl/separator/StdCollectiveSeparator.java b/edexOsgi/com.raytheon.edex.plugin.text/src/com/raytheon/edex/plugin/text/impl/separator/StdCollectiveSeparator.java index 326d638101..dbb69ec6c4 100644 --- a/edexOsgi/com.raytheon.edex.plugin.text/src/com/raytheon/edex/plugin/text/impl/separator/StdCollectiveSeparator.java +++ b/edexOsgi/com.raytheon.edex.plugin.text/src/com/raytheon/edex/plugin/text/impl/separator/StdCollectiveSeparator.java @@ -20,6 +20,7 @@ package com.raytheon.edex.plugin.text.impl.separator; import java.util.regex.Matcher; +import java.util.regex.Pattern; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; @@ -50,6 +51,8 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader; public class StdCollectiveSeparator extends WMOMessageSeparator { private final Log logger = LogFactory.getLog(getClass()); + private static final Pattern P_TAF = Pattern.compile("(TAF +AMD)|(TAF +COR)|(TAF...[\r\n])|(TAF ?)"); + private StringBuilder fouHeader = new StringBuilder(); private boolean checkFouHeader = true; @@ -91,7 +94,7 @@ public class StdCollectiveSeparator extends WMOMessageSeparator { productId = new AFOSProductId("CCC", "MTR", "XXX"); } else if ("FR".equals(tt)) { productId = new AFOSProductId("CCC", "TWB", "XXX"); - } else if ("FT".equals(tt)) { + } else if (("FT".equals(tt))||("FC".equals(tt))) { productId = new AFOSProductId("CCC", "TAF", "XXX"); } else { productId = NOAFOSPIL; @@ -124,6 +127,19 @@ public class StdCollectiveSeparator extends WMOMessageSeparator { if ((rawMsg.indexOf(METAR) == 0) || (rawMsg.indexOf(SPECI) == 0)) { productType = (rawMsg.indexOf(METAR) == 0 ? METAR : SPECI); } + + StringBuilder sb = null; + if ("TAF".equals(afos_id.getNnn())) { + sb = new StringBuilder(rawMsg); + Matcher m = P_TAF.matcher(sb); + while (m.find()) { + sb.delete(m.start(), m.end()); + m = P_TAF.matcher(sb); + } + sb.insert(0, "\n"); + sb.insert(0, "TAFXXX\nTAF"); + rawMsg = sb.toString(); + } Matcher nnnxxxMatcher = NNNXXX.matcher(rawMsg); if (nnnxxxMatcher.find()) { rawMsg = rawMsg.substring(nnnxxxMatcher.end()); @@ -317,59 +333,43 @@ public class StdCollectiveSeparator extends WMOMessageSeparator { reportType = blank; } else if (blank.startsWith("TAF")) { - // Lines commented out for DR 6251 -- modifed decoding of TAF - // messages - // tmp = strpbrk (tmp, CSPL); - // tmp++; - // blank = tmp; - - tmp = new StringBuilder(buffer.toString()); - - // Check the first lines of the TAF message to see if they contain - // only strings such as "TAF" or "TAFxxx" or "TAF ". If so, - // skip these to get to the data. (Revised for DR 6251) + // Delete "TAF" that starts the data + safeStrpbrk(buffer, rnl); + // then any remaining leading carriage control. while (buffer.length() > 0) { - getTextSegment(buffer, tmp, rnl); - if (tmp.length() >= MIN_COLL_DATA_LEN) { + char c = buffer.charAt(0); + if ((c == '\n') || (c == '\r')) { + buffer.deleteCharAt(0); + } else { break; } - - if (safeStrpbrk(buffer, nl)) { - buffer.deleteCharAt(0); - } - } - - // If the data begins with "TAF", skip it also (DR 6251) in order to - // get to the first product. - if (buffer.toString().startsWith("TAF")) { - if (safeStrpbrk(buffer, CSPC)) - buffer.deleteCharAt(0); } // The next test on blank uses at most three characters blank = buffer.substring(0, buffer.length() < 3 ? buffer.length() : 3); } else if (pirFlag) { - if(buffer != null) { - for(int i = 0;i < buffer.length();i++) { - if(buffer.charAt(i) == '\r') { - buffer.setCharAt(i,'\n'); + if (buffer != null) { + for (int i = 0; i < buffer.length(); i++) { + if (buffer.charAt(i) == '\r') { + buffer.setCharAt(i, '\n'); } } - - // If the pirflag is set, skip the first line of the message, as it + + // If the pirflag is set, skip the first line of the message, as + // it // is not an id or part of the first collective. // safeStrpbrk(buffer, CSPL); - - while(buffer.length() > 0) { + + while (buffer.length() > 0) { char c = buffer.charAt(0); - if((c == ' ') || (c == '\n')) { + if ((c == ' ') || (c == '\n')) { buffer.deleteCharAt(0); } else { break; } } - + } pirFlag = false; } diff --git a/edexOsgi/com.raytheon.edex.plugin.text/src/com/raytheon/edex/plugin/text/impl/separator/WMOMessageSeparator.java b/edexOsgi/com.raytheon.edex.plugin.text/src/com/raytheon/edex/plugin/text/impl/separator/WMOMessageSeparator.java index 151feb5025..189969d722 100644 --- a/edexOsgi/com.raytheon.edex.plugin.text/src/com/raytheon/edex/plugin/text/impl/separator/WMOMessageSeparator.java +++ b/edexOsgi/com.raytheon.edex.plugin.text/src/com/raytheon/edex/plugin/text/impl/separator/WMOMessageSeparator.java @@ -85,7 +85,7 @@ public abstract class WMOMessageSeparator extends AbstractRecordSeparator { protected static final int MAX_SECND_LINE_LEN = 10; protected static final Pattern NNNXXX = Pattern - .compile("\\w{4,6}(?:\\s{1,2})?[\\r\\n]+(?:" + (char) 0x1e + ")?"); + .compile("\\w{3,6}(?:\\s{1,2})?[\\r\\n]+(?:" + (char) 0x1e + ")?"); private final Log logger = LogFactory.getLog(getClass()); @@ -406,26 +406,25 @@ public abstract class WMOMessageSeparator extends AbstractRecordSeparator { endChar = msg.charAt(msg.length() - 1); } } - - - public static final void main(String [] args) { - - Pattern NNNXXX = Pattern.compile("\\w{4,6}(?:\\s{1,2})?[\\r\\n]+(?:" + (char) 0x1e + ")?"); - - - Matcher m = NNNXXX.matcher("PIRUS\r\rOMA UUA /OV"); - - if(m.find()) { - for(int i = 0;i <= m.groupCount();i++) { - System.out.println(m.group(i)); - } - } - - - - + + public static final void main(String[] args) { + + StringBuilder sb = new StringBuilder( + "\r\r\nKOFF 1912/20/15\n\n\r BECMG"); + + safeStrpbrk(sb, nl); + + // Pattern NNNXXX = Pattern.compile("\\w{4,6}(?:\\s{1,2})?[\\r\\n]+(?:" + // + (char) 0x1e + ")?"); + // + // + // Matcher m = NNNXXX.matcher("PIRUS\r\rOMA UUA /OV"); + // + // if(m.find()) { + // for(int i = 0;i <= m.groupCount();i++) { + // System.out.println(m.group(i)); + // } + // } } - - } diff --git a/edexOsgi/com.raytheon.edex.plugin.warning/src/com/raytheon/edex/plugin/warning/gis/GeospatialDataGenerator.java b/edexOsgi/com.raytheon.edex.plugin.warning/src/com/raytheon/edex/plugin/warning/gis/GeospatialDataGenerator.java index 1bf8f8ebc4..8ac6824a14 100644 --- a/edexOsgi/com.raytheon.edex.plugin.warning/src/com/raytheon/edex/plugin/warning/gis/GeospatialDataGenerator.java +++ b/edexOsgi/com.raytheon.edex.plugin.warning/src/com/raytheon/edex/plugin/warning/gis/GeospatialDataGenerator.java @@ -225,6 +225,7 @@ public class GeospatialDataGenerator { } if (dataSet == null) { + // If the file does not exist, then geoms need to be deleted. deleteGeomFiles(site, lastRunTime); } else { generate = false; @@ -299,12 +300,17 @@ public class GeospatialDataGenerator { GeospatialConfiguration geoConfig = template.getGeospatialConfig(); AreaConfiguration areaConfig = template.getAreaConfig(); rval.setAreaSource(geoConfig.getAreaSource()); - List areaFields = new ArrayList(4); + List areaFields = new ArrayList(); areaFields.add(WarningConstants.GID); areaFields.add(areaConfig.getAreaField()); areaFields.add(areaConfig.getFipsField()); areaFields.add(areaConfig.getAreaNotationField()); - areaFields.add(areaConfig.getFeAreaField()); + if (areaConfig.getFeAreaField() != null) { + areaFields.add(areaConfig.getFeAreaField()); + } + if (areaConfig.getTimeZoneField() != null) { + areaFields.add(areaConfig.getTimeZoneField()); + } rval.setFipsField(areaConfig.getFipsField()); rval.setAreaFields(areaFields); rval.setTimeZoneSource(geoConfig.getTimezoneSource()); diff --git a/edexOsgi/com.raytheon.edex.textdb/src/com/raytheon/edex/textdb/dbapi/impl/TextDB.java b/edexOsgi/com.raytheon.edex.textdb/src/com/raytheon/edex/textdb/dbapi/impl/TextDB.java index 0fe437bb3a..ceebcb58e3 100644 --- a/edexOsgi/com.raytheon.edex.textdb/src/com/raytheon/edex/textdb/dbapi/impl/TextDB.java +++ b/edexOsgi/com.raytheon.edex.textdb/src/com/raytheon/edex/textdb/dbapi/impl/TextDB.java @@ -74,6 +74,8 @@ import com.raytheon.uf.edex.wmo.message.WMOHeader; * 09Aug2010 3944 cjeanbap Add new method, queryAllWatchWarn. * 8Nov2010 7294 cjeanbap Update logic in executeAFOSCommand. * Removed committed out code. + * ------------------------------------ + * 18 Apr 2012 479 jkorman Modified to pad xxxid to 3 characters in queries. * * * @author jkorman @@ -586,6 +588,11 @@ public class TextDB { String ccc = productId.substring(0, 3); String nnn = productId.substring(3, 6); String xxx = productId.substring(6); + if(xxx.length() == 1) { + xxx = xxx + " "; + } else if (xxx.length() == 2) { + xxx = xxx + " "; + } AFOSProductId afosId = new AFOSProductId(ccc, nnn, xxx); @@ -620,6 +627,11 @@ public class TextDB { String ccc = productId.substring(0, 3); String nnn = productId.substring(3, 6); String xxx = productId.substring(6); + if(xxx.length() == 1) { + xxx = xxx + " "; + } else if (xxx.length() == 2) { + xxx = xxx + " "; + } return getAllTimes(ccc, nnn, xxx, operationalMode); } diff --git a/edexOsgi/com.raytheon.edex.utilitysrv/src/com/raytheon/edex/services/AbstractPrivilegedLocalizationRequestHandler.java b/edexOsgi/com.raytheon.edex.utilitysrv/src/com/raytheon/edex/services/AbstractPrivilegedLocalizationRequestHandler.java index 1d3e2daba2..4e7e1659db 100644 --- a/edexOsgi/com.raytheon.edex.utilitysrv/src/com/raytheon/edex/services/AbstractPrivilegedLocalizationRequestHandler.java +++ b/edexOsgi/com.raytheon.edex.utilitysrv/src/com/raytheon/edex/services/AbstractPrivilegedLocalizationRequestHandler.java @@ -23,7 +23,6 @@ import com.raytheon.uf.common.auth.req.AbstractPrivilegedRequest; import com.raytheon.uf.common.auth.user.IUser; import com.raytheon.uf.common.localization.LocalizationContext; import com.raytheon.uf.common.localization.LocalizationContext.LocalizationLevel; -import com.raytheon.uf.common.localization.LocalizationUtil; import com.raytheon.uf.edex.auth.AuthManager; import com.raytheon.uf.edex.auth.AuthManagerFactory; import com.raytheon.uf.edex.auth.req.AbstractPrivilegedRequestHandler; @@ -72,9 +71,10 @@ public abstract class AbstractPrivilegedLocalizationRequestHandler 0) { @@ -96,12 +96,21 @@ public abstract class AbstractPrivilegedLocalizationRequestHandler.(.)/type/path/name/ - String[] pathParts = LocalizationUtil.splitUnique(fileName); - for (String part : pathParts) { - roleId += "/" + part; - if (checkRole(roles, roleId, user)) { + int minIndex = roleId.length(); + roleId += "/" + fileName; + int index = roleId.length(); + while (index > minIndex && isValid) { + roleId = roleId.substring(0, index); + IRole role = roles.lookupRole(roleId); + index = roleId.lastIndexOf("/", index - 1); + if (role.validForUser(user)) { return new AuthorizationResponse(true); + } else if (!roles.isDefaultRole(role)) { + // if not valid for user and is not default role then not + // authorized. + isValid = false; } } } diff --git a/edexOsgi/com.raytheon.uf.common.comm/src/com/raytheon/uf/common/comm/HttpClient.java b/edexOsgi/com.raytheon.uf.common.comm/src/com/raytheon/uf/common/comm/HttpClient.java index aceae79e4c..8f293582b3 100644 --- a/edexOsgi/com.raytheon.uf.common.comm/src/com/raytheon/uf/common/comm/HttpClient.java +++ b/edexOsgi/com.raytheon.uf.common.comm/src/com/raytheon/uf/common/comm/HttpClient.java @@ -23,6 +23,7 @@ package com.raytheon.uf.common.comm; import java.io.IOException; import java.io.InputStream; import java.io.UnsupportedEncodingException; +import java.util.zip.GZIPOutputStream; import org.apache.http.Header; import org.apache.http.HeaderElement; @@ -91,6 +92,8 @@ public class HttpClient { private NetworkStatistics stats = NetworkStatistics.getInstance(); + private boolean gzipRequests = false; + private HttpClient() { connManager = new ThreadSafeClientConnManager(); DefaultHttpClient client = new DefaultHttpClient(connManager); @@ -130,7 +133,7 @@ public class HttpClient { * encoding and decompressing responses if they arrived gzipped. This should * only ever be called once per runtime. */ - public void enableGzipHandling() { + public void enableGzipResponseHandling() { // Add gzip compression handlers // advertise we accept gzip @@ -172,6 +175,10 @@ public class HttpClient { }); } + public void enableRequestCompression() { + gzipRequests = true; + } + public static synchronized HttpClient getInstance() { if (instance == null) { instance = new HttpClient(); @@ -389,6 +396,20 @@ public class HttpClient { throws CommunicationException, Exception { HttpPost put = new HttpPost(address); + if (gzipRequests) { + ByteArrayOutputStream byteStream = ByteArrayOutputStreamPool + .getInstance().getStream(message.length); + GZIPOutputStream gzipStream = new GZIPOutputStream(byteStream); + gzipStream.write(message); + gzipStream.finish(); + gzipStream.flush(); + byte[] gzipMessage = byteStream.toByteArray(); + gzipStream.close(); + if (message.length > gzipMessage.length) { + message = gzipMessage; + put.setHeader("Content-Encoding", "gzip"); + } + } put.setEntity(new ByteArrayEntity(message)); diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.ffmp/src/com/raytheon/uf/common/dataplugin/ffmp/FFMPBasin.java b/edexOsgi/com.raytheon.uf.common.dataplugin.ffmp/src/com/raytheon/uf/common/dataplugin/ffmp/FFMPBasin.java index 0972af648d..40416c10f8 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.ffmp/src/com/raytheon/uf/common/dataplugin/ffmp/FFMPBasin.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.ffmp/src/com/raytheon/uf/common/dataplugin/ffmp/FFMPBasin.java @@ -153,7 +153,6 @@ public class FFMPBasin implements ISerializableObject, Cloneable { long expirationTime, boolean rate) { float dvalue = 0.0f; Date prevDate = null; - // map ordered newest first, so grab from newest date to oldest date if (afterDate.before(beforeDate) && (values.size() > 0)) { // if (values.containsKey(beforeDate) && diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.ffmp/src/com/raytheon/uf/common/dataplugin/ffmp/FFMPDataContainer.java b/edexOsgi/com.raytheon.uf.common.dataplugin.ffmp/src/com/raytheon/uf/common/dataplugin/ffmp/FFMPDataContainer.java index 0763f1b25d..975a0d0176 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.ffmp/src/com/raytheon/uf/common/dataplugin/ffmp/FFMPDataContainer.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.ffmp/src/com/raytheon/uf/common/dataplugin/ffmp/FFMPDataContainer.java @@ -32,8 +32,11 @@ import com.raytheon.uf.common.monitor.xml.SourceXML; import com.raytheon.uf.common.serialization.DynamicSerializationManager; import com.raytheon.uf.common.serialization.DynamicSerializationManager.SerializationType; import com.raytheon.uf.common.serialization.SerializationException; +import com.raytheon.uf.common.status.IUFStatusHandler; +import com.raytheon.uf.common.status.UFStatus; import com.raytheon.uf.common.util.FileUtil; + /** * FFTI Data Container * @@ -52,6 +55,9 @@ import com.raytheon.uf.common.util.FileUtil; */ public class FFMPDataContainer { + + private static final transient IUFStatusHandler statusHandler = UFStatus + .getHandler(FFMPDataContainer.class); private HashMap basinDataMap = new HashMap(); @@ -85,7 +91,11 @@ public class FFMPDataContainer { * @return */ public FFMPBasinData getBasinData(String huc) { - return basinDataMap.get(huc); + if (basinDataMap.containsKey(huc)) { + return basinDataMap.get(huc); + } else { + return null; + } } /** @@ -138,147 +148,160 @@ public class FFMPDataContainer { if (source.getSourceType().equals(SOURCE_TYPE.GUIDANCE.getSourceType())) { guid = true; } + + FFMPBasinData currBasinData = getBasinData(huc); - FFMPBasinData currBasinData = getBasinData(huc); + if (currBasinData == null) { + setBasinData(huc, newBasinData); + } else { - for (Long key : newBasinData.getBasins().keySet()) { + for (Long key : newBasinData.getBasins().keySet()) { - if (guid) { + if (guid) { - FFMPGuidanceBasin basin = null; + FFMPGuidanceBasin basin = null; - if (currBasinData.get(key) instanceof FFMPGuidanceBasin) { - basin = (FFMPGuidanceBasin) currBasinData.get(key); - } + if (currBasinData.get(key) instanceof FFMPGuidanceBasin) { + basin = (FFMPGuidanceBasin) currBasinData.get(key); + } - if (basin == null) { + if (basin == null) { - FFMPBasin newbasin = newBasinData.get(key); - basin = new FFMPGuidanceBasin(key, newbasin.getAggregated()); + FFMPBasin newbasin = newBasinData.get(key); + basin = new FFMPGuidanceBasin(key, + newbasin.getAggregated()); - if (newbasin instanceof FFMPGuidanceBasin) { + if (newbasin instanceof FFMPGuidanceBasin) { - basin.setValue( - source.getSourceName(), - date, - ((FFMPGuidanceBasin) newbasin).getValue( - source.getSourceName(), - source.getExpirationMinutes(siteKey) * 60 * 1000)); - } else { - basin.setValue(source.getSourceName(), date, - newBasinData.get(key).getValue()); - } + basin.setValue( + source.getSourceName(), + date, + ((FFMPGuidanceBasin) newbasin).getValue( + source.getSourceName(), + source.getExpirationMinutes(siteKey) * 60 * 1000)); + } else { + basin.setValue(source.getSourceName(), date, + newBasinData.get(key).getValue()); + } - currBasinData.put(key, basin); + currBasinData.put(key, basin); - } else { + } else { - FFMPBasin newbasin = newBasinData.get(key); + FFMPBasin newbasin = newBasinData.get(key); - if (newbasin instanceof FFMPGuidanceBasin) { + if (newbasin instanceof FFMPGuidanceBasin) { - if (basin.getValue(date, source.getSourceName()) != null - && (basin - .getValue(date, source.getSourceName()) >= 0.0f && !basin - .getValue(date, source.getSourceName()) - .isNaN())) { + if (basin.getValue(date, source.getSourceName()) != null + && (basin.getValue(date, + source.getSourceName()) >= 0.0f && !basin + .getValue(date, + source.getSourceName()) + .isNaN())) { - if (((FFMPGuidanceBasin) newbasin).getValue(date, - source.getSourceName()) >= 0.0f - && !((FFMPGuidanceBasin) newbasin) - .getValue(date, - source.getSourceName()) - .isNaN()) { + if (((FFMPGuidanceBasin) newbasin).getValue( + date, source.getSourceName()) >= 0.0f + && !((FFMPGuidanceBasin) newbasin) + .getValue(date, + source.getSourceName()) + .isNaN()) { - float val = (float) (basin.getValue(date, - source.getSourceName()) + ((FFMPGuidanceBasin) newbasin) - .getValue( - source.getSourceName(), - source.getExpirationMinutes(siteKey) * 60 * 1000) / 2.0); + float val = (float) (basin.getValue(date, + source.getSourceName()) + ((FFMPGuidanceBasin) newbasin) + .getValue( + source.getSourceName(), + source.getExpirationMinutes(siteKey) * 60 * 1000) / 2.0); - basin.setValue(source.getSourceName(), date, - val); - } - } else { + basin.setValue(source.getSourceName(), + date, val); + } - if (!basin - .containsKey(date, source.getSourceName()) - && newbasin != null) { - basin.setValue(source.getSourceName(), date, - ((FFMPGuidanceBasin) newbasin) - .getValue(date, - source.getSourceName())); - } - } + } else { - } else { - // meaning, it's a brand new file, we don't cast - // those out - if (newbasin.getValue(date) != null - && newbasin.getValue(date) >= 0.0f - && !newbasin.getValue(date).isNaN() - && ((FFMPGuidanceBasin) basin).getValue(date, - source.getSourceName()) >= 0.0f - && !((FFMPGuidanceBasin) basin).getValue(date, - source.getSourceName()).isNaN()) { + if (!basin.containsKey(date, + source.getSourceName()) + && newbasin != null) { + basin.setValue(source.getSourceName(), + date, + ((FFMPGuidanceBasin) newbasin) + .getValue(date, source + .getSourceName())); + } + } - float val = (float) ((basin.getValue(date, - source.getSourceName()) + newbasin - .getValue()) / 2); + } else { + // meaning, it's a brand new file, we don't cast + // those out - basin.setValue(source.getSourceName(), date, val); + if (newbasin.getValue(date) != null + && newbasin.getValue(date) >= 0.0f + && !newbasin.getValue(date).isNaN() + && ((FFMPGuidanceBasin) basin).getValue( + date, source.getSourceName()) >= 0.0f + && !((FFMPGuidanceBasin) basin).getValue( + date, source.getSourceName()) + .isNaN()) { - } else { + float val = (float) ((basin.getValue(date, + source.getSourceName()) + newbasin + .getValue()) / 2); - basin.setValue(source.getSourceName(), date, - newbasin.getValue(date)); - } - } - } + basin.setValue(source.getSourceName(), date, + val); - } else { + } else { - FFMPBasin basin = currBasinData.get(key); - FFMPBasin newbasin = newBasinData.get(key); - Float val = 0.0f; + basin.setValue(source.getSourceName(), date, + newbasin.getValue(date)); + } + } + } - if (basin == null) { + } else { - basin = new FFMPBasin(key, newbasin.getAggregated()); - val = newbasin.getValue(date); + FFMPBasin basin = currBasinData.get(key); + FFMPBasin newbasin = newBasinData.get(key); + Float val = 0.0f; - if (val.isNaN()) { - val = 0.0f; - } + if (basin == null) { - basin.setValue(date, val); - currBasinData.put(key, basin); + basin = new FFMPBasin(key, newbasin.getAggregated()); + val = newbasin.getValue(date); - } else { + if (val.isNaN()) { + val = 0.0f; + } - if (basin.getValue(date) != null - && !basin.getValue(date).isNaN() - && basin.getValue(date) != 0.0) { - if (newbasin.getValue(date) != null - && !newbasin.getValue(date).isNaN() - && newbasin.getValue(date) != 0.0) { + basin.setValue(date, val); + currBasinData.put(key, basin); - val = (float) ((basin.getValue(date) + newbasin - .getValue(date)) / 2); - } - } else { - val = newbasin.getValue(date); + } else { - if (val.isNaN()) { - val = 0.0f; - } - } + if (basin.getValue(date) != null + && !basin.getValue(date).isNaN() + && basin.getValue(date) != 0.0) { + if (newbasin.getValue(date) != null + && !newbasin.getValue(date).isNaN() + && newbasin.getValue(date) != 0.0) { - basin.setValue(date, val); - } - } - } - } + val = (float) ((basin.getValue(date) + newbasin + .getValue(date)) / 2); + } + + } else { + val = newbasin.getValue(date); + + if (val.isNaN()) { + val = 0.0f; + } + } + + basin.setValue(date, val); + } + } + } + } + } public void setSourceName(String sourceName) { this.sourceName = sourceName; @@ -305,7 +328,8 @@ public class FFMPDataContainer { } } } catch (Exception e) { - // no such element + statusHandler.debug("No old times available..."+getSourceName()); + return null; } return null; } @@ -330,7 +354,8 @@ public class FFMPDataContainer { return orderedTimes; } } catch (Exception e) { - // no such element + statusHandler.debug("No ordered times available..."+getSourceName()); + return null; } return null; @@ -353,7 +378,8 @@ public class FFMPDataContainer { } } } catch (Exception e) { - e.printStackTrace(); + statusHandler.debug("No new times available..."+getSourceName()); + return null; } return null; diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.ffmp/src/com/raytheon/uf/common/dataplugin/ffmp/FFMPRecord.java b/edexOsgi/com.raytheon.uf.common.dataplugin.ffmp/src/com/raytheon/uf/common/dataplugin/ffmp/FFMPRecord.java index 8377fe8c59..298834fc22 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.ffmp/src/com/raytheon/uf/common/dataplugin/ffmp/FFMPRecord.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.ffmp/src/com/raytheon/uf/common/dataplugin/ffmp/FFMPRecord.java @@ -68,7 +68,7 @@ import com.raytheon.uf.common.status.UFStatus.Priority; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * 06/03/09 2521 D. Hladky Initial release - * 16/04/12 DR 14511 G. Zhang Replacing synchronized object + * * * * @author dhladky @@ -537,8 +537,8 @@ public class FFMPRecord extends PersistablePluginDataObject implements SourceXML source = FFMPSourceConfigurationManager.getInstance() .getSource(sourceName); Long pfaf = basin.getPfaf(); - //DR 14511: FFMPResource.paintInternal() uses template, causing GUI delay - synchronized (/*template*/template.getPrimaryDomain()) { + + synchronized (template) { for (DomainXML domain : template.getDomains()) { diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.gfe/src/com/raytheon/uf/common/dataplugin/gfe/GridDataHistory.java b/edexOsgi/com.raytheon.uf.common.dataplugin.gfe/src/com/raytheon/uf/common/dataplugin/gfe/GridDataHistory.java index 5d07e4b5b6..1b6c34a963 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.gfe/src/com/raytheon/uf/common/dataplugin/gfe/GridDataHistory.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.gfe/src/com/raytheon/uf/common/dataplugin/gfe/GridDataHistory.java @@ -26,16 +26,12 @@ import java.util.Date; import javax.persistence.Column; import javax.persistence.Embedded; import javax.persistence.Entity; -import javax.persistence.FetchType; import javax.persistence.GeneratedValue; import javax.persistence.Id; -import javax.persistence.ManyToOne; -import javax.persistence.Transient; import org.hibernate.annotations.Type; import com.raytheon.edex.util.Util; -import com.raytheon.uf.common.dataplugin.gfe.db.objects.GFERecord; import com.raytheon.uf.common.dataplugin.gfe.db.objects.ParmID; import com.raytheon.uf.common.message.WsId; import com.raytheon.uf.common.serialization.ISerializableObject; @@ -127,10 +123,6 @@ public class GridDataHistory implements Cloneable, Serializable, @DynamicSerializeElement private Date lastSentTime; - @ManyToOne(fetch = FetchType.EAGER) - @Transient - private GFERecord parent; - /** * Default constructor (all fields initialized null) */ @@ -517,50 +509,68 @@ public class GridDataHistory implements Cloneable, Serializable, */ @Override public boolean equals(Object obj) { - if (this == obj) + if (this == obj) { return true; - if (obj == null) + } + if (obj == null) { return false; - if (getClass() != obj.getClass()) + } + if (getClass() != obj.getClass()) { return false; + } GridDataHistory other = (GridDataHistory) obj; if (lastSentTime == null) { - if (other.lastSentTime != null) + if (other.lastSentTime != null) { return false; - } else if (!lastSentTime.equals(other.lastSentTime)) + } + } else if (!lastSentTime.equals(other.lastSentTime)) { return false; - if (origin != other.origin) + } + if (origin != other.origin) { return false; + } if (originParm == null) { - if (other.originParm != null) + if (other.originParm != null) { return false; - } else if (!originParm.equals(other.originParm)) + } + } else if (!originParm.equals(other.originParm)) { return false; + } if (originTimeRange == null) { - if (other.originTimeRange != null) + if (other.originTimeRange != null) { return false; - } else if (!originTimeRange.equals(other.originTimeRange)) + } + } else if (!originTimeRange.equals(other.originTimeRange)) { return false; + } if (publishTime == null) { - if (other.publishTime != null) + if (other.publishTime != null) { return false; - } else if (!publishTime.equals(other.publishTime)) + } + } else if (!publishTime.equals(other.publishTime)) { return false; + } if (timeModified == null) { - if (other.timeModified != null) + if (other.timeModified != null) { return false; - } else if (!timeModified.equals(other.timeModified)) + } + } else if (!timeModified.equals(other.timeModified)) { return false; + } if (updateTime == null) { - if (other.updateTime != null) + if (other.updateTime != null) { return false; - } else if (!updateTime.equals(other.updateTime)) + } + } else if (!updateTime.equals(other.updateTime)) { return false; + } if (whoModified == null) { - if (other.whoModified != null) + if (other.whoModified != null) { return false; - } else if (!whoModified.equals(other.whoModified)) + } + } else if (!whoModified.equals(other.whoModified)) { return false; + } return true; } } diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.gfe/src/com/raytheon/uf/common/dataplugin/gfe/db/objects/DatabaseID.java b/edexOsgi/com.raytheon.uf.common.dataplugin.gfe/src/com/raytheon/uf/common/dataplugin/gfe/db/objects/DatabaseID.java index 837c0c7108..f40341af03 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.gfe/src/com/raytheon/uf/common/dataplugin/gfe/db/objects/DatabaseID.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.gfe/src/com/raytheon/uf/common/dataplugin/gfe/db/objects/DatabaseID.java @@ -48,6 +48,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeTypeAdap * ------------ ---------- ----------- -------------------------- * 3/6/08 875 bphillip Initial Creation * 8/19/09 2899 njensen Rewrote equals() for performance + * 5/08/12 #600 dgilling Implement clone(). * * * @@ -60,7 +61,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeTypeAdap @DynamicSerialize @DynamicSerializeTypeAdapter(factory = DatabaseIDAdapter.class) public class DatabaseID implements Serializable, Comparable, - ISerializableObject { + ISerializableObject, Cloneable { private static final long serialVersionUID = 5792890762609478694L; @@ -561,4 +562,15 @@ public class DatabaseID implements Serializable, Comparable, return time; } + /* + * (non-Javadoc) + * + * @see java.lang.Object#clone() + */ + @Override + protected DatabaseID clone() throws CloneNotSupportedException { + return new DatabaseID(this.siteId, this.format, this.dbType, + this.modelName, this.modelTime); + } + } diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.gfe/src/com/raytheon/uf/common/dataplugin/gfe/db/objects/GFERecord.java b/edexOsgi/com.raytheon.uf.common.dataplugin.gfe/src/com/raytheon/uf/common/dataplugin/gfe/db/objects/GFERecord.java index bf3773e65c..14c17a2ce5 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.gfe/src/com/raytheon/uf/common/dataplugin/gfe/db/objects/GFERecord.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.gfe/src/com/raytheon/uf/common/dataplugin/gfe/db/objects/GFERecord.java @@ -134,8 +134,8 @@ public class GFERecord extends PluginDataObject { @Transient private GridParmInfo gridInfo; - @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER) - @JoinColumn(name = "parent") + @OneToMany(cascade = CascadeType.ALL, fetch = FetchType.EAGER, orphanRemoval = true) + @JoinColumn(name = "parent", nullable = false) @Index(name = "gfe_gridhistory_history_idx") @OrderBy("key") @XmlElement diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.gfe/src/com/raytheon/uf/common/dataplugin/gfe/db/objects/ParmID.java b/edexOsgi/com.raytheon.uf.common.dataplugin.gfe/src/com/raytheon/uf/common/dataplugin/gfe/db/objects/ParmID.java index d8ae28d02b..5ad9ff1aeb 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.gfe/src/com/raytheon/uf/common/dataplugin/gfe/db/objects/ParmID.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.gfe/src/com/raytheon/uf/common/dataplugin/gfe/db/objects/ParmID.java @@ -46,6 +46,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeTypeAdap * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * 3/6/08 875 bphillip Initial Creation + * 5/8/12 #600 dgilling Implement clone(). * * * @@ -59,7 +60,7 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeTypeAdap @DynamicSerialize @DynamicSerializeTypeAdapter(factory = ParmIDAdapter.class) public class ParmID implements Comparable, Serializable, - ISerializableObject { + ISerializableObject, Cloneable { private static final long serialVersionUID = 6801523496768037356L; @@ -102,6 +103,16 @@ public class ParmID implements Comparable, Serializable, return buffer.toString(); } + /* + * (non-Javadoc) + * + * @see java.lang.Object#clone() + */ + @Override + public ParmID clone() throws CloneNotSupportedException { + return new ParmID(this.parmName, this.dbId.clone(), this.parmLevel); + } + /** * Gets the default level for all parms. In this case, the default level is * the surface(SFC) diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.gfe/src/com/raytheon/uf/common/dataplugin/gfe/server/lock/Lock.java b/edexOsgi/com.raytheon.uf.common.dataplugin.gfe/src/com/raytheon/uf/common/dataplugin/gfe/server/lock/Lock.java index 137cd27d2c..67e4ad268a 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.gfe/src/com/raytheon/uf/common/dataplugin/gfe/server/lock/Lock.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.gfe/src/com/raytheon/uf/common/dataplugin/gfe/server/lock/Lock.java @@ -32,6 +32,7 @@ import javax.xml.bind.annotation.XmlElement; import org.hibernate.annotations.Cache; import org.hibernate.annotations.CacheConcurrencyStrategy; +import org.hibernate.annotations.Index; import org.hibernate.annotations.Type; import com.raytheon.uf.common.dataplugin.gfe.db.objects.ParmID; @@ -76,6 +77,7 @@ public class Lock extends PersistableDataObject implements Cloneable, @Column @Type(type = "com.raytheon.uf.common.dataplugin.gfe.db.type.ParmIdType") @XmlElement + @Index(name = "lock_parmId_idx") @DynamicSerializeElement private ParmID parmId; diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.gfe/src/com/raytheon/uf/common/dataplugin/gfe/server/lock/LockTable.java b/edexOsgi/com.raytheon.uf.common.dataplugin.gfe/src/com/raytheon/uf/common/dataplugin/gfe/server/lock/LockTable.java index 139c68ccee..cafca035aa 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.gfe/src/com/raytheon/uf/common/dataplugin/gfe/server/lock/LockTable.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.gfe/src/com/raytheon/uf/common/dataplugin/gfe/server/lock/LockTable.java @@ -21,6 +21,7 @@ package com.raytheon.uf.common.dataplugin.gfe.server.lock; import java.util.ArrayList; +import java.util.Collection; import java.util.List; import javax.xml.bind.annotation.XmlAccessType; @@ -218,14 +219,14 @@ public class LockTable implements Cloneable, ISerializableObject { for (int i = 0; i < locks.size(); i++) { if (timeRange.overlaps(locks.get(i).getTimeRange())) { - if (!requestorId.equalForLockComparison(locks.get(i).getWsId())) { + if (!requestorId.equals(locks.get(i).getWsId())) { return LockStatus.LOCKED_BY_OTHER; - } else if (locks.get(i).getTimeRange().contains( - timeRange.getStart()) - && (locks.get(i).getTimeRange().getEnd().after( - timeRange.getEnd()) || locks.get(i) - .getTimeRange().getEnd().equals( - timeRange.getEnd()))) { + } else if (locks.get(i).getTimeRange() + .contains(timeRange.getStart()) + && (locks.get(i).getTimeRange().getEnd() + .after(timeRange.getEnd()) || locks.get(i) + .getTimeRange().getEnd() + .equals(timeRange.getEnd()))) { return LockStatus.LOCKED_BY_ME; } } @@ -245,6 +246,10 @@ public class LockTable implements Cloneable, ISerializableObject { } } + public void removeLocks(Collection locksToRemove) { + this.locks.removeAll(locksToRemove); + } + public void resetWsId(WsId wsId) { setWsId(wsId); } @@ -258,9 +263,19 @@ public class LockTable implements Cloneable, ISerializableObject { } public void addLock(Lock lock) { + if (this.locks == null) { + this.locks = new ArrayList(); + } this.locks.add(lock); } + public void addLocks(Collection locks) { + if (this.locks == null) { + this.locks = new ArrayList(); + } + this.locks.addAll(locks); + } + public WsId getWsId() { return wsId; } @@ -292,14 +307,15 @@ public class LockTable implements Cloneable, ISerializableObject { return Enum.valueOf(LockMode.class, modeName); } + @Override public String toString() { StringBuffer buffer = new StringBuffer(); buffer.append("ParmID:"); buffer.append(parmId.toString()); buffer.append(" LockTable WsId: "); - if(wsId == null){ + if (wsId == null) { buffer.append("null"); - }else{ + } else { buffer.append(wsId.toPrettyString()); } for (int i = 0; i < locks.size(); i++) { diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.grib/src/com/raytheon/uf/common/dataplugin/grib/request/GetCoveragesRequest.java~HEAD b/edexOsgi/com.raytheon.uf.common.dataplugin.grib/src/com/raytheon/uf/common/dataplugin/grib/request/GetCoveragesRequest.java~HEAD deleted file mode 100644 index 5d538a3118..0000000000 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.grib/src/com/raytheon/uf/common/dataplugin/grib/request/GetCoveragesRequest.java~HEAD +++ /dev/null @@ -1,58 +0,0 @@ -/** - * 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.common.dataplugin.grib.request; - -import java.util.List; - -import com.raytheon.uf.common.serialization.annotations.DynamicSerialize; -import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; -import com.raytheon.uf.common.serialization.comm.IServerRequest; - -/** - * - * TODO Add Description - * - *
- * 
- * SOFTWARE HISTORY
- * 
- * Date         Ticket#    Engineer    Description
- * ------------ ---------- ----------- --------------------------
- * Dec 20, 2011            bsteffen     Initial creation
- * 
- * 
- * - * @author bsteffen - * @version 1.0 - */ -@DynamicSerialize -public class GetCoveragesRequest implements IServerRequest { - @DynamicSerializeElement - private List modelNames; - - public List getModelNames() { - return modelNames; - } - - public void setModelNames(List modelNames) { - this.modelNames = modelNames; - } - -} diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.npp.viirs/META-INF/MANIFEST.MF b/edexOsgi/com.raytheon.uf.common.dataplugin.npp.viirs/META-INF/MANIFEST.MF deleted file mode 100644 index d63c753462..0000000000 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.npp.viirs/META-INF/MANIFEST.MF +++ /dev/null @@ -1,14 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: VIIRS Common Dataplugin -Bundle-SymbolicName: com.raytheon.uf.common.dataplugin.npp.viirs -Bundle-Version: 1.0.0.qualifier -Bundle-Vendor: RAYTHEON -Bundle-RequiredExecutionEnvironment: JavaSE-1.6 -Require-Bundle: com.raytheon.uf.common.dataplugin;bundle-version="1.12.1174", - com.raytheon.uf.common.serialization;bundle-version="1.12.1174", - javax.persistence;bundle-version="1.0.0", - org.geotools;bundle-version="2.6.4", - javax.measure;bundle-version="1.0.0", - com.raytheon.uf.common.time;bundle-version="1.12.1174" -Export-Package: com.raytheon.uf.common.dataplugin.npp.viirs diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.npp.viirs/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject b/edexOsgi/com.raytheon.uf.common.dataplugin.npp.viirs/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject deleted file mode 100644 index ffaf76f971..0000000000 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.npp.viirs/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject +++ /dev/null @@ -1,2 +0,0 @@ -com.raytheon.uf.common.dataplugin.npp.viirs.VIIRSDataRecord -com.raytheon.uf.common.dataplugin.npp.viirs.VIIRSSpatialRecord \ No newline at end of file diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.npp.viirs/component-deploy.xml b/edexOsgi/com.raytheon.uf.common.dataplugin.npp.viirs/component-deploy.xml deleted file mode 100644 index 7aa3626716..0000000000 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.npp.viirs/component-deploy.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.npp.viirs/src/com/raytheon/uf/common/dataplugin/npp/viirs/VIIRSCommonData.java b/edexOsgi/com.raytheon.uf.common.dataplugin.npp.viirs/src/com/raytheon/uf/common/dataplugin/npp/viirs/VIIRSCommonData.java deleted file mode 100644 index 19b5d8b4cf..0000000000 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.npp.viirs/src/com/raytheon/uf/common/dataplugin/npp/viirs/VIIRSCommonData.java +++ /dev/null @@ -1,149 +0,0 @@ -/** - * 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.common.dataplugin.npp.viirs; - -import javax.persistence.Column; -import javax.persistence.Embeddable; - -import com.raytheon.uf.common.dataplugin.annotations.DataURI; -import com.raytheon.uf.common.serialization.annotations.DynamicSerialize; -import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; - -/** - * Common data object for VIIRS data - * - *
- * 
- * SOFTWARE HISTORY
- * 
- * Date         Ticket#    Engineer    Description
- * ------------ ---------- ----------- --------------------------
- * Dec 1, 2011            mschenke     Initial creation
- * 
- * 
- * - * @author mschenke - * @version 1.0 - */ -@Embeddable -@DynamicSerialize -public class VIIRSCommonData { - - @Column(length = 30) - @DataURI(position = 0) - @DynamicSerializeElement - private String region = "Unknown Region"; - - @Column - @DataURI(position = 1) - @DynamicSerializeElement - private int levels; - - @Column - @DataURI(position = 2) - @DynamicSerializeElement - private String channelType = "Unknown"; - - @Column - @DataURI(position = 3) - @DynamicSerializeElement - private int width; - - @Column - @DataURI(position = 4) - @DynamicSerializeElement - private int height; - - /** - * @return the region - */ - public String getRegion() { - return region; - } - - /** - * @param region - * the region to set - */ - public void setRegion(String region) { - this.region = region; - } - - /** - * @return the channelType - */ - public String getChannelType() { - return channelType; - } - - /** - * @param channelType - * the channelType to set - */ - public void setChannelType(String channelType) { - this.channelType = channelType; - } - - /** - * @return the levels - */ - public int getLevels() { - return levels; - } - - /** - * @param levels - * the levels to set - */ - public void setLevels(int levels) { - this.levels = levels; - } - - /** - * @return the width - */ - public int getWidth() { - return width; - } - - /** - * @param width - * the width to set - */ - public void setWidth(int width) { - this.width = width; - } - - /** - * @return the height - */ - public int getHeight() { - return height; - } - - /** - * @param height - * the height to set - */ - public void setHeight(int height) { - this.height = height; - } - -} diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.npp.viirs/src/com/raytheon/uf/common/dataplugin/npp/viirs/VIIRSDataRecord.java b/edexOsgi/com.raytheon.uf.common.dataplugin.npp.viirs/src/com/raytheon/uf/common/dataplugin/npp/viirs/VIIRSDataRecord.java deleted file mode 100644 index 5155e9fb97..0000000000 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.npp.viirs/src/com/raytheon/uf/common/dataplugin/npp/viirs/VIIRSDataRecord.java +++ /dev/null @@ -1,293 +0,0 @@ -/** - * 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.common.dataplugin.npp.viirs; - -import java.util.Calendar; -import java.util.Date; -import java.util.TimeZone; - -import javax.persistence.Column; -import javax.persistence.Embedded; -import javax.persistence.Entity; -import javax.persistence.Table; -import javax.persistence.UniqueConstraint; - -import com.raytheon.uf.common.dataplugin.IDecoderGettable; -import com.raytheon.uf.common.dataplugin.PluginException; -import com.raytheon.uf.common.dataplugin.annotations.DataURI; -import com.raytheon.uf.common.dataplugin.persist.PersistablePluginDataObject; -import com.raytheon.uf.common.serialization.annotations.DynamicSerialize; -import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; - -/** - * VIIRS Data record object - * - *
- * 
- * SOFTWARE HISTORY
- * 
- * Date         Ticket#    Engineer    Description
- * ------------ ---------- ----------- --------------------------
- * Nov 30, 2011            mschenke     Initial creation
- * 
- * 
- * - * @author mschenke - * @version 1.0 - */ -@Entity -@Table(name = "viirs", uniqueConstraints = { @UniqueConstraint(columnNames = { "dataURI" }) }) -@DynamicSerialize -public class VIIRSDataRecord extends PersistablePluginDataObject { - - public static final String MISSING_VALUE_ID = "missing_value"; - - public static final String SCALE_ID = "scale_factor"; - - public static final String OFFSET_ID = "add_offset"; - - private static final long serialVersionUID = 4920123282595760202L; - - @Embedded - @DataURI(position = 1, embedded = true) - @DynamicSerializeElement - private VIIRSCommonData commonData = new VIIRSCommonData(); - - @Column - @DataURI(position = 2) - @DynamicSerializeElement - private Integer channel; - - @Column - @DataURI(position = 3) - @DynamicSerializeElement - private double wavelength; - - @Column - @DynamicSerializeElement - private String spatialURI; - - public VIIRSDataRecord() { - setPluginName(VIIRSDataRecord.class.getAnnotation(Table.class).name()); - } - - /** - * @return the spatialURI - */ - public String getSpatialURI() { - if (spatialURI == null) { - VIIRSSpatialRecord record = new VIIRSSpatialRecord(); - record.setCommonData(getCommonData()); - record.setDataTime(getDataTime()); - try { - record.constructDataURI(); - } catch (PluginException e) { - // Ignore, PluginDataObject.constructDataURI never even throws a - // PluginException, needs to be cleaned up! - } - spatialURI = record.getDataURI(); - } - return spatialURI; - } - - /** - * @param spatialURI - * the spatialURI to set - */ - public void setSpatialURI(String spatialURI) { - this.spatialURI = spatialURI; - } - - /** - * @return the channel - */ - public Integer getChannel() { - return channel; - } - - /** - * @param channel - * the channel to set - */ - public void setChannel(Integer channel) { - this.channel = channel; - } - - /** - * @return the wavelength - */ - public double getWavelength() { - return wavelength; - } - - /** - * @param wavelength - * the wavelength to set - */ - public void setWavelength(double wavelength) { - this.wavelength = wavelength; - } - - /** - * @return - * @see com.raytheon.uf.common.dataplugin.npp.viirs.VIIRSCommonData#getRegion() - */ - public String getRegion() { - return commonData.getRegion(); - } - - /** - * @param region - * @see com.raytheon.uf.common.dataplugin.npp.viirs.VIIRSCommonData#setRegion(java.lang.String) - */ - public void setRegion(String region) { - commonData.setRegion(region); - } - - /** - * @return - * @see com.raytheon.uf.common.dataplugin.npp.viirs.VIIRSCommonData#getChannelType() - */ - public String getChannelType() { - return commonData.getChannelType(); - } - - /** - * @param channelType - * @see com.raytheon.uf.common.dataplugin.npp.viirs.VIIRSCommonData#setChannelType(java.lang.String) - */ - public void setChannelType(String channelType) { - commonData.setChannelType(channelType); - } - - /** - * @return - * @see com.raytheon.uf.common.dataplugin.npp.viirs.VIIRSCommonData#getLevels() - */ - public int getLevels() { - return commonData.getLevels(); - } - - /** - * @param levels - * @see com.raytheon.uf.common.dataplugin.npp.viirs.VIIRSCommonData#setLevels(int) - */ - public void setLevels(int levels) { - commonData.setLevels(levels); - } - - /** - * @return - * @see com.raytheon.uf.common.dataplugin.npp.viirs.VIIRSCommonData#getWidth() - */ - public int getWidth() { - return commonData.getWidth(); - } - - /** - * @param width - * @see com.raytheon.uf.common.dataplugin.npp.viirs.VIIRSCommonData#setWidth(int) - */ - public void setWidth(int width) { - commonData.setWidth(width); - } - - /** - * @return - * @see com.raytheon.uf.common.dataplugin.npp.viirs.VIIRSCommonData#getHeight() - */ - public int getHeight() { - return commonData.getHeight(); - } - - /** - * @param height - * @see com.raytheon.uf.common.dataplugin.npp.viirs.VIIRSCommonData#setHeight(int) - */ - public void setHeight(int height) { - commonData.setHeight(height); - } - - /** - * @return the commonData - */ - public VIIRSCommonData getCommonData() { - return commonData; - } - - /** - * @param commonData - * the commonData to set - */ - public void setCommonData(VIIRSCommonData commonData) { - this.commonData = commonData; - } - - /* - * (non-Javadoc) - * - * @see - * com.raytheon.uf.common.dataplugin.persist.IPersistable#getPersistenceTime - * () - */ - @Override - public Date getPersistenceTime() { - Calendar c = getInsertTime(); - if (c == null) - return null; - - return c.getTime(); - } - - /* - * (non-Javadoc) - * - * @see - * com.raytheon.uf.common.dataplugin.persist.IPersistable#setPersistenceTime - * (java.util.Date) - */ - @Override - public void setPersistenceTime(Date persistTime) { - Calendar c = Calendar.getInstance(TimeZone.getTimeZone("GMT")); - c.setTime(persistTime); - setInsertTime(c); - } - - /** - * Get the name of the dataset for the level - * - * @param level - * @return - */ - public static String getDataSet(int level) { - return "Data-" + level; - } - - /* - * (non-Javadoc) - * - * @see - * com.raytheon.uf.common.dataplugin.PluginDataObject#getDecoderGettable() - */ - @Override - public IDecoderGettable getDecoderGettable() { - return null; - } -} diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.npp.viirs/src/com/raytheon/uf/common/dataplugin/npp/viirs/VIIRSSpatialRecord.java b/edexOsgi/com.raytheon.uf.common.dataplugin.npp.viirs/src/com/raytheon/uf/common/dataplugin/npp/viirs/VIIRSSpatialRecord.java deleted file mode 100644 index c69eee31b2..0000000000 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.npp.viirs/src/com/raytheon/uf/common/dataplugin/npp/viirs/VIIRSSpatialRecord.java +++ /dev/null @@ -1,227 +0,0 @@ -/** - * 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.common.dataplugin.npp.viirs; - -import java.util.Calendar; -import java.util.Date; -import java.util.TimeZone; - -import javax.persistence.Embedded; -import javax.persistence.Entity; -import javax.persistence.Table; -import javax.persistence.UniqueConstraint; - -import com.raytheon.uf.common.dataplugin.IDecoderGettable; -import com.raytheon.uf.common.dataplugin.annotations.DataURI; -import com.raytheon.uf.common.dataplugin.persist.PersistablePluginDataObject; -import com.raytheon.uf.common.serialization.annotations.DynamicSerialize; -import com.raytheon.uf.common.serialization.annotations.DynamicSerializeElement; - -/** - * VIIRS geographic data record object - * - *
- * 
- * SOFTWARE HISTORY
- * 
- * Date         Ticket#    Engineer    Description
- * ------------ ---------- ----------- --------------------------
- * Dec 1, 2011            mschenke     Initial creation
- * 
- * 
- * - * @author mschenke - * @version 1.0 - */ -@Entity -@Table(name = "viirs_spatial", uniqueConstraints = { @UniqueConstraint(columnNames = { "dataURI" }) }) -@DynamicSerialize -public class VIIRSSpatialRecord extends PersistablePluginDataObject { - - private static final long serialVersionUID = -2532225158997059309L; - - public static final String VALID_HEIGHT_ID = "validHeight"; - - @DataURI(position = 1, embedded = true) - @Embedded - @DynamicSerializeElement - private VIIRSCommonData commonData = new VIIRSCommonData();; - - public VIIRSSpatialRecord() { - // We want pluginName to be "viirs" - setPluginName(VIIRSDataRecord.class.getAnnotation(Table.class).name()); - } - - /** - * @return - * @see com.raytheon.uf.common.dataplugin.npp.viirs.VIIRSCommonData#getRegion() - */ - public String getRegion() { - return commonData.getRegion(); - } - - /** - * @param region - * @see com.raytheon.uf.common.dataplugin.npp.viirs.VIIRSCommonData#setRegion(java.lang.String) - */ - public void setRegion(String region) { - commonData.setRegion(region); - } - - /** - * @return - * @see com.raytheon.uf.common.dataplugin.npp.viirs.VIIRSCommonData#getChannelType() - */ - public String getChannelType() { - return commonData.getChannelType(); - } - - /** - * @param channelType - * @see com.raytheon.uf.common.dataplugin.npp.viirs.VIIRSCommonData#setChannelType(java.lang.String) - */ - public void setChannelType(String channelType) { - commonData.setChannelType(channelType); - } - - /** - * @return - * @see com.raytheon.uf.common.dataplugin.npp.viirs.VIIRSCommonData#getLevels() - */ - public int getLevels() { - return commonData.getLevels(); - } - - /** - * @param levels - * @see com.raytheon.uf.common.dataplugin.npp.viirs.VIIRSCommonData#setLevels(int) - */ - public void setLevels(int levels) { - commonData.setLevels(levels); - } - - /** - * @return - * @see com.raytheon.uf.common.dataplugin.npp.viirs.VIIRSCommonData#getWidth() - */ - public int getWidth() { - return commonData.getWidth(); - } - - /** - * @param width - * @see com.raytheon.uf.common.dataplugin.npp.viirs.VIIRSCommonData#setWidth(int) - */ - public void setWidth(int width) { - commonData.setWidth(width); - } - - /** - * @return - * @see com.raytheon.uf.common.dataplugin.npp.viirs.VIIRSCommonData#getHeight() - */ - public int getHeight() { - return commonData.getHeight(); - } - - /** - * @param height - * @see com.raytheon.uf.common.dataplugin.npp.viirs.VIIRSCommonData#setHeight(int) - */ - public void setHeight(int height) { - commonData.setHeight(height); - } - - /** - * @return the commonData - */ - public VIIRSCommonData getCommonData() { - return commonData; - } - - /** - * @param commonData - * the commonData to set - */ - public void setCommonData(VIIRSCommonData commonData) { - this.commonData = commonData; - } - - /* - * (non-Javadoc) - * - * @see - * com.raytheon.uf.common.dataplugin.persist.IPersistable#getPersistenceTime - * () - */ - @Override - public Date getPersistenceTime() { - Calendar c = getInsertTime(); - if (c == null) - return null; - - return c.getTime(); - } - - /* - * (non-Javadoc) - * - * @see - * com.raytheon.uf.common.dataplugin.persist.IPersistable#setPersistenceTime - * (java.util.Date) - */ - @Override - public void setPersistenceTime(Date persistTime) { - Calendar c = Calendar.getInstance(TimeZone.getTimeZone("GMT")); - c.setTime(persistTime); - setInsertTime(c); - } - - /** - * Get the name of the longitude dataset for the level - * - * @param level - * @return - */ - public static String getLongitudeDataSet(int level) { - return "Longitudes-" + level; - } - - /** - * Get the name of the latitude dataset for the level - * - * @param level - * @return - */ - public static String getLatitudeDataSet(int level) { - return "Latitudes-" + level; - } - - /* - * (non-Javadoc) - * - * @see - * com.raytheon.uf.common.dataplugin.PluginDataObject#getDecoderGettable() - */ - @Override - public IDecoderGettable getDecoderGettable() { - return null; - } -} diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.warning/src/com/raytheon/uf/common/dataplugin/warning/config/AreaConfiguration.java b/edexOsgi/com.raytheon.uf.common.dataplugin.warning/src/com/raytheon/uf/common/dataplugin/warning/config/AreaConfiguration.java index 014f5a3d6a..2084c6b04f 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.warning/src/com/raytheon/uf/common/dataplugin/warning/config/AreaConfiguration.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.warning/src/com/raytheon/uf/common/dataplugin/warning/config/AreaConfiguration.java @@ -72,6 +72,9 @@ public class AreaConfiguration { @XmlElement private String feAreaField; + + @XmlElement + private String timeZoneField; @XmlElement private String fipsField; @@ -268,4 +271,12 @@ public class AreaConfiguration { this.areaSource = areaSource; } + public String getTimeZoneField() { + return timeZoneField; + } + + public void setTimeZoneField(String timeZoneField) { + this.timeZoneField = timeZoneField; + } + } diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.warning/src/com/raytheon/uf/common/dataplugin/warning/config/AreaSourceConfiguration.java b/edexOsgi/com.raytheon.uf.common.dataplugin.warning/src/com/raytheon/uf/common/dataplugin/warning/config/AreaSourceConfiguration.java index 83d1995be4..14e6c046b5 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.warning/src/com/raytheon/uf/common/dataplugin/warning/config/AreaSourceConfiguration.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.warning/src/com/raytheon/uf/common/dataplugin/warning/config/AreaSourceConfiguration.java @@ -59,6 +59,9 @@ public class AreaSourceConfiguration { @XmlElement private String areaNotationTranslationFile; + + @XmlElement + private String timeZoneField; @XmlElementWrapper(name = "sortBy") @XmlElement(name = "sort") @@ -95,6 +98,7 @@ public class AreaSourceConfiguration { setAreaField(areaConfig.getAreaField()); setAreaNotationField(areaConfig.getAreaNotationField()); setFeAreaField(areaConfig.getFeAreaField()); + setTimeZoneField(areaConfig.getTimeZoneField()); setAreaNotationTranslationFile(areaConfig .getAreaNotationTranslationFile()); setFipsField(areaConfig.getFipsField()); @@ -125,6 +129,7 @@ public class AreaSourceConfiguration { areaConfig.setSortBy(sortBy); areaConfig.setVariable(variable); areaConfig.setAreaSource(areaSource); + areaConfig.setTimeZoneField(timeZoneField); return areaConfig; } @@ -258,4 +263,12 @@ public class AreaSourceConfiguration { this.variable = variable; } + public String getTimeZoneField() { + return timeZoneField; + } + + public void setTimeZoneField(String timeZoneField) { + this.timeZoneField = timeZoneField; + } + } diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.warning/src/com/raytheon/uf/common/dataplugin/warning/config/DialogConfiguration.java b/edexOsgi/com.raytheon.uf.common.dataplugin.warning/src/com/raytheon/uf/common/dataplugin/warning/config/DialogConfiguration.java index 188607ec6c..5b42c2e530 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.warning/src/com/raytheon/uf/common/dataplugin/warning/config/DialogConfiguration.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.warning/src/com/raytheon/uf/common/dataplugin/warning/config/DialogConfiguration.java @@ -39,6 +39,9 @@ public class DialogConfiguration implements ISerializableObject { @XmlElement private long followupListRefeshDelay; + + @XmlElement + private GridSpacing gridSpacing; public static DialogConfiguration loadDialogConfig(String localSite) throws FileNotFoundException, IOException, JAXBException { @@ -109,4 +112,13 @@ public class DialogConfiguration implements ISerializableObject { public void setFollowupListRefeshDelay(long followupListRefeshDelay) { this.followupListRefeshDelay = followupListRefeshDelay; } + + public GridSpacing getGridSpacing() { + return gridSpacing; + } + + public void setGridSpacing(GridSpacing gridSpacing) { + this.gridSpacing = gridSpacing; + } + } diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.warning/src/com/raytheon/uf/common/dataplugin/warning/config/GridSpacing.java b/edexOsgi/com.raytheon.uf.common.dataplugin.warning/src/com/raytheon/uf/common/dataplugin/warning/config/GridSpacing.java new file mode 100644 index 0000000000..8a3e72310e --- /dev/null +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.warning/src/com/raytheon/uf/common/dataplugin/warning/config/GridSpacing.java @@ -0,0 +1,43 @@ +package com.raytheon.uf.common.dataplugin.warning.config; + +import javax.xml.bind.annotation.XmlAccessType; +import javax.xml.bind.annotation.XmlAccessorType; +import javax.xml.bind.annotation.XmlElement; + +@XmlAccessorType(XmlAccessType.NONE) +public class GridSpacing { + + @XmlElement + private Integer nx; + + @XmlElement + private Integer ny; + + @XmlElement + private boolean keepAspectRatio; + + public Integer getNx() { + return nx; + } + + public void setNx(Integer nx) { + this.nx = nx; + } + + public Integer getNy() { + return ny; + } + + public void setNy(Integer ny) { + this.ny = ny; + } + + public boolean isKeepAspectRatio() { + return keepAspectRatio; + } + + public void setKeepAspectRatio(boolean keepAspectRatio) { + this.keepAspectRatio = keepAspectRatio; + } + +} diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.warning/src/com/raytheon/uf/common/dataplugin/warning/gis/GeospatialFactory.java b/edexOsgi/com.raytheon.uf.common.dataplugin.warning/src/com/raytheon/uf/common/dataplugin/warning/gis/GeospatialFactory.java index a26724d931..8b1c1dff1c 100644 --- a/edexOsgi/com.raytheon.uf.common.dataplugin.warning/src/com/raytheon/uf/common/dataplugin/warning/gis/GeospatialFactory.java +++ b/edexOsgi/com.raytheon.uf.common.dataplugin.warning/src/com/raytheon/uf/common/dataplugin/warning/gis/GeospatialFactory.java @@ -96,7 +96,7 @@ public class GeospatialFactory { "Failed to load area geometry files from disk", e); } - generate = dataSet != null; + generate = dataSet == null; } if (generate) { @@ -247,18 +247,18 @@ public class GeospatialFactory { AreaSourceConfiguration[] ascs = template.getAreaSources(); for (AreaSourceConfiguration asc : ascs) { - List areaFields; - String tmp = asc.getFeAreaField(); - if (tmp == null) { - areaFields = new ArrayList(4); - } else { - areaFields = new ArrayList(5); - } + List areaFields = new ArrayList(); + String feAreaField = asc.getFeAreaField(); + String timeZoneField = asc.getTimeZoneField(); areaFields.add(WarningConstants.GID); areaFields.add(asc.getAreaField()); - if (tmp != null) { - areaFields.add(tmp); - } + if (feAreaField != null) { + areaFields.add(feAreaField); + } + + if (timeZoneField != null) { + areaFields.add(timeZoneField); + } areaFields.add(asc.getFipsField()); areaFields.add(asc.getAreaNotationField()); diff --git a/edexOsgi/com.raytheon.uf.common.geospatial/src/com/raytheon/uf/common/geospatial/MapUtil.java b/edexOsgi/com.raytheon.uf.common.geospatial/src/com/raytheon/uf/common/geospatial/MapUtil.java index d3212ae34c..985665a8a4 100644 --- a/edexOsgi/com.raytheon.uf.common.geospatial/src/com/raytheon/uf/common/geospatial/MapUtil.java +++ b/edexOsgi/com.raytheon.uf.common.geospatial/src/com/raytheon/uf/common/geospatial/MapUtil.java @@ -86,6 +86,16 @@ import com.vividsolutions.jts.geom.Polygon; * * @author chammack * + *
+ * 
+ *    SOFTWARE HISTORY
+ *   
+ *    Date         Ticket#     Engineer    Description
+ *    ------------ ----------  ----------- --------------------------
+ *    05/16/2012   14993       D. Friedman Add oversampling option to
+ *                                         reprojectGeometry.
+ * 
+ * 
*/ @SuppressWarnings("unchecked") public class MapUtil { @@ -330,6 +340,27 @@ public class MapUtil { public static GeneralGridGeometry reprojectGeometry( GeneralGridGeometry sourceGeometry, Envelope targetEnvelope, boolean addBorder) throws FactoryException, TransformException { + return reprojectGeometry(sourceGeometry, targetEnvelope, addBorder, 1); + } + + /** + * Builds a new grid geometry that can be used to reproject sourceGeometry + * into target envelope with about the same number of points (multiplied by + * an oversample factor.) + * + * @param sourceGeometry + * @param targetEnvelope + * @param addBorder + * expand envelope to include a 1 grid cell border after + * reprojection + * @param oversampleFactor oversample factor for new grid + * @return the reprojected grid geometry + * @throws FactoryException + * , TransformException + */ + public static GeneralGridGeometry reprojectGeometry( + GeneralGridGeometry sourceGeometry, Envelope targetEnvelope, + boolean addBorder, int oversampleFactor) throws FactoryException, TransformException { CoordinateReferenceSystem targetCRS = targetEnvelope .getCoordinateReferenceSystem(); ReferencedEnvelope targetREnv = null; @@ -355,8 +386,7 @@ public class MapUtil { ReferencedEnvelope newEnv = new ReferencedEnvelope(JTS.getEnvelope2D( newTargetREnv.intersection(newSourceEnv), LATLON_PROJECTION), LATLON_PROJECTION); - newEnv = newEnv.transform(targetCRS, false); - + newEnv = newEnv.transform(targetCRS, false, 500); // Calculate nx and ny, start with the number of original grid // points in the intersection and then adjust to the new aspect // ratio @@ -367,6 +397,8 @@ public class MapUtil { double count = intersectingEnv.getWidth() * intersectingEnv.getHeight(); int nx = (int) Math.sqrt(count / aspectRatio); int ny = (int) (nx * aspectRatio); + nx *= oversampleFactor; + ny *= oversampleFactor; if (addBorder) { newEnv.expandBy(newEnv.getWidth() / nx, newEnv.getHeight() / ny); diff --git a/edexOsgi/com.raytheon.uf.common.geospatial/src/com/raytheon/uf/common/geospatial/interpolation/AbstractInterpolation.java b/edexOsgi/com.raytheon.uf.common.geospatial/src/com/raytheon/uf/common/geospatial/interpolation/AbstractInterpolation.java index 0e179bb714..2332af70f3 100644 --- a/edexOsgi/com.raytheon.uf.common.geospatial/src/com/raytheon/uf/common/geospatial/interpolation/AbstractInterpolation.java +++ b/edexOsgi/com.raytheon.uf.common.geospatial/src/com/raytheon/uf/common/geospatial/interpolation/AbstractInterpolation.java @@ -8,13 +8,17 @@ import org.geotools.coverage.grid.GeneralGridGeometry; import org.geotools.coverage.grid.GridCoverage2D; import org.geotools.geometry.DirectPosition2D; import org.geotools.referencing.CRS; +import org.geotools.referencing.crs.DefaultGeographicCRS; import org.geotools.referencing.operation.DefaultMathTransformFactory; +import org.geotools.referencing.operation.projection.ProjectionException; import org.opengis.referencing.FactoryException; import org.opengis.referencing.crs.CoordinateReferenceSystem; import org.opengis.referencing.datum.PixelInCell; import org.opengis.referencing.operation.MathTransform; import org.opengis.referencing.operation.TransformException; +import com.raytheon.uf.common.geospatial.MapUtil; + /** * * Abstract class for mapping data from one grid geometry to another @@ -65,6 +69,10 @@ public abstract class AbstractInterpolation { protected float[] transformTable = null; + // The number of grid cells needed to wrap source x coordinates around the + // world, or -1 if the source grid does not wrap evenly. + protected int sourceWrapX = -1; + protected AbstractInterpolation(GeneralGridGeometry sourceGeometry, GeneralGridGeometry targetGeometry) { this.sourceGeometry = sourceGeometry; @@ -143,6 +151,59 @@ public abstract class AbstractInterpolation { DefaultMathTransformFactory mtf = new DefaultMathTransformFactory(); transform = mtf.createConcatenatedTransform(grid2crs, mtf.createConcatenatedTransform(crs2crs, crs2grid)); + checkForWrappingSource(); + + } + } + + // Attempt to detect the case where a geographic coordinate reference system + // wraps around the world so that values out of range on the X-axis can be + // retrieved from the other side of the grid. If this is the case the + // sourceWrapX value will be set to the number of grid cells that are needed + // to wrap all the way around the world. + private void checkForWrappingSource() { + try { + MathTransform grid2crs = sourceGeometry + .getGridToCRS(PixelInCell.CELL_CENTER); + MathTransform crs2LatLon = CRS.findMathTransform(sourceCRS, + DefaultGeographicCRS.WGS84); + DirectPosition2D corner1 = new DirectPosition2D(sourceNx, 0); + DirectPosition2D corner2 = new DirectPosition2D(sourceNx, + sourceNy - 1); + grid2crs.transform(corner1, corner1); + grid2crs.transform(corner2, corner2); + crs2LatLon.transform(corner1, corner1); + crs2LatLon.transform(corner2, corner2); + corner1.x = MapUtil.correctLon(corner1.x); + corner2.x = MapUtil.correctLon(corner2.x); + crs2LatLon.inverse().transform(corner1, corner1); + crs2LatLon.inverse().transform(corner2, corner2); + grid2crs.inverse().transform(corner1, corner1); + grid2crs.inverse().transform(corner2, corner2); + int sourceWrapX = (int) (sourceNx - corner1.x); + // In order to wrap then the transformed point x value should be on + // the other side of the grid and the y value should not have + // changed significantly. Additionally the wrapped x value should + // fall exactly on a grid cell. + if (corner1.x > sourceNx - 1) { + return; + } else if (Math.abs(corner1.y - 0) > 0.0001) { + return; + } else if (Math.abs(corner2.y - sourceNy + 1) > 0.0001) { + return; + } else if (Math.abs(corner1.x + sourceWrapX - sourceNx) > 0.0001) { + return; + } else if (Math.abs(corner2.x + sourceWrapX - sourceNx) > 0.0001) { + return; + } else { + this.sourceWrapX = sourceWrapX; + } + + } catch (Exception e) { + // if anything goes wrong in this process just assume we don't + // wrap the x axis, thats not a big deal and it is normal for + // non geographic coordinate systems. + ; } } @@ -163,7 +224,9 @@ public abstract class AbstractInterpolation { for (int i = 0; i < newData.length; i++) { float x = transformTable[tIndex++]; float y = transformTable[tIndex++]; - newData[i] = getInterpolatedValue(x, y); + if (!Float.isNaN(x) && !Float.isNaN(y)) { + newData[i] = getInterpolatedValue(x, y); + } } } return newData; @@ -180,8 +243,17 @@ public abstract class AbstractInterpolation { public float getReprojectedGridCell(int x, int y) throws FactoryException, TransformException { Validate.notNull(data); + Point2D.Double dp = null; + try { + dp = getReprojectDataPoint(x, y); + } catch (ProjectionException e) { + // ProjectionException is thrown when a point is outside + // the valid range of the source data, so we will treat + // it like other out of range values and set it to fill + // value. + return fillValue; + } - Point2D.Double dp = getReprojectDataPoint(x, y); return getInterpolatedValue(dp.x, dp.y); } @@ -208,16 +280,24 @@ public abstract class AbstractInterpolation { // outside y range return Float.NaN; } else if (x < 0 || x > sourceNx - 1) { - // outside xRange - return Float.NaN; - } else { - float val = data[(int) (y * sourceNx + x)]; - if (val < minValid || val > maxValid) { - // skip outside valid range - val = Float.NaN; + // outside x range + if (sourceWrapX > 0) { + // attempt to wrap if this is a wrapping grid. + x = (x + sourceWrapX) % sourceWrapX; + if (x < 0 || x > sourceNx - 1) { + return Float.NaN; + } + } else { + + return Float.NaN; } - return val; } + float val = data[(int) (y * sourceNx + x)]; + if (val < minValid || val > maxValid) { + // skip outside valid range + val = Float.NaN; + } + return val; } protected Point2D.Double getReprojectDataPoint(int x, int y) @@ -228,12 +308,13 @@ public abstract class AbstractInterpolation { int index = (y * targetNx + x) * 2; float xVal = transformTable[index]; float yVal = transformTable[index + 1]; - return new Point2D.Double(xVal, yVal); - } else { - DirectPosition2D dp = new DirectPosition2D(x, y); - transform.transform(dp, dp); - return dp; + if (!Float.isNaN(xVal) && !Float.isNaN(yVal)) { + return new Point2D.Double(xVal, yVal); + } } + DirectPosition2D dp = new DirectPosition2D(x, y); + transform.transform(dp, dp); + return dp; } /** @@ -285,8 +366,13 @@ public abstract class AbstractInterpolation { transformTable[index++] = j; } } - transform.transform(transformTable, 0, transformTable, 0, targetNy - * targetNx); + try { + transform.transform(transformTable, 0, transformTable, 0, targetNy + * targetNx); + } catch (ProjectionException e) { + ;// Ignore, the points in the transformTable that are invalid are + // set to NaN, no other action is necessary. + } this.transformTable = transformTable; return transformTable.length * 4; } diff --git a/edexOsgi/com.raytheon.uf.common.geospatial/src/com/raytheon/uf/common/geospatial/interpolation/BicubicInterpolation.java b/edexOsgi/com.raytheon.uf.common.geospatial/src/com/raytheon/uf/common/geospatial/interpolation/BicubicInterpolation.java new file mode 100644 index 0000000000..10303a6e4d --- /dev/null +++ b/edexOsgi/com.raytheon.uf.common.geospatial/src/com/raytheon/uf/common/geospatial/interpolation/BicubicInterpolation.java @@ -0,0 +1,100 @@ +package com.raytheon.uf.common.geospatial.interpolation; + +import org.geotools.coverage.grid.GeneralGridGeometry; + +/** + * + * bicubic convolusion. + * + *
+ * http://en.wikipedia.org/wiki/Bicubic_interpolation#Bicubic_convolution_algorithm
+ * http://docs.oracle.com/cd/E17802_01/products/products/java-media/jai/forDevelopers/jai-apidocs/javax/media/jai/InterpolationBicubic.html
+ * 
+ * + *
+ * 
+ * SOFTWARE HISTORY
+ * 
+ * Date         Ticket#    Engineer    Description
+ * ------------ ---------- ----------- --------------------------
+ * Mar 29, 2012            bsteffen     Initial creation
+ * 
+ * 
+ * + * @author bsteffen + * @version 1.0 + */ +public class BicubicInterpolation extends AbstractInterpolation { + + private double a = -0.5; + + public BicubicInterpolation(GeneralGridGeometry sourceGeometry, + GeneralGridGeometry targetGeometry, float minValid, float maxValid, + float fillValue) { + super(sourceGeometry, targetGeometry, minValid, maxValid, fillValue); + } + + public BicubicInterpolation(GeneralGridGeometry sourceGeometry, + GeneralGridGeometry targetGeometry) { + super(sourceGeometry, targetGeometry); + } + + public BicubicInterpolation(float[] data, + GeneralGridGeometry sourceGeometry, + GeneralGridGeometry targetGeometry, float minValid, float maxValid, + float fillValue) { + super(data, sourceGeometry, targetGeometry, minValid, maxValid, + fillValue); + } + + public BicubicInterpolation(float[] data, + GeneralGridGeometry sourceGeometry, + GeneralGridGeometry targetGeometry) { + super(data, sourceGeometry, targetGeometry); + } + + /** + * Should be -0.5, -0.75, or -1.0, or maybe something inbetween? + * + * @param a + */ + public void setA(double a) { + this.a = a; + } + + @Override + protected float getInterpolatedValue(double x, double y) { + double value = 0.0f; + double weight = 0.0f; + + double xd = ((int) x) - x; + double yd = ((int) y) - y; + + for (int xi = -1; xi <= 2; xi += 1) { + for (int yi = -1; yi <= 2; yi += 1) { + double xWeight = weight(xd + xi); + double yWeight = weight(yd + yi); + double w = xWeight * yWeight; + double val = getRawDataValue((int) x + xi, (int) y + yi); + value += w * val; + weight += w; + } + } + return (float) (value / weight); + } + + private double weight(double dist) { + if (dist < 0) { + dist = -dist; + } + if (dist <= 1) { + return (a + 2) * dist * dist * dist - (a + 3) * dist * dist + 1.0; + } else if (dist > 1 && dist <= 2) { + return a * dist * dist * dist - 5 * a * dist * dist + 8 * a * dist + - 4 * a; + } + return 0.0f; + + } + +} diff --git a/edexOsgi/com.raytheon.uf.common.message/src/com/raytheon/uf/common/message/WsId.java b/edexOsgi/com.raytheon.uf.common.message/src/com/raytheon/uf/common/message/WsId.java index e6f3f23ff3..94087dd4bb 100644 --- a/edexOsgi/com.raytheon.uf.common.message/src/com/raytheon/uf/common/message/WsId.java +++ b/edexOsgi/com.raytheon.uf.common.message/src/com/raytheon/uf/common/message/WsId.java @@ -32,16 +32,13 @@ import com.raytheon.uf.common.serialization.annotations.DynamicSerializeTypeAdap /** * The WsId contains the work station identification for the user. * * - * Only the IP network address and lock key are used to identify locks (if the - * lockKey is non-zero), otherwise the other identifiers must be unique. The - * function equalForLockComparison() is used to enforce this rule. - * *
  * 
  * SOFTWARE HISTORY
  * Date         Ticket#    Engineer    Description
  * ------------ ---------- ----------- --------------------------
  * Jun 10, 2009            randerso     Initial creation
+ * Apr 25, 2012       545  randerso     Repurposed the lockKey field as threadId
  * 
  * 
* @@ -62,13 +59,17 @@ public class WsId implements Serializable, ISerializableObject { private int pid; - private final long lockKey; + // replaced A1 lockKey with threadId for A2. + // lockKey was not used in A2. This allows A2 to retain + // compatibility with A1 for ISC purposes by not chaning + // the format of the WsId + private final long threadId; /** * Constructs an default wsid. Only for use by serialization */ public WsId() { - this(null, null, null, 0); + this(null, null, null); } /** @@ -104,12 +105,12 @@ public class WsId implements Serializable, ISerializableObject { throw new IllegalArgumentException( "pid argument not of proper format for WsId"); } - this.lockKey = Long.parseLong(token[4]); + this.threadId = Long.parseLong(token[4]); } /** - * Constructor for WsId taking the networkId, user name, progName, pid. + * Constructor for WsId taking the networkId, user name, progName. * * @param networkId * If null local IP address will be used if available, otherwise @@ -120,34 +121,9 @@ public class WsId implements Serializable, ISerializableObject { * @param progName * if null "unknown" will be used * - * @param pid - * if 0 current process id will be used */ public WsId(InetAddress networkId, final String userName, - final String progName, int pid) { - this(networkId, userName, progName, pid, 0); - } - - /** - * Constructor for WsId taking the networkId, user name, progName, pid, and - * lockKey. - * - * @param networkId - * If null local IP address will be used if available, otherwise - * will use 0.0.0.0 - * @param userName - * if null current login name will be used - * - * @param progName - * if null "unknown" will be used - * - * @param pid - * if 0 current process id will be used - * - * @param lockKey - */ - public WsId(InetAddress networkId, final String userName, - final String progName, int pid, long lockKey) { + final String progName) { if (userName != null) { this.userName = userName; @@ -161,14 +137,10 @@ public class WsId implements Serializable, ISerializableObject { this.progName = "unknown"; } - if (pid != 0) { - this.pid = pid; - } else { - this.pid = Integer.parseInt(ManagementFactory.getRuntimeMXBean() - .getName().split("@")[0]); - } + this.pid = Integer.parseInt(ManagementFactory.getRuntimeMXBean() + .getName().split("@")[0]); - this.lockKey = lockKey; + this.threadId = Thread.currentThread().getId(); if (networkId != null) { this.networkId = networkId; @@ -188,23 +160,6 @@ public class WsId implements Serializable, ISerializableObject { } - /** - * Returns true if two WsIDs are equal for locking comparison. - * - * If lockKey is non-zero and equal to the other wsId, return true. - * Otherwise, returns the results from equals(). - * - * @param wsId - * @return see above - */ - public boolean equalForLockComparison(WsId wsId) { - if (lockKey != 0 && lockKey == wsId.lockKey) { - return true; - } else { - return equals(wsId); - } - } - /* * (non-Javadoc) * @@ -222,7 +177,7 @@ public class WsId implements Serializable, ISerializableObject { o.append(addr).append(':').append(userName).append(':') .append(progName).append(':').append(pid).append(':') - .append(lockKey); + .append(threadId); return o.toString(); } @@ -236,7 +191,7 @@ public class WsId implements Serializable, ISerializableObject { StringBuilder o = new StringBuilder(); o.append(userName).append('@').append(networkId.getHostName()) .append(':').append(progName).append(':').append(pid) - .append(':').append(lockKey); + .append(':').append(threadId); return o.toString(); } @@ -270,10 +225,10 @@ public class WsId implements Serializable, ISerializableObject { } /** - * @return the lockKey + * @return the threadId */ - public long getLockKey() { - return lockKey; + public long getThreadId() { + return threadId; } /* @@ -285,7 +240,7 @@ public class WsId implements Serializable, ISerializableObject { public int hashCode() { final int prime = 31; int result = 1; - result = prime * result + (int) (lockKey ^ (lockKey >>> 32)); + result = prime * result + (int) (threadId ^ (threadId >>> 32)); result = prime * result + ((networkId == null) ? 0 : networkId.hashCode()); result = prime * result + pid; @@ -313,7 +268,7 @@ public class WsId implements Serializable, ISerializableObject { return false; } WsId other = (WsId) obj; - if (lockKey != other.lockKey) { + if (threadId != other.threadId) { return false; } if (networkId == null) { diff --git a/edexOsgi/com.raytheon.uf.common.message/src/com/raytheon/uf/common/message/adapter/WsIdAdapter.java b/edexOsgi/com.raytheon.uf.common.message/src/com/raytheon/uf/common/message/adapter/WsIdAdapter.java index 51885525ff..bde900a621 100644 --- a/edexOsgi/com.raytheon.uf.common.message/src/com/raytheon/uf/common/message/adapter/WsIdAdapter.java +++ b/edexOsgi/com.raytheon.uf.common.message/src/com/raytheon/uf/common/message/adapter/WsIdAdapter.java @@ -36,6 +36,7 @@ import com.raytheon.uf.common.serialization.SerializationException; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * Jun 10, 2009 randerso Initial creation + * Apr 25, 2012 545 randerso Repurposed the lockKey field as threadId * * * diff --git a/edexOsgi/com.raytheon.uf.common.message/tests/com/raytheon/uf/common/message/TestWsId.java b/edexOsgi/com.raytheon.uf.common.message/tests/com/raytheon/uf/common/message/TestWsId.java index 1173c1c031..d882c60bc6 100644 --- a/edexOsgi/com.raytheon.uf.common.message/tests/com/raytheon/uf/common/message/TestWsId.java +++ b/edexOsgi/com.raytheon.uf.common.message/tests/com/raytheon/uf/common/message/TestWsId.java @@ -19,15 +19,18 @@ **/ package com.raytheon.uf.common.message; +import java.lang.management.ManagementFactory; import java.net.InetAddress; import java.net.UnknownHostException; -import java.util.Random; import org.junit.Assert; import org.junit.Test; public class TestWsId { - private Random rnd = new Random(); + private int pid = Integer.parseInt(ManagementFactory.getRuntimeMXBean() + .getName().split("@")[0]); + + private long threadId = Thread.currentThread().getId(); @Test public void testWsIdString() { @@ -39,10 +42,8 @@ public class TestWsId { } String user = System.getProperty("user.name"); String program = "TestWsId"; - int pid = rnd.nextInt(); - long key = System.currentTimeMillis(); - WsId wsId1 = new WsId(addr, user, program, pid, key); + WsId wsId1 = new WsId(addr, user, program); WsId wsId2 = new WsId(wsId1.toString()); Assert.assertEquals(wsId1, wsId2); @@ -58,16 +59,15 @@ public class TestWsId { } String user = System.getProperty("user.name"); String program = "TestWsId"; - int pid = rnd.nextInt(); - WsId wsId = new WsId(addr, user, program, pid); - WsId wsId2 = new WsId(null, user, program, pid); + WsId wsId = new WsId(addr, user, program); + WsId wsId2 = new WsId(null, user, program); System.out.println(wsId2.getNetworkId()); Assert.assertEquals(addr, wsId.getNetworkId()); Assert.assertEquals(user, wsId.getUserName()); Assert.assertEquals(program, wsId.getProgName()); Assert.assertEquals(pid, wsId.getPid()); - Assert.assertEquals(0, wsId.getLockKey()); + Assert.assertEquals(threadId, wsId.getThreadId()); } @Test @@ -80,38 +80,14 @@ public class TestWsId { } String user = System.getProperty("user.name"); String program = "TestWsId"; - int pid = rnd.nextInt(); - long key = System.currentTimeMillis(); - WsId wsId = new WsId(addr, user, program, pid, key); + WsId wsId = new WsId(addr, user, program); Assert.assertEquals(addr, wsId.getNetworkId()); Assert.assertEquals(user, wsId.getUserName()); Assert.assertEquals(program, wsId.getProgName()); Assert.assertEquals(pid, wsId.getPid()); - Assert.assertEquals(key, wsId.getLockKey()); - } - - @Test - public void testEqualForLockComparison() { - InetAddress addr1 = null; - InetAddress addr2 = null; - try { - addr1 = InetAddress.getLocalHost(); - addr2 = InetAddress.getByAddress(new byte[] { 123, 45, 67, 89 }); - } catch (UnknownHostException e) { - e.printStackTrace(); - } - String user = System.getProperty("user.name"); - String program = "TestWsId"; - int pid = rnd.nextInt(); - long key = System.currentTimeMillis(); - - WsId wsId1 = new WsId(addr1, user, program, pid, key); - WsId wsId2 = new WsId(addr2, "bogus", "bogus", rnd.nextInt(), key); - - Assert.assertFalse(wsId1.equals(wsId2)); - Assert.assertTrue(wsId1.equalForLockComparison(wsId2)); + Assert.assertEquals(threadId, wsId.getThreadId()); } @Test @@ -124,12 +100,12 @@ public class TestWsId { } String user = "user"; String program = "TestWsId"; - int pid = 987654321; - long key = 1234567890l; - WsId wsId1 = new WsId(addr, user, program, pid, key); + WsId wsId1 = new WsId(addr, user, program); String s = wsId1.toString(); - Assert.assertEquals("1497574779:user:TestWsId:987654321:1234567890", s); + String expected = "1497574779:user:TestWsId:" + this.pid + ":" + + this.threadId; + Assert.assertEquals(expected, s); } @Test @@ -142,47 +118,53 @@ public class TestWsId { } String user = "user"; String program = "TestWsId"; - int pid = 987654321; - long key = 1234567890l; - WsId wsId1 = new WsId(addr, user, program, pid, key); + WsId wsId1 = new WsId(addr, user, program); String s = wsId1.toPrettyString(); - Assert.assertEquals("user@123.45.67.89:TestWsId:987654321:1234567890", - s); + String expected = "user@123.45.67.89:TestWsId:" + this.pid + ":" + + this.threadId; + Assert.assertEquals(expected, s); } @Test public void testEqualsObject() { - InetAddress addr1 = null; - InetAddress addr2 = null; try { - addr1 = InetAddress.getLocalHost(); - addr2 = InetAddress.getByAddress(new byte[] { 123, 45, 67, 89 }); + final InetAddress addr1 = InetAddress.getLocalHost(); + final InetAddress addr2 = InetAddress.getByAddress(new byte[] { + 123, 45, 67, 89 }); + final String user = System.getProperty("user.name"); + final String program = "TestWsId"; + WsId wsId1 = new WsId(addr1, user, program); + WsId wsId2 = new WsId(addr1, user, program); + WsId wsId3 = new WsId(addr2, user, program); + WsId wsId4 = new WsId(addr1, "bogus", program); + WsId wsId5 = new WsId(addr1, user, "bogus"); + WsId wsId6 = new WsId(addr1, "bogus", program); + + Assert.assertTrue(wsId1.equals(wsId1)); + Assert.assertTrue(wsId1.equals(wsId2)); + Assert.assertTrue(wsId2.equals(wsId1)); + Assert.assertFalse(wsId1.equals(wsId3)); + Assert.assertFalse(wsId1.equals(wsId4)); + Assert.assertFalse(wsId1.equals(wsId5)); + Assert.assertFalse(wsId1.equals(wsId6)); + + final WsId[] wsId7 = new WsId[1]; + Thread thread = new Thread(new Runnable() { + @Override + public void run() { + wsId7[0] = new WsId(addr1, user, program); + } + }); + + thread.start(); + thread.join(); + Assert.assertFalse(wsId1.equals(wsId7[0])); + } catch (UnknownHostException e) { e.printStackTrace(); + } catch (InterruptedException e) { + e.printStackTrace(); } - String user = System.getProperty("user.name"); - String program = "TestWsId"; - int pid = rnd.nextInt(); - long key = System.currentTimeMillis(); - - WsId wsId1 = new WsId(addr1, user, program, pid, key); - WsId wsId2 = new WsId(addr1, user, program, pid, key); - WsId wsId3 = new WsId(addr2, user, program, pid, key); - WsId wsId4 = new WsId(addr1, "bogus", program, pid, key); - WsId wsId5 = new WsId(addr1, user, "bogus", pid, key); - WsId wsId6 = new WsId(addr1, user, program, rnd.nextInt(), key); - WsId wsId7 = new WsId(addr1, "bogus", program, pid, - System.currentTimeMillis()); - - Assert.assertTrue(wsId1.equals(wsId1)); - Assert.assertTrue(wsId1.equals(wsId2)); - Assert.assertTrue(wsId2.equals(wsId1)); - Assert.assertFalse(wsId1.equals(wsId3)); - Assert.assertFalse(wsId1.equals(wsId4)); - Assert.assertFalse(wsId1.equals(wsId5)); - Assert.assertFalse(wsId1.equals(wsId6)); - Assert.assertFalse(wsId1.equals(wsId7)); } - } diff --git a/edexOsgi/com.raytheon.uf.common.message/tests/com/raytheon/uf/common/message/TestWsIdAdapter.java b/edexOsgi/com.raytheon.uf.common.message/tests/com/raytheon/uf/common/message/TestWsIdAdapter.java index 0b3e2c381a..cf3f08d26d 100644 --- a/edexOsgi/com.raytheon.uf.common.message/tests/com/raytheon/uf/common/message/TestWsIdAdapter.java +++ b/edexOsgi/com.raytheon.uf.common.message/tests/com/raytheon/uf/common/message/TestWsIdAdapter.java @@ -66,11 +66,8 @@ public class TestWsIdAdapter { } String user = System.getProperty("user.name"); String program = "TestWsId"; - int pid = rnd.nextInt(); - ; - long key = System.currentTimeMillis(); - WsId wsId = new WsId(addr, user, program, pid, key); + WsId wsId = new WsId(addr, user, program); Test inTest = new Test(); inTest.setWsId(wsId); diff --git a/edexOsgi/com.raytheon.uf.common.monitor/src/com/raytheon/uf/common/monitor/scan/ScanUtils.java b/edexOsgi/com.raytheon.uf.common.monitor/src/com/raytheon/uf/common/monitor/scan/ScanUtils.java index 25862c205e..1ad2be83d3 100644 --- a/edexOsgi/com.raytheon.uf.common.monitor/src/com/raytheon/uf/common/monitor/scan/ScanUtils.java +++ b/edexOsgi/com.raytheon.uf.common.monitor/src/com/raytheon/uf/common/monitor/scan/ScanUtils.java @@ -23,6 +23,7 @@ package com.raytheon.uf.common.monitor.scan; import java.awt.geom.Point2D; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.Date; import java.util.HashMap; import java.util.List; @@ -294,9 +295,13 @@ public class ScanUtils { public static String SEVERE_THUNDERSTORM_PHENSIG = "SV.W"; - private static String standardResolutionLevel = null; + private static Map tableStdResLevels = new HashMap(); + +// private static String standardResolutionLevel = null; - private static String highResolutionLevel = null; + private static Map tableHighResLevels = new HashMap(); + +// private static String highResolutionLevel = null; private static String prevTable = ""; @@ -1608,9 +1613,12 @@ public class ScanUtils { // hail cap check if (rValue > hailCap) { - rValue = hailCap; + return (float)(MM_TO_INCH * hailCap); } + } else { + return (float) rValue; } + return (float) (MM_TO_INCH * rValue); } @@ -1751,6 +1759,7 @@ public class ScanUtils { sq = SpatialQueryFactory.create(); Object[] results = sq.dbRequest(sql, MAPS_DB); levels = new double[results.length]; + Arrays.fill(levels, 9999.0); int i = 0; for (Object obj : results) { if (obj instanceof Object[]) { @@ -1773,11 +1782,11 @@ public class ScanUtils { return; } - highResolutionLevel = levelList.get(levelList.size() - 1); + tableHighResLevels.put(tablename, levelList.get(levelList.size() - 1)); for (int i = 0; i < levels.length; i++) { if (levels[i] <= 0.016) { - standardResolutionLevel = levelList.get(i); + tableStdResLevels.put(tablename, levelList.get(i)); break; } } @@ -1835,9 +1844,12 @@ public class ScanUtils { * @return the standardResolutionLevel column name */ public static String getStandardResolutionLevel(String tablename) { - setResolutionLevels(tablename); - - return standardResolutionLevel; + String resLevel = tableStdResLevels.get(tablename); + if(resLevel == null) { + setResolutionLevels(tablename); + resLevel = tableStdResLevels.get(tablename); + } + return resLevel; } /** @@ -1848,9 +1860,12 @@ public class ScanUtils { * @return the highResolutionLevel column name */ public static String getHighResolutionLevel(String tablename) { - setResolutionLevels(tablename); - - return highResolutionLevel; + String resLevel = tableHighResLevels.get(tablename); + if(resLevel == null) { + setResolutionLevels(tablename); + resLevel = tableHighResLevels.get(tablename); + } + return resLevel; } /** diff --git a/edexOsgi/com.raytheon.uf.common.ohd/utility/common_static/base/hydro/Apps_defaults b/edexOsgi/com.raytheon.uf.common.ohd/utility/common_static/base/hydro/Apps_defaults index df87bf3d4d..67f7900501 100644 --- a/edexOsgi/com.raytheon.uf.common.ohd/utility/common_static/base/hydro/Apps_defaults +++ b/edexOsgi/com.raytheon.uf.common.ohd/utility/common_static/base/hydro/Apps_defaults @@ -165,6 +165,14 @@ hydro_publicbin : $(apps_dir)/public/bin sqlcmd_bin_dir : /usr/local/sqlcmd/bin # location of sqlcmd executable on both HP and # Linux beginning in OB3 +################################################################################# +# Default Display Maps - comma separated list of maps with no spaces +# Map names can be found in the localization perspective under +# CAVE->Bundles->Maps. Use the filename without the extension. +# statesCounties.xml -> statesCounties +display_maps : statesCounties +################################################################################# + # database selection tokens server_name : ONLINE # Informix database server name db_name : hd_ob92lwx # IHFS database name diff --git a/edexOsgi/com.raytheon.uf.edex.database/src/com/raytheon/uf/edex/database/DataAccessLayerException.java b/edexOsgi/com.raytheon.uf.edex.database/src/com/raytheon/uf/edex/database/DataAccessLayerException.java index 44ae758b57..8c3e762ab4 100644 --- a/edexOsgi/com.raytheon.uf.edex.database/src/com/raytheon/uf/edex/database/DataAccessLayerException.java +++ b/edexOsgi/com.raytheon.uf.edex.database/src/com/raytheon/uf/edex/database/DataAccessLayerException.java @@ -59,7 +59,7 @@ public class DataAccessLayerException extends EdexException { * @param aCause * @param anException */ - public DataAccessLayerException(String aCause, Exception anException) { + public DataAccessLayerException(String aCause, Throwable anException) { super(aCause, anException); } diff --git a/edexOsgi/com.raytheon.uf.edex.database/src/com/raytheon/uf/edex/database/cluster/ClusterLockUtils.java b/edexOsgi/com.raytheon.uf.edex.database/src/com/raytheon/uf/edex/database/cluster/ClusterLockUtils.java index c178952d6e..94fd35a7e5 100644 --- a/edexOsgi/com.raytheon.uf.edex.database/src/com/raytheon/uf/edex/database/cluster/ClusterLockUtils.java +++ b/edexOsgi/com.raytheon.uf.edex.database/src/com/raytheon/uf/edex/database/cluster/ClusterLockUtils.java @@ -255,6 +255,65 @@ public class ClusterLockUtils { return rval; } + /** + * Updates the extra info field for a cluster task + * + * @param taskName + * The name of the task + * @param details + * The details associated with the task + * @param extraInfo + * The new extra info to set + * @return True if the update was successful, else false if the update + * failed + */ + public static boolean updateExtraInfo(String taskName, String details, + String extraInfo) { + CoreDao cd = new CoreDao(DaoConfig.DEFAULT); + Session s = null; + Transaction tx = null; + ClusterTask ct = null; + boolean rval = true; + + try { + s = cd.getHibernateTemplate().getSessionFactory().openSession(); + tx = s.beginTransaction(); + ClusterTaskPK pk = new ClusterTaskPK(); + pk.setName(taskName); + pk.setDetails(details); + + ct = getLock(s, pk, true); + ct.setExtraInfo(extraInfo); + s.update(ct); + tx.commit(); + } catch (Throwable t) { + handler.handle(Priority.ERROR, + "Error processing update lock time for cluster task [" + + taskName + "/" + details + "]", t); + rval = false; + + if (tx != null) { + try { + tx.rollback(); + } catch (HibernateException e) { + handler.handle(Priority.ERROR, + "Error rolling back cluster task lock transaction", + e); + } + } + } finally { + if (s != null) { + try { + s.close(); + } catch (HibernateException e) { + handler.handle(Priority.ERROR, + "Error closing cluster task lock session", e); + } + } + } + return rval; + } + /** * * @param taskName diff --git a/edexOsgi/com.raytheon.uf.edex.database/src/com/raytheon/uf/edex/database/cluster/handler/CurrentTimeClusterLockHandler.java b/edexOsgi/com.raytheon.uf.edex.database/src/com/raytheon/uf/edex/database/cluster/handler/CurrentTimeClusterLockHandler.java index 8632d6455e..d3c2baa1ea 100644 --- a/edexOsgi/com.raytheon.uf.edex.database/src/com/raytheon/uf/edex/database/cluster/handler/CurrentTimeClusterLockHandler.java +++ b/edexOsgi/com.raytheon.uf.edex.database/src/com/raytheon/uf/edex/database/cluster/handler/CurrentTimeClusterLockHandler.java @@ -100,35 +100,33 @@ public class CurrentTimeClusterLockHandler implements IClusterLockHandler { public LockState handleLock(ClusterTask ct) { LockState ls = null; checkTime = System.currentTimeMillis(); - if (checkTime > ct.getLastExecution()) { - boolean override = checkTime > ct.getLastExecution() - + timeOutOverride; - if (!ct.isRunning() || override) { - if (override && ct.isRunning()) { - if (handler.isPriorityEnabled(Priority.INFO)) { - handler.handle( - Priority.INFO, - "Overriding lock for cluster task [" - + ct.getId().getName() - + "/" - + ct.getId().getDetails() - + "] time out [" - + timeOutOverride - + "] exceeded by " - + (checkTime - (ct.getLastExecution() + timeOutOverride)) - + " ms."); - } + if (ct.isRunning()) { + ls = LockState.ALREADY_RUNNING; + // Override + if (checkTime > ct.getLastExecution() + timeOutOverride) { + if (handler.isPriorityEnabled(Priority.INFO)) { + handler.handle( + Priority.INFO, + "Overriding lock for cluster task [" + + ct.getId().getName() + + "/" + + ct.getId().getDetails() + + "] time out [" + + timeOutOverride + + "] exceeded by " + + (checkTime - (ct.getLastExecution() + timeOutOverride)) + + " ms."); } ls = LockState.SUCCESSFUL; - } else { - // it's newer but currently locked - ls = LockState.ALREADY_RUNNING; } } else { - ls = LockState.OLD; + if (checkTime > ct.getLastExecution()) { + ls = LockState.SUCCESSFUL; + } else { + ls = LockState.OLD; + } } - return ls; } diff --git a/edexOsgi/com.raytheon.uf.edex.database/src/com/raytheon/uf/edex/database/purge/PurgeLogger.java b/edexOsgi/com.raytheon.uf.edex.database/src/com/raytheon/uf/edex/database/purge/PurgeLogger.java index 4a4d58c427..53d3040976 100644 --- a/edexOsgi/com.raytheon.uf.edex.database/src/com/raytheon/uf/edex/database/purge/PurgeLogger.java +++ b/edexOsgi/com.raytheon.uf.edex.database/src/com/raytheon/uf/edex/database/purge/PurgeLogger.java @@ -88,10 +88,36 @@ public class PurgeLogger { * @param e * The exception to log */ - public static void logError(String message, String plugin, Exception e) { + public static void logError(String message, String plugin, Throwable e) { logMsg(Priority.ERROR, message, plugin, e); } + /** + * Logs a fatal message for the given plugin + * + * @param message + * The fatal message to log + * @param plugin + * The plugin this message applies to + */ + public static void logFatal(String message, String plugin) { + logMsg(Priority.FATAL, message, plugin, null); + } + + /** + * Logs a fatal message with an exception for the given plugin + * + * @param message + * The fatal message to log + * @param plugin + * The plugin this message applies to + * @param e + * The exception to log + */ + public static void logFatal(String message, String plugin, Throwable e) { + logMsg(Priority.FATAL, message, plugin, e); + } + /** * Logs a debug message for the given plugin * @@ -128,7 +154,7 @@ public class PurgeLogger { * The exception, if any, to log */ private static void logMsg(Priority priority, String message, - String plugin, Exception e) { + String plugin, Throwable e) { if (plugin == null) { plugin = StatusConstants.CATEGORY_PURGE; } diff --git a/edexOsgi/com.raytheon.uf.edex.decodertools/src/com/raytheon/uf/edex/decodertools/bufr/BUFRSection1.java b/edexOsgi/com.raytheon.uf.edex.decodertools/src/com/raytheon/uf/edex/decodertools/bufr/BUFRSection1.java index 8004597d51..a32b947ace 100644 --- a/edexOsgi/com.raytheon.uf.edex.decodertools/src/com/raytheon/uf/edex/decodertools/bufr/BUFRSection1.java +++ b/edexOsgi/com.raytheon.uf.edex.decodertools/src/com/raytheon/uf/edex/decodertools/bufr/BUFRSection1.java @@ -128,11 +128,8 @@ public abstract class BUFRSection1 extends BUFRSection { * @return */ public Calendar getSectionDate() { - Calendar cal = TimeTools.getSystemCalendar(); + Calendar cal = TimeTools.getBaseCalendar(year, month, day); - cal.set(Calendar.YEAR, year); - cal.set(Calendar.MONTH, month - 1); - cal.set(Calendar.DAY_OF_MONTH, day); cal.set(Calendar.HOUR_OF_DAY, hour); cal.set(Calendar.MINUTE, minute); diff --git a/edexOsgi/com.raytheon.uf.edex.decodertools/src/com/raytheon/uf/edex/decodertools/time/TimeTools.java b/edexOsgi/com.raytheon.uf.edex.decodertools/src/com/raytheon/uf/edex/decodertools/time/TimeTools.java index 736a2532a2..f838cec2ab 100644 --- a/edexOsgi/com.raytheon.uf.edex.decodertools/src/com/raytheon/uf/edex/decodertools/time/TimeTools.java +++ b/edexOsgi/com.raytheon.uf.edex.decodertools/src/com/raytheon/uf/edex/decodertools/time/TimeTools.java @@ -20,6 +20,7 @@ package com.raytheon.uf.edex.decodertools.time; import java.text.ParseException; +import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.TimeZone; import java.util.regex.Matcher; @@ -55,33 +56,63 @@ import com.raytheon.uf.edex.decodertools.core.DecoderTools; */ public class TimeTools { + /** + * Time stamp that includes the receipt time + * format : YYYYMMDD + */ + public static final Pattern FILE_TIMESTAMP = Pattern.compile("(.*\\.)(\\d{8}$)"); + + public static final Pattern WMO_TIMESTAMP = Pattern.compile("([0-3][0-9])(\\d{2})(\\d{2})[Zz]?"); + + public static final int HOURS_DAY = 24; + + public static final int MINUTES_HOUR = 60; + public static final int SECONDS_HOUR = 3600; - public static final int SECONDS_DAY = 24 * SECONDS_HOUR; + public static final int SECONDS_DAY = HOURS_DAY * SECONDS_HOUR; public static final long MILLIS_HOUR = 1000L * SECONDS_HOUR; - public static final long MILLIS_DAY = MILLIS_HOUR * 24L; + public static final long MILLIS_DAY = MILLIS_HOUR * HOURS_DAY; public static final String ZULU_TIMEZONE = "Zulu"; private static ITimeService timeService = null; private static final Log logger = LogFactory.getLog(TimeTools.class); - + + /** + * + * @return + */ + public static boolean allowArchive() { + return ("true".equalsIgnoreCase(System.getenv().get("ALLOW_ARCHIVE_DATA"))); + } + /** * Get a calendar that expresses the current system time. If an ITimeService * provider is registered, the time is retrieved from the service. * * @return The current time as a GMT Calendar. */ - public static Calendar getSystemCalendar() { + public static final Calendar getSystemCalendar() { Calendar retCal = null; if (timeService != null) { retCal = timeService.getCalendar(); } else { retCal = Calendar.getInstance(TimeZone.getTimeZone(ZULU_TIMEZONE)); } + if(retCal != null) { + TimeZone tz = retCal.getTimeZone(); + if(tz != null) { + if (0 != tz.getRawOffset()) { + retCal.setTimeZone(TimeZone.getTimeZone(ZULU_TIMEZONE)); + } + } else { + retCal.setTimeZone(TimeZone.getTimeZone(ZULU_TIMEZONE)); + } + } return retCal; } @@ -91,46 +122,74 @@ public class TimeTools { * * @return The current time as a GMT Calendar. */ - public static Calendar getSystemCalendar(int year, int month, int day) { + public static final Calendar getSystemCalendar(int year, int month, int day) { + return getSystemCalendar(year, month, day, 0, 0); + } + + /** + * Get a calendar that expresses the current system time based from specified + * date information if the + * @param year Year to set. + * @param month + * @param day + * @param hour + * @param minute + * @return The current time as a GMT Calendar. + */ + public static final Calendar getSystemCalendar(int year, int month, + int day, int hour, int minute) { Calendar retCal = getSystemCalendar(); - String allow = System.getenv("ALLOW_ARCHIVE_DATA"); - if ("true".equalsIgnoreCase(allow)) { - if (year != -1) { - retCal.set(Calendar.YEAR, year); - } - if (month != -1) { - retCal.set(Calendar.MONTH, month - 1); - } - if (day != -1) { - retCal.set(Calendar.DATE, day); + if (allowArchive()) { + if (isValidDate(year, month, day)) { + if (hour != -1) { + if (minute != -1) { + retCal.set(Calendar.YEAR, year); + retCal.set(Calendar.MONTH, month - 1); + retCal.set(Calendar.DAY_OF_MONTH, day); + retCal.set(Calendar.HOUR_OF_DAY, hour); + retCal.set(Calendar.MINUTE, minute); + retCal.set(Calendar.SECOND, 0); + retCal.set(Calendar.MILLISECOND, 0); + } + } } } return retCal; } - public static Calendar getSystemCalendar(String fileName) { + /** + * + * @param fileName + * @return + */ + public static final Calendar getSystemCalendar(String fileName) { int year = -1; int month = -1; int day = -1; - if (fileName != null && fileName.matches(".*\\.\\d{8}$")) { - Pattern pattern = Pattern.compile("(.*\\.)(\\d{8}$)"); - Matcher matcher = pattern.matcher(fileName); - matcher.find(); - String yyyymmdd = matcher.group(2); - year = Integer.parseInt(yyyymmdd.substring(0, 4)); - month = Integer.parseInt(yyyymmdd.substring(4, 6)); - day = Integer.parseInt(yyyymmdd.substring(6, 8)); - + if(fileName != null) { + Matcher matcher = FILE_TIMESTAMP.matcher(fileName); + if(matcher.find()) { + String yyyymmdd = matcher.group(2); + try { + year = Integer.parseInt(yyyymmdd.substring(0, 4)); + month = Integer.parseInt(yyyymmdd.substring(4, 6)); + day = Integer.parseInt(yyyymmdd.substring(6, 8)); + } catch (NumberFormatException nfe) { + year = -1; + month = -1; + day = -1; + } + } } - return getSystemCalendar(year, month, day); + return getSystemCalendar(year, month, day, 0, 0); } - + /** * Converts a ddhhmm time group to a Calendar. Adjusts the calendar as * follows: Any time group with a day (dd) in the future is set back one * month. * - * @param baseTime + * @param wmoDateStamp * the time to convert * * @return the converted time @@ -138,25 +197,52 @@ public class TimeTools { * @throws DataFormatException * if an error occurs */ - public static Calendar findCurrentTime(String baseTime, String fileName) + public static final Calendar findCurrentTime(String wmoDateStamp, String fileName) throws DataFormatException { - Calendar retVal = getSystemCalendar(fileName); + Calendar refCal = getSystemCalendar(fileName); try { - String regexe = "(\\d{2})(\\d{2})(\\d{2})[Zz]?"; - Pattern pattern = Pattern.compile(regexe); - Matcher matcher = pattern.matcher(baseTime); + Matcher matcher = WMO_TIMESTAMP.matcher(wmoDateStamp); if (matcher.matches()) { - adjustDayHourMinute(retVal, matcher.group(1), matcher.group(2), - matcher.group(3)); + int iDay = Integer.parseInt(matcher.group(1)); + int iHour = Integer.parseInt(matcher.group(2)); + int iMinute = Integer.parseInt(matcher.group(3)); + + refCal = adjustDayHourMinute(refCal, iDay, iHour, iMinute); } else { - throw new ParseException("Invalid format - does not match " - + regexe, 0); + throw new ParseException("Invalid format - time does not match " + + WMO_TIMESTAMP.pattern(), 0); } } catch (Exception e) { throw new DataFormatException("Unable to find current time for " - + baseTime + ", exception was " + e.toString()); + + wmoDateStamp + ", exception was " + e.toString()); } - return retVal; + return refCal; + } + + /** + * Convert a string in ddhhmm format to a standard {@link Calendar} format + * where ddhhmm is the GMT format while the standard time is in Calendar + * format with Year and Month information. Usage: ddhhmm is the issue time + * whereas utcTime can be the MDN time. The former comes "after" the latter. + * + * @parm ddhhmm day-hour-minute in GMT + * @parm local Time UTC time in Calendar + */ + public static final Calendar findDataTime(String ddhhmm, Headers headers) { + Calendar issueTime = Calendar.getInstance(TimeZone.getTimeZone("GMT")); + String fileName = null; + if (headers != null) { + fileName = (String) headers.get(DecoderTools.INGEST_FILE_NAME); + } + try { + issueTime = findCurrentTime(ddhhmm, fileName); + } catch (DataFormatException e) { + if (logger.isInfoEnabled()) { + logger.info(" Error in processing MND time; return current time "); + } + issueTime = null; + } + return issueTime; } /** @@ -174,31 +260,78 @@ public class TimeTools { * @param minute * the new minute of the hour */ - private static void adjustDayHourMinute(Calendar cal, String day, - String hour, String minute) { - int iDay = Integer.parseInt(day); - int iHour = Integer.parseInt(hour); - int iMinute = Integer.parseInt(minute); - int iMonth = cal.get(Calendar.MONTH); - int iYear = cal.get(Calendar.YEAR); - // adjust the month and year for roll-over situations - if (iDay > cal.get(Calendar.DAY_OF_MONTH)) { - iMonth--; - if (iMonth < 0) { - iMonth = Calendar.DECEMBER; - iYear--; + private static Calendar adjustDayHourMinute(Calendar cal, int wmoDay, + int wmoHour, int wmoMinute) { + if (cal != null) { + + int cDay = cal.get(Calendar.DAY_OF_MONTH); + + cal.set(Calendar.SECOND, 0); + cal.set(Calendar.MILLISECOND, 0); + + // Range check hour/minute first. Have to wait for + // checking the day + if (isValidHour(wmoHour) && (isValidMinSec(wmoMinute))) { + Calendar lastMonth = copy(cal); + lastMonth.set(Calendar.DAY_OF_MONTH, 1); + lastMonth.add(Calendar.MONTH, -1); + + // Get the maximum day of the current month from the reference + // calendar + int maxDayThisMonth = cal + .getActualMaximum(Calendar.DAY_OF_MONTH); + // Set the day to one so all add/subtracts work correctly + cal.set(Calendar.DAY_OF_MONTH, 1); + cal.set(Calendar.HOUR_OF_DAY, wmoHour); + cal.set(Calendar.MINUTE, wmoMinute); + if (wmoDay == 1) { + // the wmoDay is 1 + // and the reference calendar is the last + // day of the month + if (cDay == maxDayThisMonth) { + // This is potentially next month's data received early + // Allow three hours into the next day + if (wmoHour < 3) { + // Advance to the next month + cal.add(Calendar.MONTH, 1); + // and set the hour, minute + } + } + } else if (wmoDay > cDay) { + // Is the wmoDay valid for this month? + if(wmoDay <= maxDayThisMonth) { + // First allow up to 3 hours into the next day + if ((cDay + 1) == wmoDay) { + // This is potentially next month's data received early + // Allow three hours into the next day + if (wmoHour > 2) { + // Back up a month + cal.add(Calendar.MONTH, -1); + } + } else { + // Back up a month + cal.add(Calendar.MONTH, -1); + int mDay = cal.getActualMaximum(Calendar.DAY_OF_MONTH); + if(mDay < wmoDay) { + cal.add(Calendar.MONTH, -1); + } + } + } else { + // The wmoDay is greater than the maximum number + // of days for the reference month. We can't back + // up one month, but can always back up two months. + cal.add(Calendar.MONTH, -2); + } + } + cal.set(Calendar.DAY_OF_MONTH, wmoDay); + } else { + // bad + cal = null; } } - cal.set(Calendar.SECOND, 0); - cal.set(Calendar.MILLISECOND, 0); - cal.set(Calendar.YEAR, iYear); - cal.set(Calendar.MONTH, iMonth); - cal.set(Calendar.DAY_OF_MONTH, iDay); - cal.set(Calendar.HOUR_OF_DAY, iHour); - cal.set(Calendar.MINUTE, iMinute); - - } - + return cal; + } + /** * Set the time service. To clear an existing service, set a null reference. * @@ -207,7 +340,7 @@ public class TimeTools { * service. * @return The TimeService that had been previously defined. */ - public static ITimeService setTimeService(ITimeService service) { + public static final ITimeService setTimeService(ITimeService service) { ITimeService retService = null; // get the current service if any. retService = timeService; @@ -227,7 +360,7 @@ public class TimeTools { * Day of the month [1..31] varies by month rules. * @return */ - public static Calendar getBaseCalendar(int year, int month, int day) { + public static final Calendar getBaseCalendar(int year, int month, int day) { Calendar calendar = null; calendar = getSystemCalendar(); @@ -243,7 +376,7 @@ public class TimeTools { return calendar; } - + /** * Get a new GMT time-zone calendar set to a specified time in milliseconds. * @@ -251,7 +384,7 @@ public class TimeTools { * The time to set in milliseconds. * @return The new calendar instance. */ - public static Calendar newCalendar(long timeInMillis) { + public static final Calendar newCalendar(long timeInMillis) { Calendar calendar = getSystemCalendar(); calendar.setTimeInMillis(timeInMillis); @@ -266,22 +399,23 @@ public class TimeTools { * The calendar to copy. * @return The copied calendar. */ - public static Calendar copy(Calendar calendar) { + public static final Calendar copy(Calendar calendar) { Calendar retValue = null; if (calendar != null) { - retValue = (Calendar) calendar.clone(); + retValue = newCalendar(calendar.getTimeInMillis()); + retValue.setTimeZone(calendar.getTimeZone()); } return retValue; } /** - * Make a copy of a calendar instance to the nearest hour. + * Make a copy of a calendar instance truncated to the hour. * * @param calendar * The calendar to copy. * @return The copied calendar. */ - public static Calendar copyToNearestHour(Calendar calendar) { + public static final Calendar copyToNearestHour(Calendar calendar) { Calendar retValue = null; if (calendar != null) { retValue = (Calendar) calendar.clone(); @@ -299,7 +433,7 @@ public class TimeTools { * The calendar to copy. * @return The copied calendar. */ - public static Calendar roundToNearestHour(Calendar calendar) { + public static final Calendar roundToNearestHour(Calendar calendar) { Calendar retValue = null; if (calendar != null) { retValue = (Calendar) calendar.clone(); @@ -322,7 +456,7 @@ public class TimeTools { * Number of days to add or subtract. * @return The modified calendar. */ - public static Calendar rollByDays(Calendar calendar, int byDays) { + public static final Calendar rollByDays(Calendar calendar, int byDays) { if (calendar != null) { long millis = calendar.getTimeInMillis(); @@ -342,7 +476,7 @@ public class TimeTools { * Number of hours to add or subtract. * @return The modified calendar. */ - public static Calendar rollByHours(Calendar calendar, int byHours) { + public static final Calendar rollByHours(Calendar calendar, int byHours) { if (calendar != null) { long millis = calendar.getTimeInMillis(); @@ -354,28 +488,196 @@ public class TimeTools { } /** - * Convert a string in ddhhmm format to a standard {@link Calendar} format - * where ddhhmm is the GMT format while the standard time is in Calendar - * format with Year and Month information. Usage: ddhhmm is the issue time - * whereas utcTime can be the MDN time. The former comes "after" the latter. - * - * @parm ddhhmm day-hour-minute in GMT - * @parm local Time UTC time in Calendar + * Is the year valid. This method supposes any positive year + * value as valid. + * @param year The year to check. + * @return Is the year valid? */ - public static Calendar findDataTime(String ddhhmm, Headers headers) { - Calendar issueTime = Calendar.getInstance(TimeZone.getTimeZone("GMT")); - String fileName = null; - if (headers != null) { - fileName = (String) headers.get(DecoderTools.INGEST_FILE_NAME); - } - try { - return issueTime = findCurrentTime(ddhhmm, fileName); - } catch (DataFormatException e) { - if (logger.isInfoEnabled()) { - logger.info(" Error in processing MND time; return current time "); - } - return issueTime; - } + public static final boolean isValidYear(int year) { + return (year >= 0); + } + + /** + * The the specified month of the year valid. + * @param month Numeric value of the month. + * @return Is the month valid? + */ + public static final boolean isValidMonth(int month) { + return ((month > 0)&&(month <= 12)); } + /** + * Is the specified hour of the day valid? Range 0..23 inclusive. + * @param hour The hour to check. + * @return Is the hour valid? + */ + public static final boolean isValidHour(int hour) { + return ((hour > -1)&&(hour < HOURS_DAY)); + } + + /** + * Is the specified minute/second valid? Range 0..59 inclusive. + * @param hour The minute/second to check. + * @return Is the minute/second valid? + */ + public static final boolean isValidMinSec(int value) { + return ((value > -1)&&(value < MINUTES_HOUR)); + } + + + /** + * Is a specified date valid? This method checks an entire + * year, month, day timestamp. + * @param year The year to check. + * @param month Numeric value of the month. + * @param day Is the month valid? + * @return Is year, month, day timestamp valid. + */ + public static final boolean isValidDate(int year, int month, int day) { + boolean validDay = false; + if(day > -1) { + if(isValidYear(year)) { + if(isValidMonth(month)) { + Calendar c = getBaseCalendar(year, month, 1); + int lastDay = c.getActualMaximum(Calendar.DAY_OF_MONTH) + 1; + + validDay = (day < lastDay); + } + } + } + return validDay; + } + + /** + * End of month, end of year + * + * @return test passed status + */ + private static boolean test(String [] data) { + String expected = data[3]; + System.out.print(String.format("Test Step %12s ", data[0])); + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + Headers header = new Headers(); + header.put(DecoderTools.INGEST_FILE_NAME, data[1]); + + Calendar c = findDataTime(data[2],header); + sdf.setTimeZone(c.getTimeZone()); + + String cs = sdf.format(c.getTime()); + System.out.print(String.format("%20s expected %20s ",cs, expected)); + return expected.equals(cs); + } + + public static final void main(String [] args) { + SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); + sdf.setTimeZone(TimeZone.getTimeZone(ZULU_TIMEZONE)); + + ITimeService service = new ITimeService() { + @Override + public Calendar getCalendar() { + final Calendar c = Calendar.getInstance(); + c.setTimeZone(TimeZone.getTimeZone(ZULU_TIMEZONE)); + c.set(Calendar.YEAR, 2011); + c.set(Calendar.MONTH, Calendar.JULY); + c.set(Calendar.DAY_OF_MONTH,15); + c.set(Calendar.HOUR_OF_DAY, 14); + c.set(Calendar.MINUTE, 15); + c.set(Calendar.SECOND, 32); + c.set(Calendar.MILLISECOND, 268); + + return c; + } + }; + TimeTools.setTimeService(service); + + if(allowArchive()) { + String [] [] archiveData = { + { "test001","UANT01_CWAO_171653_225472224.20110717", "171653","2011-07-17 16:53:00", }, + { "test002","UANT01_CWAO_312315_225472224.20110731", "312315","2011-07-31 23:15:00", }, + { "test003","UANT01_CWAO_312315_225472224.20110801", "312315","2011-07-31 23:15:00", }, + { "test004","UANT01_CWAO_170000_225472224.20110716", "170000","2011-07-17 00:00:00", }, + { "test005","UANT01_CWAO_170000_225472224.20110717", "170000","2011-07-17 00:00:00", }, + { "test006","UANT01_CWAO_100000_225472224.20111109", "100000","2011-11-10 00:00:00", }, + { "test007","UANT01_CWAO_010000_225472224.20111231", "010000","2012-01-01 00:00:00", }, + { "test008","UANT01_CWAO_312350_225472224.20120101", "312350","2011-12-31 23:50:00", }, + { "test009","UANT01_CWAO_010259_225472224.20111231", "010259","2012-01-01 02:59:00", }, + { "test010","UANT01_CWAO_010300_225472224.20111231", "010300","2011-12-01 03:00:00", }, + { "test011","UANT01_CWAO_290050_225472224.20120228", "290050","2012-02-29 00:50:00", }, + { "test012","UANT01_CWAO_010100_225472224.20120229", "010100","2012-03-01 01:00:00", }, + }; + System.out.println("Performing archive mode data tests"); + for(String [] d : archiveData) { + System.out.println(" status = " + (test(d) ? "passed" : "failed")); + } + } + if(!allowArchive()) { + System.out.println("Performing non-archive mode data tests"); + + System.out.println(String.format("Base time = %s", sdf.format(getSystemCalendar().getTime()))); + // 2011-07-15 14:15:32.268 + String[][] data = { + { "test001", "UANT01_CWAO_171653_225472224.20110717", "171653", + "2011-06-17 16:53:00", }, + { "test002", "UANT01_CWAO_312315_225472224.20110731", "312315", + "2011-05-31 23:15:00", }, + }; + for (String[] d : data) { + System.out.println(" status = " + (test(d) ? "passed" : "failed")); + } + //********************************************************************** + service = new ITimeService() { + @Override + public Calendar getCalendar() { + final Calendar c = Calendar.getInstance(); + c.setTimeZone(TimeZone.getTimeZone(ZULU_TIMEZONE)); + c.set(Calendar.YEAR, 2011); + c.set(Calendar.MONTH, Calendar.AUGUST); + c.set(Calendar.DAY_OF_MONTH,1); + c.set(Calendar.HOUR_OF_DAY, 14); + c.set(Calendar.MINUTE, 15); + c.set(Calendar.SECOND, 32); + c.set(Calendar.MILLISECOND, 268); + + return c; + } + }; + TimeTools.setTimeService(service); + System.out.println(String.format("Base time = %s", sdf.format(getSystemCalendar().getTime()))); + + data = new String [][] { + { "test011", "UANT01_CWAO_312353_225472224.20110717", "312353", + "2011-07-31 23:53:00", }, + }; + for (String[] d : data) { + System.out.println(" status = " + (test(d) ? "passed" : "failed")); + } + //********************************************************************** + service = new ITimeService() { + @Override + public Calendar getCalendar() { + final Calendar c = Calendar.getInstance(); + c.setTimeZone(TimeZone.getTimeZone(ZULU_TIMEZONE)); + c.set(Calendar.YEAR, 2011); + c.set(Calendar.MONTH, Calendar.JULY); + c.set(Calendar.DAY_OF_MONTH,31); + c.set(Calendar.HOUR_OF_DAY, 22); + c.set(Calendar.MINUTE, 45); + c.set(Calendar.SECOND, 32); + c.set(Calendar.MILLISECOND, 268); + + return c; + } + }; + TimeTools.setTimeService(service); + System.out.println(String.format("Base time = %s", sdf.format(getSystemCalendar().getTime()))); + + data = new String [][] { + { "test011", "UANT01_CWAO_010053_225472224.20110717", "010053", + "2011-08-01 00:53:00", }, + }; + for (String[] d : data) { + System.out.println(" status = " + (test(d) ? "passed" : "failed")); + } + } + } } diff --git a/edexOsgi/com.raytheon.uf.edex.decodertools/src/com/raytheon/uf/edex/wmo/message/WMOHeader.java b/edexOsgi/com.raytheon.uf.edex.decodertools/src/com/raytheon/uf/edex/wmo/message/WMOHeader.java index 9205463b50..6045c09665 100644 --- a/edexOsgi/com.raytheon.uf.edex.decodertools/src/com/raytheon/uf/edex/wmo/message/WMOHeader.java +++ b/edexOsgi/com.raytheon.uf.edex.decodertools/src/com/raytheon/uf/edex/wmo/message/WMOHeader.java @@ -169,10 +169,16 @@ public class WMOHeader { } YYGGgg = wmoHeader.substring(hdrIndex, hdrIndex + DTGROUP_SIZE); parseDateTime(YYGGgg); - Calendar obsTime = TimeTools.findDataTime(YYGGgg, headers); - headerYear = obsTime.get(Calendar.YEAR); - headerMonth = obsTime.get(Calendar.MONTH) + 1; - + headerDate = TimeTools.findDataTime(YYGGgg, headers); + // At this point headerDate will either be the current time (non-archive) or + // a time generated from the WMOHeader and filename dateStamp + + headerYear = headerDate.get(Calendar.YEAR); + headerMonth = headerDate.get(Calendar.MONTH) + 1; + headerDay = headerDate.get(Calendar.DAY_OF_MONTH); + headerHour = headerDate.get(Calendar.HOUR_OF_DAY); + headerMinute = headerDate.get(Calendar.MINUTE); + hdrIndex += DTGROUP_SIZE; // Everything else goes here for now. Leave it to the client to @@ -346,10 +352,6 @@ public class WMOHeader { * @return the headerDate */ public Calendar getHeaderDate() { - // Use lazy construction here. - if (headerDate == null) { - headerDate = createCalendarDate(); - } return headerDate; } @@ -402,53 +404,53 @@ public class WMOHeader { } } - /** - * Use the parsed date/time elements to create the Calendar date time info - * for this WMO header. The logic in this method allows the WMO header time - * to be set to the current day, the next day, or up to 25 days in the past. - * - * @return A Calendar instance based on the current system date time. - */ - private Calendar createCalendarDate() { - Calendar msgDate = null; - // check the internal data first - if ((headerDay > -1) && (headerHour > -1) && (headerMinute > -1)) { - Calendar currentClock = TimeTools.getSystemCalendar(headerYear, - headerMonth, -1); - - Calendar obsDate = null; - Calendar tTime = TimeTools.copyToNearestHour(currentClock); - // Set to the next day. - TimeTools.rollByDays(tTime, 1); - - if (headerDay == currentClock.get(Calendar.DAY_OF_MONTH)) { - obsDate = TimeTools.copyToNearestHour(currentClock); - obsDate.set(Calendar.HOUR_OF_DAY, headerHour); - obsDate.set(Calendar.MINUTE, headerMinute); - } else if (headerDay == tTime.get(Calendar.DAY_OF_MONTH)) { - // Observation time is in the next day - obsDate = TimeTools.copyToNearestHour(tTime); - obsDate.set(Calendar.HOUR_OF_DAY, headerHour); - obsDate.set(Calendar.MINUTE, headerMinute); - } else { - tTime = TimeTools.copyToNearestHour(currentClock); - int i = 0; - while (i++ < 25) { - // Go back a day - TimeTools.rollByDays(tTime, -1); - if (headerDay == tTime.get(Calendar.DAY_OF_MONTH)) { - // Day values are equal, so this is it. - obsDate = TimeTools.copyToNearestHour(tTime); - obsDate.set(Calendar.HOUR_OF_DAY, headerHour); - obsDate.set(Calendar.MINUTE, headerMinute); - break; - } - } - } - if (obsDate != null) { - msgDate = obsDate; - } - } - return msgDate; - } +// /** +// * Use the parsed date/time elements to create the Calendar date time info +// * for this WMO header. The logic in this method allows the WMO header time +// * to be set to the current day, the next day, or up to 25 days in the past. +// * +// * @return A Calendar instance based on the current system date time. +// */ +// private Calendar createCalendarDate() { +// Calendar msgDate = null; +// // check the internal data first +// if ((headerDay > -1) && (headerHour > -1) && (headerMinute > -1)) { +// Calendar currentClock = TimeTools.getSystemCalendar(headerYear, +// headerMonth, headerDay); +// +// Calendar obsDate = null; +// Calendar tTime = TimeTools.copyToNearestHour(currentClock); +// // Set to the next day. +// TimeTools.rollByDays(tTime, 1); +// +// if (headerDay == currentClock.get(Calendar.DAY_OF_MONTH)) { +// obsDate = TimeTools.copyToNearestHour(currentClock); +// obsDate.set(Calendar.HOUR_OF_DAY, headerHour); +// obsDate.set(Calendar.MINUTE, headerMinute); +// } else if (headerDay == tTime.get(Calendar.DAY_OF_MONTH)) { +// // Observation time is in the next day +// obsDate = TimeTools.copyToNearestHour(tTime); +// obsDate.set(Calendar.HOUR_OF_DAY, headerHour); +// obsDate.set(Calendar.MINUTE, headerMinute); +// } else { +// tTime = TimeTools.copyToNearestHour(currentClock); +// int i = 0; +// while (i++ < 25) { +// // Go back a day +// TimeTools.rollByDays(tTime, -1); +// if (headerDay == tTime.get(Calendar.DAY_OF_MONTH)) { +// // Day values are equal, so this is it. +// obsDate = TimeTools.copyToNearestHour(tTime); +// obsDate.set(Calendar.HOUR_OF_DAY, headerHour); +// obsDate.set(Calendar.MINUTE, headerMinute); +// break; +// } +// } +// } +// if (obsDate != null) { +// msgDate = obsDate; +// } +// } +// return msgDate; +// } } diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.ffmp/src/com/raytheon/uf/edex/plugin/ffmp/FFMPURIFilter.java b/edexOsgi/com.raytheon.uf.edex.plugin.ffmp/src/com/raytheon/uf/edex/plugin/ffmp/FFMPURIFilter.java index 48700ae689..012d8ad6f0 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.ffmp/src/com/raytheon/uf/edex/plugin/ffmp/FFMPURIFilter.java +++ b/edexOsgi/com.raytheon.uf.edex.plugin.ffmp/src/com/raytheon/uf/edex/plugin/ffmp/FFMPURIFilter.java @@ -48,7 +48,7 @@ import com.raytheon.uf.edex.core.props.PropertiesFactory; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * 06/21/2009 2521 dhladky Initial Creation. - * 18/04/2012 DR14619/20 dhladky Replace setMatchURIs() + * * * * @author dhladky @@ -244,7 +244,7 @@ public class FFMPURIFilter extends URIFilter { } return newKey.toString(); } -/*2012-04-18: Old code keep for refefence. Gang Zhang + @Override public void setMatchURIs() { FFMPSourceConfigurationManager sourceConfig = FFMPSourceConfigurationManager @@ -272,17 +272,22 @@ public class FFMPURIFilter extends URIFilter { for (String dataKey : sicx.getDataKey()) { String matcher = null; - // RFC FFG, special matching criteria - if (source.isRfc()) { - matcher = replaceWildCard( - "FFG-" + dataKey.substring(1), - source.getDataPath(), - sicx.getUriSubLocation()); - } - // All others use this pattern - else { - matcher = replaceWildCard(dataKey, - source.getDataPath(), + // RFC FFG, special matching criteria and override potentials + if (source.isRfc()) { + String pathReplace = source.getDataPath(dataKey); + if (pathReplace.equals(source.getDataPath())) { + matcher = replaceWildCard( + "FFG-" + dataKey.substring(1), + source.getDataPath(), + sicx.getUriSubLocation()); + } else { + matcher = pathReplace; + } + } + // All others use this pattern + else { + matcher = replaceWildCard(dataKey, + source.getDataPath(dataKey), sicx.getUriSubLocation()); } // take care of time match @@ -311,7 +316,7 @@ public class FFMPURIFilter extends URIFilter { } } } -*/ + /** * Grab the most recent XMRG file time by HPE file type * @@ -555,78 +560,4 @@ public class FFMPURIFilter extends URIFilter { return new FFMPURIGenerateMessage(this); } - /** - * 2012-04-18: Code from David Hladky in Omaha. - */ - @Override - public void setMatchURIs() { - FFMPSourceConfigurationManager sourceConfig = FFMPSourceConfigurationManager - .getInstance(); - FFMPRunConfigurationManager runConfig = FFMPRunConfigurationManager - .getInstance(); - FFMPRunXML runner = runConfig.getRunner(PropertiesFactory.getInstance() - .getEnvProperties().getEnvValue("SITENAME")); - - for (SourceXML source : sourceConfig.getSources()) { - - SourceIngestConfigXML sicx = runner.getSourceIngest(source - .getSourceName()); - // just use an average time, not the expiration - long duration = 60 * 1000l * 10; - // setup URI filtering for PDO/RADAR types, multiple RADAR sites - // possible, don't process gages - - if (!source.getSourceType().equals( - FFMPSourceConfigurationManager.SOURCE_TYPE.GAGE - .getSourceType())) { - - if (sicx != null && sicx.getDataKey().size() > 0) { - - for (String dataKey : sicx.getDataKey()) { - - String matcher = null; - // RFC FFG, special matching criteria and override potentials - if (source.isRfc()) { - String pathReplace = source.getDataPath(dataKey); - if (pathReplace.equals(source.getDataPath())) { - matcher = replaceWildCard( - "FFG-" + dataKey.substring(1), - source.getDataPath(), - sicx.getUriSubLocation()); - } else { - matcher = pathReplace; - } - } - // All others use this pattern - else { - matcher = replaceWildCard(dataKey, - source.getDataPath(dataKey), - sicx.getUriSubLocation()); - } - // take care of time match - matcher = replaceWildCard(URIFilter.wildCard, matcher, - 2); - Pattern pattern = Pattern.compile(matcher); - patternKeys.put(source.getSourceName() + ":" + dataKey, - pattern); - getMatchURIs().put(pattern, duration); - } - } else { - // XMRG dosen't use the URI Filtering - if (source.getDataType().equals( - FFMPSourceConfigurationManager.DATA_TYPE.XMRG - .getDataType())) { - sourceFileTimes.put(source, - getMostRecentXMRGTime(source)); - } else { - // only the time has a match replace - String matcher = replaceWildCard(URIFilter.wildCard, - source.getDataPath(), 2); - Pattern pattern = Pattern.compile(matcher); - getMatchURIs().put(pattern, duration); - } - } - } - } - } } diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.ffmp/src/com/raytheon/uf/edex/plugin/ffmp/common/FFMPProcessor.java b/edexOsgi/com.raytheon.uf.edex.plugin.ffmp/src/com/raytheon/uf/edex/plugin/ffmp/common/FFMPProcessor.java index 625a15c9e7..8ae41c5269 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.ffmp/src/com/raytheon/uf/edex/plugin/ffmp/common/FFMPProcessor.java +++ b/edexOsgi/com.raytheon.uf.edex.plugin.ffmp/src/com/raytheon/uf/edex/plugin/ffmp/common/FFMPProcessor.java @@ -257,6 +257,8 @@ public class FFMPProcessor { dhrMap = RadarRecordUtil.getDHRValues(radarRec); statusHandler.handle(Priority.INFO, "DHR Bias: " + dhrMap.get(DHRValues.BIAS_TO_USE)); + statusHandler.handle(Priority.INFO, + "DHR HailCap: " + dhrMap.get(DHRValues.MAXPRECIPRATEALLOW)); } recdate = radarRec.getDataTime().getRefTime(); @@ -1154,14 +1156,20 @@ public class FFMPProcessor { for (int j = 0; j < dataVals.length; j++) { float fval = (float) ScanUtils.getDecodedDHRValue(dataVals[j]); - - val += ScanUtils.getZRvalue(fval, - dhrMap.get(DHRValues.ZRMULTCOEFF), - dhrMap.get(DHRValues.MAXPRECIPRATEALLOW), - dhrMap.get(DHRValues.ZRPOWERCOEFF), - dhrMap.get(DHRValues.BIAS_TO_USE)) - * areas[j]; - area += areas[j]; + + try { + val += ScanUtils.getZRvalue(fval, + dhrMap.get(DHRValues.ZRMULTCOEFF), + dhrMap.get(DHRValues.MAXPRECIPRATEALLOW), + dhrMap.get(DHRValues.ZRPOWERCOEFF), + dhrMap.get(DHRValues.BIAS_TO_USE)) + * areas[j]; + area += areas[j]; + } catch (Exception e) { + statusHandler + .error("DHR parameters are NULL, can't process!" + + e.getMessage()); + } } } else if (radarRec.getMnemonic().equals("DPR")) { diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.ffmp/src/com/raytheon/uf/edex/plugin/ffmp/common/FFTI.java b/edexOsgi/com.raytheon.uf.edex.plugin.ffmp/src/com/raytheon/uf/edex/plugin/ffmp/common/FFTI.java index 3b708bd957..d0b5a05d2a 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.ffmp/src/com/raytheon/uf/edex/plugin/ffmp/common/FFTI.java +++ b/edexOsgi/com.raytheon.uf.edex.plugin.ffmp/src/com/raytheon/uf/edex/plugin/ffmp/common/FFTI.java @@ -231,28 +231,31 @@ public class FFTI implements Runnable { source = ffmpgen.getSourceConfig().getSourceByDisplayName( displayName); ArrayList sites = getSites(source); - FFTIAccum[] accums = new FFTIAccum[sites.size()]; + ArrayList accums = new ArrayList(); // process all pieces of the mosaic for (int i = 0; i < sites.size(); i++) { - accums[i] = getAccumulationForSite(displayName, + FFTIAccum faccum = getAccumulationForSite(displayName, sites.get(i), duration); + if (faccum != null) { + accums.add(faccum); + } } // find the highest for the entire mosaic accum = new FFTIAccum(); accum.setAccumulation(0.0); - for (int j = 0; j < accums.length; j++) { + for (FFTIAccum faccum: accums) { - if (accum.getAccumulation() <= accums[j].getAccumulation()) { - accum.setAccumulation(accums[j].getAccumulation()); + if (accum.getAccumulation() <= faccum.getAccumulation()) { + accum.setAccumulation(faccum.getAccumulation()); } - if (accum.getGap() <= accums[j].getGap()) { - accum.setGap(accums[j].getGap()); + if (accum.getGap() <= faccum.getGap()) { + accum.setGap(faccum.getGap()); } - accum.setName(accums[j].getName()); + accum.setName(faccum.getName()); } accum.setUnit(source.getUnit()); @@ -271,14 +274,18 @@ public class FFTI implements Runnable { accum = getAccumulationForSite(fftiSourceKey, fftiSiteKey, duration); + + if (accum != null) { + accum.setUnit(source.getUnit()); + statusHandler.handle( + Priority.INFO, + "FFTI ACCUM: " + source.getSourceName() + " " + + fftiSiteKey + " " + + accum.getAccumulation() + " gap: " + + accum.getGap()); - accum.setUnit(source.getUnit()); - statusHandler.handle(Priority.INFO, - "FFTI ACCUM: " + source.getSourceName() + " " - + fftiSiteKey + " " + accum.getAccumulation() - + " gap: " + accum.getGap()); - - accumList.add(accum); + accumList.add(accum); + } } } @@ -426,69 +433,74 @@ public class FFTI implements Runnable { double red = attribute.getRedThrshld(); for (FFTIAccum accum : accumList) { - value = accum.getAccumulation(); - unit = accum.getUnit(); - displayName = accum.getName(); - gapVal = accum.getGap(); + if (accum != null && accum.getName() != null) { + value = accum.getAccumulation(); + unit = accum.getUnit(); + displayName = accum.getName(); + gapVal = accum.getGap(); - String sourceDisplayName = null; - if (displayName.contains("-")) { - sourceDisplayName = displayName.split("-")[1]; - } else { - sourceDisplayName = displayName; - } + String sourceDisplayName = null; + if (displayName.contains("-")) { + sourceDisplayName = displayName.split("-")[1]; + } else { + sourceDisplayName = displayName; + } - SourceXML source = FFMPSourceConfigurationManager.getInstance() - .getSourceByDisplayName(sourceDisplayName); + SourceXML source = FFMPSourceConfigurationManager + .getInstance().getSourceByDisplayName( + sourceDisplayName); - String sourceType = source.getSourceType(); + String sourceType = source.getSourceType(); - // Set up the alert data object - FFTIAlertData fad = new FFTIAlertData(); + // Set up the alert data object + FFTIAlertData fad = new FFTIAlertData(); - if (sourceType - .equalsIgnoreCase(SOURCE_TYPE.QPE.getSourceType())) { - fad.addSource(SOURCE_TYPE.QPE, displayName); - fad.addDuration(SOURCE_TYPE.QPE, setting.getQpeSource() - .getDurationHour()); - } else if (sourceType.equalsIgnoreCase(SOURCE_TYPE.QPF - .getSourceType())) { - fad.addSource(SOURCE_TYPE.QPF, displayName); - fad.addDuration(SOURCE_TYPE.QPF, setting.getQpfSource() - .getDurationHour()); - } + if (sourceType.equalsIgnoreCase(SOURCE_TYPE.QPE + .getSourceType())) { + fad.addSource(SOURCE_TYPE.QPE, displayName); + fad.addDuration(SOURCE_TYPE.QPE, setting.getQpeSource() + .getDurationHour()); + } else if (sourceType.equalsIgnoreCase(SOURCE_TYPE.QPF + .getSourceType())) { + fad.addSource(SOURCE_TYPE.QPF, displayName); + fad.addDuration(SOURCE_TYPE.QPF, setting.getQpfSource() + .getDurationHour()); + } - fad.setAttributeName(attribute.getAttributeName()); - fad.setDisplayName(displayName); - fad.setUnit(unit); - fad.setValue(formatter.format(value)); - fad.setGap(getGapString(gapVal)); + fad.setAttributeName(attribute.getAttributeName()); + fad.setDisplayName(displayName); + fad.setUnit(unit); + fad.setValue(formatter.format(value)); + fad.setGap(getGapString(gapVal)); - if ((value >= yellow) && (value < red)) { - fad.setPriority(String.valueOf(UFStatus.Priority.PROBLEM - .ordinal())); + if ((value >= yellow) && (value < red)) { + fad.setPriority(String + .valueOf(UFStatus.Priority.PROBLEM.ordinal())); - if (messagePriority.ordinal() > Priority.PROBLEM.ordinal()) { - messagePriority = UFStatus.Priority.PROBLEM; - } - } else if (value >= red) { - fad.setPriority(String - .valueOf(UFStatus.Priority.SIGNIFICANT.ordinal())); - if (messagePriority.ordinal() > UFStatus.Priority.SIGNIFICANT - .ordinal()) { - messagePriority = UFStatus.Priority.SIGNIFICANT; - } - } else { - fad.setPriority(String.valueOf(UFStatus.Priority.EVENTA - .ordinal())); - if (messagePriority.ordinal() > UFStatus.Priority.EVENTA - .ordinal()) { - messagePriority = UFStatus.Priority.EVENTA; - } - } + if (messagePriority.ordinal() > Priority.PROBLEM + .ordinal()) { + messagePriority = UFStatus.Priority.PROBLEM; + } + } else if (value >= red) { + fad.setPriority(String + .valueOf(UFStatus.Priority.SIGNIFICANT + .ordinal())); + if (messagePriority.ordinal() > UFStatus.Priority.SIGNIFICANT + .ordinal()) { + messagePriority = UFStatus.Priority.SIGNIFICANT; + } + } else { + fad.setPriority(String.valueOf(UFStatus.Priority.EVENTA + .ordinal())); + if (messagePriority.ordinal() > UFStatus.Priority.EVENTA + .ordinal()) { + messagePriority = UFStatus.Priority.EVENTA; + } + } - alertDataArray.add(fad); - } + alertDataArray.add(fad); + } + } } catch (Exception e) { e.printStackTrace(); statusHandler @@ -746,7 +758,7 @@ public class FFTI implements Runnable { } /** - * Get value for an individual peice of the puzzle + * Get value for an individual piece of the puzzle * * @param fftiSourceKey * @param fftiSiteKey @@ -769,42 +781,46 @@ public class FFTI implements Runnable { if (ffmpSource.isMosaic()) { fdc = ffmpgen.getFFMPDataContainer(ffmpSource.getDisplayName()); } else { - fdc = ffmpgen.getFFMPDataContainer(fftiSiteKey + "-" - + ffmpSource.getDisplayName()); + fdc = ffmpgen.getFFMPDataContainer(ffmpSource.getDisplayName() + "-" + + fftiSiteKey + "-" + fftiSiteKey); } - // go over the list of CWAs gathering the pfaf list - ArrayList pfafs = new ArrayList(); - ArrayList cwaList = fdm.getCwaList(); + + if (fdc != null) { + // go over the list of CWAs gathering the pfaf list + ArrayList pfafs = new ArrayList(); + ArrayList cwaList = fdm.getCwaList(); - Double gap = getGap(fdc, ffmpSource, duration, fftiSiteKey); + Double gap = getGap(fdc, ffmpSource, duration, fftiSiteKey); - if (gap != Double.NaN) { + if (gap != Double.NaN) { - accumulator = new FFTIAccum(); - if (ffmpSource.isMosaic()) { - accumulator.setName(ffmpSource.getDisplayName()); - } else { - accumulator.setName(fftiSiteKey + "-" + fftiSourceKey); - } - for (String cwa : cwaList) { - for (Long key : fdc.getBasinData("ALL").getBasins().keySet()) { + accumulator = new FFTIAccum(); + if (ffmpSource.isMosaic()) { + accumulator.setName(ffmpSource.getDisplayName()); + } else { + accumulator.setName(fftiSiteKey + "-" + fftiSourceKey); + } + for (String cwa : cwaList) { + for (Long key : fdc.getBasinData("ALL").getBasins() + .keySet()) { - FFMPBasinMetaData basin = templates.getBasin(key); - if ((basin != null) && (basin.getCwa() != null)) { - if (basin.getCwa().equals(cwa)) { - pfafs.add(key); - } - } - } - } + FFMPBasinMetaData basin = templates.getBasin(key); + if ((basin != null) && (basin.getCwa() != null)) { + if (basin.getCwa().equals(cwa)) { + pfafs.add(key); + } + } + } + } - double amount = fdc.getMaxValue(pfafs, backDate, config.getDate(), - expirationTime, false); - // max value for monitored area - accumulator.setAccumulation(amount); + double amount = fdc.getMaxValue(pfafs, backDate, + config.getDate(), expirationTime, false); + // max value for monitored area + accumulator.setAccumulation(amount); - accumulator.setGap(gap); - } + accumulator.setGap(gap); + } + } return accumulator; } @@ -828,84 +844,122 @@ public class FFTI implements Runnable { FFMPDataContainer guidContainer = ffmpgen.getFFMPDataContainer(ffgType); long guidSourceExpiration = 0l; - for (SourceXML iguidSource : product.getGuidanceSourcesByType(ffgType)) { - - if (guidSourceExpiration == 0l) { - guidSourceExpiration = iguidSource - .getExpirationMinutes(qSiteKey) * 60 * 1000; - } - - if (!guidContainer.containsKey(iguidSource.getSourceName())) { - - guidContainer = FFTIProcessor.populateDataContainer( - guidContainer, templates, null, ffgBackDate, - config.getDate(), config.getCWA(), iguidSource, - qSiteKey); - } - } - - // if still nothing, punt! - if (guidContainer.size() == 0) { - - statusHandler.handle(Priority.PROBLEM, + if (guidContainer == null) { + statusHandler.handle(Priority.PROBLEM, "FFTI: No guidance sources available for " + qSiteKey + " " + qSourceKey + " " + " comparison."); return null; } + + for (SourceXML iguidSource : product.getGuidanceSourcesByType(ffgType)) { - FFMPDataContainer qpeContainer = null; + if (guidSourceExpiration == 0l) { + guidSourceExpiration = iguidSource + .getExpirationMinutes(qSiteKey) * 60 * 1000; + } - if (ffmpQSource.isMosaic()) { - qpeContainer = ffmpgen.getFFMPDataContainer(ffmpQSource - .getDisplayName()); - } else { - qpeContainer = ffmpgen.getFFMPDataContainer(qSiteKey + "-" - + ffmpQSource.getSourceName()); - } + if (!guidContainer.containsKey(iguidSource.getSourceName())) { - // go over the list of CWAs gathering the pfaf list - ArrayList pfafs = new ArrayList(); - ArrayList cwaList = fdm.getCwaList(); - for (String cwa : cwaList) { - for (Long key : qpeContainer.getBasinData("ALL").getBasins() - .keySet()) { - FFMPBasinMetaData basin = templates.getBasin(key); - if ((basin != null) && (basin.getCwa() != null)) { - if (basin.getCwa().equals(cwa)) { - pfafs.add(key); - } - } - } - } + guidContainer = FFTIProcessor.populateDataContainer( + guidContainer, templates, null, ffgBackDate, + config.getDate(), config.getCWA(), iguidSource, + qSiteKey); + } + } - long cur = config.getDate().getTime(); - long timeBack = (long) (duration * 3600 * 1000); - Date backDate = new Date(cur - timeBack); - long expirationTime = ffmpQSource.getExpirationMinutes(qSiteKey) * 60 * 1000; + // if still nothing, punt! + if (guidContainer.size() == 0) { - Double gap = getGap(qpeContainer, ffmpQSource, duration, qSiteKey); + statusHandler.handle(Priority.PROBLEM, + "FFTI: No guidance sources available for " + qSiteKey + " " + + qSourceKey + " " + " comparison."); + return null; + } - if (gap != Double.NaN) { + FFMPDataContainer qpeContainer = null; - ArrayList qpes = qpeContainer.getBasinData("ALL") - .getAccumValues(pfafs, backDate, config.getDate(), - expirationTime, false); + if (ffmpQSource.isMosaic()) { + qpeContainer = ffmpgen.getFFMPDataContainer(ffmpQSource + .getDisplayName()); + } else { + qpeContainer = ffmpgen.getFFMPDataContainer(ffmpQSource + .getSourceName() + "-" + qSiteKey + "-" + qSiteKey); + } - FFMPGuidanceInterpolation interpolator = new FFMPGuidanceInterpolation( - ffmpgen.fscm, product, ffmpgen.frcm.getRunner( - config.getCWA()).getProduct(qSiteKey), - primarySource, ffgType, qSiteKey); - interpolator.setInterpolationSources(duration); + if (qpeContainer != null) { + // go over the list of CWAs gathering the pfaf list + ArrayList qpfafs = new ArrayList(); + ArrayList gpfafs = new ArrayList(); + ArrayList pfafs = new ArrayList(); + ArrayList cwaList = fdm.getCwaList(); + + for (String cwa : cwaList) { + for (Long key : guidContainer.getBasinData("ALL").getBasins() + .keySet()) { + FFMPBasinMetaData basin = templates.getBasin(key); + if ((basin != null) && (basin.getCwa() != null)) { + if (basin.getCwa().equals(cwa)) { + gpfafs.add(key); + } + } + } + } + + for (String cwa : cwaList) { + for (Long key : qpeContainer.getBasinData("ALL").getBasins() + .keySet()) { + FFMPBasinMetaData basin = templates.getBasin(key); + if ((basin != null) && (basin.getCwa() != null)) { + if (basin.getCwa().equals(cwa)) { + qpfafs.add(key); + } + } + } + } + // find common pfafs + if (qpfafs.size() < gpfafs.size()) { + for (Long pfaf: gpfafs) { + if (qpfafs.contains(pfaf)) { + pfafs.add(pfaf); + } + } + } else { + for (Long pfaf: qpfafs) { + if (gpfafs.contains(pfaf)) { + pfafs.add(pfaf); + } + } + } - ArrayList guids = guidContainer.getBasinData("ALL") - .getGuidanceValues(pfafs, interpolator, - guidSourceExpiration); + long cur = config.getDate().getTime(); + long timeBack = (long) (duration * 3600 * 1000); + Date backDate = new Date(cur - timeBack); + long expirationTime = ffmpQSource.getExpirationMinutes(qSiteKey) * 60 * 1000; - values = new FFTIRatioDiff(qpes, guids, gap); + Double gap = getGap(qpeContainer, ffmpQSource, duration, qSiteKey); - } + if (gap != Double.NaN) { - return values; + ArrayList qpes = qpeContainer.getBasinData("ALL") + .getAccumValues(pfafs, backDate, config.getDate(), + expirationTime, false); + + FFMPGuidanceInterpolation interpolator = new FFMPGuidanceInterpolation( + ffmpgen.fscm, product, ffmpgen.frcm.getRunner( + config.getCWA()).getProduct(qSiteKey), + primarySource, ffgType, qSiteKey); + interpolator.setInterpolationSources(duration); + + ArrayList guids = guidContainer.getBasinData("ALL") + .getGuidanceValues(pfafs, interpolator, + guidSourceExpiration); + + values = new FFTIRatioDiff(qpes, guids, gap); + + } + } + + return values; } /** @@ -934,6 +988,7 @@ public class FFTI implements Runnable { for (FFMPGap gap : gaps) { gapVal += gap.getGap(); } + gapVal = gapVal / 60; } diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.npp.viirs/META-INF/MANIFEST.MF b/edexOsgi/com.raytheon.uf.edex.plugin.npp.viirs/META-INF/MANIFEST.MF deleted file mode 100644 index 1655d7dbf1..0000000000 --- a/edexOsgi/com.raytheon.uf.edex.plugin.npp.viirs/META-INF/MANIFEST.MF +++ /dev/null @@ -1,15 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: VIIRS Edex Plugin -Bundle-SymbolicName: com.raytheon.uf.edex.plugin.npp.viirs -Bundle-Version: 1.0.0.qualifier -Bundle-Vendor: RAYTHEON -Bundle-RequiredExecutionEnvironment: JavaSE-1.6 -Require-Bundle: com.raytheon.edex.common;bundle-version="1.12.1174", - org.geotools;bundle-version="2.6.4", - javax.measure;bundle-version="1.0.0", - javax.persistence;bundle-version="1.0.0", - com.raytheon.uf.common.dataplugin.npp.viirs;bundle-version="1.0.0", - org.apache.commons.logging;bundle-version="1.1.1", - ucar.nc2;bundle-version="1.0.0", - org.apache.commons.lang;bundle-version="2.3.0" diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.npp.viirs/component-deploy.xml b/edexOsgi/com.raytheon.uf.edex.plugin.npp.viirs/component-deploy.xml deleted file mode 100644 index ccb0855b0a..0000000000 --- a/edexOsgi/com.raytheon.uf.edex.plugin.npp.viirs/component-deploy.xml +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.npp.viirs/res/spring/viirs-common.xml b/edexOsgi/com.raytheon.uf.edex.plugin.npp.viirs/res/spring/viirs-common.xml deleted file mode 100644 index 9003096a27..0000000000 --- a/edexOsgi/com.raytheon.uf.edex.plugin.npp.viirs/res/spring/viirs-common.xml +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.npp.viirs/res/spring/viirs-ingest.xml b/edexOsgi/com.raytheon.uf.edex.plugin.npp.viirs/res/spring/viirs-ingest.xml deleted file mode 100644 index 2c736e190f..0000000000 --- a/edexOsgi/com.raytheon.uf.edex.plugin.npp.viirs/res/spring/viirs-ingest.xml +++ /dev/null @@ -1,57 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - java.lang.Throwable - - - - - - diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.npp.viirs/src/com/raytheon/uf/edex/plugin/npp/viirs/VIIRSChannelInfo.java b/edexOsgi/com.raytheon.uf.edex.plugin.npp.viirs/src/com/raytheon/uf/edex/plugin/npp/viirs/VIIRSChannelInfo.java deleted file mode 100644 index 5916786b34..0000000000 --- a/edexOsgi/com.raytheon.uf.edex.plugin.npp.viirs/src/com/raytheon/uf/edex/plugin/npp/viirs/VIIRSChannelInfo.java +++ /dev/null @@ -1,106 +0,0 @@ -/** - * 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.edex.plugin.npp.viirs; - -/** - * VIIRS Channel info class, channelType is something like "Immagery", - * "Moderate", or "DayNight" In the case that channel is null, assumes band. In - * the case channel and wavelength are null, assumes geolocation data. Should - * probably store into in xml config file - * - *
- * 
- * SOFTWARE HISTORY
- * 
- * Date         Ticket#    Engineer    Description
- * ------------ ---------- ----------- --------------------------
- * Dec 5, 2011            mschenke     Initial creation
- * 
- * 
- * - * @author mschenke - * @version 1.0 - */ - -public class VIIRSChannelInfo { - - private String channelType; - - private Double wavelength; - - private Integer channel; - - public VIIRSChannelInfo() { - - } - - public VIIRSChannelInfo(String channelType, Double wavelength, - Integer channel) { - this.channelType = channelType; - this.wavelength = wavelength; - this.channel = channel; - } - - /** - * @return the channelType - */ - public String getChannelType() { - return channelType; - } - - /** - * @param channelType - * the channelType to set - */ - public void setChannelType(String channelType) { - this.channelType = channelType; - } - - /** - * @return the wavelength - */ - public Double getWavelength() { - return wavelength; - } - - /** - * @param wavelength - * the wavelength to set - */ - public void setWavelength(Double wavelength) { - this.wavelength = wavelength; - } - - /** - * @return the channel - */ - public Integer getChannel() { - return channel; - } - - /** - * @param channel - * the channel to set - */ - public void setChannel(Integer channel) { - this.channel = channel; - } - -} diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.npp.viirs/src/com/raytheon/uf/edex/plugin/npp/viirs/VIIRSDecoder.java b/edexOsgi/com.raytheon.uf.edex.plugin.npp.viirs/src/com/raytheon/uf/edex/plugin/npp/viirs/VIIRSDecoder.java deleted file mode 100644 index e83a3ac0e1..0000000000 --- a/edexOsgi/com.raytheon.uf.edex.plugin.npp.viirs/src/com/raytheon/uf/edex/plugin/npp/viirs/VIIRSDecoder.java +++ /dev/null @@ -1,356 +0,0 @@ -/** - * 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.edex.plugin.npp.viirs; - -import java.io.File; -import java.io.FileInputStream; -import java.io.FileOutputStream; -import java.io.IOException; -import java.text.SimpleDateFormat; -import java.util.Arrays; -import java.util.Calendar; -import java.util.Date; -import java.util.HashMap; -import java.util.Map; -import java.util.TimeZone; - -import org.apache.commons.lang.StringUtils; - -import ucar.nc2.Attribute; -import ucar.nc2.Group; -import ucar.nc2.NetcdfFile; -import ucar.nc2.Variable; - -import com.raytheon.edex.esb.Headers; -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.npp.viirs.VIIRSCommonData; -import com.raytheon.uf.common.dataplugin.npp.viirs.VIIRSDataRecord; -import com.raytheon.uf.common.dataplugin.npp.viirs.VIIRSSpatialRecord; -import com.raytheon.uf.common.time.DataTime; - -/** - * Decoder for VIIRS data and spatial files - * - *
- * 
- * SOFTWARE HISTORY
- * 
- * Date         Ticket#    Engineer    Description
- * ------------ ---------- ----------- --------------------------
- * Dec 1, 2011            mschenke     Initial creation
- * 
- * 
- * - * @author mschenke - * @version 1.0 - */ - -public class VIIRSDecoder extends AbstractDecoder { - - private static final String TIME_FORMAT = "ddHHmm"; - - private static final Map regionMap = new HashMap(); - - private static final Map channelMap = new HashMap(); - - static { - regionMap.put("IPUS", "CONUS"); - regionMap.put("IPAK", "Alaska"); - regionMap.put("IPPA", "Pacific"); - regionMap.put("IPCA", "Caribbean"); - - channelMap.put("41", new VIIRSChannelInfo("Imagery", 0.64, 1)); - channelMap.put("42", new VIIRSChannelInfo("Imagery", 0.865, 2)); - channelMap.put("43", new VIIRSChannelInfo("Imagery", 1.61, 3)); - channelMap.put("44", new VIIRSChannelInfo("Imagery", 3.74, 4)); - channelMap.put("45", new VIIRSChannelInfo("Imagery", 11.45, 5)); - channelMap.put("81", new VIIRSChannelInfo("Imagery", null, null)); - channelMap.put("56", new VIIRSChannelInfo("Moderate", 0.746, 6)); - channelMap.put("59", new VIIRSChannelInfo("Moderate", 1.378, 9)); - channelMap.put("63", new VIIRSChannelInfo("Moderate", 4.05, 13)); - channelMap.put("65", new VIIRSChannelInfo("Moderate", 10.763, 15)); - channelMap.put("66", new VIIRSChannelInfo("Moderate", 12.013, 16)); - channelMap.put("82", new VIIRSChannelInfo("Moderate", null, null)); - channelMap.put("67", new VIIRSChannelInfo("DayNight", 0.7, null)); - channelMap.put("83", new VIIRSChannelInfo("DayNight", null, null)); - } - - private static final String NETCDF4StartSequence = new String(new byte[] { - (byte) 0x89, 'H', 'D', 'F', (byte) 0x0d }); - - private static final long TWENTY_FIVE_DAYS = 1000 * 60 * 60 * 24 * 25; - - private File tmpDataDir; - - public VIIRSDecoder(String tmpDataDir) { - this.tmpDataDir = new File(tmpDataDir); - if (this.tmpDataDir.exists() == false) { - this.tmpDataDir.mkdirs(); - } - } - - public PluginDataObject[] decode(File viirsFile, Headers headers) { - PluginDataObject[] rval = new PluginDataObject[0]; - File tmpFile = new File(tmpDataDir, viirsFile.getName()); - try { - FileInputStream fin = new FileInputStream(viirsFile); - FileOutputStream fout = new FileOutputStream(tmpFile); - byte[] bytes = new byte[1024]; - int read = 0; - boolean startFound = false; - while ((read = fin.read(bytes)) > 0) { - byte[] readIn = Arrays.copyOf(bytes, read); - if (!startFound) { - String txt = new String(readIn); - int idx = txt.indexOf(NETCDF4StartSequence, 0); - if (idx >= 0) { - startFound = true; - fout.write(readIn, idx, readIn.length - idx); - } - } else { - fout.write(readIn); - } - } - fout.flush(); - fout.close(); - fin.close(); - } catch (Exception e) { - logger.error("Error extracting header from file", e); - } - - try { - NetcdfFile dataFile = NetcdfFile.open(tmpFile.getAbsolutePath()); - Group root = dataFile.getRootGroup(); - - String wmoHeader = (String) headers.get("header"); - String[] parts = StringUtils.split(wmoHeader, ' '); - if (parts.length != 3) { - logger.error("Could not parse wmo header (" + wmoHeader - + ") properly"); - return rval; - } - String regionId = parts[0].substring(0, 4); - String channelId = parts[0].substring(4); - String time = parts[2]; - - VIIRSChannelInfo channelInfo = channelMap.get(channelId); - if (channelInfo == null) { - logger.error("Could not find channel information for wmo header (" - + wmoHeader + ")"); - return rval; - } - String region = regionMap.get(regionId); - if (region == null) { - logger.error("Could not find region information for wmo header (" - + wmoHeader + ")"); - return rval; - } - VIIRSCommonData commonData = new VIIRSCommonData(); - commonData.setRegion(region); - commonData.setChannelType(channelInfo.getChannelType()); - - SimpleDateFormat sdf = new SimpleDateFormat(TIME_FORMAT); - sdf.setTimeZone(TimeZone.getTimeZone("GMT")); - Date date = sdf.parse(time); - Calendar dataCal = Calendar - .getInstance(TimeZone.getTimeZone("GMT")); - dataCal.setTime(date); - Calendar currCal = Calendar - .getInstance(TimeZone.getTimeZone("GMT")); - dataCal.set(Calendar.YEAR, currCal.get(Calendar.YEAR)); - dataCal.set(Calendar.MONTH, currCal.get(Calendar.MONTH)); - DataTime dataTime = new DataTime(dataCal.getTime()); - - if (currCal.getTimeInMillis() - dataCal.getTimeInMillis() > TWENTY_FIVE_DAYS) { - // This check is for around midnight on last day of month, data - // might come in ahead of time and we don't want to jump - // backwards in time - dataCal.add(Calendar.MONTH, 1); - } - - PluginDataObject pdo = null; - if (channelInfo.getChannel() == null - && channelInfo.getWavelength() == null) { - pdo = decodeSpatialFile(root, commonData, dataTime); - } else { - pdo = decodeDataFile(root, commonData, channelInfo, dataTime); - } - - if (pdo != null) { - pdo.setInsertTime(currCal); - pdo.constructDataURI(); - rval = new PluginDataObject[] { pdo }; - } else { - logger.error("Error decoding netcdf file (" + tmpFile - + ") to PluginDataObject"); - } - } catch (Exception e) { - logger.error("Error decoding viirs data file: " + tmpFile, e); - } finally { - if (tmpFile != null) { - tmpFile.delete(); - } - } - return rval; - } - - private static final String BRIGHTNESS_TEMP_REFLECTANCE_ID = "BrightnessTemperatureOrReflectance@"; - - private static final String RADIANCE_ID = "Radiance@"; - - /** - * @param root - * @param commonData - * @param channelInfo - * @return - * @throws PluginException - */ - private PluginDataObject decodeDataFile(Group root, - VIIRSCommonData commonData, VIIRSChannelInfo channelInfo, - DataTime dataTime) throws IOException, PluginException { - VIIRSDataRecord record = new VIIRSDataRecord(); - record.setDataTime(dataTime); - record.setCommonData(commonData); - record.setLevels(1); - - record.setChannel(channelInfo.getChannel()); - record.setWavelength(channelInfo.getWavelength()); - - int width = 0, height = 0; - float offset = 0.0f, scale = 1.0f; - int[] missingValues = null; - short[] rawData = null; - for (Variable var : root.getVariables()) { - if (var.getFullName().startsWith(BRIGHTNESS_TEMP_REFLECTANCE_ID) - || var.getFullName().startsWith(RADIANCE_ID)) { - rawData = (short[]) var.read().copyTo1DJavaArray(); - // Backwards!? - width = var.getDimension(1).getLength(); - height = var.getDimension(0).getLength(); - for (Attribute attr : var.getAttributes()) { - String name = attr.getName(); - if (VIIRSDataRecord.MISSING_VALUE_ID.equals(name)) { - missingValues = (int[]) attr.getValues() - .copyTo1DJavaArray(); - } else if (VIIRSDataRecord.OFFSET_ID.equals(name)) { - offset = attr.getNumericValue().floatValue(); - } else if (VIIRSDataRecord.SCALE_ID.equals(name)) { - scale = attr.getNumericValue().floatValue(); - } - } - break; - } - } - - if (rawData == null) { - throw new IOException("Error extracting rawData from data file"); - } - - record.setWidth(width); - record.setHeight(height); - - VIIRSMessageData messageData = new VIIRSMessageData(); - messageData.rawData = rawData; - messageData.scale = scale; - messageData.offset = offset; - messageData.missingValues = missingValues; - - record.setMessageData(messageData); - // This will construct the spatialURI - record.getSpatialURI(); - return record; - } - - private static final String LATITUDE_ID = "Latitude@"; - - private static final String LONGITUDE_ID = "Longitude@"; - - /** - * @param root - * @param commonData - * @return - */ - private PluginDataObject decodeSpatialFile(Group root, - VIIRSCommonData commonData, DataTime dataTime) throws IOException { - VIIRSSpatialRecord record = new VIIRSSpatialRecord(); - record.setDataTime(dataTime); - record.setCommonData(commonData); - record.setLevels(1); - - int width = 0, height = 0; - float[] latitudes = null, longitudes = null; - double[] missingValues = null; - for (Variable var : root.getVariables()) { - if (var.getFullName().startsWith(LATITUDE_ID) && latitudes == null) { - latitudes = (float[]) var.read().copyTo1DJavaArray(); - } else if (var.getFullName().startsWith(LONGITUDE_ID) - && longitudes == null) { - width = var.getDimension(1).getLength(); - height = var.getDimension(0).getLength(); - longitudes = (float[]) var.read().copyTo1DJavaArray(); - for (Attribute attr : var.getAttributes()) { - if (VIIRSDataRecord.MISSING_VALUE_ID.equals(attr.getName())) { - missingValues = (double[]) attr.getValues() - .copyTo1DJavaArray(); - } - } - } - } - - if (latitudes == null || longitudes == null) { - throw new IOException("Error extracting lat/lons from spatial file"); - } - - record.setWidth(width); - record.setHeight(height); - - VIIRSSpatialMessageData messageData = new VIIRSSpatialMessageData(); - messageData.latitudes = latitudes; - messageData.longitudes = longitudes; - - if (missingValues != null) { - messageData.missingValues = new float[missingValues.length]; - for (int i = 0; i < missingValues.length; ++i) { - messageData.missingValues[i] = (float) missingValues[i]; - } - // Find first row with bad data - int badRow = height; - for (int h = 0; h < height && badRow == height; ++h) { - float value = longitudes[h * width]; - for (float missingVal : messageData.missingValues) { - if (missingVal == value) { - badRow = h; - break; - } - } - } - - messageData.validHeight = badRow; - } else { - // No missing values present - messageData.validHeight = height; - } - record.setMessageData(messageData); - return record; - } - -} diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.npp.viirs/src/com/raytheon/uf/edex/plugin/npp/viirs/VIIRSSpatialMessageData.java b/edexOsgi/com.raytheon.uf.edex.plugin.npp.viirs/src/com/raytheon/uf/edex/plugin/npp/viirs/VIIRSSpatialMessageData.java deleted file mode 100644 index 6fe7710474..0000000000 --- a/edexOsgi/com.raytheon.uf.edex.plugin.npp.viirs/src/com/raytheon/uf/edex/plugin/npp/viirs/VIIRSSpatialMessageData.java +++ /dev/null @@ -1,49 +0,0 @@ -/** - * 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.edex.plugin.npp.viirs; - -/** - * VIIRS Message data object for spatial data - * - *
- * 
- * SOFTWARE HISTORY
- * 
- * Date         Ticket#    Engineer    Description
- * ------------ ---------- ----------- --------------------------
- * Dec 5, 2011            mschenke     Initial creation
- * 
- * 
- * - * @author mschenke - * @version 1.0 - */ - -public class VIIRSSpatialMessageData { - - public float[] latitudes; - - public float[] longitudes; - - public int validHeight; - - public float[] missingValues; - -} diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.npp.viirs/src/com/raytheon/uf/edex/plugin/npp/viirs/dao/VIIRSDao.java b/edexOsgi/com.raytheon.uf.edex.plugin.npp.viirs/src/com/raytheon/uf/edex/plugin/npp/viirs/dao/VIIRSDao.java deleted file mode 100644 index a9f9a0bdad..0000000000 --- a/edexOsgi/com.raytheon.uf.edex.plugin.npp.viirs/src/com/raytheon/uf/edex/plugin/npp/viirs/dao/VIIRSDao.java +++ /dev/null @@ -1,164 +0,0 @@ -/** - * 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.edex.plugin.npp.viirs.dao; - -import java.util.HashMap; -import java.util.Map; - -import com.raytheon.uf.common.dataplugin.PluginException; -import com.raytheon.uf.common.dataplugin.npp.viirs.VIIRSDataRecord; -import com.raytheon.uf.common.dataplugin.npp.viirs.VIIRSSpatialRecord; -import com.raytheon.uf.common.dataplugin.persist.IPersistable; -import com.raytheon.uf.common.datastorage.IDataStore; -import com.raytheon.uf.common.datastorage.StorageProperties; -import com.raytheon.uf.common.datastorage.records.FloatDataRecord; -import com.raytheon.uf.common.datastorage.records.ShortDataRecord; -import com.raytheon.uf.edex.core.dataplugin.PluginRegistry; -import com.raytheon.uf.edex.database.plugin.PluginDao; -import com.raytheon.uf.edex.plugin.npp.viirs.VIIRSMessageData; -import com.raytheon.uf.edex.plugin.npp.viirs.VIIRSSpatialMessageData; - -/** - * VIIRSDao, creates storage records from PDOs - * - *
- * 
- * SOFTWARE HISTORY
- * 
- * Date         Ticket#    Engineer    Description
- * ------------ ---------- ----------- --------------------------
- * Dec 1, 2011            mschenke     Initial creation
- * 
- * 
- * - * @author mschenke - * @version 1.0 - */ - -public class VIIRSDao extends PluginDao { - - /** - * @param pluginName - * @throws PluginException - */ - public VIIRSDao(String pluginName) throws PluginException { - super(pluginName); - } - - /* - * (non-Javadoc) - * - * @see - * com.raytheon.uf.edex.database.plugin.PluginDao#populateDataStore(com. - * raytheon.uf.common.datastorage.IDataStore, - * com.raytheon.uf.common.dataplugin.persist.IPersistable) - */ - @Override - protected IDataStore populateDataStore(IDataStore dataStore, - IPersistable obj) throws Exception { - if (obj instanceof VIIRSDataRecord) { - populateDataStore(dataStore, (VIIRSDataRecord) obj); - } else if (obj instanceof VIIRSSpatialRecord) { - populateDataStore(dataStore, (VIIRSSpatialRecord) obj); - } - return dataStore; - } - - private void populateDataStore(IDataStore dataStore, VIIRSDataRecord record) - throws Exception { - StorageProperties props = new StorageProperties(); - String compression = PluginRegistry.getInstance() - .getRegisteredObject(pluginName).getCompression(); - if (compression != null) { - props.setCompression(StorageProperties.Compression - .valueOf(compression)); - } - - int levels = record.getLevels(); - int width = record.getWidth(); - int height = record.getHeight(); - for (int i = 0; i < levels; ++i) { - VIIRSMessageData messageData = (VIIRSMessageData) record - .getMessageData(); - ShortDataRecord sdr = new ShortDataRecord( - VIIRSDataRecord.getDataSet(i), record.getDataURI(), - messageData.rawData, 2, new long[] { width, height }); - Map attributes = new HashMap(); - attributes.put(VIIRSDataRecord.MISSING_VALUE_ID, - messageData.missingValues); - attributes.put(VIIRSDataRecord.OFFSET_ID, messageData.offset); - attributes.put(VIIRSDataRecord.SCALE_ID, messageData.scale); - sdr.setDataAttributes(attributes); - sdr.setProperties(props); - sdr.setCorrelationObject(record); - dataStore.addDataRecord(sdr); - // TODO: Handle scaling here - break; - } - } - - private void populateDataStore(IDataStore dataStore, - VIIRSSpatialRecord record) throws Exception { - StorageProperties props = new StorageProperties(); - String compression = PluginRegistry.getInstance() - .getRegisteredObject(pluginName).getCompression(); - if (compression != null) { - props.setCompression(StorageProperties.Compression - .valueOf(compression)); - } - - int levels = record.getLevels(); - int width = record.getWidth(); - int height = record.getHeight(); - for (int i = 0; i < levels; ++i) { - long[] sizes = new long[] { width, height }; - VIIRSSpatialMessageData messageData = (VIIRSSpatialMessageData) record - .getMessageData(); - FloatDataRecord lats = new FloatDataRecord( - VIIRSSpatialRecord.getLatitudeDataSet(i), - record.getDataURI(), messageData.latitudes, sizes.length, - sizes); - FloatDataRecord lons = new FloatDataRecord( - VIIRSSpatialRecord.getLongitudeDataSet(i), - record.getDataURI(), messageData.longitudes, sizes.length, - sizes); - // Create record attributes - Map attributes = new HashMap(); - attributes.put(VIIRSDataRecord.MISSING_VALUE_ID, - messageData.missingValues); - attributes.put(VIIRSSpatialRecord.VALID_HEIGHT_ID, - messageData.validHeight); - - // Set on records - lats.setDataAttributes(attributes); - lats.setProperties(props); - lats.setCorrelationObject(record); - lons.setDataAttributes(attributes); - lons.setProperties(props); - lons.setCorrelationObject(record); - - // Add records - dataStore.addDataRecord(lats); - dataStore.addDataRecord(lons); - // TODO: Handle scaling here - break; - } - } -} diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.npp.viirs/utility/edex_static/base/distribution/viirs.xml b/edexOsgi/com.raytheon.uf.edex.plugin.npp.viirs/utility/edex_static/base/distribution/viirs.xml deleted file mode 100644 index 48e070e2de..0000000000 --- a/edexOsgi/com.raytheon.uf.edex.plugin.npp.viirs/utility/edex_static/base/distribution/viirs.xml +++ /dev/null @@ -1,23 +0,0 @@ - - - - IP.... KNES - diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.nwsauth/utility/edex_static/base/roles/userRoles.xml b/edexOsgi/com.raytheon.uf.edex.plugin.nwsauth/utility/edex_static/base/roles/userRoles.xml index dfea46eca3..910eab1ac4 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.nwsauth/utility/edex_static/base/roles/userRoles.xml +++ b/edexOsgi/com.raytheon.uf.edex.plugin.nwsauth/utility/edex_static/base/roles/userRoles.xml @@ -58,6 +58,12 @@ + + + + + + diff --git a/edexOsgi/com.raytheon.uf.edex.plugin.preciprate/src/com/raytheon/uf/edex/plugin/preciprate/common/PrecipRate.java b/edexOsgi/com.raytheon.uf.edex.plugin.preciprate/src/com/raytheon/uf/edex/plugin/preciprate/common/PrecipRate.java index 3979eeec49..9c819e27b6 100644 --- a/edexOsgi/com.raytheon.uf.edex.plugin.preciprate/src/com/raytheon/uf/edex/plugin/preciprate/common/PrecipRate.java +++ b/edexOsgi/com.raytheon.uf.edex.plugin.preciprate/src/com/raytheon/uf/edex/plugin/preciprate/common/PrecipRate.java @@ -55,7 +55,13 @@ public class PrecipRate { for (int radial = 0; radial < rec.getNumRadials(); radial++) { for (int bin = 0; bin < rec.getNumBins(); bin++) { Float val = precipRate[(rec.getNumBins() * radial) + bin] * 10; - bytes[(rec.getNumBins() * radial) + bin] = val.byteValue(); + byte b = (int)0; + if (val > 0.0) { + val = val + 1; + b = val.byteValue(); + } + + bytes[(rec.getNumBins() * radial) + bin] = b; } } diff --git a/edexOsgi/com.raytheon.uf.edex.purgesrv/META-INF/MANIFEST.MF b/edexOsgi/com.raytheon.uf.edex.purgesrv/META-INF/MANIFEST.MF index ab59428837..cfda66614c 100644 --- a/edexOsgi/com.raytheon.uf.edex.purgesrv/META-INF/MANIFEST.MF +++ b/edexOsgi/com.raytheon.uf.edex.purgesrv/META-INF/MANIFEST.MF @@ -8,4 +8,5 @@ Bundle-RequiredExecutionEnvironment: JavaSE-1.6 Require-Bundle: com.raytheon.edex.common;bundle-version="1.11.26", org.apache.commons.logging;bundle-version="1.0.4", org.apache.commons.lang;bundle-version="2.3.0", - com.raytheon.uf.common.status;bundle-version="1.12.1174" + com.raytheon.uf.common.status;bundle-version="1.12.1174", + javax.persistence;bundle-version="1.0.0" diff --git a/edexOsgi/com.raytheon.uf.edex.purgesrv/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject b/edexOsgi/com.raytheon.uf.edex.purgesrv/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject new file mode 100644 index 0000000000..1d4401ec46 --- /dev/null +++ b/edexOsgi/com.raytheon.uf.edex.purgesrv/META-INF/services/com.raytheon.uf.common.serialization.ISerializableObject @@ -0,0 +1 @@ +com.raytheon.uf.edex.purgesrv.PurgeJobStatus \ No newline at end of file diff --git a/edexOsgi/com.raytheon.uf.edex.purgesrv/res/spring/purge-spring.xml b/edexOsgi/com.raytheon.uf.edex.purgesrv/res/spring/purge-spring.xml index ae76dd4db8..5c16e396ed 100644 --- a/edexOsgi/com.raytheon.uf.edex.purgesrv/res/spring/purge-spring.xml +++ b/edexOsgi/com.raytheon.uf.edex.purgesrv/res/spring/purge-spring.xml @@ -6,7 +6,25 @@ - + + + + + + + + + + + + + + + + + + + @@ -18,22 +36,8 @@ - - - - - - - - java.lang.Throwable - - - - - @@ -58,8 +62,22 @@ + + + + + + + + java.lang.Throwable + + + + + diff --git a/edexOsgi/com.raytheon.uf.edex.purgesrv/src/com/raytheon/uf/edex/purgesrv/PurgeDao.java b/edexOsgi/com.raytheon.uf.edex.purgesrv/src/com/raytheon/uf/edex/purgesrv/PurgeDao.java new file mode 100644 index 0000000000..492c27e9c7 --- /dev/null +++ b/edexOsgi/com.raytheon.uf.edex.purgesrv/src/com/raytheon/uf/edex/purgesrv/PurgeDao.java @@ -0,0 +1,282 @@ +/** + * 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.edex.purgesrv; + +import java.sql.Timestamp; +import java.util.Calendar; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.TimeZone; + +import org.hibernate.Query; +import org.hibernate.Session; +import org.springframework.transaction.TransactionStatus; +import org.springframework.transaction.support.TransactionCallback; +import org.springframework.transaction.support.TransactionCallbackWithoutResult; + +import com.raytheon.uf.edex.database.dao.CoreDao; +import com.raytheon.uf.edex.database.dao.DaoConfig; + +/** + * + * Data access object for accessing purge job status objects + * + *
+ * 
+ * SOFTWARE HISTORY
+ * 
+ * Date         Ticket#    Engineer    Description
+ * ------------ ---------- ----------- --------------------------
+ * May 1, 2012  #470      bphillip     Initial creation
+ * 
+ * 
+ * + * @author bphillip + * @version 1.0 + */ +public class PurgeDao extends CoreDao { + + /** + * Constructs a new purge data access object + */ + public PurgeDao() { + super(DaoConfig.forClass(PurgeJobStatus.class)); + } + + /** + * Gets the number of purge jobs currently running on the cluster. A job is + * considered running if the 'running' flag is set to true and the job has + * been started since validStartTime and has not met or exceeded the failed + * count. + * + * @param validStartTime + * @param failedCount + * @return The number of purge jobs currently running on the cluster + */ + public int getRunningClusterJobs(final Date validStartTime, + final int failedCount) { + final String query = "from " + + daoClass.getName() + + " obj where obj.running = true and obj.startTime > :startTime and obj.failedCount <= :failedCount"; + return (Integer) txTemplate.execute(new TransactionCallback() { + @Override + public Object doInTransaction(TransactionStatus status) { + Query hibQuery = getSession(false).createQuery(query); + hibQuery.setTimestamp("startTime", validStartTime); + hibQuery.setInteger("failedCount", failedCount); + List queryResult = hibQuery.list(); + if (queryResult == null) { + return 0; + } else { + return queryResult.size(); + } + } + }); + } + + /** + * Returns the jobs that have met or exceed the failed count. + * + * @param failedCount + * @return + */ + @SuppressWarnings("unchecked") + public List getFailedJobs(final int failedCount) { + final String query = "from " + daoClass.getName() + + " obj where obj.failedCount >= :failedCount"; + return (List) txTemplate + .execute(new TransactionCallback() { + @Override + public List doInTransaction( + TransactionStatus status) { + Query hibQuery = getSession(false).createQuery(query); + hibQuery.setInteger("failedCount", failedCount); + return hibQuery.list(); + } + }); + } + + @SuppressWarnings("unchecked") + public List getTimedOutJobs(final Date validStartTime) { + final String query = "from " + + daoClass.getName() + + " obj where obj.running = true and obj.startTime <= :startTime"; + return (List) txTemplate + .execute(new TransactionCallback() { + @Override + public List doInTransaction( + TransactionStatus status) { + Query hibQuery = getSession(false).createQuery(query); + hibQuery.setTimestamp("startTime", validStartTime); + return hibQuery.list(); + } + }); + } + + @SuppressWarnings("unchecked") + public Map> getRunningServerJobs() { + final String query = "from " + + daoClass.getName() + + " obj where obj.running = true and obj.timedOut = false and obj.failed = false and obj.id.server=':SERVER'"; + return (Map>) txTemplate + .execute(new TransactionCallback() { + @Override + public Map> doInTransaction( + TransactionStatus status) { + Map> serverMap = new HashMap>(); + Query serverQuery = getSession(false).createQuery( + "select distinct obj.id.server from " + + daoClass.getName() + + " obj order by obj.id.server asc"); + List result = serverQuery.list(); + for (String server : result) { + Query query2 = getSession(false).createQuery( + query.replace(":SERVER", server)); + serverMap.put(server, query2.list()); + } + return serverMap; + } + }); + } + + /** + * Gets the amount of time in milliseconds since the last purge of a given + * plugin + * + * @param plugin + * The plugin name + * @return Number of milliseconds since the purge job was run for the given + * plugin + */ + public long getTimeSinceLastPurge(String plugin) { + final String query = "select obj.startTime from " + daoClass.getName() + + " obj where obj.id.plugin='" + plugin + "'"; + return (Long) txTemplate.execute(new TransactionCallback() { + @Override + public Object doInTransaction(TransactionStatus status) { + Query hibQuery = getSession(false).createQuery(query); + Timestamp queryResult = (Timestamp) hibQuery.uniqueResult(); + if (queryResult == null) { + return -1; + } else { + return System.currentTimeMillis() - queryResult.getTime(); + } + } + }); + } + + /** + * Gets the purge job status for a plugin + * + * @param plugin + * The plugin to get the purge job status for + * @return The purge job statuses + */ + public PurgeJobStatus getJobForPlugin(String plugin) { + final String query = "from " + daoClass.getName() + + " obj where obj.id.plugin='" + plugin + "'"; + return (PurgeJobStatus) txTemplate.execute(new TransactionCallback() { + @Override + public PurgeJobStatus doInTransaction(TransactionStatus status) { + Query hibQuery = getSession(false).createQuery(query); + PurgeJobStatus queryResult = (PurgeJobStatus) hibQuery + .uniqueResult(); + return queryResult; + } + }); + } + + /** + * Sets a purge job to running status and sets the startTime to current + * time. If was previously running, will increment the failed count. + * + * @param plugin + * The plugin row to update + */ + public void startJob(final String plugin) { + final String query = "from " + daoClass.getName() + + " obj where obj.id.plugin='" + plugin + "'"; + txTemplate.execute(new TransactionCallback() { + @Override + public PurgeJobStatus doInTransaction(TransactionStatus status) { + Session sess = getSession(false); + Query hibQuery = sess.createQuery(query); + PurgeJobStatus queryResult = (PurgeJobStatus) hibQuery + .uniqueResult(); + if (queryResult == null) { + queryResult = new PurgeJobStatus(); + queryResult.setFailedCount(0); + queryResult.setPlugin(plugin); + queryResult.setRunning(false); + sess.save(queryResult); + } + + if (queryResult.isRunning()) { + // query was previously running, update failed count + queryResult.incrementFailedCount(); + } + + queryResult.setStartTime(Calendar.getInstance( + TimeZone.getTimeZone("GMT")).getTime()); + queryResult.setRunning(true); + sess.update(queryResult); + return queryResult; + } + }); + } + + /** + * Retrieves the plugins order by startTime. + * + * @param latestStartTime + * @param failedCount + * @return + */ + @SuppressWarnings("unchecked") + public List getPluginsByPurgeTime() { + final String query = "select obj.id.plugin from " + daoClass.getName() + + " obj order by obj.startTime asc, obj.plugin asc"; + return (List) txTemplate.execute(new TransactionCallback() { + @Override + public List doInTransaction(TransactionStatus status) { + Query hibQuery = getSession(false).createQuery(query); + List result = (List) hibQuery.list(); + return result; + } + }); + } + + /** + * Updates a purge job status object + * + * @param jobStatus + * The object to update + */ + public void update(final PurgeJobStatus jobStatus) { + txTemplate.execute(new TransactionCallbackWithoutResult() { + @Override + public void doInTransactionWithoutResult(TransactionStatus status) { + getHibernateTemplate().update(jobStatus); + } + }); + } +} diff --git a/edexOsgi/com.raytheon.uf.edex.purgesrv/src/com/raytheon/uf/edex/purgesrv/PurgeJob.java b/edexOsgi/com.raytheon.uf.edex.purgesrv/src/com/raytheon/uf/edex/purgesrv/PurgeJob.java new file mode 100644 index 0000000000..d71ca475d1 --- /dev/null +++ b/edexOsgi/com.raytheon.uf.edex.purgesrv/src/com/raytheon/uf/edex/purgesrv/PurgeJob.java @@ -0,0 +1,302 @@ +/** + * 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.edex.purgesrv; + +import java.lang.reflect.Method; +import java.sql.SQLException; +import java.util.Calendar; +import java.util.Date; +import java.util.Map; +import java.util.TimeZone; + +import com.raytheon.uf.edex.database.cluster.ClusterLockUtils; +import com.raytheon.uf.edex.database.cluster.ClusterTask; +import com.raytheon.uf.edex.database.plugin.PluginDao; +import com.raytheon.uf.edex.database.plugin.PluginFactory; +import com.raytheon.uf.edex.database.purge.PurgeLogger; + +/** + * + * This class encapsulates the purge activity for a plugin into a cluster task. + * + *
+ * 
+ * SOFTWARE HISTORY
+ * 
+ * Date         Ticket#    Engineer    Description
+ * ------------ ---------- ----------- --------------------------
+ * Apr 19, 2012 #470       bphillip     Initial creation
+ * 
+ * 
+ * + * @author bphillip + * @version 1.0 + */ +public class PurgeJob extends Thread { + + /** The type of purge */ + public enum PURGE_JOB_TYPE { + PURGE_ALL, PURGE_EXPIRED + } + + private long startTime; + + /** The cluster task name to use for purge jobs */ + public static final String TASK_NAME = "Purge Plugin Data"; + + /** The plugin associated with this purge job */ + private String pluginName; + + /** The type of purge job being executed */ + private PURGE_JOB_TYPE purgeType; + + /** Last time job has printed a timed out message */ + private long lastTimeOutMessage = 0; + + /** + * Creates a new Purge job for the specified plugin. + * + * @param pluginName + * The plugin to be purged + * @param purgeType + * The type of purge to be executed + */ + public PurgeJob(String pluginName, PURGE_JOB_TYPE purgeType) { + // Give the thread a name + this.setName("Purge-" + pluginName.toUpperCase() + "-Thread"); + this.pluginName = pluginName; + this.purgeType = purgeType; + } + + public void run() { + + // Flag used to track if this job has failed + boolean failed = false; + startTime = System.currentTimeMillis(); + PurgeLogger.logInfo("Purging expired data...", pluginName); + PluginDao dao = null; + + try { + dao = PluginFactory.getInstance().getPluginDao(pluginName); + if (dao.getDaoClass() != null) { + dao.purgeExpiredData(); + PurgeLogger.logInfo("Data successfully Purged!", pluginName); + } else { + Method m = dao.getClass().getMethod("purgeExpiredData", + new Class[] {}); + if (m != null) { + if (m.getDeclaringClass().equals(PluginDao.class)) { + PurgeLogger + .logWarn( + "Unable to purge data. This plugin does not specify a record class and does not implement a custom purger.", + pluginName); + } else { + if (this.purgeType.equals(PURGE_JOB_TYPE.PURGE_EXPIRED)) { + dao.purgeExpiredData(); + } else { + dao.purgeAllData(); + } + PurgeLogger.logInfo("Data successfully Purged!", + pluginName); + } + } + } + } catch (Exception e) { + failed = true; + // keep getting next exceptions with sql exceptions to ensure + // we can see the underlying error + PurgeLogger + .logError("Error purging expired data!\n", pluginName, e); + Throwable t = e.getCause(); + while (t != null) { + if (t instanceof SQLException) { + SQLException se = ((SQLException) t).getNextException(); + PurgeLogger.logError("Next exception:", pluginName, se); + } + t = t.getCause(); + } + } finally { + ClusterTask purgeLock = PurgeManager.getInstance().getPurgeLock(); + try { + /* + * Update the status accordingly if the purge failed or + * succeeded + */ + PurgeDao purgeDao = new PurgeDao(); + PurgeJobStatus status = purgeDao + .getJobForPlugin(this.pluginName); + if (status == null) { + PurgeLogger.logError( + "Purge job completed but no status object found!", + this.pluginName); + } else { + if (failed) { + status.incrementFailedCount(); + if (status.getFailedCount() >= PurgeManager + .getInstance().getFatalFailureCount()) { + PurgeLogger + .logFatal( + "Purger for this plugin has reached or exceeded consecutive failure limit of " + + PurgeManager + .getInstance() + .getFatalFailureCount() + + ". Data will no longer being purged for this plugin.", + pluginName); + } else { + PurgeLogger.logError("Purge job has failed " + + status.getFailedCount() + + " consecutive times.", this.pluginName); + // Back the start time off by half an hour to try to + // purgin soon, don't want to start immediately so + // it doesn't ping pong between servers in a time + // out scenario + Date startTime = status.getStartTime(); + startTime.setTime(startTime.getTime() - (1800000)); + } + } else { + status.setFailedCount(0); + } + + /* + * This purger thread has exceeded the time out duration but + * finally finished. Output a message and update the status + */ + int deadPurgeJobAge = PurgeManager.getInstance() + .getDeadPurgeJobAge(); + Calendar purgeTimeOutLimit = Calendar.getInstance(); + purgeTimeOutLimit.setTimeZone(TimeZone.getTimeZone("GMT")); + purgeTimeOutLimit.add(Calendar.MINUTE, -deadPurgeJobAge); + if (startTime < purgeTimeOutLimit.getTimeInMillis()) { + PurgeLogger + .logInfo( + "Purge job has recovered from timed out state!!", + pluginName); + } + status.setRunning(false); + purgeDao.update(status); + /* + * Log execution times + */ + long executionTime = getAge(); + long execTimeInMinutes = executionTime / 60000; + if (execTimeInMinutes > 0) { + PurgeLogger.logInfo("Purge run time: " + executionTime + + " ms (" + execTimeInMinutes + " minutes)", + this.pluginName); + } else { + PurgeLogger.logInfo("Purge run time: " + executionTime + + " ms", this.pluginName); + } + } + } catch (Throwable e) { + PurgeLogger + .logError( + "An unexpected error occurred upon completion of the purge job", + this.pluginName, e); + } finally { + ClusterLockUtils.unlock(purgeLock, false); + } + } + } + + public void printTimedOutMessage(int deadPurgeJobAge) { + // only print message every 5 minutes + if (System.currentTimeMillis() - lastTimeOutMessage > 300000) { + PurgeLogger.logFatal( + "Purger running time has exceeded timeout duration of " + + deadPurgeJobAge + + " minutes. Current running time: " + + (getAge() / 60000) + " minutes", pluginName); + printStackTrace(); + } + } + + /** + * Prints the stack trace for this job thread. + */ + public void printStackTrace() { + StringBuffer buffer = new StringBuffer(); + buffer.append("Stack trace for Purge Job Thread:\n"); + buffer.append(getStackTrace(this)); + // If this thread is blocked, output the stack traces for the other + // blocked threads to assist in determining the source of the + // deadlocked + // threads + if (this.getState().equals(State.BLOCKED)) { + buffer.append("\tDUMPING OTHER BLOCKED THREADS\n"); + buffer.append(getBlockedStackTraces()); + + } + PurgeLogger.logError(buffer.toString(), this.pluginName); + + } + + /** + * Gets the stack traces for all other threads in the BLOCKED state in the + * JVM + * + * @return The stack traces for all other threads in the BLOCKED state in + * the JVM + */ + private String getBlockedStackTraces() { + StringBuffer buffer = new StringBuffer(); + Map threads = Thread.getAllStackTraces(); + for (Thread t : threads.keySet()) { + if (t.getState().equals(State.BLOCKED)) { + if (t.getId() != this.getId()) { + buffer.append(getStackTrace(t)); + } + } + } + + return buffer.toString(); + } + + /** + * Gets the stack trace for the given thread + * + * @param thread + * The thread to get the stack trace for + * @return The stack trace as a String + */ + private String getStackTrace(Thread thread) { + StringBuffer buffer = new StringBuffer(); + StackTraceElement[] stack = Thread.getAllStackTraces().get(thread); + buffer.append("\tThread ID: ").append(thread.getId()) + .append(" Thread state: ").append(this.getState()) + .append("\n"); + if (stack == null) { + buffer.append("No stack trace could be retrieved for this thread"); + } else { + for (int i = 0; i < stack.length; i++) { + buffer.append("\t\t").append(stack[i]).append("\n"); + } + } + return buffer.toString(); + } + + public long getStartTime() { + return startTime; + } + + public long getAge() { + return System.currentTimeMillis() - startTime; + } +} diff --git a/edexOsgi/com.raytheon.uf.edex.purgesrv/src/com/raytheon/uf/edex/purgesrv/PurgeJobStatus.java b/edexOsgi/com.raytheon.uf.edex.purgesrv/src/com/raytheon/uf/edex/purgesrv/PurgeJobStatus.java new file mode 100644 index 0000000000..4d225199c7 --- /dev/null +++ b/edexOsgi/com.raytheon.uf.edex.purgesrv/src/com/raytheon/uf/edex/purgesrv/PurgeJobStatus.java @@ -0,0 +1,157 @@ +/** + * 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.edex.purgesrv; + +import java.io.Serializable; +import java.util.Date; + +import javax.persistence.Column; +import javax.persistence.Entity; +import javax.persistence.Id; +import javax.persistence.Table; + +import com.raytheon.uf.common.serialization.ISerializableObject; + +/** + * + * Object that encapsulates the status of a plugin purge job + * + *
+ * 
+ * SOFTWARE HISTORY
+ * 
+ * Date         Ticket#    Engineer    Description
+ * ------------ ---------- ----------- --------------------------
+ * May 1, 2012            bphillip     Initial creation
+ * 
+ * 
+ * + * @author bphillip + * @version 1.0 + */ +@Entity +@Table(name = "purgejobs") +public class PurgeJobStatus implements Serializable, ISerializableObject, + Cloneable { + + private static final long serialVersionUID = -6381471022735050985L; + + /** The plugin that is to be purged by this job */ + @Id + @Column(nullable = false, length = 64) + private String plugin; + + /** Denotes if this job is currently running */ + @Column(nullable = false) + private boolean running = false; + + /** The time that this purger started execution */ + @Column(nullable = false) + private Date startTime; + + /** + * The number of consecutive times this purge has failed to execute + * successfully + */ + @Column(nullable = false) + private int failedCount; + + public PurgeJobStatus() { + + } + + /** + * Creates a new PurgeJobStatus with the given values + * + * @param plugin + * @param running + * @param startTime + * @param failedCount + */ + public PurgeJobStatus(String plugin, boolean running, Date startTime, + int failedCount) { + this.plugin = plugin; + this.running = running; + this.startTime = startTime; + this.failedCount = failedCount; + } + + /** + * Gets how long this job has been running in milliseconds + * + * @return The execution duration + */ + public long getRunningTime() { + return System.currentTimeMillis() - startTime.getTime(); + } + + /** + * Gets how long this job has been running in minutes + * + * @return The execution duration in minutes + */ + public long getRunningTimeAsMinutes() { + return getRunningTime() / 60000; + } + + /** + * Increments the failed count + */ + public void incrementFailedCount() { + this.failedCount++; + } + + public String getPlugin() { + return plugin; + } + + public void setPlugin(String plugin) { + this.plugin = plugin; + } + + public boolean isRunning() { + return running; + } + + public void setRunning(boolean running) { + this.running = running; + } + + public Date getStartTime() { + return startTime; + } + + public void setStartTime(Date startTime) { + this.startTime = startTime; + } + + public int getFailedCount() { + return failedCount; + } + + public void setFailedCount(int failedCount) { + this.failedCount = failedCount; + } + + @Override + public Object clone() { + return new PurgeJobStatus(plugin, running, startTime, failedCount); + } +} diff --git a/edexOsgi/com.raytheon.uf.edex.purgesrv/src/com/raytheon/uf/edex/purgesrv/PurgeManager.java b/edexOsgi/com.raytheon.uf.edex.purgesrv/src/com/raytheon/uf/edex/purgesrv/PurgeManager.java new file mode 100644 index 0000000000..a21bb7fc7e --- /dev/null +++ b/edexOsgi/com.raytheon.uf.edex.purgesrv/src/com/raytheon/uf/edex/purgesrv/PurgeManager.java @@ -0,0 +1,488 @@ +/** + * 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.edex.purgesrv; + +import java.lang.Thread.State; +import java.util.ArrayList; +import java.util.Calendar; +import java.util.Collections; +import java.util.Date; +import java.util.HashSet; +import java.util.Iterator; +import java.util.List; +import java.util.Map; +import java.util.Set; +import java.util.TimeZone; +import java.util.concurrent.ConcurrentHashMap; + +import com.raytheon.uf.edex.core.dataplugin.PluginRegistry; +import com.raytheon.uf.edex.database.cluster.ClusterLockUtils; +import com.raytheon.uf.edex.database.cluster.ClusterLockUtils.LockState; +import com.raytheon.uf.edex.database.cluster.ClusterTask; +import com.raytheon.uf.edex.database.purge.PurgeLogger; +import com.raytheon.uf.edex.database.status.StatusConstants; +import com.raytheon.uf.edex.purgesrv.PurgeJob.PURGE_JOB_TYPE; + +/** + * + * Object for managing purge jobs. The purge manager relies on the purgejobs + * table to coordinate information. The executePurge() method on this class is + * executed every minute via a quartz timer defined in the purge-spring.xml + * Spring configuration file. + *

+ * The purge manager is designed to adhere to the following rules: + *

+ * · The cluster may have no more than 6 purge jobs running simultaneously by + * default. This property is configurable in the project.properties file
+ * · Any given server may have no more than 2 purge jobs running simultaneously + * by default. This property is configurable in the project.properties file
+ * · A purge job for a plugin is considered 'hung' if it has been running for + * more than 20 minutes by default. This property is configurable in the + * project.properties file
+ * · If a purge job that was previously determined to be hung actually finishes + * it's execution, the cluster lock is updated appropriately and the purge job + * is able to resume normal operation. This is in place so if a hung purge + * process goes unnoticed for a period of time, the server will still try to + * recover autonomously if it can.
+ * · If a purge job is determined to be hung, the stack trace for the thread + * executing the job is output to the log. Furthermore, if the job is in the + * BLOCKED state, the stack traces for all other BLOCKED threads is output to + * the purge log as part of a rudimentary deadlock detection strategy to be used + * by personnel attempting to remedy the situation.
+ * · By default, a fatal condition occurs if a given plugin's purge job fails 3 + * consecutive times.
+ * · If a purge job hangs on one server in the cluster, it will try and run on + * another cluster member at the next purge interval.
+ * · If the purge manager attempts to purge a plugin that has been running for + * longer than the 20 minute threshold, it is considered a failure, and the + * failure count is updated. + *

+ * + * + *

+ * 
+ * SOFTWARE HISTORY
+ * 
+ * Date         Ticket#    Engineer    Description
+ * ------------ ---------- ----------- --------------------------
+ * Apr 18, 2012 #470       bphillip    Initial creation
+ * 
+ * 
+ * + * @author bphillip + * @version 1.0 + */ +public class PurgeManager { + + /** Purge Manager task name */ + private static final String PURGE_TASK_NAME = "Purge Manager"; + + /** Purge Manager task details */ + private static final String PURGE_TASK_DETAILS = "Purge Manager Job"; + + /** Purge Manager task override timeout. Currently 2 minutes */ + private static final long PURGE_MANAGER_TIMEOUT = 120000; + + /** + * The cluster limit property to be set via Spring with the value defined in + * project.properties + */ + private int clusterLimit = 6; + + /** + * The server limit property to be set via Spring with the value defined in + * project.properties + */ + private int serverLimit = 2; + + /** + * The time in minutes at which a purge job is considered 'dead' or 'hung' + * set via Spring with the value defined in project.properties + */ + private int deadPurgeJobAge = 20; + + /** + * The frequency, in minutes, that a plugin may be purged set via Spring + * with the value defined in project.properties + */ + private int purgeFrequency = 60; + + /** + * How many times a purger is allowed to fail before it is considered fatal. + * Set via Spring with the value defined in project.properties + */ + private int fatalFailureCount = 3; + + /** + * The master switch defined in project.properties that enables and disables + * data purging + */ + private boolean purgeEnabled = true; + + /** Map of purge jobs */ + private Map purgeJobs = new ConcurrentHashMap(); + + private PurgeDao dao = new PurgeDao(); + + private static PurgeManager instance = new PurgeManager(); + + public static PurgeManager getInstance() { + return instance; + } + + /** + * Creates a new PurgeManager + */ + private PurgeManager() { + } + + /** + * Executes the purge routine + */ + public void executePurge() { + if (!purgeEnabled) { + PurgeLogger.logWarn( + "Data purging has been disabled. No data will be purged.", + null); + return; + } + + ClusterTask purgeMgrTask = getPurgeLock(); + + try { + // Prune the job map + Iterator iter = purgeJobs.values().iterator(); + while (iter.hasNext()) { + if (!iter.next().isAlive()) { + iter.remove(); + } + } + + Calendar purgeTimeOutLimit = Calendar.getInstance(); + purgeTimeOutLimit.setTimeZone(TimeZone.getTimeZone("GMT")); + purgeTimeOutLimit.add(Calendar.MINUTE, -deadPurgeJobAge); + Calendar purgeFrequencyLimit = Calendar.getInstance(); + purgeFrequencyLimit.setTimeZone(TimeZone.getTimeZone("GMT")); + purgeFrequencyLimit.add(Calendar.MINUTE, -purgeFrequency); + + // Gets the list of plugins in ascending order by the last time they + // were purged + List pluginList = dao.getPluginsByPurgeTime(); + + // check for any new plugins or database being purged and needing + // entries recreated + Set availablePlugins = new HashSet(PluginRegistry + .getInstance().getRegisteredObjects()); + + // Merge the lists + availablePlugins.removeAll(pluginList); + + if (availablePlugins.size() > 0) { + // generate new list with them at the beginning + List newSortedPlugins = new ArrayList( + availablePlugins); + Collections.sort(newSortedPlugins); + newSortedPlugins.addAll(pluginList); + pluginList = newSortedPlugins; + } + + boolean canPurge = true; + int jobsStarted = 0; + int maxNumberOfJobsToStart = Math.min( + clusterLimit + - dao.getRunningClusterJobs( + purgeTimeOutLimit.getTime(), + fatalFailureCount), serverLimit + - getNumberRunningJobsOnServer(purgeTimeOutLimit)); + for (String plugin : pluginList) { + try { + // initialize canPurge based on number of jobs started + canPurge = jobsStarted < maxNumberOfJobsToStart; + PurgeJob jobThread = purgeJobs.get(plugin); + PurgeJobStatus job = dao.getJobForPlugin(plugin); + + if (job == null) { + // no job in database, generate empty job + + try { + job = new PurgeJobStatus(); + job.setPlugin(plugin); + job.setFailedCount(0); + job.setRunning(false); + job.setStartTime(new Date(0)); + dao.create(job); + } catch (Throwable e) { + PurgeLogger.logError( + "Failed to create new purge job entry", + plugin, e); + } + } + + // Check to see if this job has met the fatal failure count + if (job.getFailedCount() >= fatalFailureCount) { + canPurge = false; + PurgeLogger + .logFatal( + "Purger for this plugin has reached or exceeded consecutive failure limit of " + + fatalFailureCount + + ". Data will no longer being purged for this plugin.", + plugin); + } + + // is purge job currently running on this server + if (jobThread != null) { + // job currently running on our server, don't start + // another + canPurge = false; + + if (purgeTimeOutLimit.getTimeInMillis() > jobThread + .getStartTime()) { + jobThread.printTimedOutMessage(deadPurgeJobAge); + } + } else { + if (job.isRunning()) { + // check if job has timed out + if (purgeTimeOutLimit.getTime().before( + job.getStartTime())) { + canPurge = false; + } + // else if no one else sets canPurge = false will + // start purging on this server + } else { + // not currently running, check if need to be purged + Date startTime = job.getStartTime(); + if (startTime != null + && startTime.after(purgeFrequencyLimit + .getTime())) { + canPurge = false; + } + } + } + + if (canPurge) { + purgeJobs.put(plugin, purgeExpiredData(plugin)); + jobsStarted++; + } + } catch (Throwable e) { + PurgeLogger + .logError( + "An unexpected error occured during the purge job check for plugin", + plugin, e); + } + } + } catch (Throwable e) { + PurgeLogger + .logError( + "An unexpected error occured during the data purge process", + StatusConstants.CATEGORY_PURGE, e); + } finally { + // Unlock the purge task to allow other servers to run. + ClusterLockUtils.unlock(purgeMgrTask, false); + // PurgeLogger.logInfo(getPurgeStatus(true), null); + } + } + + @SuppressWarnings("unused") + private String getPurgeStatus(boolean verbose) { + Calendar purgeTimeOutLimit = Calendar.getInstance(); + purgeTimeOutLimit.setTimeZone(TimeZone.getTimeZone("GMT")); + purgeTimeOutLimit.add(Calendar.MINUTE, -deadPurgeJobAge); + + StringBuilder builder = new StringBuilder(); + List failedJobs = dao.getFailedJobs(fatalFailureCount); + + List timedOutJobs = dao + .getTimedOutJobs(purgeTimeOutLimit.getTime()); + int clusterJobs = dao.getRunningClusterJobs( + purgeTimeOutLimit.getTime(), fatalFailureCount); + Map> serverMap = dao + .getRunningServerJobs(); + builder.append("\nPURGE JOB STATUS:"); + builder.append("\n\tTotal Jobs Running On Cluster: ").append( + clusterJobs); + List jobs = null; + for (String server : serverMap.keySet()) { + jobs = serverMap.get(server); + builder.append("\n\tJobs Running On ").append(server).append(": ") + .append(jobs.size()); + if (verbose && !jobs.isEmpty()) { + builder.append(" Plugins: "); + for (int i = 0; i < jobs.size(); i++) { + builder.append(jobs.get(i).getPlugin()); + if (i != jobs.size() - 1) { + builder.append(","); + } + } + } + } + if (verbose) { + builder.append("\n\tFailed Jobs: "); + if (failedJobs.isEmpty()) { + builder.append("0"); + } else { + PurgeJobStatus currentJob = null; + for (int i = 0; i < failedJobs.size(); i++) { + currentJob = failedJobs.get(i); + builder.append(currentJob.getPlugin()); + if (i != failedJobs.size() - 1) { + builder.append(","); + } + } + } + + builder.append("\n\tTimed Out Jobs: "); + if (timedOutJobs.isEmpty()) { + builder.append("0"); + } else { + PurgeJobStatus currentJob = null; + for (int i = 0; i < timedOutJobs.size(); i++) { + currentJob = timedOutJobs.get(i); + builder.append(currentJob.getPlugin()); + if (i != timedOutJobs.size() - 1) { + builder.append(","); + } + } + } + } + return builder.toString(); + } + + public ClusterTask getPurgeLock() { + // Lock so only one cluster member may start purge processes + ClusterTask purgeMgrTask = ClusterLockUtils.lock(PURGE_TASK_NAME, + PURGE_TASK_DETAILS, PURGE_MANAGER_TIMEOUT, true); + + LockState purgeMgrLockState = purgeMgrTask.getLockState(); + switch (purgeMgrLockState) { + case FAILED: + PurgeLogger.logError( + "Purge Manager failed to acquire cluster task lock", + StatusConstants.CATEGORY_PURGE); + return null; + case OLD: + PurgeLogger.logWarn("Purge Manager acquired old cluster task lock", + StatusConstants.CATEGORY_PURGE); + break; + case ALREADY_RUNNING: + PurgeLogger + .logWarn( + "Purge Manager acquired currently running cluster task lock", + StatusConstants.CATEGORY_PURGE); + return null; + case SUCCESSFUL: + break; + } + return purgeMgrTask; + } + + private int getNumberRunningJobsOnServer(Calendar timeOutTime) { + int rval = 0; + for (PurgeJob job : purgeJobs.values()) { + // if job has not timed out or if the job is not blocked consider it + // running on this server + if (timeOutTime.getTimeInMillis() < job.getStartTime() + || !job.getState().equals(State.BLOCKED)) { + rval++; + } + + } + return rval; + } + + /** + * Starts a purge expired data job for the specified plugin. Using this + * method allows for exceeding failure count via a manual purge as well as + * kicking off a second purge for one already running on a server. + * + * @param plugin + * The plugin to purge the expired data for + * @return The PurgeJob that was started + */ + public PurgeJob purgeExpiredData(String plugin) { + dao.startJob(plugin); + PurgeJob job = new PurgeJob(plugin, PURGE_JOB_TYPE.PURGE_EXPIRED); + job.start(); + return job; + } + + /** + * Starts a purge all data job for the specified plugin. Using this method + * allows for exceeding failure count via a manual purge as well as kicking + * off a second purge for one already running on a server. + * + * @param plugin + * The plugin to purge all data for + * @return The PurgeJob that was started + */ + public PurgeJob purgeAllData(String plugin) { + dao.startJob(plugin); + PurgeJob job = new PurgeJob(plugin, PURGE_JOB_TYPE.PURGE_ALL); + job.start(); + return job; + } + + public int getClusterLimit() { + return clusterLimit; + } + + public void setClusterLimit(int clusterLimit) { + this.clusterLimit = clusterLimit; + } + + public int getServerLimit() { + return serverLimit; + } + + public void setServerLimit(int serverLimit) { + this.serverLimit = serverLimit; + } + + public int getDeadPurgeJobAge() { + return deadPurgeJobAge; + } + + public void setDeadPurgeJobAge(int deadPurgeJobAge) { + this.deadPurgeJobAge = deadPurgeJobAge; + } + + public int getPurgeFrequency() { + return purgeFrequency; + } + + public void setPurgeFrequency(int purgeFrequency) { + this.purgeFrequency = purgeFrequency; + } + + public int getFatalFailureCount() { + return this.fatalFailureCount; + } + + public void setFatalFailureCount(int fatalFailureCount) { + this.fatalFailureCount = fatalFailureCount; + } + + public void setPurgeEnabled(boolean purgeEnabled) { + this.purgeEnabled = purgeEnabled; + } + + public boolean getPurgeEnabled() { + return purgeEnabled; + } +} diff --git a/edexOsgi/com.raytheon.uf.edex.purgesrv/src/com/raytheon/uf/edex/purgesrv/PurgeSrv.java b/edexOsgi/com.raytheon.uf.edex.purgesrv/src/com/raytheon/uf/edex/purgesrv/PurgeSrv.java index 61f8bb0505..586707fe6f 100644 --- a/edexOsgi/com.raytheon.uf.edex.purgesrv/src/com/raytheon/uf/edex/purgesrv/PurgeSrv.java +++ b/edexOsgi/com.raytheon.uf.edex.purgesrv/src/com/raytheon/uf/edex/purgesrv/PurgeSrv.java @@ -20,10 +20,7 @@ package com.raytheon.uf.edex.purgesrv; -import java.lang.reflect.Method; -import java.sql.SQLException; import java.util.Date; -import java.util.List; import java.util.Set; import java.util.TreeSet; @@ -31,10 +28,6 @@ import org.apache.commons.lang.time.StopWatch; import com.raytheon.uf.common.dataplugin.PluginException; import com.raytheon.uf.edex.core.dataplugin.PluginRegistry; -import com.raytheon.uf.edex.database.DataAccessLayerException; -import com.raytheon.uf.edex.database.plugin.PluginDao; -import com.raytheon.uf.edex.database.plugin.PluginFactory; -import com.raytheon.uf.edex.database.plugin.PluginVersionDao; import com.raytheon.uf.edex.database.purge.PurgeLogger; import com.raytheon.uf.edex.database.status.StatusConstants; @@ -52,6 +45,7 @@ import com.raytheon.uf.edex.database.status.StatusConstants; * 10/6/08 bphillip Added custom purge behavior support * 10/8/2008 1532 bphillip Refactor to support custom purging * 02/06/09 1990 bphillip Refactored to use plugin daos. Moved initialization code out + * Apr 19, 2012 #470 bphillip Refactored to use PurgeManager * * * @@ -80,18 +74,11 @@ public class PurgeSrv { /** The purge cron message */ public static final String PURGE_CRON = "PURGE_CRON"; - /** - * A data access object for manipulating plugin version information in the - * database - */ - private PluginVersionDao pvd; - /** * Constructs a new PurgeSrv. This method verifies the metadata database has * been constructed and exports the schema if necessary */ public PurgeSrv() { - pvd = new PluginVersionDao(); } public void purgeCron() throws Exception { @@ -139,10 +126,10 @@ public class PurgeSrv { purgeAllData(); } else if (message.startsWith(DELETE_PLUGIN_DATA)) { String pluginToPurge = message.replace(DELETE_PLUGIN_DATA, ""); - purgeExpiredPluginData(pluginToPurge); + PurgeManager.getInstance().purgeExpiredData(pluginToPurge); } else if (message.startsWith(DELETE_ALL_PLUGIN_DATA)) { String pluginToPurge = message.replace(DELETE_ALL_PLUGIN_DATA, ""); - purgeAllPluginData(pluginToPurge); + PurgeManager.getInstance().purgeAllData(pluginToPurge); } else if (message.equals(PURGE_CRON) || message.equals(DELETE_EXPIRED_DATA)) { purgeExpiredData(); @@ -151,7 +138,6 @@ public class PurgeSrv { .logError("Unsupported command received by Purge Service: " + message, StatusConstants.CATEGORY_PURGE); } - PurgeLogger.logInfo("Purge Operation: " + message + " completed in " + millisToString(timer.getTime()), StatusConstants.CATEGORY_PURGE); @@ -169,10 +155,12 @@ public class PurgeSrv { PurgeLogger.logInfo("Purge All Data Started at: " + new Date(), StatusConstants.CATEGORY_PURGE); - List availablePlugins = getAvailablePlugins(); + // order the purge + Set availablePlugins = new TreeSet(PluginRegistry + .getInstance().getRegisteredObjects()); for (String pluginName : availablePlugins) { if (PluginRegistry.getInstance().getRegisteredObject(pluginName) != null) { - purgeAllPluginData(pluginName); + PurgeManager.getInstance().purgeAllData(pluginName); } } PurgeLogger.logInfo("Purge All Data Completed at: " + new Date(), @@ -195,101 +183,9 @@ public class PurgeSrv { for (String pluginName : availablePlugins) { if (PluginRegistry.getInstance().getRegisteredObject(pluginName) != null) { - purgeExpiredPluginData(pluginName); + PurgeManager.getInstance().purgeExpiredData(pluginName); } } - PurgeLogger.logInfo("Purge Expired Data Completed at: " + new Date(), - StatusConstants.CATEGORY_PURGE); - } - - /** - * Purges data for the given plugin - * - * @param pluginName - * The plugin for which to delete data - * @throws PluginException - * If errors occur while deleting this plugin's data - */ - private void purgeExpiredPluginData(String pluginName) { - PurgeLogger.logInfo("Purging expired data...", pluginName); - PluginDao dao = null; - try { - dao = PluginFactory.getInstance().getPluginDao(pluginName); - } catch (PluginException e) { - PurgeLogger.logError( - "Error getting data access object! Unable to purge data!", - pluginName, e); - return; - } - try { - if (dao.getDaoClass() != null) { - dao.purgeExpiredData(); - PurgeLogger.logInfo("Data successfully Purged!", pluginName); - } else { - Method m = dao.getClass().getMethod("purgeExpiredData", - new Class[] {}); - if (m != null) { - if (m.getDeclaringClass().equals(PluginDao.class)) { - PurgeLogger - .logWarn( - "Unable to purge data. This plugin does not specify a record class and does not implement a custom purger.", - pluginName); - } else { - dao.purgeExpiredData(); - PurgeLogger.logInfo("Data successfully Purged!", - pluginName); - } - } - } - } catch (Exception e) { - // keep getting next exceptions with sql exceptions to ensure - // we can see the underlying error - PurgeLogger - .logError("Error purging expired data!\n", pluginName, e); - Throwable t = e.getCause(); - while (t != null) { - if (t instanceof SQLException) { - SQLException se = ((SQLException) t).getNextException(); - PurgeLogger.logError("Next exception:", pluginName, se); - } - t = t.getCause(); - } - } - } - - private void purgeAllPluginData(String pluginName) { - PurgeLogger.logInfo("Purging ALL data...", pluginName); - PluginDao dao = null; - try { - dao = PluginFactory.getInstance().getPluginDao(pluginName); - } catch (PluginException e) { - PurgeLogger.logError( - "Error getting data access object! Unable to purge data!", - pluginName, e); - return; - } - try { - dao.purgeAllData(); - PurgeLogger.logInfo("Data successfully Purged!", pluginName); - } catch (Exception e) { - PurgeLogger.logError("Error purging ALL data!", pluginName, e); - } - } - - /** - * Gets the available plugins - * - * @return The available plugins - * @throws PluginException - */ - private List getAvailablePlugins() throws PluginException { - List availablePlugins; - try { - availablePlugins = pvd.getAvailablePlugins(); - } catch (DataAccessLayerException e1) { - throw new PluginException(e1); - } - return availablePlugins; } /** diff --git a/edexOsgi/com.raytheon.uf.edex.textdbsrv/src/com/raytheon/uf/edex/services/textdbimpl/TextViewAdapter.java b/edexOsgi/com.raytheon.uf.edex.textdbsrv/src/com/raytheon/uf/edex/services/textdbimpl/TextViewAdapter.java index 75ba060fcf..d9f9d1f1a0 100644 --- a/edexOsgi/com.raytheon.uf.edex.textdbsrv/src/com/raytheon/uf/edex/services/textdbimpl/TextViewAdapter.java +++ b/edexOsgi/com.raytheon.uf.edex.textdbsrv/src/com/raytheon/uf/edex/services/textdbimpl/TextViewAdapter.java @@ -26,6 +26,7 @@ import static com.raytheon.edex.textdb.dbapi.impl.TextDB.hexToAscii; import java.io.ByteArrayOutputStream; import java.util.ArrayList; import java.util.Calendar; +import java.util.Collections; import java.util.Date; import java.util.List; @@ -70,6 +71,8 @@ import com.raytheon.uf.edex.services.textdbsrv.TextViewTags; * 02Aug2010 2187 cjeanbap Move AlarmAlertUtil.sendProductAlarmAlert() * outside of if-statement. * 28Sep2010 6338 cjeanbap Added retrieval of current node by site. + * -------------------------------- + * 27Apr2012 564 jkorman Added sort to ALL times retrieval. * * * @@ -253,7 +256,9 @@ public class TextViewAdapter implements ICommandExecutor { List times = textDB.getAllTimes(productId, operationalMode); - + // sort the list first... + Collections.sort(times); + Property[] msgProps = new Property[times.size()]; int pIndex = 0; for (Long t : times) { diff --git a/edexOsgi/com.raytheon.uf.tools.cli/impl/src/msg/fxaAnnounce.py b/edexOsgi/com.raytheon.uf.tools.cli/impl/src/msg/fxaAnnounce.py index 73749f31ac..76d103522f 100755 --- a/edexOsgi/com.raytheon.uf.tools.cli/impl/src/msg/fxaAnnounce.py +++ b/edexOsgi/com.raytheon.uf.tools.cli/impl/src/msg/fxaAnnounce.py @@ -78,15 +78,12 @@ source="ANNOUNCER" if displayerType.upper() == "RADAR": cat = "RADAR" -elif displayerType.upper() == "SYSTAT": +elif displayerType.upper() == "SYSTAT" or displayerType.upper() == "SYSTEM": cat = "SYSTAT" elif displayerType.upper() == "LOCAL": cat = "LOCAL" hostname="localhost" portnum=61999 -elif displayerType.upper() == "SYSTEM": - cat = "SVRWX_O_" - source="TEXT_TRIGGER" else: print 'fxaAnnounce: Invalid displayer type argument' usage() diff --git a/edexOsgi/com.raytheon.uf.tools.gfesuite/cli/checkCWFGrids.pl b/edexOsgi/com.raytheon.uf.tools.gfesuite/cli/checkCWFGrids.pl new file mode 100644 index 0000000000..3454c2e518 --- /dev/null +++ b/edexOsgi/com.raytheon.uf.tools.gfesuite/cli/checkCWFGrids.pl @@ -0,0 +1,105 @@ +#!/usr/local/perl/bin/perl +use LWP::Simple; +use Time::Local; +################################################################################ +# # +# Program name: checkCWFGrids.pl # +# Version: 1.0 # +# Language (Perl, C-shell, etc.): perl # +# # +# Authors: Virgil Middendorf (BYZ), Dave Pike (RNO) # +# # +# Date of last revision: 05/16/08 # +# # +# Script description: This script downloads information from the Consolidated # +# Web Farm netcdf file status page for the site provided by a command line # +# argument. In the netcdf file on ALL servers is more than 30 minutes old, # +# then the script will return a message to be later used for a Guardian # +# red-banner alarm. # +# # +# To run this script, then use these arguments: # +# ./checkCWFGrids.pl WFO # +# (where WFO is the three character uppercase wfo id) # +# # +# This script is designed to work in service backup situations and only # +# works on ls2/3. # +# # +# Directory program runs from: /data/ldad/grid # +# # +# Needed configuration on ls2/3: You will need a /data/ldad/grid directory. # +# Also, the checkCWFGrids.pl script needs to be # +# placed in the /data/ldad/grid directory. # +# # +# Revision History: # +# 05/15/08: Created script. vtm # +# 05/16/08: Implemented 3 server check. vtm # +################################################################################ + +## read in a command line argument that contains the uppercase WFO id +$site = $ARGV[0]; + +## file path and names where the webpages are stored on ls2/ls3. +$inputFile1 = "/data/ldad/grid/".$site."cwf1.txt"; +$inputFile2 = "/data/ldad/grid/".$site."cwf2.txt"; +$inputFile3 = "/data/ldad/grid/".$site."cwf3.txt"; + +## webpages to get +$url1 = "http://www.weather.gov/wtf/gfestatus.php"; +$url3 = "http://www.crh.noaa.gov/wtf/gfestatus.php"; + +## get the current unix time +$currentTime = time()-32*60; + +## get netcdf file unix time stamp from server #1 +$response_code = getstore($url1, $inputFile1); +if (is_success($response_code)) { + # Read the saved web page and determine time stamp. + open(DATA, $inputFile1); + @data= ; + close(DATA); + foreach $i (@data) { + if ($i=~/$site/) { + ($junk,$date) = split /font color=\"black\"\>/,$i; + ($date,$junk) = split /\; + close(DATA); + foreach $i (@data) { + if ($i=~/$site/) { + ($junk,$date) = split /font color=\"black\"\>/,$i; + ($date,$junk) = split /\ 30 && $diff2 > 30 && $diff3 > 30) { + print "$site grids were not sent to the Consolidated Web Farm. Last Sent at $date"; +} diff --git a/edexOsgi/com.raytheon.uf.tools.gfesuite/cli/convert_netcdf.pl b/edexOsgi/com.raytheon.uf.tools.gfesuite/cli/convert_netcdf.pl new file mode 100644 index 0000000000..2629f5e128 --- /dev/null +++ b/edexOsgi/com.raytheon.uf.tools.gfesuite/cli/convert_netcdf.pl @@ -0,0 +1,162 @@ +#!/usr/bin/perl +################################################################################ +# # +# Program name: convert_netcdf.pl # +# Version: 1.1 # +# Language (Perl, C-shell, etc.): perl # +# # +# Authors: Don Britton (TFX) # +# Contributers: Virgil Middendorf, David Tomalak # +# # +# Date of last revision: 07/17/08 # +# # +# Script description: This script optimizes the netcdf file created by GFE. # +# ifpnetCDF stores most of the data as floating point # +# values. This script creates an optimized netcdf file # +# where most of the data is stored as shorts and bytes. # +# This makes the netcdf file much smaller and improves # +# performance on the web farms. # +# # +# Directory program runs from: /awips/adapt/ifps/localbin # +# # +# Revision History: # +# 12/19/07: Done created Script. vtm # +# 07/17/08: Removed VentRate and MixHgt from the short list because they are # +# too large to store in a short variable, thus a digit is being # +# truncated at the web farm. vtm # +# 07/17/08: Added my standard comment block. vtm # +################################################################################ + +######################## +# paths to ncdump and ncgen applications +######################## +$ncdump = "/usr/local/netcdf/bin/ncdump"; +$ncgen = "/usr/local/netcdf/bin/ncgen"; + +######################## +# list of fields to shorts (integers) and bytes (0-255) +######################## +@shorts = qw (MaxT MinT T Td WindChill HeatIndex SnowLevel Wind_Dir Wind20ft_Dir ClearIndex FreeWind_Dir TransWind_Dir Topo Swell_Dir DiffFromOfficialMaxT DiffFromOfficialMinT ClimoPoPDiff DiffFromOfficialWind RHtrend); +@bytes = qw (MaxRH MinRH RH Pop Wind_Mag Wind20ft_Mag Sky Wind_Gust FreeWind_Mag LAL Haines TransWind_Mag WindWaveHeight WaveHeight SurfHeight Swell_Mag IceCoverage StormTotalSnow HoursOfSun DSI Period2 Wetflag); + + +######################## +# grab site id from command line +######################## +if (@ARGV) +{ + $ifile = $ARGV[0]; + $ofile = $ARGV[1]; +} +else +{ + die "requires a 3-letter site id argument\n"; +} + +######################## +# create filenames +######################## +# input +$cdlin_filename = $ifile . ".cdl"; +$cdlout_filename = $ofile . ".opt.cdl"; +# output +$cdfin_filename = $ifile; +$cdfout_filename = $ofile; + +# provide some output for log file +print "ncdump..."; +system "date"; + +######################## +# ncdump netcdf file to a plain text cdl file for parsing +######################## +system "$ncdump $cdfin_filename > $cdlin_filename"; + +# check return code of system call for success +if ($? != 0) +{ + die "ERROR: cdl file unable to be created!\n"; +} +######################## + +# provide some output for log file +print "parsing cdl file..."; +system "date"; + +######################## +# if the cdl was successfully created, +# open it and begin parsing +######################## +if (open IFILE, $cdlin_filename) +{ + ######################## + # write out optimized cdl file + ######################## + open OFILE, ">$cdlout_filename" or die "cannot open $cdlout_filename for output!\n"; + + while () + { + + ######################## + # iterate thru first 2000 lines, + # looking only for netcdf header information + ######################## + if ($counter < 2000) { + $counter++; + + ######################## + # iterate thru the list of fields + # to be converted to shorts + ######################## + for $var (@shorts) + { + # float field_name + if (/float $var/) + { + # replace "float" with "short" + s/float/short/; + } + } + + ######################## + # iterate thru the list of fields + # to be converted to bytes + ######################## + for $var (@bytes) + { + # float field_name + if (/float $var/) + { + # replace "float" with "byte" + s/float/byte/; + } + } + + } + print OFILE $_; + } + + # close both files + close IFILE; + close OFILE; + + # provide some output for a log file + printf "ncgen file...: %s\n", $cdfout_filename; + system "date"; + + + ######################## + # ncgen cdl file to create the optimized netcdf file + ######################## + system "$ncgen -o $cdfout_filename $cdlout_filename"; + + # check return code of system call for success + if ($? != 0) + { + die "ERROR: optimized netcdf file unable to be created!\n"; + } + ######################## +} + +# provide some output for log file +system "date"; diff --git a/edexOsgi/com.raytheon.uf.tools.gfesuite/cli/rsyncGridsToCWF.sh b/edexOsgi/com.raytheon.uf.tools.gfesuite/cli/rsyncGridsToCWF.sh new file mode 100644 index 0000000000..7f28d70474 --- /dev/null +++ b/edexOsgi/com.raytheon.uf.tools.gfesuite/cli/rsyncGridsToCWF.sh @@ -0,0 +1,554 @@ +#!/bin/sh +################################################################################ +# # +# Program name: rsyncGridsToCWF.sh # +# Version: 3.5-2 # +# Language (Perl, C-shell, etc.): bash # +# # +# Authors: Virgil Middendorf (BYZ), Steve Sigler (MSO) # +# Contributers: Ahmad Garabi, Ken Sargeant, Dave Pike, Dave Rosenberg, # +# Tim Barker, Maureen Ballard, Jay Smith, Dave Tomalak, # +# Evelyn Bersack, # +# # +# Date of last revision: 07/07/11 # +# # +# Script description: This script can create a netcdf file containing IFPS # +# grids, quality control the netcdf file, send the file to a local rsync # +# server (ls2/3), and then rsync the file to the remote rsync servers. # +# Quality Control involves iscMosaic'ing the contents of the netcdf file # +# into the Restore database in GFE. If a failure is detected for any of the # +# grids, then the forecasters will get a red-banner alarm and the script # +# will recreate the netcdf file. # +# # +# To upload netcdf files use the following arguments: # +# ./rsyncGridsToCWF.sh wfo # +# (where wfo is the three character wfo id) # +# # +# This script is designed to work in service backup situations. This script # +# is launched from the Scripts... menu in GFE and it will work in both # +# operational and service backup situations. # +# # +# Directory program runs from: /awips2/GFESuite/bin # +# # +# Needed configuration on ls2/3: For each wfo that you run this script for, # +# you will need a /data/ldad/grid/wfo # +# directory. (where wfo is the 3 character # +# wfo id) # +# The checkCWFGrids.pl # +# script needs to be placed in the # +# /data/ldad/grid directory. # +# # +# Revision History: # +# 02/12/07: Created Script to rsync grids to CRH from ls1. vtm # +# 03/22/07: Added rsync to gridiron and Steve's QC methodology. vtm # +# 03/26/07: Changed iscMosaic so output works in remote ssh/background. sjs # +# 04/03/07: Added code to change permissions. vtm # +# 04/03/07: Added bwlimit and timeout switches to rsync call. vtm # +# 04/03/07: Made parmlist easier to configure? vtm # +# 04/05/07: Added a check to see if netcdf file made it to the WRH farm. vtm # +# 04/05/07: Added red-banner alarm if netcdf did not make it to WRH. vtm # +# 04/05/07: Added mask setting in config section. vtm # +# 04/20/07: Fixed missing mask setting for second ifpnetCDF call. vtm # +# 04/20/07: Added -D 0.0 option to speed up iscMosaic. vtm # +# 04/20/07: Changed iscMosaic database from Restore to Test_Fcst. vtm # +# 04/23/07: Took out parmlist parameter from ifpnetCDF. vtm # +# 04/23/07: Added use of a backup rsync server. vtm # +# 04/25/07: Added red-banner notifying forecaster that ls1 is down. vtm # +# 04/25/07: Added red-banner notifying forecaster that netcdf files have been # +# rsynced. vtm # +# 05/03/07: Added functionally to allow a limited set of parms to be sent by # +# the primary site, while all parms sent for backup sites. vtm # +# 05/03/07: Added publish to official check for service backup. vtm # +# 05/03/07: Now rsync file to WR webfarm first. vtm # +# 05/07/07: Guardian issue fixed. Switched Reminder to Announcer. vtm # +# 05/20/07: Added switch to turn off sending grids to the consolidated web # +# farm. vtm # +# 06/04/07: Added code to make the number of times to attempt netcdf file # +# creation configurable. Baseline 3 times. vtm # +# 06/04/07: Script now quality controls netcdf files created in attempts #2 # +# and beyond. If the third attempt is bad, then script quits. vtm # +# 06/05/07: Added code to remove the QC logfile after each attempt, otherwise # +# the script will never send the netcdf file in the 2nd and 3rd # +# attempts. vtm # +# 06/05/07: Added code to notify forecaster that grids passed QC check and # +# included a switch to turn this notification off. vtm # +# 06/06/07: Added code to remove the netcdf file if it is too small. vtm # +# 06/06/07: Changed the name of the netcdf files so they include the process # +# id in event the script is launched again before the first launch # +# is completed. vtm # +# 06/06/07: Added a check to ensure rsync is not already running to ensure # +# multiple script launches do not conflict with each other. vtm # +# 06/07/07: Fixed the rsync already running check. vtm # +# 06/08/07: iscMosaic error files were not being deleted fixed. vtm # +# 06/11/07: Corrected name of file sent to the consolidated web farm. vtm # +# 06/14/07: Sent "sendCWFgrids" to "no" per request. vtm # +# 06/19/07: When grids are not sent to the consolidated web farm, the backed # +# up zip file was not deleted and filling up ls1. Fixed. vtm # +# 06/27/07: Illiminated a "file does not exist error message. vtm # +# 08/13/07: Increased iscMosaic delay to 1.0 and make configurable. vtm # +# 12/05/07: Added test compressed netcdf file send to WR. vtm # +# 02/18/08: Switched to use ls2/ls3. Added code to turn off send to regional # +# web farms. vtm # +# 02/22/08: Removed WR specific code from the script. vtm # +# 02/25/08: Adjusted list of parms based on list provided to me by Mark # +# Mitchell. vtm # +# 02/25/08: creationAttempts config variable wasn't used by the script. vtm # +# 02/25/08: Added QCnetCDF config variable to allow offices to bypass long # +# netcdf file QC process. vtm # +# 02/25/08: Added a ls1 section in the configuration section. vtm # +# 05/14/08: Added audio for Guardian "ANNOUNCER 0 LOCAL". Any bad message # +# will get sound with it. vtm # +# 05/14/08: If WR grids did not update, then script will echo out a message # +# for a log file. vtm # +# 05/15/08: Added code to change time stamps of netcdf files on ls1. vtm # +# 05/15/08: Moved AWIPS file clean up to the end. Directory wasn't being # +# cleaned out properly. Also included the cdl files to the list. vtm# +# 05/15/08: Added code to clean orphaned files created by this script on AWIPS# +# and on the local rsync server. vtm # +# 05/16/08: Added check to see if netcdf file made it to the consolidated web # +# farm. If not, then notify forecast via red banner. vtm # +# 05/16/08: Added switch to turn off sending grids to the WR web farm. vtm # +# 05/16/08: Eliminated the variables for the rsync, gunzip, and chmod # +# commands. vtm # +# 05/16/08: Added configuration for email notifications. vtm # +# 05/16/08: Added configuration for Guardian alert level number when grid # +# creation or transfer problems occur. vtm # +# 05/21/08: Added the --address= switch to the rysnc commands in an attempt # +# resolve rsync issues after switch to NOAANet. ls cluster only. vtm# +# 05/21/08: If rsync fails to move the file to the server, then the script # +# will now retry 4 more times. vtm # +# 05/22/08: Moved relivent code from the WR version into this script. vtm # +# 05/28/08: Fixed Bug removing CurrentFcst.?????.site.cdf file. vtm # +# 05/28/08: CWF netcdf file availability check can now be turned off. vtm # +# 05/28/08: Added flag so all banner messages can be turned off. vtm # +# 05/28/08: Added the CWFcheckWait configuration. vtm # +# 05/29/08: Bug in backup file time stamp touch. Touched vtm.opt.cdf instead # +# vtm.opt.cdf.gz. vtm # +# 06/11/08: Fixed bug. If rsync fails more than 5 times, the script was # +# supposed to stop. Instead it kept trying. vtm # +# 06/19/08: Changed the directory on AWIPS where the netcdf file is created. # +# Now using a drive local to machine for performance reasons. # +# New directory is now /awips/fxa/netcdf. This directory will be # +# created by the script if it doesn't exist. vtm # +# 06/19/08: Changed script to remove AWIPS netcdf and log files sooner. vtm # +# 07/10/08: Made the /awips/fxa/netcdf configurable for by DX and LX machines.# +# vtm # +# 07/11/08: Pointed most all of script feedback to a log file that can be # +# found in the /awips/GFESuite/primary/data/logfiles/yyyymmdd/ # +# directory called netcdf_rsync.log. (LX workstations put the file # +# into the /awips/GFESuite/data/logfiles/yyyymmdd directory.) vtm # +# 07/07/11: Put in code to limit the time period of the netcdf file. vtm # +# 04/16/12: Added a little error checking for work directory and replaced # +# the hard-coded path to /awips2/fxa/bin with $FXA_BIN. Removed # +# awips1 code. # +################################################################################ +# check to see if site id was passed as argument +# if not then exit from the script +if [ $# -lt 1 ] ;then + echo Invalid number of arguments. + echo Script stopped. + echo ./rsyncGridsToCWF.sh wfo + exit +else + SITE=$(echo ${1} | tr '[a-z]' '[A-Z]') + site=$(echo ${1} | tr '[A-Z]' '[a-z]') +fi + +IFPS_DATA="/awips2/GFESuite/ServiceBackup/data" +GFESUITE_BIN="/awips2/GFESuite/bin" + +################################################################################ +# Configuration Section # +################################################################################ + +### Work Directory for Netcdf files. ### +DXwrkDir=$IFPS_DATA/rsyncGridsToCWF # must be a non-nas1 drive with enough space +if [ ! -d ${DXwrkDir} ] ;then + mkdir -p ${DXwrkDir} + chmod 777 ${DXwrkDir} + chown awips:fxalpha ${DXwrkDir} +fi + +### Turn On/Off certain script functionality. ### +QCnetCDF="no" # Do you want the netCDF file checked before + # it is rsynced? This takes 5-15 minutes to + # complete depending on size of domain. + # *** Leave "no" for AWIPS 2. QC doesn't work *** + +checkCWFavailability="no" # Do you want the script to check to see if + # the netcdf file made it to the Consolidated + # web farm? + +### Banner notification configuration ### +SendQCgoodNotification="no" # Tell forecaster that netcdf file passed + # QC check. + +sendCWFnotification="no" # Tell forecaster when netcdf rsync complete + # to the consolidated web farm. + +turnOffAllNotifications="yes" # This will turn off all banner messages. + +### new ldad configuration ### +locServer="ldad@ls1" # Name of local rsync server. +locDirectory="/data/ldad/grid" # Directory where grids are stored on the + # local rsync server. Note that file will be + # stored in $site sub directory. +locRsyncSwitches="--address=192.168.1.10" # Needed to fix a noaanet rysnc problem. + +# Consolidated web farm +remServer1="sync.weather.gov" # Name of remote rsync server. +remDirectory1="netcdf-wfo" # Directory where grids are stored on the + # remote rsync server. + +# Edit area to limit the portion of the grid domain to send to the webfarms. +mask=ISC_Send_Area + +# Parameter list for the netcdf file +parmlist1="-p MaxT -p MinT -p MaxRH -p MinRH -p T -p Td -p RH -p WindChill -p HeatIndex -p ApparentT" +parmlist2="-p PoP -p PoP12 -p Sky -p Wx -p Hazards -p SnowLevel -p QPF -p SnowAmt -p IceAccum -p Wind -p WindGust" +parmlist3="-p ClearIndex -p FreeWind -p LAL -p Haines -p MixHgt -p VentRate -p TransWind -p Wind20ft -p CLRIndx" +parmlist5="" +parmlist6="" +parmlist="$parmlist1 $parmlist2 $parmlist3 $parmlist4 $parmlist5 $parmlist6" +parmlist="" #uncomment to send all parameters + +creationAttempts=3 # How many times do you want script to create and + # quality control netcdf files if bad netcdf files + # are detected? + +rsyncWait=30 # Minutes to wait for free rsync connection. +CWFcheckWait=360 # Delay in seconds to wait to check to see if file made it + # to the consolidated web farm. + +iscMosaicDelay=0.0 # Delay of 0.0 causes GFE pauses. + +probAlertNum=1 # Guardian alert level when problems occur. + +# Email notification configuration +sendEmailNotification="no" # Do you want to send email notification of grids are not sent? +emailAddress1="" +emailAddress2="" +emailAddress3="" + +################################################################################ +# Set some paths +WRKDIR="${DXwrkDir}/data" +FXA_BIN="/awips2/fxa/bin" +CDSHOST="dx3" +CDSPORT="9581" + +# It is possible that you may not have all of the parameters that your service backup sites +# need sent to the webfarms. So if script is run for a backup site, then send all parameters. +parmlist=" " + +# Setting up the infrastructure for a log file. +currdate=$(date -u +%Y%m%d) +export LOG_FILE="${DXwrkDir}/log/${currdate}/netcdf_rsync.log" + +# check to see if log directory structure exists. +if [ ! -d ${DXwrkDir}/log/${currdate} ] ;then + mkdir -p ${DXwrkDir}/log/${currdate} + chmod 777 ${DXwrkDir}/log/${currdate} + chown awips:fxalpha ${DXwrkDir}/log/${currdate} +fi + +# Log file header +echo " " >> $LOG_FILE +echo "####################################################################################" >> $LOG_FILE +echo "# Starting Grid Rsync Script.... #" >> $LOG_FILE +echo "####################################################################################" >> $LOG_FILE +chmod 666 $LOG_FILE + +# Check to see of the ${WRKDIR} directory exists. If not, then create. +echo making sure that ${WRKDIR} exists at $(date) >> $LOG_FILE +if [ ! -d ${WRKDIR} ] ;then + echo " ${WRKDIR} directory not found." >> $LOG_FILE + echo " making ${WRKDIR} directory..." >> $LOG_FILE + mkdir -p ${WRKDIR} + echo " changing permissions of ${WRKDIR} directory..." >> $LOG_FILE + chmod 777 ${WRKDIR} + echo " changing ownership of ${WRKDIR} directory to fxa..." >> $LOG_FILE + chown awips:fxalpha ${WRKDIR} +else + echo " ${WRKDIR} directory exists!" >> $LOG_FILE +fi +echo ...finished. >> $LOG_FILE +echo " " >> $LOG_FILE + +# Clean up orphaned files in the NETCDF directory. +echo cleaning up orphaned files in the ${WRKDIR} directory at $(date) >> $LOG_FILE +find ${WRKDIR}/. -mmin +60 -exec rm {} -f \; +echo ...finished. >> $LOG_FILE +echo " " >> $LOG_FILE + +# Determine the ifpnetCDF start and end times. +start_time=$(date +%Y%m%d_%H00 -d "6 hours ago") +end_time=$(date +%Y%m%d_%H00 -d "192 hours") +cdfTimeRange="-s ${start_time} -e ${end_time} " + +# In this while loop, the netcdf file will be created and quality controlled. +# The script will attempt to create the netcdf file three times before failing. +creationAttemptCount=1 +badGridFlag=1 +while (( ( $creationAttemptCount <= creationAttempts ) && ( $badGridFlag == 1 ) )) +do + # create the netcdf file + echo starting netcdf file creation...attempt number ${creationAttemptCount} at $(date) >> $LOG_FILE + echo " " >> $LOG_FILE + ${GFESUITE_BIN}/ifpnetCDF -t -g -o ${WRKDIR}/CurrentFcst.$$.${site}.cdf -h $CDSHOST -d ${SITE}_GRID__Official_00000000_0000 -m $mask $cdfTimeRange $parmlist >> $LOG_FILE 2>&1 + + # Check to see if netcdf file is big enough. In service backup, publish to official may have been forgotten. + filesize=$(ls -l ${WRKDIR}/CurrentFcst.$$.${site}.cdf | awk '{print $5}') + if (( filesize < 1000000 )) ;then + echo $filesize >> $LOG_FILE + if [[ $turnOffAllNotifications == "no" ]] ;then + ${FXA_BIN}/sendNotificationMsg ANNOUNCER LOCAL ${probAlertNum} "${SITE} netcdf file determined to be incomplete and not sent to webfarms. Did you publish to official?" + fi + rm -f ${WRKDIR}/CurrentFcst.$$.${site}.cdf + echo netcdf file is too small. Either the Official database is empty OR EDEX is down. >> $LOG_FILE + echo Script stopped. >> $LOG_FILE + exit + fi + echo ...finished. >> $LOG_FILE + echo " " >> $LOG_FILE + + + ############################################## + # STOP HERE RIGHT NOW + ############################################## + + if [[ $QCnetCDF == "yes" ]] ;then + #Check netcdf file for errors. + echo started netcdf file checking at $(date) >> $LOG_FILE + ${GFESUITE_BIN}/iscMosaic -h $CDSHOST $parmlist -f ${WRKDIR}/CurrentFcst.$$.${site}.cdf -d ${SITE}_GRID_Test_Fcst_00000000_0000 -D $iscMosaicDelay >> ${WRKDIR}/iscmosaicOutput.$$ 2>&1 + +# cd $runDir + iscmosaicError=$(cat ${WRKDIR}/iscmosaicOutput.$$ | grep Failure) + if [[ $iscmosaicError != "" ]] ;then + echo "isc error|${iscmosaicError}|" >> $LOG_FILE + if [[ $creationAttemptCount == $creationAttempts ]] ;then + if [[ $turnOffAllNotifications == "no" ]] ;then + ${FXA_BIN}/sendNotificationMsg ANNOUNCER LOCAL 1 "Errors detected in ${SITE} netcdf file again and not sent to webfarms. Send Grids Manually." + fi + echo "Errors detected in ${SITE} netcdf file again and not sent to webfarms. Script stopped." >> $LOG_FILE + exit + else + if [[ $turnOffAllNotifications == "no" ]] ;then + ${FXA_BIN}/sendNotificationMsg ANNOUNCER LOCAL 1 "Errors detected in ${SITE} netcdf file again. Regenerating netcdf file attempt # ${creationAttemptCount}." + fi + echo "Errors detected in ${SITE} netcdf file. Regenerating netcdf file." >> $LOG_FILE + fi + rm -f ${WRKDIR}/CurrentFcst.$$.${site}.cdf + (( creationAttemptCount = $creationAttemptCount + 1 )) + else + echo The netcdf file appears to be good. >> $LOG_FILE + badGridFlag=0 + fi + rm -f ${WRKDIR}/iscmosaicOutput.$$ + else + echo netcdf file checking bypassed at $(date) >> $LOG_FILE + badGridFlag=0 + fi + +done +echo ...finished. >> $LOG_FILE +echo " " >> $LOG_FILE + +# create the optimized netcdf file +echo creating optimzed netcdf file at $(date) >> $LOG_FILE +cp ${WRKDIR}/CurrentFcst.$$.${site}.cdf ${WRKDIR}/CurrentFcst.$$.${site}.opt.cdf >> $LOG_FILE 2>&1 + +$GFESUITE_BIN/convert_netcdf.pl ${WRKDIR}/CurrentFcst.$$.${site}.cdf ${WRKDIR}/CurrentFcst.$$.${site}.opt.cdf >> $LOG_FILE 2>&1 +echo ...finished. >> $LOG_FILE +echo " " >> $LOG_FILE + +# check space used by the process of creating the opt netcdf file in the netcdf directory +echo "space used in netcdf: $(cd ${WRKDIR}; du -m --max-depth=1) mb" >> $LOG_FILE +echo ...finished >> $LOG_FILE +echo " " >> $LOG_FILE + +# cleaning up files on AWIPS created by the optimizing process. +echo cleaning up files on AWIPS created by the optimizing process at $(date) >> $LOG_FILE +rm -f ${WRKDIR}/CurrentFcst.$$.${site}.cdf +rm -f ${WRKDIR}/CurrentFcst.$$.${site}.cdf.cdl +rm -f ${WRKDIR}/CurrentFcst.$$.${site}.opt.cdf.opt.cdl +echo ...finished. >> $LOG_FILE +echo " " >> $LOG_FILE + +# zip up the optimized netcdf file +echo starting optimized netcdf file zipping at $(date) >> $LOG_FILE +gzip -9 ${WRKDIR}/CurrentFcst.$$.${site}.opt.cdf +echo ...finished. >> $LOG_FILE +echo " " >> $LOG_FILE + +# check spaced used by the zipped opt netcdf file in the netcdf directory +echo "space used in netcdf: $(cd ${WRKDIR}; du -m --max-depth=1) mb" >> $LOG_FILE +echo ... finished >> $LOG_FILE +echo " " >> $LOG_FILE + +# Clean up orphaned files on the local rsync server. +echo cleaning up orphaned files on $locServer in the ${locDirectory}/${site} directory at $(date) >> $LOG_FILE +ssh $locServer "find ${locDirectory}/${site} -mmin +720 -exec rm {} -f \;" +echo ...finished. >> $LOG_FILE +echo " " >> $LOG_FILE + +# move optimized netcdf file to the local rsync server. +echo trying to scp optimized netcdf file to $locServer at $(date) >> $LOG_FILE +scp ${WRKDIR}/CurrentFcst.$$.${site}.opt.cdf.gz ${locServer}:${locDirectory}/${site} >> $LOG_FILE 2>&1 +echo ...finished. >> $LOG_FILE +echo " " >> $LOG_FILE + +# cleaning up the zipped optimized file on AWIPS. +echo cleaning up the zipped optimized file on AWIPS at $(date) >> $LOG_FILE +rm -f ${WRKDIR}/CurrentFcst.$$.${site}.opt.cdf.gz +echo ...finished. >> $LOG_FILE +echo " " >> $LOG_FILE + +# Notify forecaster that the quality control check passed and rsyncing will begin. +if [[ $SendQCgoodNotification == "yes" ]] ;then + echo sending forecaster notification that QC passed at $(date) >> $LOG_FILE + if [[ $turnOffAllNotifications == "no" ]] ;then + ${FXA_BIN}/sendNotificationMsg ANNOUNCER LOCAL 1 "${SITE} netcdf file passed quality control check. Now rsyncing the file to the webfarms." + fi + echo ...finished. >> $LOG_FILE + echo " " >> $LOG_FILE +fi + +# change file permissions +echo changed permissions of the uncompressed netcdf files on $locServer at $(date) >> $LOG_FILE +ssh $locServer "/bin/chmod 2775 ${locDirectory}/${site}/CurrentFcst.$$.${site}.opt.cdf.gz" +echo ...finished. >> $LOG_FILE +echo " " >> $LOG_FILE + +# make backup copies of the netcdf files so manual rsync commands can be used +echo make backup of the compressed netcdf files on $locServer at $(date) >> $LOG_FILE +ssh $locServer "cp ${locDirectory}/${site}/CurrentFcst.$$.${site}.opt.cdf.gz ${locDirectory}/${site}/vtm.opt.cdf.gz" +echo ...finished. >> $LOG_FILE +echo " " >> $LOG_FILE + +# change the timestamp on the files +echo updated the time stamps of the compressed and uncompressed netcdf files on $locServer at $(date) >> $LOG_FILE +ssh $locServer "touch ${locDirectory}/${site}/CurrentFcst.$$.${site}.opt.cdf.gz" +ssh $locServer "touch ${locDirectory}/${site}/vtm.opt.cdf.gz" +echo ...finished. >> $LOG_FILE +echo " " >> $LOG_FILE + +rsyncCompleted=0 +rsyncAttempt=0 +while [[ $rsyncCompleted == "0" ]] +do + echo checking to see if another rsync process is running >> $LOG_FILE + # Checking to see if another rsync process is running. If so, then wait. + try=0 + rsync_ok="yes" + grepCMD="/usr/bin/rsync -rDvlzt ${locRsyncSwitches}" + while ( ssh $locServer "ps -elf | grep \"${grepCMD}\" | grep -q -v grep" ) + do + (( try = $try + 1 )) + if (( $try > $rsyncWait )) ;then + echo Waited more than $rsyncWait minutes to start a rsync to the Web Farm >> $LOG_FILE + echo but another rsync process is still running - so could not. >> $LOG_FILE + if [[ $turnOffAllNotifications == "no" ]] ;then + ${FXA_BIN}/sendNotificationMsg ANNOUNCER LOCAL 1 "${SITE} GFE netcdf file NOT sent to the Consolidated web farm. Another rsync process blocked transfer." + fi + rsync_ok="no" + break + fi + echo A rsync is already active...waiting 1 minute at $(date) >> $LOG_FILE + sleep 60 + done + + + if [[ $rsync_ok == "yes" ]] ;then + + # launch the rsync process that sends the netcdf file to the consolidated web farm at $(date) + echo " " >> $LOG_FILE + echo starting netcdf file rsync to consolidated webserver at $(date) >> $LOG_FILE + echo " " >> $LOG_FILE + echo rsyncCMD + rsyncCMD="/usr/bin/rsync -rDvlzt ${locRsyncSwitches} --stats --progress ${locDirectory}/${site}/CurrentFcst.$$.${site}.opt.cdf.gz ${remServer1}::${remDirectory1}/CurrentFcst.${site}.cdf.gz" + ssh $locServer "$rsyncCMD" >> $LOG_FILE 2>&1 + (( rsyncAttempt = $rsyncAttempt + 1 )) + echo $rsyncCMD >> $LOG_FILE + echo "...finished." >> $LOG_FILE + echo " " >> $LOG_FILE + + if [[ $checkCWFavailability == "yes" ]] ;then + + # Check to see if netcdf file was posted at the Consolidated Web Farm. If not, then send red banner message. + # If it did then send a notification to the forecasters that the send was successful. + echo waiting $CWFcheckWait seconds before check at $(date) >> $LOG_FILE + sleep $CWFcheckWait + echo starting consolidated web farm check at $(date) >> $LOG_FILE + + if [ ! -f ${locServer}:${locDirectory}/checkCWFGrids.pl ] ;then + scp $GFESUITE_BIN/checkCWFGrids.pl ${locServer}:${locDirectory}/checkCWFGrids.pl + ssh ${locServer} "chmod 777 ${locDirectory}/checkCWFGrids.pl" + ssh ${locServer} "chown ldad:ldad ${locDirectory}/checkCWFGrids.pl" + fi + + msg=$(ssh $locServer ${locDirectory}/checkCWFGrids.pl ${SITE}) + if [[ $msg != "" ]] ;then + if [[ $turnOffAllNotifications == "no" ]] ;then + ${FXA_BIN}/sendNotificationMsg ANNOUNCER LOCAL ${probAlertNum} "${msg}" + fi + echo Detected that grids did NOT make it to the Consolidated web farm at $(date) >> $LOG_FILE + echo "${msg}" >> $LOG_FILE + if [[ $sendEmailNotification == "yes" ]] ;then + echo "X-Priority: 3" > /awips/adapt/ifps/localbin/email.txt + echo "Subject: CWF Grid Rsync Report" >> /awips/adapt/ifps/localbin/email.txt + echo "${msg}" >> /awips/adapt/ifps/localbin/email.txt + scp /awips/adapt/ifps/localbin/email.txt ${locServer}:${locDirectory}/email.txt + if [[ $emailAddress1 != "" ]] ;then + ssh $locServer "/usr/sbin/sendmail -FAWIPS -fldad ${emailAddress1} < ${locDirectory}/email.txt" + fi + if [[ $emailAddress2 != "" ]] ;then + ssh $locServer "/usr/sbin/sendmail -FAWIPS -fldad ${emailAddress2} < ${locDirectory}/email.txt" + fi + if [[ $emailAddress3 != "" ]] ;then + ssh $locServer "/usr/sbin/sendmail -FAWIPS -fldad ${emailAddress3} < ${locDirectory}/email.txt" + fi + fi + else + rsyncCompleted=1 + if [[ $sendCWFnotification == "yes" ]] ;then + echo Detected that grids DID make it to the consolidated web farm at $(date) >> $LOG_FILE + if [[ $turnOffAllNotifications == "no" ]] ;then + ${FXA_BIN}/sendNotificationMsg ANNOUNCER LOCAL 1 "${SITE} GFE netcdf file sent to the consolidated web farm." + fi + fi + fi + else + rsyncCompleted=1 + if [[ $sendCWFnotification == "yes" ]] ;then + echo Detected that grids DID make it to the consolidated web farm at $(date) >> $LOG_FILE + if [[ $turnOffAllNotifications == "no" ]] ;then + ${FXA_BIN}/sendNotificationMsg ANNOUNCER LOCAL 1 "${SITE} GFE netcdf file sent to the consolidated web farm." + fi + fi + fi + if [[ ( $rsyncAttempt > 5 ) && ( $rsyncCompleted = 0) ]] ;then + rsyncCompleted=1 + if [[ $turnOffAllNotifications == "no" ]] ;then + ${FXA_BIN}/sendNotificationMsg ANNOUNCER LOCAL ${probAlertNum} "${SITE} GFE netcdf file was NOT sent to the Consolidated Web Farm, because rsync connection is broken." + fi + echo Detected that grids did NOT make it to the Consolidated web farm at $(date) >> $LOG_FILE + fi + + fi + +done +echo "...finished." >> $LOG_FILE +echo " " >> $LOG_FILE + +# removing the zipped netcdf file +echo removing the zipped netcdf files on $locServer at $(date) >> $LOG_FILE +ssh $locServer "rm -f ${locDirectory}/${site}/CurrentFcst.$$.${site}.opt.cdf.gz" +echo "...finished." >> $LOG_FILE +echo " " >> $LOG_FILE + +echo script finished at $(date) >> $LOG_FILE +echo " " >> $LOG_FILE + +exit + diff --git a/edexOsgi/com.raytheon.uf.tools.gfesuite/cli/rsyncGridsToCWF_client.sh b/edexOsgi/com.raytheon.uf.tools.gfesuite/cli/rsyncGridsToCWF_client.sh new file mode 100644 index 0000000000..7bec67a3d4 --- /dev/null +++ b/edexOsgi/com.raytheon.uf.tools.gfesuite/cli/rsyncGridsToCWF_client.sh @@ -0,0 +1,27 @@ +#!/bin/sh +################################################################################ +# # +# Program name: rsyncGridsToCWF_client.sh # +# # +# Executes rsynceGridsToCWF.sh locally or remotely as needed # +# # +# Author: Juliya Dynina # +# # +# Revisions: # +# 04/25/12: Created Script # +################################################################################ +if [ $# -lt 1 ] ;then + echo Invalid number of arguments. + echo Script stopped. + echo ./rsyncGridsToCWF_client.sh wfo + exit +fi + +host_name=`hostname` +host_name=`echo $host_name | cut -c1-3` + +if [ $host_name != "dx3" ] && [ $host_name != "dx4" ]; then + ssh dx3 "/awips2/GFESuite/bin/rsyncGridsToCWF.sh ${1}" +else + /awips2/GFESuite/bin/rsyncGridsToCWF.sh ${1} +fi diff --git a/localization/localization.OAX/utility/cave_static/site/OAX/alertViz/AlertVizForced.xml b/localization/localization.OAX/utility/cave_static/site/OAX/alertViz/AlertVizForced.xml new file mode 100644 index 0000000000..a05911e54a --- /dev/null +++ b/localization/localization.OAX/utility/cave_static/site/OAX/alertViz/AlertVizForced.xml @@ -0,0 +1,3 @@ + + + diff --git a/nativeLib/dist.native/i386-pc-linux-gnu.tar.REMOVED.git-id b/nativeLib/dist.native/i386-pc-linux-gnu.tar.REMOVED.git-id index ab1e8b3642..4b35d20944 100644 --- a/nativeLib/dist.native/i386-pc-linux-gnu.tar.REMOVED.git-id +++ b/nativeLib/dist.native/i386-pc-linux-gnu.tar.REMOVED.git-id @@ -1 +1 @@ -43a91b8b2ef2c9fc8df4133865f8e9048d01fcf5 \ No newline at end of file +635307bdc190794794c28bdd7f28ff9cad05c40f \ No newline at end of file diff --git a/nativeLib/rary.ohd.filesystem/awips/hydroapps/whfs/bin/run_SiteSpecific b/nativeLib/rary.ohd.filesystem/awips/hydroapps/whfs/bin/run_SiteSpecific index 1930de4db9..299b05f4ee 100755 --- a/nativeLib/rary.ohd.filesystem/awips/hydroapps/whfs/bin/run_SiteSpecific +++ b/nativeLib/rary.ohd.filesystem/awips/hydroapps/whfs/bin/run_SiteSpecific @@ -30,5 +30,5 @@ mv $SSHPTMPFILE $SSHPLOGFILE # set up an X Terminal window to write stdout and run the SiteSpecific # application using java -xterm -T "SiteSpecific standard output window" -iconic -hold \ +xterm -T "SiteSpecific standard output window" -iconic \ -e $JBINDIR/java ohd.hseb.sshp.SSHP $JDBCURL $SSHP_LOG_DIR $LID_PASSED_IN & diff --git a/nativeLib/rary.ohd.filesystem/awips/hydroapps/whfs/bin/run_damcrest b/nativeLib/rary.ohd.filesystem/awips/hydroapps/whfs/bin/run_damcrest index 2fbcfa2742..7d37e9effa 100755 --- a/nativeLib/rary.ohd.filesystem/awips/hydroapps/whfs/bin/run_damcrest +++ b/nativeLib/rary.ohd.filesystem/awips/hydroapps/whfs/bin/run_damcrest @@ -31,5 +31,5 @@ export DAMCREST_HOME=$WHFS_BIN_DIR # set up an X Terminal window to write stdout and run the DamCrest # application using java -xterm -T "DamCrest standard output window" -iconic -hold \ +xterm -T "DamCrest standard output window" -iconic \ -e "$SYS_JAVA_BIN_DIR/java -Ddamcrest.home=$DAMCREST_HOME gov.dambreak.menu.Launcher $1" diff --git a/nativeLib/rary.ohd.filesystem/awips/hydroapps/whfs/bin/start_fcstservice b/nativeLib/rary.ohd.filesystem/awips/hydroapps/whfs/bin/start_fcstservice index 0e20afd06d..5bc6296ec2 100755 --- a/nativeLib/rary.ohd.filesystem/awips/hydroapps/whfs/bin/start_fcstservice +++ b/nativeLib/rary.ohd.filesystem/awips/hydroapps/whfs/bin/start_fcstservice @@ -19,5 +19,5 @@ export CLASSPATH=$DB_DRIVER_PATH CLASSPATH=$CLASSPATH:$WHFS_BIN_DIR/fcstservice.jar #Execute Lhvm -xterm -T "fcstservice" -iconic -hold \ +xterm -T "fcstservice" -iconic \ -e $SYS_JAVA_DIR/bin/java ohd.hseb.fcstservice.LhvmApplicationWindow $JDBCURL & diff --git a/nativeLib/rary.ohd.filesystem/awips/hydroapps/whfs/bin/start_rivermonitor b/nativeLib/rary.ohd.filesystem/awips/hydroapps/whfs/bin/start_rivermonitor index acbe9742b0..8a3173763d 100755 --- a/nativeLib/rary.ohd.filesystem/awips/hydroapps/whfs/bin/start_rivermonitor +++ b/nativeLib/rary.ohd.filesystem/awips/hydroapps/whfs/bin/start_rivermonitor @@ -25,6 +25,6 @@ else MONITOR_NAME="River" fi -xterm -T $MONITOR_NAME"Monitor" -iconic -hold \ +xterm -T $MONITOR_NAME"Monitor" -iconic \ -e $SYS_JAVA_DIR/bin/java -Xms64m -Xmx512m ohd.hseb.monitor.Monitor $JDBCURL "$MISSING_REPRESENTATION" $MONITOR_NAME & diff --git a/nativeLib/rary.ohd.filesystem/file_permissions.sh b/nativeLib/rary.ohd.filesystem/file_permissions.sh index ff75f84286..a45175f3f8 100644 --- a/nativeLib/rary.ohd.filesystem/file_permissions.sh +++ b/nativeLib/rary.ohd.filesystem/file_permissions.sh @@ -1,825 +1,825 @@ cd $(dirname $0) -chmod 644 awips/hydroapps/data/fxa/radar/envData/_keep_me -chmod 644 awips/hydroapps/ffmp_templates/_keep_me -chmod 644 awips/hydroapps/geo_data/host/ascii/coord_host.dat -chmod 644 awips/hydroapps/geo_data/host/ascii/county.dat -chmod 644 awips/hydroapps/geo_data/host/ascii/cwaus.dat -chmod 644 awips/hydroapps/geo_data/host/ascii/fg_basin.dat -chmod 644 awips/hydroapps/geo_data/host/ascii/flights.dat -chmod 644 awips/hydroapps/geo_data/host/ascii/forecastpt.dat -chmod 644 awips/hydroapps/geo_data/host/ascii/map_basin.dat -chmod 644 awips/hydroapps/geo_data/host/ascii/rfc_boundary.dat -chmod 644 awips/hydroapps/geo_data/host/ascii/river.dat -chmod 644 awips/hydroapps/geo_data/host/ascii/state.dat -chmod 644 awips/hydroapps/geo_data/host/ascii/town.dat -chmod 644 awips/hydroapps/geo_data/host/binary/_keep_me -chmod 644 awips/hydroapps/geo_data/ofstest/ascii/coord_ofstest.dat -chmod 644 awips/hydroapps/precip_proc/bin/gribit.LX -chmod 644 awips/hydroapps/precip_proc/bin/launch_hpe -chmod 644 awips/hydroapps/precip_proc/local/data/app/gen_areal_qpe/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/app/hpe/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/app/hpe/projection.con -chmod 644 awips/hydroapps/precip_proc/local/data/app/mpe/beam_height/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/app/mpe/climo/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/app/mpe/gage_locations/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/app/mpe/grid_masks/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/app/mpe/help/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/app/mpe/misbin/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/app/mpe/nc2grib/gfe2grib.txt -chmod 644 awips/hydroapps/precip_proc/local/data/app/mpe/prism/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/app/mpe/station_lists/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/app/mpe/utiltriangles/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/app/radclim/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/app/stage3/help/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/dhr_archive/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/dhr_decoded/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/dhr_error/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/dhr_gather/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/dsp_archive/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/dsp_decoded/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/dsp_error/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/dsp_gather/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/gpp_input/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/hpe/avgrmosaic/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/hpe/bdhrmosaic/gif/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/hpe/bdhrmosaic/grib/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/hpe/bdhrmosaic/netcdf/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/hpe/dhrmosaic/gif/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/hpe/dhrmosaic/grib/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/hpe/dhrmosaic/netcdf/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/hpe/ebmosaic/gif/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/hpe/ebmosaic/grib/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/hpe/ebmosaic/netcdf/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/hpe/ermosaic/gif/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/hpe/ermosaic/grib/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/hpe/ermosaic/netcdf/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/hpe/height/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/hpe/hpe_gif/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/hpe/hpe_grib/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/hpe/hpe_jpeg/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/hpe/hpe_netcdf/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/hpe/hpe_xmrg/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/hpe/index/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/hpe/lsatpre/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/hpe/maxrmosaic/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/hpe/nowcast/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/log/decodedhr/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/log/decodedpa/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/log/decodedsp/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/log/disagg/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/log/gage_pp/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/log/gen_areal_qpe/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/log/hpe/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/log/lightning_proc/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/log/misc/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/log/mpe_editor/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/log/mpe_fieldgen/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/log/process_bias_message/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/log/siipp/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/mpe/avgrmosaic/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/mpe/bad_gages/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/mpe/bias_message_input/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/mpe/bias_message_output/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/mpe/bmosaic/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/mpe/d2d_files/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/mpe/dailyQC/fewsgrib/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/mpe/dailyQC/freezing_level/grid/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/mpe/dailyQC/freezing_level/MAZ/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/mpe/dailyQC/freezing_level/point/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/mpe/dailyQC/netcdf_files/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/mpe/dailyQC/precip/bad/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/mpe/dailyQC/precip/dev/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/mpe/dailyQC/precip/grid/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/mpe/dailyQC/precip/MAP/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/mpe/dailyQC/precip/point/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/mpe/dailyQC/scratch/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/mpe/dailyQC/temperature/bad/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/mpe/dailyQC/temperature/dev/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/mpe/dailyQC/temperature/grid/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/mpe/dailyQC/temperature/MAT/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/mpe/dailyQC/temperature/point/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/mpe/draw_precip/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/mpe/edit_polygon/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/mpe/gageonly/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/mpe/gagetriangles/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/mpe/height/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/mpe/index/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/mpe/lmosaic/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/mpe/localfield1/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/mpe/localfield2/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/mpe/localfield3/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/mpe/locbias/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/mpe/locspan/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/mpe/lqmosaic/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/mpe/lsatpre/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/mpe/maxrmosaic/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/mpe/mlmosaic/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/mpe/mlqmosaic/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/mpe/mmosaic/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/mpe/mrmosaic/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/mpe/p3lmosaic/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/mpe/qmosaic/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/mpe/qpe_gif/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/mpe/qpe_grib/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/mpe/qpe_grib_sbn/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/mpe/qpe_jpeg/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/mpe/qpe/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/mpe/qpe_netcdf/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/mpe/qpe_sbn/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/mpe/rfcbmosaic/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/mpe/rfcmmosaic/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/mpe/rfcqpe01/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/mpe/rfcqpe06/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/mpe/rfcqpe24/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/mpe/rfcqpe_grib/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/mpe/rfcqpe_temp/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/mpe/rmosaic/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/mpe/satpre/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/mpe/sat_state_var/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/mpe/sgmosaic/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/mpe/srgmosaic/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/mpe/srmosaic/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/mpe/state_var/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/stage1_archive/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/stage1_decoded/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/stage1_error/_keep_me -chmod 644 awips/hydroapps/precip_proc/local/data/stage3/post_analysis/_keep_me -chmod 644 awips/hydroapps/public/bin/amirunning -chmod 644 awips/hydroapps/public/bin/dd_help -chmod 644 awips/hydroapps/public/bin/_keep_me -chmod 644 awips/hydroapps/rfc/data/products/_keep_me -chmod 644 awips/hydroapps/rfc/fld/bin/ARCHIVE/_keep_me -chmod 644 awips/hydroapps/rfc/fld/bin/RELEASE/_keep_me -chmod 644 awips/hydroapps/rfc/fldview/floodmapdata/_keep_me -chmod 644 awips/hydroapps/rfc/grib/bin/ARCHIVE/_keep_me -chmod 644 awips/hydroapps/rfc/grib/output/_keep_me -chmod 644 awips/hydroapps/rfc/hdb/app-defaults/_keep_me -chmod 644 awips/hydroapps/rfc/hdb/bin/ARCHIVE/_keep_me -chmod 644 awips/hydroapps/rfc/hdb/bin/RELEASE/_keep_me -chmod 644 awips/hydroapps/rfc/hdb/help_files/_keep_me -chmod 644 awips/hydroapps/rfc/hdb/scripts/_keep_me -chmod 644 awips/hydroapps/rfc/nwsrfs/calb/bin/ARCHIVE/_keep_me -chmod 644 awips/hydroapps/rfc/nwsrfs/calb/bin/RELEASE/_keep_me -chmod 644 awips/hydroapps/rfc/nwsrfs/calb/data/area_ts/oper/pre/_keep_me -chmod 644 awips/hydroapps/rfc/nwsrfs/calb/data/sta_ts/oper/_keep_me -chmod 644 awips/hydroapps/rfc/nwsrfs/calb/input/oper/mcp3/_keep_me -chmod 644 awips/hydroapps/rfc/nwsrfs/calb/lib/_keep_me -chmod 644 awips/hydroapps/rfc/nwsrfs/calb/output/_keep_me -chmod 644 awips/hydroapps/rfc/nwsrfs/doc/_keep_me -chmod 644 awips/hydroapps/rfc/nwsrfs/ens/bin/ARCHIVE/_keep_me -chmod 644 awips/hydroapps/rfc/nwsrfs/ens/bin/RELEASE/_keep_me -chmod 644 awips/hydroapps/rfc/nwsrfs/ens/files/oper/cpc_fcsts/_keep_me -chmod 644 awips/hydroapps/rfc/nwsrfs/ens/files/oper/espts/_keep_me -chmod 644 awips/hydroapps/rfc/nwsrfs/ens/input/oper/_keep_me -chmod 644 awips/hydroapps/rfc/nwsrfs/ens/output/oper/_keep_me -chmod 644 awips/hydroapps/rfc/nwsrfs/ens/scripts/_keep_me -chmod 644 awips/hydroapps/rfc/nwsrfs/ffg/bin/ARCHIVE/_keep_me -chmod 644 awips/hydroapps/rfc/nwsrfs/ffg/files/oper/affg/_keep_me -chmod 644 awips/hydroapps/rfc/nwsrfs/ffg/files/oper/cary/_keep_me -chmod 644 awips/hydroapps/rfc/nwsrfs/ffg/files/oper/define/_keep_me -chmod 644 awips/hydroapps/rfc/nwsrfs/ffg/files/oper/gdpm/_keep_me -chmod 644 awips/hydroapps/rfc/nwsrfs/ffg/files/oper/grff/_keep_me -chmod 644 awips/hydroapps/rfc/nwsrfs/ffg/files/oper/grpp/_keep_me -chmod 644 awips/hydroapps/rfc/nwsrfs/ffg/files/oper/grro/_keep_me -chmod 644 awips/hydroapps/rfc/nwsrfs/ffg/files/oper/hffg/_keep_me -chmod 644 awips/hydroapps/rfc/nwsrfs/ffg/files/oper/prod/_keep_me -chmod 644 awips/hydroapps/rfc/nwsrfs/ffg/files/oper/text/_keep_me -chmod 644 awips/hydroapps/rfc/nwsrfs/ffg/files/oper/user/_keep_me -chmod 644 awips/hydroapps/rfc/nwsrfs/ffg/files/oper/wsup/_keep_me -chmod 644 awips/hydroapps/rfc/nwsrfs/ffg/output/grib/_keep_me -chmod 644 awips/hydroapps/rfc/nwsrfs/ffg/output/oper/_keep_me -chmod 644 awips/hydroapps/rfc/nwsrfs/icp/bin/ARCHIVE/_keep_me -chmod 644 awips/hydroapps/rfc/nwsrfs/icp/bin/RELEASE/_keep_me -chmod 644 awips/hydroapps/rfc/nwsrfs/icp/scripts/_keep_me -chmod 644 awips/hydroapps/rfc/nwsrfs/ifp/bin/ARCHIVE/_keep_me -chmod 644 awips/hydroapps/rfc/nwsrfs/ifp/bin/RELEASE/_keep_me -chmod 644 awips/hydroapps/rfc/nwsrfs/ifp/help_files/_keep_me -chmod 644 awips/hydroapps/rfc/nwsrfs/ifp/options/colors/_keep_me -chmod 644 awips/hydroapps/rfc/nwsrfs/ifp/scripts/_keep_me -chmod 644 awips/hydroapps/rfc/nwsrfs/ifp/system/_keep_me -chmod 644 awips/hydroapps/rfc/nwsrfs/locks/_keep_me -chmod 644 awips/hydroapps/rfc/nwsrfs/ofs/bin/ARCHIVE/_keep_me -chmod 644 awips/hydroapps/rfc/nwsrfs/ofs/files/oper/dhmdata/_keep_me -chmod 644 awips/hydroapps/rfc/nwsrfs/ofs/files/oper/fs5files/_keep_me -chmod 644 awips/hydroapps/rfc/nwsrfs/ofs/files/oper/gif_files/_keep_me -chmod 644 awips/hydroapps/rfc/nwsrfs/ofs/files/oper/griddb/_keep_me -chmod 644 awips/hydroapps/rfc/nwsrfs/ofs/files/oper/mods/_keep_me -chmod 644 awips/hydroapps/rfc/nwsrfs/ofs/files/oper/ndfd/_keep_me -chmod 644 awips/hydroapps/rfc/nwsrfs/ofs/files/oper_new/fs5files/_keep_me -chmod 644 awips/hydroapps/rfc/nwsrfs/ofs/files/oper/sacsnow_clim/_keep_me -chmod 644 awips/hydroapps/rfc/nwsrfs/ofs/files/oper/shefdata/_keep_me -chmod 644 awips/hydroapps/rfc/nwsrfs/ofs/input/oper/_keep_me -chmod 644 awips/hydroapps/rfc/nwsrfs/ofs/output/jelkins/_keep_me -chmod 644 awips/hydroapps/rfc/nwsrfs/ofs/output/ofsde_logs/_keep_me -chmod 644 awips/hydroapps/rfc/nwsrfs/sys_files/_keep_me -chmod 644 awips/hydroapps/rfc/nwsrfs/util/bin/ARCHIVE/_keep_me -chmod 644 awips/hydroapps/rfc/nwsrfs/util/bin/RELEASE/_keep_me -chmod 644 awips/hydroapps/rfc/send_rfc/data/sbnprods/_keep_me -chmod 644 awips/hydroapps/rfc/send_rfc/data/send/_keep_me -chmod 644 awips/hydroapps/rfc/verify/bin/RELEASE/_keep_me -chmod 644 awips/hydroapps/rfc/verify/files/_keep_me -chmod 644 awips/hydroapps/rfc/verify/input/_keep_me -chmod 644 awips/hydroapps/rfc/verify/output/_keep_me -chmod 644 awips/hydroapps/rfc/verify/scripts/_keep_me -chmod 644 awips/hydroapps/rfc/xdat/bin/ARCHIVE/_keep_me -chmod 644 awips/hydroapps/rfc/xdat/bin/RELEASE/_keep_me -chmod 644 awips/hydroapps/rfc/xdat/data/localdata/_keep_me -chmod 644 awips/hydroapps/rfc/xdat/data/shefdata/_keep_me -chmod 644 awips/hydroapps/rfc/xdat/parameters/groups/_keep_me -chmod 644 awips/hydroapps/rfc/xnav/bin/ARCHIVE/_keep_me -chmod 644 awips/hydroapps/rfc/xnav/bin/RELEASE/_keep_me -chmod 644 awips/hydroapps/rfc/xnav/data/localdata/_keep_me -chmod 644 awips/hydroapps/rfc/xnav/data/misc_data/_keep_me -chmod 644 awips/hydroapps/rfc/xnav/data/rfcqpf/nmap/_keep_me -chmod 644 awips/hydroapps/rfc/xnav/data/shefdata/_keep_me -chmod 644 awips/hydroapps/rfc/xnav/data/wfoqpf/_keep_me -chmod 644 awips/hydroapps/rfc/xnav/parameters/rules/_keep_me -chmod 644 awips/hydroapps/rfc/xsets/bin/ARCHIVE/_keep_me -chmod 644 awips/hydroapps/rfc/xsets/bin/RELEASE/_keep_me -chmod 644 awips/hydroapps/rfc/xsets/files/oper/hydrographs/param/_keep_me -chmod 644 awips/hydroapps/rfc/xsets/files/oper/output/_keep_me -chmod 644 awips/hydroapps/rfc/xsets/files/oper/param/_keep_me -chmod 644 awips/hydroapps/shefdecode/bin/_keep_me -chmod 644 awips/hydroapps/shefdecode/input/_keep_me -chmod 644 awips/hydroapps/shefdecode/logs/decoder/_keep_me -chmod 644 awips/hydroapps/shefdecode/logs/product/_keep_me -chmod 644 awips/hydroapps/whfs/bin/log4j.xml -chmod 644 awips/hydroapps/whfs/bin/pa/_keep_me -chmod 644 awips/hydroapps/whfs/local/bin/_keep_me -chmod 644 awips/hydroapps/whfs/local/data/app/damcrest/_keep_me -chmod 644 awips/hydroapps/whfs/local/data/app/damcrest/.vimrc -chmod 644 awips/hydroapps/whfs/local/data/app/hydroview/help/_keep_me -chmod 644 awips/hydroapps/whfs/local/data/app/metar2shef/_keep_me -chmod 644 awips/hydroapps/whfs/local/data/app/rivermon/_keep_me -chmod 644 awips/hydroapps/whfs/local/data/app/riverpro/_keep_me -chmod 644 awips/hydroapps/whfs/local/data/app/sshp/_keep_me -chmod 644 awips/hydroapps/whfs/local/data/app/timeseries/_keep_me -chmod 644 awips/hydroapps/whfs/local/data/damcrest/_keep_me -chmod 644 awips/hydroapps/whfs/local/data/geo/basins.dat -chmod 644 awips/hydroapps/whfs/local/data/geo/basins.dat.OAX -chmod 644 awips/hydroapps/whfs/local/data/geo/topography -chmod 644 awips/hydroapps/whfs/local/data/grid/misc/_keep_me -chmod 644 awips/hydroapps/whfs/local/data/image/_keep_me -chmod 644 awips/hydroapps/whfs/local/data/import/_keep_me -chmod 644 awips/hydroapps/whfs/local/data/log/create_gagradloc/_keep_me -chmod 644 awips/hydroapps/whfs/local/data/log/db_purge/_keep_me -chmod 644 awips/hydroapps/whfs/local/data/log/floodseq/_keep_me -chmod 644 awips/hydroapps/whfs/local/data/log/metar2shef/_keep_me -chmod 644 awips/hydroapps/whfs/local/data/log/misc/_keep_me -chmod 644 awips/hydroapps/whfs/local/data/log/obsfcst_monitor/_keep_me -chmod 644 awips/hydroapps/whfs/local/data/log/pdc_pp/_keep_me -chmod 644 awips/hydroapps/whfs/local/data/log/precip_accum/_keep_me -chmod 644 awips/hydroapps/whfs/local/data/log/qcalarm/_keep_me -chmod 644 awips/hydroapps/whfs/local/data/log/rivermon/_keep_me -chmod 644 awips/hydroapps/whfs/local/data/log/riverpro/_keep_me -chmod 644 awips/hydroapps/whfs/local/data/log/sshp/_keep_me -chmod 644 awips/hydroapps/whfs/local/data/log/vacuum/_keep_me -chmod 644 awips/hydroapps/whfs/local/data/metar_input/_keep_me -chmod 644 awips/hydroapps/whfs/local/data/metar_output/_keep_me -chmod 644 awips/hydroapps/whfs/local/data/pdc_pp/_keep_me -chmod 644 awips/hydroapps/whfs/local/data/product/_keep_me -chmod 644 awips/hydroapps/whfs/local/data/report/_keep_me -chmod 644 awips/hydroapps/whfs/local/data/sshp/forecast/_keep_me -chmod 644 awips/hydroapps/whfs/local/data/sshp/precip/_keep_me -chmod 644 awips/hydroapps/whfs/local/data/sshp_transfer/incoming/_keep_me -chmod 644 awips/hydroapps/whfs/local/data/sshp_transfer/ingest_xml/_keep_me -chmod 644 awips/hydroapps/whfs/local/data/sshp_transfer/ofs_extract_text/_keep_me -chmod 644 awips/hydroapps/whfs/local/data/sshp_transfer/ofs_extract_xml/_keep_me -chmod 644 awips/hydroapps/whfs/local/data/sshp_transfer/outgoing/_keep_me -chmod 755 awips -chmod 755 awips/hydroapps -chmod 755 awips/hydroapps/data -chmod 755 awips/hydroapps/data/fxa -chmod 755 awips/hydroapps/data/fxa/radar -chmod 755 awips/hydroapps/data/fxa/radar/envData -chmod 755 awips/hydroapps/ffmp_templates -chmod 755 awips/hydroapps/geo_data -chmod 755 awips/hydroapps/geo_data/host -chmod 755 awips/hydroapps/geo_data/host/ascii -chmod 755 awips/hydroapps/geo_data/host/binary -chmod 755 awips/hydroapps/geo_data/ofstest -chmod 755 awips/hydroapps/geo_data/ofstest/ascii -chmod 755 awips/hydroapps/geo_data/util -chmod 755 awips/hydroapps/geo_data/util/run_create_bas_bound -chmod 755 awips/hydroapps/precip_proc -chmod 755 awips/hydroapps/precip_proc/bin -chmod 755 awips/hydroapps/precip_proc/bin/bias_trans.jar -chmod 755 awips/hydroapps/precip_proc/bin/DHRgather -chmod 755 awips/hydroapps/precip_proc/bin/DPAgather -chmod 755 awips/hydroapps/precip_proc/bin/DSPgather -chmod 755 awips/hydroapps/precip_proc/bin/hourly_precip_station_gen.sql -chmod 755 awips/hydroapps/precip_proc/bin/precip_station_gen.sql -chmod 755 awips/hydroapps/precip_proc/bin/prism.jar -chmod 755 awips/hydroapps/precip_proc/bin/process_dpa -chmod 755 awips/hydroapps/precip_proc/bin/process_dpafiles -chmod 755 awips/hydroapps/precip_proc/bin/process_grib_files -chmod 755 awips/hydroapps/precip_proc/bin/process_hpe_grib_files -chmod 755 awips/hydroapps/precip_proc/bin/process_rfc_bias -chmod 755 awips/hydroapps/precip_proc/bin/purge_hpe_files -chmod 755 awips/hydroapps/precip_proc/bin/purge_mpe_files -chmod 755 awips/hydroapps/precip_proc/bin/rerun_mpe_fieldgen -chmod 755 awips/hydroapps/precip_proc/bin/ruc.pl.template -chmod 755 awips/hydroapps/precip_proc/bin/ruc.tcl -chmod 755 awips/hydroapps/precip_proc/bin/run_biasmesgen -chmod 755 awips/hydroapps/precip_proc/bin/run_build_hourly -chmod 755 awips/hydroapps/precip_proc/bin/run_convert_basin_format -chmod 755 awips/hydroapps/precip_proc/bin/run_convert_dqc_climo_list -chmod 755 awips/hydroapps/precip_proc/bin/run_convert_dqc_station_list -chmod 755 awips/hydroapps/precip_proc/bin/run_copygb -chmod 755 awips/hydroapps/precip_proc/bin/run_create_freezing_station_list -chmod 755 awips/hydroapps/precip_proc/bin/run_create_mpe_beam_height_file -chmod 755 awips/hydroapps/precip_proc/bin/run_create_mpe_climo_lists -chmod 755 awips/hydroapps/precip_proc/bin/run_create_mpe_gage_file -chmod 755 awips/hydroapps/precip_proc/bin/run_create_mpe_station_lists -chmod 755 awips/hydroapps/precip_proc/bin/run_create_prism -chmod 755 awips/hydroapps/precip_proc/bin/run_create_topo -chmod 755 awips/hydroapps/precip_proc/bin/run_create_triangles -chmod 755 awips/hydroapps/precip_proc/bin/Run_DecodeDHR -chmod 755 awips/hydroapps/precip_proc/bin/Run_DecodeDPA -chmod 755 awips/hydroapps/precip_proc/bin/Run_DecodeDSP -chmod 755 awips/hydroapps/precip_proc/bin/run_disagg -chmod 755 awips/hydroapps/precip_proc/bin/run_disagg_fieldgen -chmod 755 awips/hydroapps/precip_proc/bin/run_dqc_preprocessor -chmod 755 awips/hydroapps/precip_proc/bin/run_fieldgen_disagg_fieldgen -chmod 755 awips/hydroapps/precip_proc/bin/run_freezing_level -chmod 755 awips/hydroapps/precip_proc/bin/run_freezing_station_setup -chmod 755 awips/hydroapps/precip_proc/bin/run_gen_areal_ffg -chmod 755 awips/hydroapps/precip_proc/bin/run_gen_areal_qpe -chmod 755 awips/hydroapps/precip_proc/bin/run_gribit -chmod 755 awips/hydroapps/precip_proc/bin/run_hpe_fieldgen -chmod 755 awips/hydroapps/precip_proc/bin/run_lightning_proc -chmod 755 awips/hydroapps/precip_proc/bin/run_mpe_fieldgen -chmod 755 awips/hydroapps/precip_proc/bin/run_mpe_whfs -chmod 755 awips/hydroapps/precip_proc/bin/run_nc2grib -chmod 755 awips/hydroapps/precip_proc/bin/run_post_analysis -chmod 755 awips/hydroapps/precip_proc/bin/start_gage_pp -chmod 755 awips/hydroapps/precip_proc/bin/start_hpe -chmod 755 awips/hydroapps/precip_proc/bin/start_hpe_crons -chmod 755 awips/hydroapps/precip_proc/bin/start_mpe_editor -chmod 755 awips/hydroapps/precip_proc/bin/start_process_dpafiles -chmod 755 awips/hydroapps/precip_proc/bin/stop_gage_pp -chmod 755 awips/hydroapps/precip_proc/bin/stop_hpe -chmod 755 awips/hydroapps/precip_proc/bin/stop_hpe_crons -chmod 755 awips/hydroapps/precip_proc/bin/stop_process_dpafiles -chmod 755 awips/hydroapps/precip_proc/bin/temperature_station_gen.sql -chmod 755 awips/hydroapps/precip_proc/bin/transmit_rfc_bias -chmod 755 awips/hydroapps/precip_proc/bin/transmit_rfc_qpe -chmod 755 awips/hydroapps/precip_proc/local -chmod 755 awips/hydroapps/precip_proc/local/bin -chmod 755 awips/hydroapps/precip_proc/local/bin/mpe_internal_script -chmod 755 awips/hydroapps/precip_proc/local/bin/process_qpe_mosaic -chmod 755 awips/hydroapps/precip_proc/local/bin/run_build_hourly -chmod 755 awips/hydroapps/precip_proc/local/bin/transmit_rfc_qpe -chmod 755 awips/hydroapps/precip_proc/local/data -chmod 755 awips/hydroapps/precip_proc/local/data/app -chmod 755 awips/hydroapps/precip_proc/local/data/app/gen_areal_qpe -chmod 755 awips/hydroapps/precip_proc/local/data/app/hpe -chmod 755 awips/hydroapps/precip_proc/local/data/app/mpe -chmod 755 awips/hydroapps/precip_proc/local/data/app/mpe/beam_height -chmod 755 awips/hydroapps/precip_proc/local/data/app/mpe/climo -chmod 755 awips/hydroapps/precip_proc/local/data/app/mpe/gage_locations -chmod 755 awips/hydroapps/precip_proc/local/data/app/mpe/grid_masks -chmod 755 awips/hydroapps/precip_proc/local/data/app/mpe/help -chmod 755 awips/hydroapps/precip_proc/local/data/app/mpe/misbin -chmod 755 awips/hydroapps/precip_proc/local/data/app/mpe/nc2grib -chmod 755 awips/hydroapps/precip_proc/local/data/app/mpe/prism -chmod 755 awips/hydroapps/precip_proc/local/data/app/mpe/station_lists -chmod 755 awips/hydroapps/precip_proc/local/data/app/mpe/utiltriangles -chmod 755 awips/hydroapps/precip_proc/local/data/app/radclim -chmod 755 awips/hydroapps/precip_proc/local/data/app/stage3 -chmod 755 awips/hydroapps/precip_proc/local/data/app/stage3/help -chmod 755 awips/hydroapps/precip_proc/local/data/dhr_archive -chmod 755 awips/hydroapps/precip_proc/local/data/dhr_decoded -chmod 755 awips/hydroapps/precip_proc/local/data/dhr_error -chmod 755 awips/hydroapps/precip_proc/local/data/dhr_gather -chmod 755 awips/hydroapps/precip_proc/local/data/dsp_archive -chmod 755 awips/hydroapps/precip_proc/local/data/dsp_decoded -chmod 755 awips/hydroapps/precip_proc/local/data/dsp_error -chmod 755 awips/hydroapps/precip_proc/local/data/dsp_gather -chmod 755 awips/hydroapps/precip_proc/local/data/gpp_input -chmod 755 awips/hydroapps/precip_proc/local/data/hpe -chmod 755 awips/hydroapps/precip_proc/local/data/hpe/avgrmosaic -chmod 755 awips/hydroapps/precip_proc/local/data/hpe/bdhrmosaic -chmod 755 awips/hydroapps/precip_proc/local/data/hpe/bdhrmosaic/gif -chmod 755 awips/hydroapps/precip_proc/local/data/hpe/bdhrmosaic/grib -chmod 755 awips/hydroapps/precip_proc/local/data/hpe/bdhrmosaic/netcdf -chmod 755 awips/hydroapps/precip_proc/local/data/hpe/dhrmosaic -chmod 755 awips/hydroapps/precip_proc/local/data/hpe/dhrmosaic/gif -chmod 755 awips/hydroapps/precip_proc/local/data/hpe/dhrmosaic/grib -chmod 755 awips/hydroapps/precip_proc/local/data/hpe/dhrmosaic/netcdf -chmod 755 awips/hydroapps/precip_proc/local/data/hpe/ebmosaic -chmod 755 awips/hydroapps/precip_proc/local/data/hpe/ebmosaic/gif -chmod 755 awips/hydroapps/precip_proc/local/data/hpe/ebmosaic/grib -chmod 755 awips/hydroapps/precip_proc/local/data/hpe/ebmosaic/netcdf -chmod 755 awips/hydroapps/precip_proc/local/data/hpe/ermosaic -chmod 755 awips/hydroapps/precip_proc/local/data/hpe/ermosaic/gif -chmod 755 awips/hydroapps/precip_proc/local/data/hpe/ermosaic/grib -chmod 755 awips/hydroapps/precip_proc/local/data/hpe/ermosaic/netcdf -chmod 755 awips/hydroapps/precip_proc/local/data/hpe/height -chmod 755 awips/hydroapps/precip_proc/local/data/hpe/hpe_gif -chmod 755 awips/hydroapps/precip_proc/local/data/hpe/hpe_grib -chmod 755 awips/hydroapps/precip_proc/local/data/hpe/hpe_jpeg -chmod 755 awips/hydroapps/precip_proc/local/data/hpe/hpe_netcdf -chmod 755 awips/hydroapps/precip_proc/local/data/hpe/hpe_xmrg -chmod 755 awips/hydroapps/precip_proc/local/data/hpe/index -chmod 755 awips/hydroapps/precip_proc/local/data/hpe/lsatpre -chmod 755 awips/hydroapps/precip_proc/local/data/hpe/maxrmosaic -chmod 755 awips/hydroapps/precip_proc/local/data/hpe/nowcast -chmod 755 awips/hydroapps/precip_proc/local/data/log -chmod 755 awips/hydroapps/precip_proc/local/data/log/decodedhr -chmod 755 awips/hydroapps/precip_proc/local/data/log/decodedpa -chmod 755 awips/hydroapps/precip_proc/local/data/log/decodedsp -chmod 755 awips/hydroapps/precip_proc/local/data/log/disagg -chmod 755 awips/hydroapps/precip_proc/local/data/log/gage_pp -chmod 755 awips/hydroapps/precip_proc/local/data/log/gen_areal_qpe -chmod 755 awips/hydroapps/precip_proc/local/data/log/hpe -chmod 755 awips/hydroapps/precip_proc/local/data/log/lightning_proc -chmod 755 awips/hydroapps/precip_proc/local/data/log/misc -chmod 755 awips/hydroapps/precip_proc/local/data/log/mpe_editor -chmod 755 awips/hydroapps/precip_proc/local/data/log/mpe_fieldgen -chmod 755 awips/hydroapps/precip_proc/local/data/log/process_bias_message -chmod 755 awips/hydroapps/precip_proc/local/data/log/siipp -chmod 755 awips/hydroapps/precip_proc/local/data/mpe -chmod 755 awips/hydroapps/precip_proc/local/data/mpe/avgrmosaic -chmod 755 awips/hydroapps/precip_proc/local/data/mpe/bad_gages -chmod 755 awips/hydroapps/precip_proc/local/data/mpe/bias_message_input -chmod 755 awips/hydroapps/precip_proc/local/data/mpe/bias_message_output -chmod 755 awips/hydroapps/precip_proc/local/data/mpe/bmosaic -chmod 755 awips/hydroapps/precip_proc/local/data/mpe/d2d_files -chmod 755 awips/hydroapps/precip_proc/local/data/mpe/dailyQC -chmod 755 awips/hydroapps/precip_proc/local/data/mpe/dailyQC/fewsgrib -chmod 755 awips/hydroapps/precip_proc/local/data/mpe/dailyQC/freezing_level -chmod 755 awips/hydroapps/precip_proc/local/data/mpe/dailyQC/freezing_level/grid -chmod 755 awips/hydroapps/precip_proc/local/data/mpe/dailyQC/freezing_level/MAZ -chmod 755 awips/hydroapps/precip_proc/local/data/mpe/dailyQC/freezing_level/point -chmod 755 awips/hydroapps/precip_proc/local/data/mpe/dailyQC/netcdf_files -chmod 755 awips/hydroapps/precip_proc/local/data/mpe/dailyQC/precip -chmod 755 awips/hydroapps/precip_proc/local/data/mpe/dailyQC/precip/bad -chmod 755 awips/hydroapps/precip_proc/local/data/mpe/dailyQC/precip/dev -chmod 755 awips/hydroapps/precip_proc/local/data/mpe/dailyQC/precip/grid -chmod 755 awips/hydroapps/precip_proc/local/data/mpe/dailyQC/precip/MAP -chmod 755 awips/hydroapps/precip_proc/local/data/mpe/dailyQC/precip/point -chmod 755 awips/hydroapps/precip_proc/local/data/mpe/dailyQC/scratch -chmod 755 awips/hydroapps/precip_proc/local/data/mpe/dailyQC/temperature -chmod 755 awips/hydroapps/precip_proc/local/data/mpe/dailyQC/temperature/bad -chmod 755 awips/hydroapps/precip_proc/local/data/mpe/dailyQC/temperature/dev -chmod 755 awips/hydroapps/precip_proc/local/data/mpe/dailyQC/temperature/grid -chmod 755 awips/hydroapps/precip_proc/local/data/mpe/dailyQC/temperature/MAT -chmod 755 awips/hydroapps/precip_proc/local/data/mpe/dailyQC/temperature/point -chmod 755 awips/hydroapps/precip_proc/local/data/mpe/draw_precip -chmod 755 awips/hydroapps/precip_proc/local/data/mpe/edit_polygon -chmod 755 awips/hydroapps/precip_proc/local/data/mpe/gageonly -chmod 755 awips/hydroapps/precip_proc/local/data/mpe/gagetriangles -chmod 755 awips/hydroapps/precip_proc/local/data/mpe/height -chmod 755 awips/hydroapps/precip_proc/local/data/mpe/index -chmod 755 awips/hydroapps/precip_proc/local/data/mpe/lmosaic -chmod 755 awips/hydroapps/precip_proc/local/data/mpe/localfield1 -chmod 755 awips/hydroapps/precip_proc/local/data/mpe/localfield2 -chmod 755 awips/hydroapps/precip_proc/local/data/mpe/localfield3 -chmod 755 awips/hydroapps/precip_proc/local/data/mpe/locbias -chmod 755 awips/hydroapps/precip_proc/local/data/mpe/locspan -chmod 755 awips/hydroapps/precip_proc/local/data/mpe/lqmosaic -chmod 755 awips/hydroapps/precip_proc/local/data/mpe/lsatpre -chmod 755 awips/hydroapps/precip_proc/local/data/mpe/maxrmosaic -chmod 755 awips/hydroapps/precip_proc/local/data/mpe/mlmosaic -chmod 755 awips/hydroapps/precip_proc/local/data/mpe/mlqmosaic -chmod 755 awips/hydroapps/precip_proc/local/data/mpe/mmosaic -chmod 755 awips/hydroapps/precip_proc/local/data/mpe/mrmosaic -chmod 755 awips/hydroapps/precip_proc/local/data/mpe/p3lmosaic -chmod 755 awips/hydroapps/precip_proc/local/data/mpe/qmosaic -chmod 755 awips/hydroapps/precip_proc/local/data/mpe/qpe -chmod 755 awips/hydroapps/precip_proc/local/data/mpe/qpe_gif -chmod 755 awips/hydroapps/precip_proc/local/data/mpe/qpe_grib -chmod 755 awips/hydroapps/precip_proc/local/data/mpe/qpe_grib_sbn -chmod 755 awips/hydroapps/precip_proc/local/data/mpe/qpe_jpeg -chmod 755 awips/hydroapps/precip_proc/local/data/mpe/qpe_netcdf -chmod 755 awips/hydroapps/precip_proc/local/data/mpe/qpe_sbn -chmod 755 awips/hydroapps/precip_proc/local/data/mpe/rfcbmosaic -chmod 755 awips/hydroapps/precip_proc/local/data/mpe/rfcmmosaic -chmod 755 awips/hydroapps/precip_proc/local/data/mpe/rfcqpe01 -chmod 755 awips/hydroapps/precip_proc/local/data/mpe/rfcqpe06 -chmod 755 awips/hydroapps/precip_proc/local/data/mpe/rfcqpe24 -chmod 755 awips/hydroapps/precip_proc/local/data/mpe/rfcqpe_grib -chmod 755 awips/hydroapps/precip_proc/local/data/mpe/rfcqpe_temp -chmod 755 awips/hydroapps/precip_proc/local/data/mpe/rmosaic -chmod 755 awips/hydroapps/precip_proc/local/data/mpe/satpre -chmod 755 awips/hydroapps/precip_proc/local/data/mpe/sat_state_var -chmod 755 awips/hydroapps/precip_proc/local/data/mpe/sgmosaic -chmod 755 awips/hydroapps/precip_proc/local/data/mpe/srgmosaic -chmod 755 awips/hydroapps/precip_proc/local/data/mpe/srmosaic -chmod 755 awips/hydroapps/precip_proc/local/data/mpe/state_var -chmod 755 awips/hydroapps/precip_proc/local/data/stage1_archive -chmod 755 awips/hydroapps/precip_proc/local/data/stage1_decoded -chmod 755 awips/hydroapps/precip_proc/local/data/stage1_error -chmod 755 awips/hydroapps/precip_proc/local/data/stage3 -chmod 755 awips/hydroapps/precip_proc/local/data/stage3/post_analysis -chmod 755 awips/hydroapps/public -chmod 755 awips/hydroapps/public/bin -chmod 755 awips/hydroapps/rfc -chmod 755 awips/hydroapps/rfc/data -chmod 755 awips/hydroapps/rfc/data/products -chmod 755 awips/hydroapps/rfc/fld -chmod 755 awips/hydroapps/rfc/fld/bin -chmod 755 awips/hydroapps/rfc/fld/bin/ARCHIVE -chmod 755 awips/hydroapps/rfc/fld/bin/RELEASE -chmod 755 awips/hydroapps/rfc/fldview -chmod 755 awips/hydroapps/rfc/fldview/floodmapdata -chmod 755 awips/hydroapps/rfc/grib -chmod 755 awips/hydroapps/rfc/grib/bin -chmod 755 awips/hydroapps/rfc/grib/bin/ARCHIVE -chmod 755 awips/hydroapps/rfc/grib/output -chmod 755 awips/hydroapps/rfc/hdb -chmod 755 awips/hydroapps/rfc/hdb/app-defaults -chmod 755 awips/hydroapps/rfc/hdb/bin -chmod 755 awips/hydroapps/rfc/hdb/bin/ARCHIVE -chmod 755 awips/hydroapps/rfc/hdb/bin/RELEASE -chmod 755 awips/hydroapps/rfc/hdb/help_files -chmod 755 awips/hydroapps/rfc/hdb/scripts -chmod 755 awips/hydroapps/rfc/nwsrfs -chmod 755 awips/hydroapps/rfc/nwsrfs/calb -chmod 755 awips/hydroapps/rfc/nwsrfs/calb/bin -chmod 755 awips/hydroapps/rfc/nwsrfs/calb/bin/ARCHIVE -chmod 755 awips/hydroapps/rfc/nwsrfs/calb/bin/RELEASE -chmod 755 awips/hydroapps/rfc/nwsrfs/calb/data -chmod 755 awips/hydroapps/rfc/nwsrfs/calb/data/area_ts -chmod 755 awips/hydroapps/rfc/nwsrfs/calb/data/area_ts/oper -chmod 755 awips/hydroapps/rfc/nwsrfs/calb/data/area_ts/oper/pre -chmod 755 awips/hydroapps/rfc/nwsrfs/calb/data/sta_ts -chmod 755 awips/hydroapps/rfc/nwsrfs/calb/data/sta_ts/oper -chmod 755 awips/hydroapps/rfc/nwsrfs/calb/input -chmod 755 awips/hydroapps/rfc/nwsrfs/calb/input/oper -chmod 755 awips/hydroapps/rfc/nwsrfs/calb/input/oper/mcp3 -chmod 755 awips/hydroapps/rfc/nwsrfs/calb/lib -chmod 755 awips/hydroapps/rfc/nwsrfs/calb/output -chmod 755 awips/hydroapps/rfc/nwsrfs/doc -chmod 755 awips/hydroapps/rfc/nwsrfs/ens -chmod 755 awips/hydroapps/rfc/nwsrfs/ens/bin -chmod 755 awips/hydroapps/rfc/nwsrfs/ens/bin/ARCHIVE -chmod 755 awips/hydroapps/rfc/nwsrfs/ens/bin/RELEASE -chmod 755 awips/hydroapps/rfc/nwsrfs/ens/files -chmod 755 awips/hydroapps/rfc/nwsrfs/ens/files/oper -chmod 755 awips/hydroapps/rfc/nwsrfs/ens/files/oper/cpc_fcsts -chmod 755 awips/hydroapps/rfc/nwsrfs/ens/files/oper/espts -chmod 755 awips/hydroapps/rfc/nwsrfs/ens/input -chmod 755 awips/hydroapps/rfc/nwsrfs/ens/input/oper -chmod 755 awips/hydroapps/rfc/nwsrfs/ens/output -chmod 755 awips/hydroapps/rfc/nwsrfs/ens/output/oper -chmod 755 awips/hydroapps/rfc/nwsrfs/ens/scripts -chmod 755 awips/hydroapps/rfc/nwsrfs/ffg -chmod 755 awips/hydroapps/rfc/nwsrfs/ffg/bin -chmod 755 awips/hydroapps/rfc/nwsrfs/ffg/bin/ARCHIVE -chmod 755 awips/hydroapps/rfc/nwsrfs/ffg/bin/RELEASE -chmod 755 awips/hydroapps/rfc/nwsrfs/ffg/bin/RELEASE/ffguid -chmod 755 awips/hydroapps/rfc/nwsrfs/ffg/bin/RELEASE/prodgen -chmod 755 awips/hydroapps/rfc/nwsrfs/ffg/bin/RELEASE/zgrid -chmod 755 awips/hydroapps/rfc/nwsrfs/ffg/files -chmod 755 awips/hydroapps/rfc/nwsrfs/ffg/files/oper -chmod 755 awips/hydroapps/rfc/nwsrfs/ffg/files/oper/affg -chmod 755 awips/hydroapps/rfc/nwsrfs/ffg/files/oper/cary -chmod 755 awips/hydroapps/rfc/nwsrfs/ffg/files/oper/define -chmod 755 awips/hydroapps/rfc/nwsrfs/ffg/files/oper/gdpm -chmod 755 awips/hydroapps/rfc/nwsrfs/ffg/files/oper/grff -chmod 755 awips/hydroapps/rfc/nwsrfs/ffg/files/oper/grpp -chmod 755 awips/hydroapps/rfc/nwsrfs/ffg/files/oper/grro -chmod 755 awips/hydroapps/rfc/nwsrfs/ffg/files/oper/hffg -chmod 755 awips/hydroapps/rfc/nwsrfs/ffg/files/oper/prod -chmod 755 awips/hydroapps/rfc/nwsrfs/ffg/files/oper/text -chmod 755 awips/hydroapps/rfc/nwsrfs/ffg/files/oper/user -chmod 755 awips/hydroapps/rfc/nwsrfs/ffg/files/oper/wsup -chmod 755 awips/hydroapps/rfc/nwsrfs/ffg/output -chmod 755 awips/hydroapps/rfc/nwsrfs/ffg/output/grib -chmod 755 awips/hydroapps/rfc/nwsrfs/ffg/output/oper -chmod 755 awips/hydroapps/rfc/nwsrfs/ffg/scripts -chmod 755 awips/hydroapps/rfc/nwsrfs/ffg/scripts/ffg -chmod 755 awips/hydroapps/rfc/nwsrfs/ffg/scripts/ffg_binxmit -chmod 755 awips/hydroapps/rfc/nwsrfs/ffg/scripts/ffg_testit -chmod 755 awips/hydroapps/rfc/nwsrfs/icp -chmod 755 awips/hydroapps/rfc/nwsrfs/icp/bin -chmod 755 awips/hydroapps/rfc/nwsrfs/icp/bin/ARCHIVE -chmod 755 awips/hydroapps/rfc/nwsrfs/icp/bin/RELEASE -chmod 755 awips/hydroapps/rfc/nwsrfs/icp/scripts -chmod 755 awips/hydroapps/rfc/nwsrfs/ifp -chmod 755 awips/hydroapps/rfc/nwsrfs/ifp/bin -chmod 755 awips/hydroapps/rfc/nwsrfs/ifp/bin/ARCHIVE -chmod 755 awips/hydroapps/rfc/nwsrfs/ifp/bin/RELEASE -chmod 755 awips/hydroapps/rfc/nwsrfs/ifp/help_files -chmod 755 awips/hydroapps/rfc/nwsrfs/ifp/options -chmod 755 awips/hydroapps/rfc/nwsrfs/ifp/options/colors -chmod 755 awips/hydroapps/rfc/nwsrfs/ifp/scripts -chmod 755 awips/hydroapps/rfc/nwsrfs/ifp/system -chmod 755 awips/hydroapps/rfc/nwsrfs/locks -chmod 755 awips/hydroapps/rfc/nwsrfs/ofs -chmod 755 awips/hydroapps/rfc/nwsrfs/ofs/bin -chmod 755 awips/hydroapps/rfc/nwsrfs/ofs/bin/ARCHIVE -chmod 755 awips/hydroapps/rfc/nwsrfs/ofs/bin/RELEASE -chmod 755 awips/hydroapps/rfc/nwsrfs/ofs/bin/RELEASE/batchpst -chmod 755 awips/hydroapps/rfc/nwsrfs/ofs/bin/RELEASE/espinit -chmod 755 awips/hydroapps/rfc/nwsrfs/ofs/bin/RELEASE/fcinit -chmod 755 awips/hydroapps/rfc/nwsrfs/ofs/bin/RELEASE/fcst -chmod 755 awips/hydroapps/rfc/nwsrfs/ofs/bin/RELEASE/filecrat -chmod 755 awips/hydroapps/rfc/nwsrfs/ofs/bin/RELEASE/filesize -chmod 755 awips/hydroapps/rfc/nwsrfs/ofs/bin/RELEASE/goesdb -chmod 755 awips/hydroapps/rfc/nwsrfs/ofs/bin/RELEASE/include_hydro_env.sh -chmod 755 awips/hydroapps/rfc/nwsrfs/ofs/bin/RELEASE/ndfd2rfs -chmod 755 awips/hydroapps/rfc/nwsrfs/ofs/bin/RELEASE/ppdutil -chmod 755 awips/hydroapps/rfc/nwsrfs/ofs/bin/RELEASE/ppinit -chmod 755 awips/hydroapps/rfc/nwsrfs/ofs/bin/RELEASE/prdutil -chmod 755 awips/hydroapps/rfc/nwsrfs/ofs/bin/RELEASE/reorder -chmod 755 awips/hydroapps/rfc/nwsrfs/ofs/bin/RELEASE/sasmdb -chmod 755 awips/hydroapps/rfc/nwsrfs/ofs/bin/RELEASE/shefpars -chmod 755 awips/hydroapps/rfc/nwsrfs/ofs/bin/RELEASE/shefpost -chmod 755 awips/hydroapps/rfc/nwsrfs/ofs/files -chmod 755 awips/hydroapps/rfc/nwsrfs/ofs/files/oper -chmod 755 awips/hydroapps/rfc/nwsrfs/ofs/files/oper/dhmdata -chmod 755 awips/hydroapps/rfc/nwsrfs/ofs/files/oper/fs5files -chmod 755 awips/hydroapps/rfc/nwsrfs/ofs/files/oper/gif_files -chmod 755 awips/hydroapps/rfc/nwsrfs/ofs/files/oper/griddb -chmod 755 awips/hydroapps/rfc/nwsrfs/ofs/files/oper/mods -chmod 755 awips/hydroapps/rfc/nwsrfs/ofs/files/oper/ndfd -chmod 755 awips/hydroapps/rfc/nwsrfs/ofs/files/oper_new -chmod 755 awips/hydroapps/rfc/nwsrfs/ofs/files/oper_new/fs5files -chmod 755 awips/hydroapps/rfc/nwsrfs/ofs/files/oper/sacsnow_clim -chmod 755 awips/hydroapps/rfc/nwsrfs/ofs/files/oper/shefdata -chmod 755 awips/hydroapps/rfc/nwsrfs/ofs/input -chmod 755 awips/hydroapps/rfc/nwsrfs/ofs/input/oper -chmod 755 awips/hydroapps/rfc/nwsrfs/ofs/output -chmod 755 awips/hydroapps/rfc/nwsrfs/ofs/output/jelkins -chmod 755 awips/hydroapps/rfc/nwsrfs/ofs/output/ofsde_logs -chmod 755 awips/hydroapps/rfc/nwsrfs/ofs/scripts -chmod 755 awips/hydroapps/rfc/nwsrfs/ofs/scripts/create_files_group -chmod 755 awips/hydroapps/rfc/nwsrfs/ofs/scripts/create_input_group -chmod 755 awips/hydroapps/rfc/nwsrfs/ofs/scripts/include_hydro_env.sh -chmod 755 awips/hydroapps/rfc/nwsrfs/ofs/scripts/ofs -chmod 755 awips/hydroapps/rfc/nwsrfs/sys_files -chmod 755 awips/hydroapps/rfc/nwsrfs/util -chmod 755 awips/hydroapps/rfc/nwsrfs/util/bin -chmod 755 awips/hydroapps/rfc/nwsrfs/util/bin/ARCHIVE -chmod 755 awips/hydroapps/rfc/nwsrfs/util/bin/RELEASE -chmod 755 awips/hydroapps/rfc/send_rfc -chmod 755 awips/hydroapps/rfc/send_rfc/data -chmod 755 awips/hydroapps/rfc/send_rfc/data/sbnprods -chmod 755 awips/hydroapps/rfc/send_rfc/data/send -chmod 755 awips/hydroapps/rfc/verify -chmod 755 awips/hydroapps/rfc/verify/bin -chmod 755 awips/hydroapps/rfc/verify/bin/RELEASE -chmod 755 awips/hydroapps/rfc/verify/files -chmod 755 awips/hydroapps/rfc/verify/input -chmod 755 awips/hydroapps/rfc/verify/output -chmod 755 awips/hydroapps/rfc/verify/scripts -chmod 755 awips/hydroapps/rfc/xdat -chmod 755 awips/hydroapps/rfc/xdat/bin -chmod 755 awips/hydroapps/rfc/xdat/bin/ARCHIVE -chmod 755 awips/hydroapps/rfc/xdat/bin/RELEASE -chmod 755 awips/hydroapps/rfc/xdat/data -chmod 755 awips/hydroapps/rfc/xdat/data/localdata -chmod 755 awips/hydroapps/rfc/xdat/data/shefdata -chmod 755 awips/hydroapps/rfc/xdat/parameters -chmod 755 awips/hydroapps/rfc/xdat/parameters/groups -chmod 755 awips/hydroapps/rfc/xdat/parameters/groups/groups -chmod 755 awips/hydroapps/rfc/xdat/parameters/groups/test -chmod 755 awips/hydroapps/rfc/xdat/parameters/groups/towns_nc -chmod 755 awips/hydroapps/rfc/xdat/parameters/pe_map -chmod 755 awips/hydroapps/rfc/xnav -chmod 755 awips/hydroapps/rfc/xnav/bin -chmod 755 awips/hydroapps/rfc/xnav/bin/ARCHIVE -chmod 755 awips/hydroapps/rfc/xnav/bin/RELEASE -chmod 755 awips/hydroapps/rfc/xnav/data -chmod 755 awips/hydroapps/rfc/xnav/data/localdata -chmod 755 awips/hydroapps/rfc/xnav/data/misc_data -chmod 755 awips/hydroapps/rfc/xnav/data/rfcqpf -chmod 755 awips/hydroapps/rfc/xnav/data/rfcqpf/nmap -chmod 755 awips/hydroapps/rfc/xnav/data/shefdata -chmod 755 awips/hydroapps/rfc/xnav/data/wfoqpf -chmod 755 awips/hydroapps/rfc/xnav/parameters -chmod 755 awips/hydroapps/rfc/xnav/parameters/rules -chmod 755 awips/hydroapps/rfc/xsets -chmod 755 awips/hydroapps/rfc/xsets/bin -chmod 755 awips/hydroapps/rfc/xsets/bin/ARCHIVE -chmod 755 awips/hydroapps/rfc/xsets/bin/RELEASE -chmod 755 awips/hydroapps/rfc/xsets/files -chmod 755 awips/hydroapps/rfc/xsets/files/oper -chmod 755 awips/hydroapps/rfc/xsets/files/oper/hydrographs -chmod 755 awips/hydroapps/rfc/xsets/files/oper/hydrographs/param -chmod 755 awips/hydroapps/rfc/xsets/files/oper/output -chmod 755 awips/hydroapps/rfc/xsets/files/oper/param -chmod 755 awips/hydroapps/set_hydro_env -chmod 755 awips/hydroapps/shefdecode -chmod 755 awips/hydroapps/shefdecode/bin -chmod 755 awips/hydroapps/shefdecode/input -chmod 755 awips/hydroapps/shefdecode/logs -chmod 755 awips/hydroapps/shefdecode/logs/decoder -chmod 755 awips/hydroapps/shefdecode/logs/product -chmod 755 awips/hydroapps/whfs -chmod 755 awips/hydroapps/whfs/bin -chmod 755 awips/hydroapps/whfs/bin/afos2awips.ksh -chmod 755 awips/hydroapps/whfs/bin/awips2afos.ksh -chmod 755 awips/hydroapps/whfs/bin/create_whfs_geodata -chmod 755 awips/hydroapps/whfs/bin/crs2awips.ksh -chmod 755 awips/hydroapps/whfs/bin/damcrest.jar -chmod 755 awips/hydroapps/whfs/bin/fcstservice.jar -chmod 755 awips/hydroapps/whfs/bin/fldat.jar -chmod 755 awips/hydroapps/whfs/bin/init_rivermon_tables.ksh -chmod 755 awips/hydroapps/whfs/bin/load_rpf_backup_msg -chmod 755 awips/hydroapps/whfs/bin/MiscDialogs.jar -chmod 755 awips/hydroapps/whfs/bin/pa -chmod 755 awips/hydroapps/whfs/bin/pdc_pp.jar -chmod 755 awips/hydroapps/whfs/bin/pdc_pp_test -chmod 755 awips/hydroapps/whfs/bin/post_remote_CRS_msg -chmod 755 awips/hydroapps/whfs/bin/print_image -chmod 755 awips/hydroapps/whfs/bin/process_geoarea -chmod 755 awips/hydroapps/whfs/bin/process_geoline -chmod 755 awips/hydroapps/whfs/bin/process_hydro_model_data -chmod 755 awips/hydroapps/whfs/bin/process_rpf_backup_msg -chmod 755 awips/hydroapps/whfs/bin/process_shef_msg -chmod 755 awips/hydroapps/whfs/bin/purge_files -chmod 755 awips/hydroapps/whfs/bin/rax_apps.jar -chmod 755 awips/hydroapps/whfs/bin/RiverMonitor.jar -chmod 755 awips/hydroapps/whfs/bin/Rpf -chmod 755 awips/hydroapps/whfs/bin/rpf_sendbackup -chmod 755 awips/hydroapps/whfs/bin/rpf_sendbackup_latest -chmod 755 awips/hydroapps/whfs/bin/run_alarm_whfs -chmod 755 awips/hydroapps/whfs/bin/run_check_outlier -chmod 755 awips/hydroapps/whfs/bin/run_ColorChooserDialog -chmod 755 awips/hydroapps/whfs/bin/run_damcrest -chmod 755 awips/hydroapps/whfs/bin/run_db_purge -chmod 755 awips/hydroapps/whfs/bin/run_floodseq -chmod 755 awips/hydroapps/whfs/bin/run_floodseq_interactive -chmod 755 awips/hydroapps/whfs/bin/run_hydrobrief -chmod 755 awips/hydroapps/whfs/bin/run_metar2shef -chmod 755 awips/hydroapps/whfs/bin/run_obsfcst_monitor -chmod 755 awips/hydroapps/whfs/bin/run_pdc_pp -chmod 755 awips/hydroapps/whfs/bin/run_pdc_precip_pp -chmod 755 awips/hydroapps/whfs/bin/run_pdc_tsl -chmod 755 awips/hydroapps/whfs/bin/run_raxdb_sync -chmod 755 awips/hydroapps/whfs/bin/run_report_alarm -chmod 755 awips/hydroapps/whfs/bin/run_roc_checker -chmod 755 awips/hydroapps/whfs/bin/run_rpf_batch -chmod 755 awips/hydroapps/whfs/bin/run_SiteSpecific -chmod 755 awips/hydroapps/whfs/bin/run_SSHP_data_decode -chmod 755 awips/hydroapps/whfs/bin/run_SSHP_data_send -chmod 755 awips/hydroapps/whfs/bin/run_SSHP_data_transfer -chmod 755 awips/hydroapps/whfs/bin/run_SSHP_MAP_preprocess -chmod 755 awips/hydroapps/whfs/bin/run_SSHP_ofs_extract -chmod 755 awips/hydroapps/whfs/bin/run_SSHP_SAC_state_update -chmod 755 awips/hydroapps/whfs/bin/run_UnitHydrographEditor -chmod 755 awips/hydroapps/whfs/bin/run_vacuum -chmod 755 awips/hydroapps/whfs/bin/save_image -chmod 755 awips/hydroapps/whfs/bin/sdbj.LX -chmod 755 awips/hydroapps/whfs/bin/SiteSpecific.jar -chmod 755 awips/hydroapps/whfs/bin/start_fcstservice -chmod 755 awips/hydroapps/whfs/bin/start_hydrobase -chmod 755 awips/hydroapps/whfs/bin/start_hydroview -chmod 755 awips/hydroapps/whfs/bin/start_ldv -chmod 755 awips/hydroapps/whfs/bin/start_raxbase -chmod 755 awips/hydroapps/whfs/bin/start_rivermonitor -chmod 755 awips/hydroapps/whfs/bin/start_riverpro -chmod 755 awips/hydroapps/whfs/bin/start_timeseries -chmod 755 awips/hydroapps/whfs/bin/timeserieslite.jar -chmod 755 awips/hydroapps/whfs/local -chmod 755 awips/hydroapps/whfs/local/bin -chmod 755 awips/hydroapps/whfs/local/bin/whfs_editor -chmod 755 awips/hydroapps/whfs/local/data -chmod 755 awips/hydroapps/whfs/local/data/app -chmod 755 awips/hydroapps/whfs/local/data/app/damcrest -chmod 755 awips/hydroapps/whfs/local/data/app/hydroview -chmod 755 awips/hydroapps/whfs/local/data/app/hydroview/help -chmod 755 awips/hydroapps/whfs/local/data/app/metar2shef -chmod 755 awips/hydroapps/whfs/local/data/app/rivermon -chmod 755 awips/hydroapps/whfs/local/data/app/riverpro -chmod 755 awips/hydroapps/whfs/local/data/app/sshp -chmod 755 awips/hydroapps/whfs/local/data/app/timeseries -chmod 755 awips/hydroapps/whfs/local/data/damcrest -chmod 755 awips/hydroapps/whfs/local/data/geo -chmod 755 awips/hydroapps/whfs/local/data/grid -chmod 755 awips/hydroapps/whfs/local/data/grid/misc -chmod 755 awips/hydroapps/whfs/local/data/image -chmod 755 awips/hydroapps/whfs/local/data/import -chmod 755 awips/hydroapps/whfs/local/data/log -chmod 755 awips/hydroapps/whfs/local/data/log/create_gagradloc -chmod 755 awips/hydroapps/whfs/local/data/log/db_purge -chmod 755 awips/hydroapps/whfs/local/data/log/floodseq -chmod 755 awips/hydroapps/whfs/local/data/log/metar2shef -chmod 755 awips/hydroapps/whfs/local/data/log/misc -chmod 755 awips/hydroapps/whfs/local/data/log/obsfcst_monitor -chmod 755 awips/hydroapps/whfs/local/data/log/pdc_pp -chmod 755 awips/hydroapps/whfs/local/data/log/precip_accum -chmod 755 awips/hydroapps/whfs/local/data/log/qcalarm -chmod 755 awips/hydroapps/whfs/local/data/log/rivermon -chmod 755 awips/hydroapps/whfs/local/data/log/riverpro -chmod 755 awips/hydroapps/whfs/local/data/log/sshp -chmod 755 awips/hydroapps/whfs/local/data/log/vacuum -chmod 755 awips/hydroapps/whfs/local/data/metar_input -chmod 755 awips/hydroapps/whfs/local/data/metar_output -chmod 755 awips/hydroapps/whfs/local/data/pdc_pp -chmod 755 awips/hydroapps/whfs/local/data/product -chmod 755 awips/hydroapps/whfs/local/data/report -chmod 755 awips/hydroapps/whfs/local/data/sshp -chmod 755 awips/hydroapps/whfs/local/data/sshp/forecast -chmod 755 awips/hydroapps/whfs/local/data/sshp/precip -chmod 755 awips/hydroapps/whfs/local/data/sshp_transfer -chmod 755 awips/hydroapps/whfs/local/data/sshp_transfer/incoming -chmod 755 awips/hydroapps/whfs/local/data/sshp_transfer/ingest_xml -chmod 755 awips/hydroapps/whfs/local/data/sshp_transfer/ofs_extract_text -chmod 755 awips/hydroapps/whfs/local/data/sshp_transfer/ofs_extract_xml -chmod 755 awips/hydroapps/whfs/local/data/sshp_transfer/outgoing +chmod 664 awips/hydroapps/data/fxa/radar/envData/_keep_me +chmod 664 awips/hydroapps/ffmp_templates/_keep_me +chmod 664 awips/hydroapps/geo_data/host/ascii/coord_host.dat +chmod 664 awips/hydroapps/geo_data/host/ascii/county.dat +chmod 664 awips/hydroapps/geo_data/host/ascii/cwaus.dat +chmod 664 awips/hydroapps/geo_data/host/ascii/fg_basin.dat +chmod 664 awips/hydroapps/geo_data/host/ascii/flights.dat +chmod 664 awips/hydroapps/geo_data/host/ascii/forecastpt.dat +chmod 664 awips/hydroapps/geo_data/host/ascii/map_basin.dat +chmod 664 awips/hydroapps/geo_data/host/ascii/rfc_boundary.dat +chmod 664 awips/hydroapps/geo_data/host/ascii/river.dat +chmod 664 awips/hydroapps/geo_data/host/ascii/state.dat +chmod 664 awips/hydroapps/geo_data/host/ascii/town.dat +chmod 664 awips/hydroapps/geo_data/host/binary/_keep_me +chmod 664 awips/hydroapps/geo_data/ofstest/ascii/coord_ofstest.dat +chmod 664 awips/hydroapps/precip_proc/bin/gribit.LX +chmod 664 awips/hydroapps/precip_proc/bin/launch_hpe +chmod 664 awips/hydroapps/precip_proc/local/data/app/gen_areal_qpe/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/app/hpe/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/app/hpe/projection.con +chmod 664 awips/hydroapps/precip_proc/local/data/app/mpe/beam_height/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/app/mpe/climo/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/app/mpe/gage_locations/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/app/mpe/grid_masks/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/app/mpe/help/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/app/mpe/misbin/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/app/mpe/nc2grib/gfe2grib.txt +chmod 664 awips/hydroapps/precip_proc/local/data/app/mpe/prism/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/app/mpe/station_lists/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/app/mpe/utiltriangles/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/app/radclim/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/app/stage3/help/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/dhr_archive/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/dhr_decoded/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/dhr_error/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/dhr_gather/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/dsp_archive/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/dsp_decoded/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/dsp_error/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/dsp_gather/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/gpp_input/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/hpe/avgrmosaic/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/hpe/bdhrmosaic/gif/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/hpe/bdhrmosaic/grib/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/hpe/bdhrmosaic/netcdf/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/hpe/dhrmosaic/gif/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/hpe/dhrmosaic/grib/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/hpe/dhrmosaic/netcdf/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/hpe/ebmosaic/gif/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/hpe/ebmosaic/grib/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/hpe/ebmosaic/netcdf/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/hpe/ermosaic/gif/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/hpe/ermosaic/grib/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/hpe/ermosaic/netcdf/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/hpe/height/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/hpe/hpe_gif/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/hpe/hpe_grib/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/hpe/hpe_jpeg/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/hpe/hpe_netcdf/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/hpe/hpe_xmrg/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/hpe/index/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/hpe/lsatpre/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/hpe/maxrmosaic/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/hpe/nowcast/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/log/decodedhr/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/log/decodedpa/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/log/decodedsp/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/log/disagg/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/log/gage_pp/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/log/gen_areal_qpe/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/log/hpe/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/log/lightning_proc/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/log/misc/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/log/mpe_editor/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/log/mpe_fieldgen/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/log/process_bias_message/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/log/siipp/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/mpe/avgrmosaic/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/mpe/bad_gages/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/mpe/bias_message_input/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/mpe/bias_message_output/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/mpe/bmosaic/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/mpe/d2d_files/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/mpe/dailyQC/fewsgrib/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/mpe/dailyQC/freezing_level/grid/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/mpe/dailyQC/freezing_level/MAZ/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/mpe/dailyQC/freezing_level/point/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/mpe/dailyQC/netcdf_files/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/mpe/dailyQC/precip/bad/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/mpe/dailyQC/precip/dev/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/mpe/dailyQC/precip/grid/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/mpe/dailyQC/precip/MAP/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/mpe/dailyQC/precip/point/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/mpe/dailyQC/scratch/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/mpe/dailyQC/temperature/bad/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/mpe/dailyQC/temperature/dev/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/mpe/dailyQC/temperature/grid/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/mpe/dailyQC/temperature/MAT/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/mpe/dailyQC/temperature/point/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/mpe/draw_precip/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/mpe/edit_polygon/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/mpe/gageonly/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/mpe/gagetriangles/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/mpe/height/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/mpe/index/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/mpe/lmosaic/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/mpe/localfield1/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/mpe/localfield2/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/mpe/localfield3/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/mpe/locbias/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/mpe/locspan/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/mpe/lqmosaic/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/mpe/lsatpre/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/mpe/maxrmosaic/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/mpe/mlmosaic/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/mpe/mlqmosaic/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/mpe/mmosaic/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/mpe/mrmosaic/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/mpe/p3lmosaic/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/mpe/qmosaic/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/mpe/qpe_gif/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/mpe/qpe_grib/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/mpe/qpe_grib_sbn/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/mpe/qpe_jpeg/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/mpe/qpe/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/mpe/qpe_netcdf/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/mpe/qpe_sbn/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/mpe/rfcbmosaic/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/mpe/rfcmmosaic/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/mpe/rfcqpe01/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/mpe/rfcqpe06/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/mpe/rfcqpe24/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/mpe/rfcqpe_grib/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/mpe/rfcqpe_temp/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/mpe/rmosaic/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/mpe/satpre/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/mpe/sat_state_var/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/mpe/sgmosaic/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/mpe/srgmosaic/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/mpe/srmosaic/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/mpe/state_var/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/stage1_archive/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/stage1_decoded/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/stage1_error/_keep_me +chmod 664 awips/hydroapps/precip_proc/local/data/stage3/post_analysis/_keep_me +chmod 664 awips/hydroapps/public/bin/amirunning +chmod 664 awips/hydroapps/public/bin/dd_help +chmod 664 awips/hydroapps/public/bin/_keep_me +chmod 664 awips/hydroapps/rfc/data/products/_keep_me +chmod 664 awips/hydroapps/rfc/fld/bin/ARCHIVE/_keep_me +chmod 664 awips/hydroapps/rfc/fld/bin/RELEASE/_keep_me +chmod 664 awips/hydroapps/rfc/fldview/floodmapdata/_keep_me +chmod 664 awips/hydroapps/rfc/grib/bin/ARCHIVE/_keep_me +chmod 664 awips/hydroapps/rfc/grib/output/_keep_me +chmod 664 awips/hydroapps/rfc/hdb/app-defaults/_keep_me +chmod 664 awips/hydroapps/rfc/hdb/bin/ARCHIVE/_keep_me +chmod 664 awips/hydroapps/rfc/hdb/bin/RELEASE/_keep_me +chmod 664 awips/hydroapps/rfc/hdb/help_files/_keep_me +chmod 664 awips/hydroapps/rfc/hdb/scripts/_keep_me +chmod 664 awips/hydroapps/rfc/nwsrfs/calb/bin/ARCHIVE/_keep_me +chmod 664 awips/hydroapps/rfc/nwsrfs/calb/bin/RELEASE/_keep_me +chmod 664 awips/hydroapps/rfc/nwsrfs/calb/data/area_ts/oper/pre/_keep_me +chmod 664 awips/hydroapps/rfc/nwsrfs/calb/data/sta_ts/oper/_keep_me +chmod 664 awips/hydroapps/rfc/nwsrfs/calb/input/oper/mcp3/_keep_me +chmod 664 awips/hydroapps/rfc/nwsrfs/calb/lib/_keep_me +chmod 664 awips/hydroapps/rfc/nwsrfs/calb/output/_keep_me +chmod 664 awips/hydroapps/rfc/nwsrfs/doc/_keep_me +chmod 664 awips/hydroapps/rfc/nwsrfs/ens/bin/ARCHIVE/_keep_me +chmod 664 awips/hydroapps/rfc/nwsrfs/ens/bin/RELEASE/_keep_me +chmod 664 awips/hydroapps/rfc/nwsrfs/ens/files/oper/cpc_fcsts/_keep_me +chmod 664 awips/hydroapps/rfc/nwsrfs/ens/files/oper/espts/_keep_me +chmod 664 awips/hydroapps/rfc/nwsrfs/ens/input/oper/_keep_me +chmod 664 awips/hydroapps/rfc/nwsrfs/ens/output/oper/_keep_me +chmod 664 awips/hydroapps/rfc/nwsrfs/ens/scripts/_keep_me +chmod 664 awips/hydroapps/rfc/nwsrfs/ffg/bin/ARCHIVE/_keep_me +chmod 664 awips/hydroapps/rfc/nwsrfs/ffg/files/oper/affg/_keep_me +chmod 664 awips/hydroapps/rfc/nwsrfs/ffg/files/oper/cary/_keep_me +chmod 664 awips/hydroapps/rfc/nwsrfs/ffg/files/oper/define/_keep_me +chmod 664 awips/hydroapps/rfc/nwsrfs/ffg/files/oper/gdpm/_keep_me +chmod 664 awips/hydroapps/rfc/nwsrfs/ffg/files/oper/grff/_keep_me +chmod 664 awips/hydroapps/rfc/nwsrfs/ffg/files/oper/grpp/_keep_me +chmod 664 awips/hydroapps/rfc/nwsrfs/ffg/files/oper/grro/_keep_me +chmod 664 awips/hydroapps/rfc/nwsrfs/ffg/files/oper/hffg/_keep_me +chmod 664 awips/hydroapps/rfc/nwsrfs/ffg/files/oper/prod/_keep_me +chmod 664 awips/hydroapps/rfc/nwsrfs/ffg/files/oper/text/_keep_me +chmod 664 awips/hydroapps/rfc/nwsrfs/ffg/files/oper/user/_keep_me +chmod 664 awips/hydroapps/rfc/nwsrfs/ffg/files/oper/wsup/_keep_me +chmod 664 awips/hydroapps/rfc/nwsrfs/ffg/output/grib/_keep_me +chmod 664 awips/hydroapps/rfc/nwsrfs/ffg/output/oper/_keep_me +chmod 664 awips/hydroapps/rfc/nwsrfs/icp/bin/ARCHIVE/_keep_me +chmod 664 awips/hydroapps/rfc/nwsrfs/icp/bin/RELEASE/_keep_me +chmod 664 awips/hydroapps/rfc/nwsrfs/icp/scripts/_keep_me +chmod 664 awips/hydroapps/rfc/nwsrfs/ifp/bin/ARCHIVE/_keep_me +chmod 664 awips/hydroapps/rfc/nwsrfs/ifp/bin/RELEASE/_keep_me +chmod 664 awips/hydroapps/rfc/nwsrfs/ifp/help_files/_keep_me +chmod 664 awips/hydroapps/rfc/nwsrfs/ifp/options/colors/_keep_me +chmod 664 awips/hydroapps/rfc/nwsrfs/ifp/scripts/_keep_me +chmod 664 awips/hydroapps/rfc/nwsrfs/ifp/system/_keep_me +chmod 664 awips/hydroapps/rfc/nwsrfs/locks/_keep_me +chmod 664 awips/hydroapps/rfc/nwsrfs/ofs/bin/ARCHIVE/_keep_me +chmod 664 awips/hydroapps/rfc/nwsrfs/ofs/files/oper/dhmdata/_keep_me +chmod 664 awips/hydroapps/rfc/nwsrfs/ofs/files/oper/fs5files/_keep_me +chmod 664 awips/hydroapps/rfc/nwsrfs/ofs/files/oper/gif_files/_keep_me +chmod 664 awips/hydroapps/rfc/nwsrfs/ofs/files/oper/griddb/_keep_me +chmod 664 awips/hydroapps/rfc/nwsrfs/ofs/files/oper/mods/_keep_me +chmod 664 awips/hydroapps/rfc/nwsrfs/ofs/files/oper/ndfd/_keep_me +chmod 664 awips/hydroapps/rfc/nwsrfs/ofs/files/oper_new/fs5files/_keep_me +chmod 664 awips/hydroapps/rfc/nwsrfs/ofs/files/oper/sacsnow_clim/_keep_me +chmod 664 awips/hydroapps/rfc/nwsrfs/ofs/files/oper/shefdata/_keep_me +chmod 664 awips/hydroapps/rfc/nwsrfs/ofs/input/oper/_keep_me +chmod 664 awips/hydroapps/rfc/nwsrfs/ofs/output/jelkins/_keep_me +chmod 664 awips/hydroapps/rfc/nwsrfs/ofs/output/ofsde_logs/_keep_me +chmod 664 awips/hydroapps/rfc/nwsrfs/sys_files/_keep_me +chmod 664 awips/hydroapps/rfc/nwsrfs/util/bin/ARCHIVE/_keep_me +chmod 664 awips/hydroapps/rfc/nwsrfs/util/bin/RELEASE/_keep_me +chmod 664 awips/hydroapps/rfc/send_rfc/data/sbnprods/_keep_me +chmod 664 awips/hydroapps/rfc/send_rfc/data/send/_keep_me +chmod 664 awips/hydroapps/rfc/verify/bin/RELEASE/_keep_me +chmod 664 awips/hydroapps/rfc/verify/files/_keep_me +chmod 664 awips/hydroapps/rfc/verify/input/_keep_me +chmod 664 awips/hydroapps/rfc/verify/output/_keep_me +chmod 664 awips/hydroapps/rfc/verify/scripts/_keep_me +chmod 664 awips/hydroapps/rfc/xdat/bin/ARCHIVE/_keep_me +chmod 664 awips/hydroapps/rfc/xdat/bin/RELEASE/_keep_me +chmod 664 awips/hydroapps/rfc/xdat/data/localdata/_keep_me +chmod 664 awips/hydroapps/rfc/xdat/data/shefdata/_keep_me +chmod 664 awips/hydroapps/rfc/xdat/parameters/groups/_keep_me +chmod 664 awips/hydroapps/rfc/xnav/bin/ARCHIVE/_keep_me +chmod 664 awips/hydroapps/rfc/xnav/bin/RELEASE/_keep_me +chmod 664 awips/hydroapps/rfc/xnav/data/localdata/_keep_me +chmod 664 awips/hydroapps/rfc/xnav/data/misc_data/_keep_me +chmod 664 awips/hydroapps/rfc/xnav/data/rfcqpf/nmap/_keep_me +chmod 664 awips/hydroapps/rfc/xnav/data/shefdata/_keep_me +chmod 664 awips/hydroapps/rfc/xnav/data/wfoqpf/_keep_me +chmod 664 awips/hydroapps/rfc/xnav/parameters/rules/_keep_me +chmod 664 awips/hydroapps/rfc/xsets/bin/ARCHIVE/_keep_me +chmod 664 awips/hydroapps/rfc/xsets/bin/RELEASE/_keep_me +chmod 664 awips/hydroapps/rfc/xsets/files/oper/hydrographs/param/_keep_me +chmod 664 awips/hydroapps/rfc/xsets/files/oper/output/_keep_me +chmod 664 awips/hydroapps/rfc/xsets/files/oper/param/_keep_me +chmod 664 awips/hydroapps/shefdecode/bin/_keep_me +chmod 664 awips/hydroapps/shefdecode/input/_keep_me +chmod 664 awips/hydroapps/shefdecode/logs/decoder/_keep_me +chmod 664 awips/hydroapps/shefdecode/logs/product/_keep_me +chmod 664 awips/hydroapps/whfs/bin/log4j.xml +chmod 664 awips/hydroapps/whfs/bin/pa/_keep_me +chmod 664 awips/hydroapps/whfs/local/bin/_keep_me +chmod 664 awips/hydroapps/whfs/local/data/app/damcrest/_keep_me +chmod 664 awips/hydroapps/whfs/local/data/app/damcrest/.vimrc +chmod 664 awips/hydroapps/whfs/local/data/app/hydroview/help/_keep_me +chmod 664 awips/hydroapps/whfs/local/data/app/metar2shef/_keep_me +chmod 664 awips/hydroapps/whfs/local/data/app/rivermon/_keep_me +chmod 664 awips/hydroapps/whfs/local/data/app/riverpro/_keep_me +chmod 664 awips/hydroapps/whfs/local/data/app/sshp/_keep_me +chmod 664 awips/hydroapps/whfs/local/data/app/timeseries/_keep_me +chmod 664 awips/hydroapps/whfs/local/data/damcrest/_keep_me +chmod 664 awips/hydroapps/whfs/local/data/geo/basins.dat +chmod 664 awips/hydroapps/whfs/local/data/geo/basins.dat.OAX +chmod 664 awips/hydroapps/whfs/local/data/geo/topography +chmod 664 awips/hydroapps/whfs/local/data/grid/misc/_keep_me +chmod 664 awips/hydroapps/whfs/local/data/image/_keep_me +chmod 664 awips/hydroapps/whfs/local/data/import/_keep_me +chmod 664 awips/hydroapps/whfs/local/data/log/create_gagradloc/_keep_me +chmod 664 awips/hydroapps/whfs/local/data/log/db_purge/_keep_me +chmod 664 awips/hydroapps/whfs/local/data/log/floodseq/_keep_me +chmod 664 awips/hydroapps/whfs/local/data/log/metar2shef/_keep_me +chmod 664 awips/hydroapps/whfs/local/data/log/misc/_keep_me +chmod 664 awips/hydroapps/whfs/local/data/log/obsfcst_monitor/_keep_me +chmod 664 awips/hydroapps/whfs/local/data/log/pdc_pp/_keep_me +chmod 664 awips/hydroapps/whfs/local/data/log/precip_accum/_keep_me +chmod 664 awips/hydroapps/whfs/local/data/log/qcalarm/_keep_me +chmod 664 awips/hydroapps/whfs/local/data/log/rivermon/_keep_me +chmod 664 awips/hydroapps/whfs/local/data/log/riverpro/_keep_me +chmod 664 awips/hydroapps/whfs/local/data/log/sshp/_keep_me +chmod 664 awips/hydroapps/whfs/local/data/log/vacuum/_keep_me +chmod 664 awips/hydroapps/whfs/local/data/metar_input/_keep_me +chmod 664 awips/hydroapps/whfs/local/data/metar_output/_keep_me +chmod 664 awips/hydroapps/whfs/local/data/pdc_pp/_keep_me +chmod 664 awips/hydroapps/whfs/local/data/product/_keep_me +chmod 664 awips/hydroapps/whfs/local/data/report/_keep_me +chmod 664 awips/hydroapps/whfs/local/data/sshp/forecast/_keep_me +chmod 664 awips/hydroapps/whfs/local/data/sshp/precip/_keep_me +chmod 664 awips/hydroapps/whfs/local/data/sshp_transfer/incoming/_keep_me +chmod 664 awips/hydroapps/whfs/local/data/sshp_transfer/ingest_xml/_keep_me +chmod 664 awips/hydroapps/whfs/local/data/sshp_transfer/ofs_extract_text/_keep_me +chmod 664 awips/hydroapps/whfs/local/data/sshp_transfer/ofs_extract_xml/_keep_me +chmod 664 awips/hydroapps/whfs/local/data/sshp_transfer/outgoing/_keep_me +chmod 775 awips +chmod 775 awips/hydroapps +chmod 775 awips/hydroapps/data +chmod 775 awips/hydroapps/data/fxa +chmod 775 awips/hydroapps/data/fxa/radar +chmod 775 awips/hydroapps/data/fxa/radar/envData +chmod 775 awips/hydroapps/ffmp_templates +chmod 775 awips/hydroapps/geo_data +chmod 775 awips/hydroapps/geo_data/host +chmod 775 awips/hydroapps/geo_data/host/ascii +chmod 775 awips/hydroapps/geo_data/host/binary +chmod 775 awips/hydroapps/geo_data/ofstest +chmod 775 awips/hydroapps/geo_data/ofstest/ascii +chmod 775 awips/hydroapps/geo_data/util +chmod 775 awips/hydroapps/geo_data/util/run_create_bas_bound +chmod 775 awips/hydroapps/precip_proc +chmod 775 awips/hydroapps/precip_proc/bin +chmod 775 awips/hydroapps/precip_proc/bin/bias_trans.jar +chmod 775 awips/hydroapps/precip_proc/bin/DHRgather +chmod 775 awips/hydroapps/precip_proc/bin/DPAgather +chmod 775 awips/hydroapps/precip_proc/bin/DSPgather +chmod 775 awips/hydroapps/precip_proc/bin/hourly_precip_station_gen.sql +chmod 775 awips/hydroapps/precip_proc/bin/precip_station_gen.sql +chmod 775 awips/hydroapps/precip_proc/bin/prism.jar +chmod 775 awips/hydroapps/precip_proc/bin/process_dpa +chmod 775 awips/hydroapps/precip_proc/bin/process_dpafiles +chmod 775 awips/hydroapps/precip_proc/bin/process_grib_files +chmod 775 awips/hydroapps/precip_proc/bin/process_hpe_grib_files +chmod 775 awips/hydroapps/precip_proc/bin/process_rfc_bias +chmod 775 awips/hydroapps/precip_proc/bin/purge_hpe_files +chmod 775 awips/hydroapps/precip_proc/bin/purge_mpe_files +chmod 775 awips/hydroapps/precip_proc/bin/rerun_mpe_fieldgen +chmod 775 awips/hydroapps/precip_proc/bin/ruc.pl.template +chmod 775 awips/hydroapps/precip_proc/bin/ruc.tcl +chmod 775 awips/hydroapps/precip_proc/bin/run_biasmesgen +chmod 775 awips/hydroapps/precip_proc/bin/run_build_hourly +chmod 775 awips/hydroapps/precip_proc/bin/run_convert_basin_format +chmod 775 awips/hydroapps/precip_proc/bin/run_convert_dqc_climo_list +chmod 775 awips/hydroapps/precip_proc/bin/run_convert_dqc_station_list +chmod 775 awips/hydroapps/precip_proc/bin/run_copygb +chmod 775 awips/hydroapps/precip_proc/bin/run_create_freezing_station_list +chmod 775 awips/hydroapps/precip_proc/bin/run_create_mpe_beam_height_file +chmod 775 awips/hydroapps/precip_proc/bin/run_create_mpe_climo_lists +chmod 775 awips/hydroapps/precip_proc/bin/run_create_mpe_gage_file +chmod 775 awips/hydroapps/precip_proc/bin/run_create_mpe_station_lists +chmod 775 awips/hydroapps/precip_proc/bin/run_create_prism +chmod 775 awips/hydroapps/precip_proc/bin/run_create_topo +chmod 775 awips/hydroapps/precip_proc/bin/run_create_triangles +chmod 775 awips/hydroapps/precip_proc/bin/Run_DecodeDHR +chmod 775 awips/hydroapps/precip_proc/bin/Run_DecodeDPA +chmod 775 awips/hydroapps/precip_proc/bin/Run_DecodeDSP +chmod 775 awips/hydroapps/precip_proc/bin/run_disagg +chmod 775 awips/hydroapps/precip_proc/bin/run_disagg_fieldgen +chmod 775 awips/hydroapps/precip_proc/bin/run_dqc_preprocessor +chmod 775 awips/hydroapps/precip_proc/bin/run_fieldgen_disagg_fieldgen +chmod 775 awips/hydroapps/precip_proc/bin/run_freezing_level +chmod 775 awips/hydroapps/precip_proc/bin/run_freezing_station_setup +chmod 775 awips/hydroapps/precip_proc/bin/run_gen_areal_ffg +chmod 775 awips/hydroapps/precip_proc/bin/run_gen_areal_qpe +chmod 775 awips/hydroapps/precip_proc/bin/run_gribit +chmod 775 awips/hydroapps/precip_proc/bin/run_hpe_fieldgen +chmod 775 awips/hydroapps/precip_proc/bin/run_lightning_proc +chmod 775 awips/hydroapps/precip_proc/bin/run_mpe_fieldgen +chmod 775 awips/hydroapps/precip_proc/bin/run_mpe_whfs +chmod 775 awips/hydroapps/precip_proc/bin/run_nc2grib +chmod 775 awips/hydroapps/precip_proc/bin/run_post_analysis +chmod 775 awips/hydroapps/precip_proc/bin/start_gage_pp +chmod 775 awips/hydroapps/precip_proc/bin/start_hpe +chmod 775 awips/hydroapps/precip_proc/bin/start_hpe_crons +chmod 775 awips/hydroapps/precip_proc/bin/start_mpe_editor +chmod 775 awips/hydroapps/precip_proc/bin/start_process_dpafiles +chmod 775 awips/hydroapps/precip_proc/bin/stop_gage_pp +chmod 775 awips/hydroapps/precip_proc/bin/stop_hpe +chmod 775 awips/hydroapps/precip_proc/bin/stop_hpe_crons +chmod 775 awips/hydroapps/precip_proc/bin/stop_process_dpafiles +chmod 775 awips/hydroapps/precip_proc/bin/temperature_station_gen.sql +chmod 775 awips/hydroapps/precip_proc/bin/transmit_rfc_bias +chmod 775 awips/hydroapps/precip_proc/bin/transmit_rfc_qpe +chmod 775 awips/hydroapps/precip_proc/local +chmod 775 awips/hydroapps/precip_proc/local/bin +chmod 775 awips/hydroapps/precip_proc/local/bin/mpe_internal_script +chmod 775 awips/hydroapps/precip_proc/local/bin/process_qpe_mosaic +chmod 775 awips/hydroapps/precip_proc/local/bin/run_build_hourly +chmod 775 awips/hydroapps/precip_proc/local/bin/transmit_rfc_qpe +chmod 775 awips/hydroapps/precip_proc/local/data +chmod 775 awips/hydroapps/precip_proc/local/data/app +chmod 775 awips/hydroapps/precip_proc/local/data/app/gen_areal_qpe +chmod 775 awips/hydroapps/precip_proc/local/data/app/hpe +chmod 775 awips/hydroapps/precip_proc/local/data/app/mpe +chmod 775 awips/hydroapps/precip_proc/local/data/app/mpe/beam_height +chmod 775 awips/hydroapps/precip_proc/local/data/app/mpe/climo +chmod 775 awips/hydroapps/precip_proc/local/data/app/mpe/gage_locations +chmod 775 awips/hydroapps/precip_proc/local/data/app/mpe/grid_masks +chmod 775 awips/hydroapps/precip_proc/local/data/app/mpe/help +chmod 775 awips/hydroapps/precip_proc/local/data/app/mpe/misbin +chmod 775 awips/hydroapps/precip_proc/local/data/app/mpe/nc2grib +chmod 775 awips/hydroapps/precip_proc/local/data/app/mpe/prism +chmod 775 awips/hydroapps/precip_proc/local/data/app/mpe/station_lists +chmod 775 awips/hydroapps/precip_proc/local/data/app/mpe/utiltriangles +chmod 775 awips/hydroapps/precip_proc/local/data/app/radclim +chmod 775 awips/hydroapps/precip_proc/local/data/app/stage3 +chmod 775 awips/hydroapps/precip_proc/local/data/app/stage3/help +chmod 775 awips/hydroapps/precip_proc/local/data/dhr_archive +chmod 775 awips/hydroapps/precip_proc/local/data/dhr_decoded +chmod 775 awips/hydroapps/precip_proc/local/data/dhr_error +chmod 775 awips/hydroapps/precip_proc/local/data/dhr_gather +chmod 775 awips/hydroapps/precip_proc/local/data/dsp_archive +chmod 775 awips/hydroapps/precip_proc/local/data/dsp_decoded +chmod 775 awips/hydroapps/precip_proc/local/data/dsp_error +chmod 775 awips/hydroapps/precip_proc/local/data/dsp_gather +chmod 775 awips/hydroapps/precip_proc/local/data/gpp_input +chmod 775 awips/hydroapps/precip_proc/local/data/hpe +chmod 775 awips/hydroapps/precip_proc/local/data/hpe/avgrmosaic +chmod 775 awips/hydroapps/precip_proc/local/data/hpe/bdhrmosaic +chmod 775 awips/hydroapps/precip_proc/local/data/hpe/bdhrmosaic/gif +chmod 775 awips/hydroapps/precip_proc/local/data/hpe/bdhrmosaic/grib +chmod 775 awips/hydroapps/precip_proc/local/data/hpe/bdhrmosaic/netcdf +chmod 775 awips/hydroapps/precip_proc/local/data/hpe/dhrmosaic +chmod 775 awips/hydroapps/precip_proc/local/data/hpe/dhrmosaic/gif +chmod 775 awips/hydroapps/precip_proc/local/data/hpe/dhrmosaic/grib +chmod 775 awips/hydroapps/precip_proc/local/data/hpe/dhrmosaic/netcdf +chmod 775 awips/hydroapps/precip_proc/local/data/hpe/ebmosaic +chmod 775 awips/hydroapps/precip_proc/local/data/hpe/ebmosaic/gif +chmod 775 awips/hydroapps/precip_proc/local/data/hpe/ebmosaic/grib +chmod 775 awips/hydroapps/precip_proc/local/data/hpe/ebmosaic/netcdf +chmod 775 awips/hydroapps/precip_proc/local/data/hpe/ermosaic +chmod 775 awips/hydroapps/precip_proc/local/data/hpe/ermosaic/gif +chmod 775 awips/hydroapps/precip_proc/local/data/hpe/ermosaic/grib +chmod 775 awips/hydroapps/precip_proc/local/data/hpe/ermosaic/netcdf +chmod 775 awips/hydroapps/precip_proc/local/data/hpe/height +chmod 775 awips/hydroapps/precip_proc/local/data/hpe/hpe_gif +chmod 775 awips/hydroapps/precip_proc/local/data/hpe/hpe_grib +chmod 775 awips/hydroapps/precip_proc/local/data/hpe/hpe_jpeg +chmod 775 awips/hydroapps/precip_proc/local/data/hpe/hpe_netcdf +chmod 775 awips/hydroapps/precip_proc/local/data/hpe/hpe_xmrg +chmod 775 awips/hydroapps/precip_proc/local/data/hpe/index +chmod 775 awips/hydroapps/precip_proc/local/data/hpe/lsatpre +chmod 775 awips/hydroapps/precip_proc/local/data/hpe/maxrmosaic +chmod 775 awips/hydroapps/precip_proc/local/data/hpe/nowcast +chmod 775 awips/hydroapps/precip_proc/local/data/log +chmod 775 awips/hydroapps/precip_proc/local/data/log/decodedhr +chmod 775 awips/hydroapps/precip_proc/local/data/log/decodedpa +chmod 775 awips/hydroapps/precip_proc/local/data/log/decodedsp +chmod 775 awips/hydroapps/precip_proc/local/data/log/disagg +chmod 775 awips/hydroapps/precip_proc/local/data/log/gage_pp +chmod 775 awips/hydroapps/precip_proc/local/data/log/gen_areal_qpe +chmod 775 awips/hydroapps/precip_proc/local/data/log/hpe +chmod 775 awips/hydroapps/precip_proc/local/data/log/lightning_proc +chmod 775 awips/hydroapps/precip_proc/local/data/log/misc +chmod 775 awips/hydroapps/precip_proc/local/data/log/mpe_editor +chmod 775 awips/hydroapps/precip_proc/local/data/log/mpe_fieldgen +chmod 775 awips/hydroapps/precip_proc/local/data/log/process_bias_message +chmod 775 awips/hydroapps/precip_proc/local/data/log/siipp +chmod 775 awips/hydroapps/precip_proc/local/data/mpe +chmod 775 awips/hydroapps/precip_proc/local/data/mpe/avgrmosaic +chmod 775 awips/hydroapps/precip_proc/local/data/mpe/bad_gages +chmod 775 awips/hydroapps/precip_proc/local/data/mpe/bias_message_input +chmod 775 awips/hydroapps/precip_proc/local/data/mpe/bias_message_output +chmod 775 awips/hydroapps/precip_proc/local/data/mpe/bmosaic +chmod 775 awips/hydroapps/precip_proc/local/data/mpe/d2d_files +chmod 775 awips/hydroapps/precip_proc/local/data/mpe/dailyQC +chmod 775 awips/hydroapps/precip_proc/local/data/mpe/dailyQC/fewsgrib +chmod 775 awips/hydroapps/precip_proc/local/data/mpe/dailyQC/freezing_level +chmod 775 awips/hydroapps/precip_proc/local/data/mpe/dailyQC/freezing_level/grid +chmod 775 awips/hydroapps/precip_proc/local/data/mpe/dailyQC/freezing_level/MAZ +chmod 775 awips/hydroapps/precip_proc/local/data/mpe/dailyQC/freezing_level/point +chmod 775 awips/hydroapps/precip_proc/local/data/mpe/dailyQC/netcdf_files +chmod 775 awips/hydroapps/precip_proc/local/data/mpe/dailyQC/precip +chmod 775 awips/hydroapps/precip_proc/local/data/mpe/dailyQC/precip/bad +chmod 775 awips/hydroapps/precip_proc/local/data/mpe/dailyQC/precip/dev +chmod 775 awips/hydroapps/precip_proc/local/data/mpe/dailyQC/precip/grid +chmod 775 awips/hydroapps/precip_proc/local/data/mpe/dailyQC/precip/MAP +chmod 775 awips/hydroapps/precip_proc/local/data/mpe/dailyQC/precip/point +chmod 775 awips/hydroapps/precip_proc/local/data/mpe/dailyQC/scratch +chmod 775 awips/hydroapps/precip_proc/local/data/mpe/dailyQC/temperature +chmod 775 awips/hydroapps/precip_proc/local/data/mpe/dailyQC/temperature/bad +chmod 775 awips/hydroapps/precip_proc/local/data/mpe/dailyQC/temperature/dev +chmod 775 awips/hydroapps/precip_proc/local/data/mpe/dailyQC/temperature/grid +chmod 775 awips/hydroapps/precip_proc/local/data/mpe/dailyQC/temperature/MAT +chmod 775 awips/hydroapps/precip_proc/local/data/mpe/dailyQC/temperature/point +chmod 775 awips/hydroapps/precip_proc/local/data/mpe/draw_precip +chmod 775 awips/hydroapps/precip_proc/local/data/mpe/edit_polygon +chmod 775 awips/hydroapps/precip_proc/local/data/mpe/gageonly +chmod 775 awips/hydroapps/precip_proc/local/data/mpe/gagetriangles +chmod 775 awips/hydroapps/precip_proc/local/data/mpe/height +chmod 775 awips/hydroapps/precip_proc/local/data/mpe/index +chmod 775 awips/hydroapps/precip_proc/local/data/mpe/lmosaic +chmod 775 awips/hydroapps/precip_proc/local/data/mpe/localfield1 +chmod 775 awips/hydroapps/precip_proc/local/data/mpe/localfield2 +chmod 775 awips/hydroapps/precip_proc/local/data/mpe/localfield3 +chmod 775 awips/hydroapps/precip_proc/local/data/mpe/locbias +chmod 775 awips/hydroapps/precip_proc/local/data/mpe/locspan +chmod 775 awips/hydroapps/precip_proc/local/data/mpe/lqmosaic +chmod 775 awips/hydroapps/precip_proc/local/data/mpe/lsatpre +chmod 775 awips/hydroapps/precip_proc/local/data/mpe/maxrmosaic +chmod 775 awips/hydroapps/precip_proc/local/data/mpe/mlmosaic +chmod 775 awips/hydroapps/precip_proc/local/data/mpe/mlqmosaic +chmod 775 awips/hydroapps/precip_proc/local/data/mpe/mmosaic +chmod 775 awips/hydroapps/precip_proc/local/data/mpe/mrmosaic +chmod 775 awips/hydroapps/precip_proc/local/data/mpe/p3lmosaic +chmod 775 awips/hydroapps/precip_proc/local/data/mpe/qmosaic +chmod 775 awips/hydroapps/precip_proc/local/data/mpe/qpe +chmod 775 awips/hydroapps/precip_proc/local/data/mpe/qpe_gif +chmod 775 awips/hydroapps/precip_proc/local/data/mpe/qpe_grib +chmod 775 awips/hydroapps/precip_proc/local/data/mpe/qpe_grib_sbn +chmod 775 awips/hydroapps/precip_proc/local/data/mpe/qpe_jpeg +chmod 775 awips/hydroapps/precip_proc/local/data/mpe/qpe_netcdf +chmod 775 awips/hydroapps/precip_proc/local/data/mpe/qpe_sbn +chmod 775 awips/hydroapps/precip_proc/local/data/mpe/rfcbmosaic +chmod 775 awips/hydroapps/precip_proc/local/data/mpe/rfcmmosaic +chmod 775 awips/hydroapps/precip_proc/local/data/mpe/rfcqpe01 +chmod 775 awips/hydroapps/precip_proc/local/data/mpe/rfcqpe06 +chmod 775 awips/hydroapps/precip_proc/local/data/mpe/rfcqpe24 +chmod 775 awips/hydroapps/precip_proc/local/data/mpe/rfcqpe_grib +chmod 775 awips/hydroapps/precip_proc/local/data/mpe/rfcqpe_temp +chmod 775 awips/hydroapps/precip_proc/local/data/mpe/rmosaic +chmod 775 awips/hydroapps/precip_proc/local/data/mpe/satpre +chmod 775 awips/hydroapps/precip_proc/local/data/mpe/sat_state_var +chmod 775 awips/hydroapps/precip_proc/local/data/mpe/sgmosaic +chmod 775 awips/hydroapps/precip_proc/local/data/mpe/srgmosaic +chmod 775 awips/hydroapps/precip_proc/local/data/mpe/srmosaic +chmod 775 awips/hydroapps/precip_proc/local/data/mpe/state_var +chmod 775 awips/hydroapps/precip_proc/local/data/stage1_archive +chmod 775 awips/hydroapps/precip_proc/local/data/stage1_decoded +chmod 775 awips/hydroapps/precip_proc/local/data/stage1_error +chmod 775 awips/hydroapps/precip_proc/local/data/stage3 +chmod 775 awips/hydroapps/precip_proc/local/data/stage3/post_analysis +chmod 775 awips/hydroapps/public +chmod 775 awips/hydroapps/public/bin +chmod 775 awips/hydroapps/rfc +chmod 775 awips/hydroapps/rfc/data +chmod 775 awips/hydroapps/rfc/data/products +chmod 775 awips/hydroapps/rfc/fld +chmod 775 awips/hydroapps/rfc/fld/bin +chmod 775 awips/hydroapps/rfc/fld/bin/ARCHIVE +chmod 775 awips/hydroapps/rfc/fld/bin/RELEASE +chmod 775 awips/hydroapps/rfc/fldview +chmod 775 awips/hydroapps/rfc/fldview/floodmapdata +chmod 775 awips/hydroapps/rfc/grib +chmod 775 awips/hydroapps/rfc/grib/bin +chmod 775 awips/hydroapps/rfc/grib/bin/ARCHIVE +chmod 775 awips/hydroapps/rfc/grib/output +chmod 775 awips/hydroapps/rfc/hdb +chmod 775 awips/hydroapps/rfc/hdb/app-defaults +chmod 775 awips/hydroapps/rfc/hdb/bin +chmod 775 awips/hydroapps/rfc/hdb/bin/ARCHIVE +chmod 775 awips/hydroapps/rfc/hdb/bin/RELEASE +chmod 775 awips/hydroapps/rfc/hdb/help_files +chmod 775 awips/hydroapps/rfc/hdb/scripts +chmod 775 awips/hydroapps/rfc/nwsrfs +chmod 775 awips/hydroapps/rfc/nwsrfs/calb +chmod 775 awips/hydroapps/rfc/nwsrfs/calb/bin +chmod 775 awips/hydroapps/rfc/nwsrfs/calb/bin/ARCHIVE +chmod 775 awips/hydroapps/rfc/nwsrfs/calb/bin/RELEASE +chmod 775 awips/hydroapps/rfc/nwsrfs/calb/data +chmod 775 awips/hydroapps/rfc/nwsrfs/calb/data/area_ts +chmod 775 awips/hydroapps/rfc/nwsrfs/calb/data/area_ts/oper +chmod 775 awips/hydroapps/rfc/nwsrfs/calb/data/area_ts/oper/pre +chmod 775 awips/hydroapps/rfc/nwsrfs/calb/data/sta_ts +chmod 775 awips/hydroapps/rfc/nwsrfs/calb/data/sta_ts/oper +chmod 775 awips/hydroapps/rfc/nwsrfs/calb/input +chmod 775 awips/hydroapps/rfc/nwsrfs/calb/input/oper +chmod 775 awips/hydroapps/rfc/nwsrfs/calb/input/oper/mcp3 +chmod 775 awips/hydroapps/rfc/nwsrfs/calb/lib +chmod 775 awips/hydroapps/rfc/nwsrfs/calb/output +chmod 775 awips/hydroapps/rfc/nwsrfs/doc +chmod 775 awips/hydroapps/rfc/nwsrfs/ens +chmod 775 awips/hydroapps/rfc/nwsrfs/ens/bin +chmod 775 awips/hydroapps/rfc/nwsrfs/ens/bin/ARCHIVE +chmod 775 awips/hydroapps/rfc/nwsrfs/ens/bin/RELEASE +chmod 775 awips/hydroapps/rfc/nwsrfs/ens/files +chmod 775 awips/hydroapps/rfc/nwsrfs/ens/files/oper +chmod 775 awips/hydroapps/rfc/nwsrfs/ens/files/oper/cpc_fcsts +chmod 775 awips/hydroapps/rfc/nwsrfs/ens/files/oper/espts +chmod 775 awips/hydroapps/rfc/nwsrfs/ens/input +chmod 775 awips/hydroapps/rfc/nwsrfs/ens/input/oper +chmod 775 awips/hydroapps/rfc/nwsrfs/ens/output +chmod 775 awips/hydroapps/rfc/nwsrfs/ens/output/oper +chmod 775 awips/hydroapps/rfc/nwsrfs/ens/scripts +chmod 775 awips/hydroapps/rfc/nwsrfs/ffg +chmod 775 awips/hydroapps/rfc/nwsrfs/ffg/bin +chmod 775 awips/hydroapps/rfc/nwsrfs/ffg/bin/ARCHIVE +chmod 775 awips/hydroapps/rfc/nwsrfs/ffg/bin/RELEASE +chmod 775 awips/hydroapps/rfc/nwsrfs/ffg/bin/RELEASE/ffguid +chmod 775 awips/hydroapps/rfc/nwsrfs/ffg/bin/RELEASE/prodgen +chmod 775 awips/hydroapps/rfc/nwsrfs/ffg/bin/RELEASE/zgrid +chmod 775 awips/hydroapps/rfc/nwsrfs/ffg/files +chmod 775 awips/hydroapps/rfc/nwsrfs/ffg/files/oper +chmod 775 awips/hydroapps/rfc/nwsrfs/ffg/files/oper/affg +chmod 775 awips/hydroapps/rfc/nwsrfs/ffg/files/oper/cary +chmod 775 awips/hydroapps/rfc/nwsrfs/ffg/files/oper/define +chmod 775 awips/hydroapps/rfc/nwsrfs/ffg/files/oper/gdpm +chmod 775 awips/hydroapps/rfc/nwsrfs/ffg/files/oper/grff +chmod 775 awips/hydroapps/rfc/nwsrfs/ffg/files/oper/grpp +chmod 775 awips/hydroapps/rfc/nwsrfs/ffg/files/oper/grro +chmod 775 awips/hydroapps/rfc/nwsrfs/ffg/files/oper/hffg +chmod 775 awips/hydroapps/rfc/nwsrfs/ffg/files/oper/prod +chmod 775 awips/hydroapps/rfc/nwsrfs/ffg/files/oper/text +chmod 775 awips/hydroapps/rfc/nwsrfs/ffg/files/oper/user +chmod 775 awips/hydroapps/rfc/nwsrfs/ffg/files/oper/wsup +chmod 775 awips/hydroapps/rfc/nwsrfs/ffg/output +chmod 775 awips/hydroapps/rfc/nwsrfs/ffg/output/grib +chmod 775 awips/hydroapps/rfc/nwsrfs/ffg/output/oper +chmod 775 awips/hydroapps/rfc/nwsrfs/ffg/scripts +chmod 775 awips/hydroapps/rfc/nwsrfs/ffg/scripts/ffg +chmod 775 awips/hydroapps/rfc/nwsrfs/ffg/scripts/ffg_binxmit +chmod 775 awips/hydroapps/rfc/nwsrfs/ffg/scripts/ffg_testit +chmod 775 awips/hydroapps/rfc/nwsrfs/icp +chmod 775 awips/hydroapps/rfc/nwsrfs/icp/bin +chmod 775 awips/hydroapps/rfc/nwsrfs/icp/bin/ARCHIVE +chmod 775 awips/hydroapps/rfc/nwsrfs/icp/bin/RELEASE +chmod 775 awips/hydroapps/rfc/nwsrfs/icp/scripts +chmod 775 awips/hydroapps/rfc/nwsrfs/ifp +chmod 775 awips/hydroapps/rfc/nwsrfs/ifp/bin +chmod 775 awips/hydroapps/rfc/nwsrfs/ifp/bin/ARCHIVE +chmod 775 awips/hydroapps/rfc/nwsrfs/ifp/bin/RELEASE +chmod 775 awips/hydroapps/rfc/nwsrfs/ifp/help_files +chmod 775 awips/hydroapps/rfc/nwsrfs/ifp/options +chmod 775 awips/hydroapps/rfc/nwsrfs/ifp/options/colors +chmod 775 awips/hydroapps/rfc/nwsrfs/ifp/scripts +chmod 775 awips/hydroapps/rfc/nwsrfs/ifp/system +chmod 775 awips/hydroapps/rfc/nwsrfs/locks +chmod 775 awips/hydroapps/rfc/nwsrfs/ofs +chmod 775 awips/hydroapps/rfc/nwsrfs/ofs/bin +chmod 775 awips/hydroapps/rfc/nwsrfs/ofs/bin/ARCHIVE +chmod 775 awips/hydroapps/rfc/nwsrfs/ofs/bin/RELEASE +chmod 775 awips/hydroapps/rfc/nwsrfs/ofs/bin/RELEASE/batchpst +chmod 775 awips/hydroapps/rfc/nwsrfs/ofs/bin/RELEASE/espinit +chmod 775 awips/hydroapps/rfc/nwsrfs/ofs/bin/RELEASE/fcinit +chmod 775 awips/hydroapps/rfc/nwsrfs/ofs/bin/RELEASE/fcst +chmod 775 awips/hydroapps/rfc/nwsrfs/ofs/bin/RELEASE/filecrat +chmod 775 awips/hydroapps/rfc/nwsrfs/ofs/bin/RELEASE/filesize +chmod 775 awips/hydroapps/rfc/nwsrfs/ofs/bin/RELEASE/goesdb +chmod 775 awips/hydroapps/rfc/nwsrfs/ofs/bin/RELEASE/include_hydro_env.sh +chmod 775 awips/hydroapps/rfc/nwsrfs/ofs/bin/RELEASE/ndfd2rfs +chmod 775 awips/hydroapps/rfc/nwsrfs/ofs/bin/RELEASE/ppdutil +chmod 775 awips/hydroapps/rfc/nwsrfs/ofs/bin/RELEASE/ppinit +chmod 775 awips/hydroapps/rfc/nwsrfs/ofs/bin/RELEASE/prdutil +chmod 775 awips/hydroapps/rfc/nwsrfs/ofs/bin/RELEASE/reorder +chmod 775 awips/hydroapps/rfc/nwsrfs/ofs/bin/RELEASE/sasmdb +chmod 775 awips/hydroapps/rfc/nwsrfs/ofs/bin/RELEASE/shefpars +chmod 775 awips/hydroapps/rfc/nwsrfs/ofs/bin/RELEASE/shefpost +chmod 775 awips/hydroapps/rfc/nwsrfs/ofs/files +chmod 775 awips/hydroapps/rfc/nwsrfs/ofs/files/oper +chmod 775 awips/hydroapps/rfc/nwsrfs/ofs/files/oper/dhmdata +chmod 775 awips/hydroapps/rfc/nwsrfs/ofs/files/oper/fs5files +chmod 775 awips/hydroapps/rfc/nwsrfs/ofs/files/oper/gif_files +chmod 775 awips/hydroapps/rfc/nwsrfs/ofs/files/oper/griddb +chmod 775 awips/hydroapps/rfc/nwsrfs/ofs/files/oper/mods +chmod 775 awips/hydroapps/rfc/nwsrfs/ofs/files/oper/ndfd +chmod 775 awips/hydroapps/rfc/nwsrfs/ofs/files/oper_new +chmod 775 awips/hydroapps/rfc/nwsrfs/ofs/files/oper_new/fs5files +chmod 775 awips/hydroapps/rfc/nwsrfs/ofs/files/oper/sacsnow_clim +chmod 775 awips/hydroapps/rfc/nwsrfs/ofs/files/oper/shefdata +chmod 775 awips/hydroapps/rfc/nwsrfs/ofs/input +chmod 775 awips/hydroapps/rfc/nwsrfs/ofs/input/oper +chmod 775 awips/hydroapps/rfc/nwsrfs/ofs/output +chmod 775 awips/hydroapps/rfc/nwsrfs/ofs/output/jelkins +chmod 775 awips/hydroapps/rfc/nwsrfs/ofs/output/ofsde_logs +chmod 775 awips/hydroapps/rfc/nwsrfs/ofs/scripts +chmod 775 awips/hydroapps/rfc/nwsrfs/ofs/scripts/create_files_group +chmod 775 awips/hydroapps/rfc/nwsrfs/ofs/scripts/create_input_group +chmod 775 awips/hydroapps/rfc/nwsrfs/ofs/scripts/include_hydro_env.sh +chmod 775 awips/hydroapps/rfc/nwsrfs/ofs/scripts/ofs +chmod 775 awips/hydroapps/rfc/nwsrfs/sys_files +chmod 775 awips/hydroapps/rfc/nwsrfs/util +chmod 775 awips/hydroapps/rfc/nwsrfs/util/bin +chmod 775 awips/hydroapps/rfc/nwsrfs/util/bin/ARCHIVE +chmod 775 awips/hydroapps/rfc/nwsrfs/util/bin/RELEASE +chmod 775 awips/hydroapps/rfc/send_rfc +chmod 775 awips/hydroapps/rfc/send_rfc/data +chmod 775 awips/hydroapps/rfc/send_rfc/data/sbnprods +chmod 775 awips/hydroapps/rfc/send_rfc/data/send +chmod 775 awips/hydroapps/rfc/verify +chmod 775 awips/hydroapps/rfc/verify/bin +chmod 775 awips/hydroapps/rfc/verify/bin/RELEASE +chmod 775 awips/hydroapps/rfc/verify/files +chmod 775 awips/hydroapps/rfc/verify/input +chmod 775 awips/hydroapps/rfc/verify/output +chmod 775 awips/hydroapps/rfc/verify/scripts +chmod 775 awips/hydroapps/rfc/xdat +chmod 775 awips/hydroapps/rfc/xdat/bin +chmod 775 awips/hydroapps/rfc/xdat/bin/ARCHIVE +chmod 775 awips/hydroapps/rfc/xdat/bin/RELEASE +chmod 775 awips/hydroapps/rfc/xdat/data +chmod 775 awips/hydroapps/rfc/xdat/data/localdata +chmod 775 awips/hydroapps/rfc/xdat/data/shefdata +chmod 775 awips/hydroapps/rfc/xdat/parameters +chmod 775 awips/hydroapps/rfc/xdat/parameters/groups +chmod 775 awips/hydroapps/rfc/xdat/parameters/groups/groups +chmod 775 awips/hydroapps/rfc/xdat/parameters/groups/test +chmod 775 awips/hydroapps/rfc/xdat/parameters/groups/towns_nc +chmod 775 awips/hydroapps/rfc/xdat/parameters/pe_map +chmod 775 awips/hydroapps/rfc/xnav +chmod 775 awips/hydroapps/rfc/xnav/bin +chmod 775 awips/hydroapps/rfc/xnav/bin/ARCHIVE +chmod 775 awips/hydroapps/rfc/xnav/bin/RELEASE +chmod 775 awips/hydroapps/rfc/xnav/data +chmod 775 awips/hydroapps/rfc/xnav/data/localdata +chmod 775 awips/hydroapps/rfc/xnav/data/misc_data +chmod 775 awips/hydroapps/rfc/xnav/data/rfcqpf +chmod 775 awips/hydroapps/rfc/xnav/data/rfcqpf/nmap +chmod 775 awips/hydroapps/rfc/xnav/data/shefdata +chmod 775 awips/hydroapps/rfc/xnav/data/wfoqpf +chmod 775 awips/hydroapps/rfc/xnav/parameters +chmod 775 awips/hydroapps/rfc/xnav/parameters/rules +chmod 775 awips/hydroapps/rfc/xsets +chmod 775 awips/hydroapps/rfc/xsets/bin +chmod 775 awips/hydroapps/rfc/xsets/bin/ARCHIVE +chmod 775 awips/hydroapps/rfc/xsets/bin/RELEASE +chmod 775 awips/hydroapps/rfc/xsets/files +chmod 775 awips/hydroapps/rfc/xsets/files/oper +chmod 775 awips/hydroapps/rfc/xsets/files/oper/hydrographs +chmod 775 awips/hydroapps/rfc/xsets/files/oper/hydrographs/param +chmod 775 awips/hydroapps/rfc/xsets/files/oper/output +chmod 775 awips/hydroapps/rfc/xsets/files/oper/param +chmod 775 awips/hydroapps/set_hydro_env +chmod 775 awips/hydroapps/shefdecode +chmod 775 awips/hydroapps/shefdecode/bin +chmod 775 awips/hydroapps/shefdecode/input +chmod 775 awips/hydroapps/shefdecode/logs +chmod 775 awips/hydroapps/shefdecode/logs/decoder +chmod 775 awips/hydroapps/shefdecode/logs/product +chmod 775 awips/hydroapps/whfs +chmod 775 awips/hydroapps/whfs/bin +chmod 775 awips/hydroapps/whfs/bin/afos2awips.ksh +chmod 775 awips/hydroapps/whfs/bin/awips2afos.ksh +chmod 775 awips/hydroapps/whfs/bin/create_whfs_geodata +chmod 775 awips/hydroapps/whfs/bin/crs2awips.ksh +chmod 775 awips/hydroapps/whfs/bin/damcrest.jar +chmod 775 awips/hydroapps/whfs/bin/fcstservice.jar +chmod 775 awips/hydroapps/whfs/bin/fldat.jar +chmod 775 awips/hydroapps/whfs/bin/init_rivermon_tables.ksh +chmod 775 awips/hydroapps/whfs/bin/load_rpf_backup_msg +chmod 775 awips/hydroapps/whfs/bin/MiscDialogs.jar +chmod 775 awips/hydroapps/whfs/bin/pa +chmod 775 awips/hydroapps/whfs/bin/pdc_pp.jar +chmod 775 awips/hydroapps/whfs/bin/pdc_pp_test +chmod 775 awips/hydroapps/whfs/bin/post_remote_CRS_msg +chmod 775 awips/hydroapps/whfs/bin/print_image +chmod 775 awips/hydroapps/whfs/bin/process_geoarea +chmod 775 awips/hydroapps/whfs/bin/process_geoline +chmod 775 awips/hydroapps/whfs/bin/process_hydro_model_data +chmod 775 awips/hydroapps/whfs/bin/process_rpf_backup_msg +chmod 775 awips/hydroapps/whfs/bin/process_shef_msg +chmod 775 awips/hydroapps/whfs/bin/purge_files +chmod 775 awips/hydroapps/whfs/bin/rax_apps.jar +chmod 775 awips/hydroapps/whfs/bin/RiverMonitor.jar +chmod 775 awips/hydroapps/whfs/bin/Rpf +chmod 775 awips/hydroapps/whfs/bin/rpf_sendbackup +chmod 775 awips/hydroapps/whfs/bin/rpf_sendbackup_latest +chmod 775 awips/hydroapps/whfs/bin/run_alarm_whfs +chmod 775 awips/hydroapps/whfs/bin/run_check_outlier +chmod 775 awips/hydroapps/whfs/bin/run_ColorChooserDialog +chmod 775 awips/hydroapps/whfs/bin/run_damcrest +chmod 775 awips/hydroapps/whfs/bin/run_db_purge +chmod 775 awips/hydroapps/whfs/bin/run_floodseq +chmod 775 awips/hydroapps/whfs/bin/run_floodseq_interactive +chmod 775 awips/hydroapps/whfs/bin/run_hydrobrief +chmod 775 awips/hydroapps/whfs/bin/run_metar2shef +chmod 775 awips/hydroapps/whfs/bin/run_obsfcst_monitor +chmod 775 awips/hydroapps/whfs/bin/run_pdc_pp +chmod 775 awips/hydroapps/whfs/bin/run_pdc_precip_pp +chmod 775 awips/hydroapps/whfs/bin/run_pdc_tsl +chmod 775 awips/hydroapps/whfs/bin/run_raxdb_sync +chmod 775 awips/hydroapps/whfs/bin/run_report_alarm +chmod 775 awips/hydroapps/whfs/bin/run_roc_checker +chmod 775 awips/hydroapps/whfs/bin/run_rpf_batch +chmod 775 awips/hydroapps/whfs/bin/run_SiteSpecific +chmod 775 awips/hydroapps/whfs/bin/run_SSHP_data_decode +chmod 775 awips/hydroapps/whfs/bin/run_SSHP_data_send +chmod 775 awips/hydroapps/whfs/bin/run_SSHP_data_transfer +chmod 775 awips/hydroapps/whfs/bin/run_SSHP_MAP_preprocess +chmod 775 awips/hydroapps/whfs/bin/run_SSHP_ofs_extract +chmod 775 awips/hydroapps/whfs/bin/run_SSHP_SAC_state_update +chmod 775 awips/hydroapps/whfs/bin/run_UnitHydrographEditor +chmod 775 awips/hydroapps/whfs/bin/run_vacuum +chmod 775 awips/hydroapps/whfs/bin/save_image +chmod 775 awips/hydroapps/whfs/bin/sdbj.LX +chmod 775 awips/hydroapps/whfs/bin/SiteSpecific.jar +chmod 775 awips/hydroapps/whfs/bin/start_fcstservice +chmod 775 awips/hydroapps/whfs/bin/start_hydrobase +chmod 775 awips/hydroapps/whfs/bin/start_hydroview +chmod 775 awips/hydroapps/whfs/bin/start_ldv +chmod 775 awips/hydroapps/whfs/bin/start_raxbase +chmod 775 awips/hydroapps/whfs/bin/start_rivermonitor +chmod 775 awips/hydroapps/whfs/bin/start_riverpro +chmod 775 awips/hydroapps/whfs/bin/start_timeseries +chmod 775 awips/hydroapps/whfs/bin/timeserieslite.jar +chmod 775 awips/hydroapps/whfs/local +chmod 775 awips/hydroapps/whfs/local/bin +chmod 775 awips/hydroapps/whfs/local/bin/whfs_editor +chmod 775 awips/hydroapps/whfs/local/data +chmod 775 awips/hydroapps/whfs/local/data/app +chmod 775 awips/hydroapps/whfs/local/data/app/damcrest +chmod 775 awips/hydroapps/whfs/local/data/app/hydroview +chmod 775 awips/hydroapps/whfs/local/data/app/hydroview/help +chmod 775 awips/hydroapps/whfs/local/data/app/metar2shef +chmod 775 awips/hydroapps/whfs/local/data/app/rivermon +chmod 775 awips/hydroapps/whfs/local/data/app/riverpro +chmod 775 awips/hydroapps/whfs/local/data/app/sshp +chmod 775 awips/hydroapps/whfs/local/data/app/timeseries +chmod 775 awips/hydroapps/whfs/local/data/damcrest +chmod 775 awips/hydroapps/whfs/local/data/geo +chmod 775 awips/hydroapps/whfs/local/data/grid +chmod 775 awips/hydroapps/whfs/local/data/grid/misc +chmod 775 awips/hydroapps/whfs/local/data/image +chmod 775 awips/hydroapps/whfs/local/data/import +chmod 775 awips/hydroapps/whfs/local/data/log +chmod 775 awips/hydroapps/whfs/local/data/log/create_gagradloc +chmod 775 awips/hydroapps/whfs/local/data/log/db_purge +chmod 775 awips/hydroapps/whfs/local/data/log/floodseq +chmod 775 awips/hydroapps/whfs/local/data/log/metar2shef +chmod 775 awips/hydroapps/whfs/local/data/log/misc +chmod 775 awips/hydroapps/whfs/local/data/log/obsfcst_monitor +chmod 775 awips/hydroapps/whfs/local/data/log/pdc_pp +chmod 775 awips/hydroapps/whfs/local/data/log/precip_accum +chmod 775 awips/hydroapps/whfs/local/data/log/qcalarm +chmod 775 awips/hydroapps/whfs/local/data/log/rivermon +chmod 775 awips/hydroapps/whfs/local/data/log/riverpro +chmod 775 awips/hydroapps/whfs/local/data/log/sshp +chmod 775 awips/hydroapps/whfs/local/data/log/vacuum +chmod 775 awips/hydroapps/whfs/local/data/metar_input +chmod 775 awips/hydroapps/whfs/local/data/metar_output +chmod 775 awips/hydroapps/whfs/local/data/pdc_pp +chmod 775 awips/hydroapps/whfs/local/data/product +chmod 775 awips/hydroapps/whfs/local/data/report +chmod 775 awips/hydroapps/whfs/local/data/sshp +chmod 775 awips/hydroapps/whfs/local/data/sshp/forecast +chmod 775 awips/hydroapps/whfs/local/data/sshp/precip +chmod 775 awips/hydroapps/whfs/local/data/sshp_transfer +chmod 775 awips/hydroapps/whfs/local/data/sshp_transfer/incoming +chmod 775 awips/hydroapps/whfs/local/data/sshp_transfer/ingest_xml +chmod 775 awips/hydroapps/whfs/local/data/sshp_transfer/ofs_extract_text +chmod 775 awips/hydroapps/whfs/local/data/sshp_transfer/ofs_extract_xml +chmod 775 awips/hydroapps/whfs/local/data/sshp_transfer/outgoing exit 0 diff --git a/ncep/com.raytheon.uf.viz.ncep.core.feature/feature.xml b/ncep/com.raytheon.uf.viz.ncep.core.feature/feature.xml index 696890bd96..6a29b37130 100644 --- a/ncep/com.raytheon.uf.viz.ncep.core.feature/feature.xml +++ b/ncep/com.raytheon.uf.viz.ncep.core.feature/feature.xml @@ -81,4 +81,11 @@ version="0.0.0" unpack="false"/> + + diff --git a/ncep/edu.wisc.ssec.mcidas/component-deploy.xml b/ncep/edu.wisc.ssec.mcidas/component-deploy.xml index 88efa08c7a..4d6e732a18 100644 --- a/ncep/edu.wisc.ssec.mcidas/component-deploy.xml +++ b/ncep/edu.wisc.ssec.mcidas/component-deploy.xml @@ -5,6 +5,7 @@ + - \ No newline at end of file + diff --git a/ncep/gov.noaa.nws.ncep.common.dataplugin.airmet/component-deploy.xml b/ncep/gov.noaa.nws.ncep.common.dataplugin.airmet/component-deploy.xml index c3412a6be6..9b691065f8 100644 --- a/ncep/gov.noaa.nws.ncep.common.dataplugin.airmet/component-deploy.xml +++ b/ncep/gov.noaa.nws.ncep.common.dataplugin.airmet/component-deploy.xml @@ -5,7 +5,8 @@ + - \ No newline at end of file + diff --git a/ncep/gov.noaa.nws.ncep.common.dataplugin.airmet/src/gov/noaa/nws/ncep/common/dataplugin/airmet/AirmetRecord.java b/ncep/gov.noaa.nws.ncep.common.dataplugin.airmet/src/gov/noaa/nws/ncep/common/dataplugin/airmet/AirmetRecord.java index 68589209cf..7f32e54d8a 100644 --- a/ncep/gov.noaa.nws.ncep.common.dataplugin.airmet/src/gov/noaa/nws/ncep/common/dataplugin/airmet/AirmetRecord.java +++ b/ncep/gov.noaa.nws.ncep.common.dataplugin.airmet/src/gov/noaa/nws/ncep/common/dataplugin/airmet/AirmetRecord.java @@ -60,6 +60,7 @@ public class AirmetRecord extends PluginDataObject{ // reportType is AIRMET. @Column(length=32) + @DataURI(position=4) @DynamicSerializeElement private String reportType; diff --git a/ncep/gov.noaa.nws.ncep.common.dataplugin.atcf/component-deploy.xml b/ncep/gov.noaa.nws.ncep.common.dataplugin.atcf/component-deploy.xml index f3c931e65e..64c7d0c22a 100644 --- a/ncep/gov.noaa.nws.ncep.common.dataplugin.atcf/component-deploy.xml +++ b/ncep/gov.noaa.nws.ncep.common.dataplugin.atcf/component-deploy.xml @@ -5,7 +5,8 @@ + - \ No newline at end of file + diff --git a/ncep/gov.noaa.nws.ncep.common.dataplugin.atcf/src/gov/noaa/nws/ncep/common/dataplugin/atcf/AtcfRecord.java b/ncep/gov.noaa.nws.ncep.common.dataplugin.atcf/src/gov/noaa/nws/ncep/common/dataplugin/atcf/AtcfRecord.java index 8dc3dd3d9a..b0ff61e5c0 100644 --- a/ncep/gov.noaa.nws.ncep.common.dataplugin.atcf/src/gov/noaa/nws/ncep/common/dataplugin/atcf/AtcfRecord.java +++ b/ncep/gov.noaa.nws.ncep.common.dataplugin.atcf/src/gov/noaa/nws/ncep/common/dataplugin/atcf/AtcfRecord.java @@ -51,6 +51,8 @@ import gov.noaa.nws.ncep.common.tools.IDecoderConstantsN; * Date Ticket# Engineer Description * ------------ ---------- ----------- -------------------------- * 06/23/10 208 F. J. Yen Initial Coding. + * 03/10/12 606 G. Hull added reportType to URI + * * * * @author F. J. Yen, SIB @@ -68,6 +70,7 @@ public class AtcfRecord extends PluginDataObject { private static final Integer IMISSD = IDecoderConstantsN.INTEGER_MISSING; /** Report type */ + @DataURI(position = 8) @Column(length = 32) @XmlElement @DynamicSerializeElement diff --git a/ncep/gov.noaa.nws.ncep.common.dataplugin.aww/component-deploy.xml b/ncep/gov.noaa.nws.ncep.common.dataplugin.aww/component-deploy.xml index 3812f979b6..b01c741aad 100644 --- a/ncep/gov.noaa.nws.ncep.common.dataplugin.aww/component-deploy.xml +++ b/ncep/gov.noaa.nws.ncep.common.dataplugin.aww/component-deploy.xml @@ -5,7 +5,8 @@ + - \ No newline at end of file + diff --git a/ncep/gov.noaa.nws.ncep.common.dataplugin.convsigmet/component-deploy.xml b/ncep/gov.noaa.nws.ncep.common.dataplugin.convsigmet/component-deploy.xml index be412e1f79..7b3c481790 100644 --- a/ncep/gov.noaa.nws.ncep.common.dataplugin.convsigmet/component-deploy.xml +++ b/ncep/gov.noaa.nws.ncep.common.dataplugin.convsigmet/component-deploy.xml @@ -5,7 +5,8 @@ + - \ No newline at end of file + diff --git a/ncep/gov.noaa.nws.ncep.common.dataplugin.ffg/component-deploy.xml b/ncep/gov.noaa.nws.ncep.common.dataplugin.ffg/component-deploy.xml index b2c5c9b902..4c1455d742 100644 --- a/ncep/gov.noaa.nws.ncep.common.dataplugin.ffg/component-deploy.xml +++ b/ncep/gov.noaa.nws.ncep.common.dataplugin.ffg/component-deploy.xml @@ -5,6 +5,7 @@ + - \ No newline at end of file + diff --git a/ncep/gov.noaa.nws.ncep.common.dataplugin.ffg/src/gov/noaa/nws/ncep/common/dataplugin/ffg/FfgRecord.java b/ncep/gov.noaa.nws.ncep.common.dataplugin.ffg/src/gov/noaa/nws/ncep/common/dataplugin/ffg/FfgRecord.java index c535b728d7..9bb2504961 100644 --- a/ncep/gov.noaa.nws.ncep.common.dataplugin.ffg/src/gov/noaa/nws/ncep/common/dataplugin/ffg/FfgRecord.java +++ b/ncep/gov.noaa.nws.ncep.common.dataplugin.ffg/src/gov/noaa/nws/ncep/common/dataplugin/ffg/FfgRecord.java @@ -53,6 +53,7 @@ public class FfgRecord extends PluginDataObject { /** Report type */ @Column(length=32) @DynamicSerializeElement + @DataURI(position=2) private String reportType; /** FFG AWIPS identifier */ diff --git a/ncep/gov.noaa.nws.ncep.common.dataplugin.idft/component-deploy.xml b/ncep/gov.noaa.nws.ncep.common.dataplugin.idft/component-deploy.xml index ff7d39f18e..6d06d9c6d7 100644 --- a/ncep/gov.noaa.nws.ncep.common.dataplugin.idft/component-deploy.xml +++ b/ncep/gov.noaa.nws.ncep.common.dataplugin.idft/component-deploy.xml @@ -5,7 +5,8 @@ + - \ No newline at end of file + diff --git a/ncep/gov.noaa.nws.ncep.common.dataplugin.intlsigmet/component-deploy.xml b/ncep/gov.noaa.nws.ncep.common.dataplugin.intlsigmet/component-deploy.xml index f7b7d81d0c..138c84c754 100644 --- a/ncep/gov.noaa.nws.ncep.common.dataplugin.intlsigmet/component-deploy.xml +++ b/ncep/gov.noaa.nws.ncep.common.dataplugin.intlsigmet/component-deploy.xml @@ -5,6 +5,7 @@ + - \ No newline at end of file + diff --git a/ncep/gov.noaa.nws.ncep.common.dataplugin.mcidas/component-deploy.xml b/ncep/gov.noaa.nws.ncep.common.dataplugin.mcidas/component-deploy.xml index a7eca9a40c..b3a11d6d5a 100644 --- a/ncep/gov.noaa.nws.ncep.common.dataplugin.mcidas/component-deploy.xml +++ b/ncep/gov.noaa.nws.ncep.common.dataplugin.mcidas/component-deploy.xml @@ -5,6 +5,7 @@ + - \ No newline at end of file + diff --git a/ncep/gov.noaa.nws.ncep.common.dataplugin.ncairep/component-deploy.xml b/ncep/gov.noaa.nws.ncep.common.dataplugin.ncairep/component-deploy.xml index 56cdb83c36..4bddea3a50 100644 --- a/ncep/gov.noaa.nws.ncep.common.dataplugin.ncairep/component-deploy.xml +++ b/ncep/gov.noaa.nws.ncep.common.dataplugin.ncairep/component-deploy.xml @@ -5,7 +5,8 @@ + - \ No newline at end of file + diff --git a/ncep/gov.noaa.nws.ncep.common.dataplugin.ncccfp/component-deploy.xml b/ncep/gov.noaa.nws.ncep.common.dataplugin.ncccfp/component-deploy.xml index 8a8bc35063..92cbfc15e2 100644 --- a/ncep/gov.noaa.nws.ncep.common.dataplugin.ncccfp/component-deploy.xml +++ b/ncep/gov.noaa.nws.ncep.common.dataplugin.ncccfp/component-deploy.xml @@ -5,6 +5,7 @@ + - \ No newline at end of file + diff --git a/ncep/gov.noaa.nws.ncep.common.dataplugin.ncgrib/component-deploy.xml b/ncep/gov.noaa.nws.ncep.common.dataplugin.ncgrib/component-deploy.xml index f07db9f2de..b7010b7a78 100644 --- a/ncep/gov.noaa.nws.ncep.common.dataplugin.ncgrib/component-deploy.xml +++ b/ncep/gov.noaa.nws.ncep.common.dataplugin.ncgrib/component-deploy.xml @@ -5,6 +5,7 @@ + - \ No newline at end of file + diff --git a/ncep/gov.noaa.nws.ncep.common.dataplugin.ncpafm/component-deploy.xml b/ncep/gov.noaa.nws.ncep.common.dataplugin.ncpafm/component-deploy.xml index 0b554eb74e..b1ad67233d 100644 --- a/ncep/gov.noaa.nws.ncep.common.dataplugin.ncpafm/component-deploy.xml +++ b/ncep/gov.noaa.nws.ncep.common.dataplugin.ncpafm/component-deploy.xml @@ -5,7 +5,8 @@ + - \ No newline at end of file + diff --git a/ncep/gov.noaa.nws.ncep.common.dataplugin.ncpirep/component-deploy.xml b/ncep/gov.noaa.nws.ncep.common.dataplugin.ncpirep/component-deploy.xml index e27e7650fa..24076d6711 100644 --- a/ncep/gov.noaa.nws.ncep.common.dataplugin.ncpirep/component-deploy.xml +++ b/ncep/gov.noaa.nws.ncep.common.dataplugin.ncpirep/component-deploy.xml @@ -5,7 +5,8 @@ + - \ No newline at end of file + diff --git a/ncep/gov.noaa.nws.ncep.common.dataplugin.ncscat/component-deploy.xml b/ncep/gov.noaa.nws.ncep.common.dataplugin.ncscat/component-deploy.xml index 30469198f1..405f264189 100644 --- a/ncep/gov.noaa.nws.ncep.common.dataplugin.ncscat/component-deploy.xml +++ b/ncep/gov.noaa.nws.ncep.common.dataplugin.ncscat/component-deploy.xml @@ -5,6 +5,7 @@ + - \ No newline at end of file + diff --git a/ncep/gov.noaa.nws.ncep.common.dataplugin.ncscd/component-deploy.xml b/ncep/gov.noaa.nws.ncep.common.dataplugin.ncscd/component-deploy.xml index d0222d23b5..760c0112b9 100644 --- a/ncep/gov.noaa.nws.ncep.common.dataplugin.ncscd/component-deploy.xml +++ b/ncep/gov.noaa.nws.ncep.common.dataplugin.ncscd/component-deploy.xml @@ -5,6 +5,7 @@ + - \ No newline at end of file + diff --git a/ncep/gov.noaa.nws.ncep.common.dataplugin.nctaf/component-deploy.xml b/ncep/gov.noaa.nws.ncep.common.dataplugin.nctaf/component-deploy.xml index bb18e6d92f..de023b3183 100644 --- a/ncep/gov.noaa.nws.ncep.common.dataplugin.nctaf/component-deploy.xml +++ b/ncep/gov.noaa.nws.ncep.common.dataplugin.nctaf/component-deploy.xml @@ -5,7 +5,8 @@ + - \ No newline at end of file + diff --git a/ncep/gov.noaa.nws.ncep.common.dataplugin.ncuair/component-deploy.xml b/ncep/gov.noaa.nws.ncep.common.dataplugin.ncuair/component-deploy.xml index 22d3719f14..2bbe3b7b53 100644 --- a/ncep/gov.noaa.nws.ncep.common.dataplugin.ncuair/component-deploy.xml +++ b/ncep/gov.noaa.nws.ncep.common.dataplugin.ncuair/component-deploy.xml @@ -1,11 +1,12 @@ - - - - - - - \ No newline at end of file + + + + + + + + diff --git a/ncep/gov.noaa.nws.ncep.common.dataplugin.nonconvsigmet/component-deploy.xml b/ncep/gov.noaa.nws.ncep.common.dataplugin.nonconvsigmet/component-deploy.xml index 861a4f99bb..75dd10e1f3 100644 --- a/ncep/gov.noaa.nws.ncep.common.dataplugin.nonconvsigmet/component-deploy.xml +++ b/ncep/gov.noaa.nws.ncep.common.dataplugin.nonconvsigmet/component-deploy.xml @@ -5,6 +5,7 @@ + - \ No newline at end of file + diff --git a/ncep/gov.noaa.nws.ncep.common.dataplugin.nonconvsigmet/src/gov/noaa/nws/ncep/common/dataplugin/nonconvsigmet/NonConvSigmetRecord.java b/ncep/gov.noaa.nws.ncep.common.dataplugin.nonconvsigmet/src/gov/noaa/nws/ncep/common/dataplugin/nonconvsigmet/NonConvSigmetRecord.java index c295407f6a..13c9209b5d 100644 --- a/ncep/gov.noaa.nws.ncep.common.dataplugin.nonconvsigmet/src/gov/noaa/nws/ncep/common/dataplugin/nonconvsigmet/NonConvSigmetRecord.java +++ b/ncep/gov.noaa.nws.ncep.common.dataplugin.nonconvsigmet/src/gov/noaa/nws/ncep/common/dataplugin/nonconvsigmet/NonConvSigmetRecord.java @@ -54,6 +54,7 @@ public class NonConvSigmetRecord extends PluginDataObject{ // reportType is "non-convective sigmet". @Column(length=32) + @DataURI(position=5) @DynamicSerializeElement private String reportType; diff --git a/ncep/gov.noaa.nws.ncep.common.dataplugin.sgwh/component-deploy.xml b/ncep/gov.noaa.nws.ncep.common.dataplugin.sgwh/component-deploy.xml index 7d51821762..540abc36b8 100644 --- a/ncep/gov.noaa.nws.ncep.common.dataplugin.sgwh/component-deploy.xml +++ b/ncep/gov.noaa.nws.ncep.common.dataplugin.sgwh/component-deploy.xml @@ -5,7 +5,8 @@ + - \ No newline at end of file + diff --git a/ncep/gov.noaa.nws.ncep.common.dataplugin.sgwh/src/gov/noaa/nws/ncep/common/dataplugin/sgwh/SgwhRecord.java b/ncep/gov.noaa.nws.ncep.common.dataplugin.sgwh/src/gov/noaa/nws/ncep/common/dataplugin/sgwh/SgwhRecord.java index bdb0dd669a..b0390da551 100644 --- a/ncep/gov.noaa.nws.ncep.common.dataplugin.sgwh/src/gov/noaa/nws/ncep/common/dataplugin/sgwh/SgwhRecord.java +++ b/ncep/gov.noaa.nws.ncep.common.dataplugin.sgwh/src/gov/noaa/nws/ncep/common/dataplugin/sgwh/SgwhRecord.java @@ -421,6 +421,7 @@ public class SgwhRecord extends PluginDataObject implements IDecoderGettable, IP @Transient @DynamicSerializeElement + @DataURI(position=6) private String reportType; /** Text of the WMO header */ diff --git a/ncep/gov.noaa.nws.ncep.common.dataplugin.sgwhv/component-deploy.xml b/ncep/gov.noaa.nws.ncep.common.dataplugin.sgwhv/component-deploy.xml index ca9b53055c..0ac9792e40 100644 --- a/ncep/gov.noaa.nws.ncep.common.dataplugin.sgwhv/component-deploy.xml +++ b/ncep/gov.noaa.nws.ncep.common.dataplugin.sgwhv/component-deploy.xml @@ -5,7 +5,8 @@ + - \ No newline at end of file + diff --git a/ncep/gov.noaa.nws.ncep.common.dataplugin.sgwhv/src/gov/noaa/nws/ncep/common/dataplugin/sgwhv/SgwhvRecord.java b/ncep/gov.noaa.nws.ncep.common.dataplugin.sgwhv/src/gov/noaa/nws/ncep/common/dataplugin/sgwhv/SgwhvRecord.java index 1c2c3d59f7..01fba71e27 100644 --- a/ncep/gov.noaa.nws.ncep.common.dataplugin.sgwhv/src/gov/noaa/nws/ncep/common/dataplugin/sgwhv/SgwhvRecord.java +++ b/ncep/gov.noaa.nws.ncep.common.dataplugin.sgwhv/src/gov/noaa/nws/ncep/common/dataplugin/sgwhv/SgwhvRecord.java @@ -131,6 +131,7 @@ public class SgwhvRecord extends PluginDataObject implements IDecoderGettable, I //@Column(length=8) @Transient @DynamicSerializeElement + @DataURI(position=5) private String reportType; @Embedded diff --git a/ncep/gov.noaa.nws.ncep.common.dataplugin.ssha/component-deploy.xml b/ncep/gov.noaa.nws.ncep.common.dataplugin.ssha/component-deploy.xml index 45990ae99f..0f091d3e65 100644 --- a/ncep/gov.noaa.nws.ncep.common.dataplugin.ssha/component-deploy.xml +++ b/ncep/gov.noaa.nws.ncep.common.dataplugin.ssha/component-deploy.xml @@ -5,7 +5,8 @@ + - \ No newline at end of file + diff --git a/ncep/gov.noaa.nws.ncep.common.dataplugin.ssha/src/gov/noaa/nws/ncep/common/dataplugin/ssha/SshaRecord.java b/ncep/gov.noaa.nws.ncep.common.dataplugin.ssha/src/gov/noaa/nws/ncep/common/dataplugin/ssha/SshaRecord.java index c0654c26f6..52556292a7 100644 --- a/ncep/gov.noaa.nws.ncep.common.dataplugin.ssha/src/gov/noaa/nws/ncep/common/dataplugin/ssha/SshaRecord.java +++ b/ncep/gov.noaa.nws.ncep.common.dataplugin.ssha/src/gov/noaa/nws/ncep/common/dataplugin/ssha/SshaRecord.java @@ -648,6 +648,7 @@ public class SshaRecord extends PluginDataObject implements IDecoderGettable, IP @Transient @DynamicSerializeElement + @DataURI(position=6) private String reportType; @Embedded diff --git a/ncep/gov.noaa.nws.ncep.common.dataplugin.stormtrack/component-deploy.xml b/ncep/gov.noaa.nws.ncep.common.dataplugin.stormtrack/component-deploy.xml index 7b3802d03e..af70648927 100644 --- a/ncep/gov.noaa.nws.ncep.common.dataplugin.stormtrack/component-deploy.xml +++ b/ncep/gov.noaa.nws.ncep.common.dataplugin.stormtrack/component-deploy.xml @@ -1,11 +1,12 @@ - - - - - - - \ No newline at end of file + + + + + + + + diff --git a/ncep/gov.noaa.nws.ncep.common.dataplugin.stormtrack/src/gov/noaa/nws/ncep/common/dataplugin/stormtrack/StormTrackRecord.java b/ncep/gov.noaa.nws.ncep.common.dataplugin.stormtrack/src/gov/noaa/nws/ncep/common/dataplugin/stormtrack/StormTrackRecord.java index 13c8fc3849..a037a09b46 100644 --- a/ncep/gov.noaa.nws.ncep.common.dataplugin.stormtrack/src/gov/noaa/nws/ncep/common/dataplugin/stormtrack/StormTrackRecord.java +++ b/ncep/gov.noaa.nws.ncep.common.dataplugin.stormtrack/src/gov/noaa/nws/ncep/common/dataplugin/stormtrack/StormTrackRecord.java @@ -73,6 +73,7 @@ public class StormTrackRecord extends PluginDataObject { @Column(length = 32) @XmlElement @DynamicSerializeElement + @DataURI(position = 7) private String reportType; /** diff --git a/ncep/gov.noaa.nws.ncep.common.dataplugin.tcm/component-deploy.xml b/ncep/gov.noaa.nws.ncep.common.dataplugin.tcm/component-deploy.xml index 88c53d6d0c..eebaed9875 100644 --- a/ncep/gov.noaa.nws.ncep.common.dataplugin.tcm/component-deploy.xml +++ b/ncep/gov.noaa.nws.ncep.common.dataplugin.tcm/component-deploy.xml @@ -5,6 +5,7 @@ + - \ No newline at end of file + diff --git a/ncep/gov.noaa.nws.ncep.common.dataplugin.wcp/component-deploy.xml b/ncep/gov.noaa.nws.ncep.common.dataplugin.wcp/component-deploy.xml index 05d3e61917..d68e103639 100644 --- a/ncep/gov.noaa.nws.ncep.common.dataplugin.wcp/component-deploy.xml +++ b/ncep/gov.noaa.nws.ncep.common.dataplugin.wcp/component-deploy.xml @@ -5,6 +5,7 @@ + - \ No newline at end of file + diff --git a/ncep/gov.noaa.nws.ncep.common.log/component-deploy.xml b/ncep/gov.noaa.nws.ncep.common.log/component-deploy.xml index 54a2ee4ef6..c603e331ff 100644 --- a/ncep/gov.noaa.nws.ncep.common.log/component-deploy.xml +++ b/ncep/gov.noaa.nws.ncep.common.log/component-deploy.xml @@ -5,6 +5,7 @@ + - \ No newline at end of file + diff --git a/cave/com.raytheon.uf.viz.npp.viirs/.classpath b/ncep/gov.noaa.nws.ncep.common.staticdata/.classpath similarity index 100% rename from cave/com.raytheon.uf.viz.npp.viirs/.classpath rename to ncep/gov.noaa.nws.ncep.common.staticdata/.classpath diff --git a/cots/org.jboss.cache/.project b/ncep/gov.noaa.nws.ncep.common.staticdata/.project similarity index 92% rename from cots/org.jboss.cache/.project rename to ncep/gov.noaa.nws.ncep.common.staticdata/.project index 75314af2ea..6d022c31af 100644 --- a/cots/org.jboss.cache/.project +++ b/ncep/gov.noaa.nws.ncep.common.staticdata/.project @@ -1,6 +1,6 @@ - org.jboss.cache + gov.noaa.nws.ncep.common.staticdata diff --git a/cave/com.raytheon.uf.viz.npp.viirs/.settings/org.eclipse.jdt.core.prefs b/ncep/gov.noaa.nws.ncep.common.staticdata/.settings/org.eclipse.jdt.core.prefs similarity index 92% rename from cave/com.raytheon.uf.viz.npp.viirs/.settings/org.eclipse.jdt.core.prefs rename to ncep/gov.noaa.nws.ncep.common.staticdata/.settings/org.eclipse.jdt.core.prefs index 3a2d12e2e7..23304bf55a 100644 --- a/cave/com.raytheon.uf.viz.npp.viirs/.settings/org.eclipse.jdt.core.prefs +++ b/ncep/gov.noaa.nws.ncep.common.staticdata/.settings/org.eclipse.jdt.core.prefs @@ -1,4 +1,4 @@ -#Wed Nov 30 13:51:22 CST 2011 +#Mon Apr 02 08:33:03 EDT 2012 eclipse.preferences.version=1 org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 diff --git a/ncep/gov.noaa.nws.ncep.common.staticdata/META-INF/MANIFEST.MF b/ncep/gov.noaa.nws.ncep.common.staticdata/META-INF/MANIFEST.MF new file mode 100644 index 0000000000..b5eb136189 --- /dev/null +++ b/ncep/gov.noaa.nws.ncep.common.staticdata/META-INF/MANIFEST.MF @@ -0,0 +1,11 @@ +Manifest-Version: 1.0 +Bundle-ManifestVersion: 2 +Bundle-Name: StaticData +Bundle-SymbolicName: gov.noaa.nws.ncep.common.staticdata +Bundle-Version: 1.0.0.qualifier +Bundle-Vendor: NCEP +Bundle-RequiredExecutionEnvironment: JavaSE-1.6 +Require-Bundle: gov.noaa.nws.ncep.edex.common;bundle-version="1.0.0", + org.geotools;bundle-version="2.6.4" +Export-Package: gov.noaa.nws.ncep.common.staticdata +Import-Package: com.raytheon.uf.common.localization diff --git a/edexOsgi/com.raytheon.uf.common.dataplugin.npp.viirs/build.properties b/ncep/gov.noaa.nws.ncep.common.staticdata/build.properties similarity index 100% rename from edexOsgi/com.raytheon.uf.common.dataplugin.npp.viirs/build.properties rename to ncep/gov.noaa.nws.ncep.common.staticdata/build.properties diff --git a/cave/com.raytheon.uf.viz.npp.feature/com.raytheon.uf.viz.npp.feature.ecl b/ncep/gov.noaa.nws.ncep.common.staticdata/gov.noaa.nws.ncep.common.staticdata.ecl similarity index 100% rename from cave/com.raytheon.uf.viz.npp.feature/com.raytheon.uf.viz.npp.feature.ecl rename to ncep/gov.noaa.nws.ncep.common.staticdata/gov.noaa.nws.ncep.common.staticdata.ecl diff --git a/ncep/gov.noaa.nws.ncep.common.staticdata/src/gov/noaa/nws/ncep/common/staticdata/AbstractBounds.java b/ncep/gov.noaa.nws.ncep.common.staticdata/src/gov/noaa/nws/ncep/common/staticdata/AbstractBounds.java new file mode 100644 index 0000000000..79beb107b1 --- /dev/null +++ b/ncep/gov.noaa.nws.ncep.common.staticdata/src/gov/noaa/nws/ncep/common/staticdata/AbstractBounds.java @@ -0,0 +1,136 @@ +/* + * gov.noaa.nws.ncep.common.staticData.AbstractBounds + * + * 12 March 2012 + * + * This code has been developed by the NCEP/SIB for use in the AWIPS2 system. + */ + +package gov.noaa.nws.ncep.common.staticdata; + +import com.vividsolutions.jts.geom.Coordinate; +import com.vividsolutions.jts.geom.Geometry; + +/** + * Class to hold the common attributes for NCEP bounds. + * + *
+ * SOFTWARE HISTORY
+ * Date       	Ticket#		Engineer	Description
+ * ------------	----------	-----------	--------------------------
+ * 03/12		#?			B. Yin   	Initial Creation.
+ *
+ * 
+ * + * @author B. Yin + */ + +public abstract class AbstractBounds { + + protected String bid; + protected String area; + protected String name; + protected String id; + protected String statesInArea; + protected int numBlocks; + protected Coordinate centriod; + protected Geometry geometry; + + /** + * @return the bid + */ + public String getBid() { + return bid; + } + /** + * @param bid the bid to set + */ + public void setBid(String bid) { + this.bid = bid; + } + /** + * @return the area + */ + public String getArea() { + return area; + } + /** + * @param area the area to set + */ + public void setArea(String area) { + this.area = area; + } + /** + * @return the name + */ + public String getName() { + return name; + } + /** + * @param name the name to set + */ + public void setName(String name) { + this.name = name; + } + /** + * @return the id + */ + public String getId() { + return id; + } + /** + * @param id the id to set + */ + public void setId(String id) { + this.id = id; + } + /** + * @return the statesInArea + */ + public String getStatesInArea() { + return statesInArea; + } + /** + * @param statesInArea the statesInArea to set + */ + public void setStatesInArea(String statesInArea) { + this.statesInArea = statesInArea; + } + /** + * @return the numBlocks + */ + public int getNumBlocks() { + return numBlocks; + } + /** + * @param numBlocks the numBlocks to set + */ + public void setNumBlocks(int numBlocks) { + this.numBlocks = numBlocks; + } + /** + * @return the centriod + */ + public Coordinate getCentriod() { + return centriod; + } + /** + * @param centriod the centriod to set + */ + public void setCentriod(Coordinate centriod) { + this.centriod = centriod; + } + /** + * @return the geometry + */ + public Geometry getGeometry() { + return geometry; + } + /** + * @param geometry the geometry to set + */ + public void setGeometry(Geometry geometry) { + this.geometry = geometry; + } + +} diff --git a/ncep/gov.noaa.nws.ncep.common.staticdata/src/gov/noaa/nws/ncep/common/staticdata/CostalWater.java b/ncep/gov.noaa.nws.ncep.common.staticdata/src/gov/noaa/nws/ncep/common/staticdata/CostalWater.java new file mode 100644 index 0000000000..b86ed3e6cb --- /dev/null +++ b/ncep/gov.noaa.nws.ncep.common.staticdata/src/gov/noaa/nws/ncep/common/staticdata/CostalWater.java @@ -0,0 +1,63 @@ +/* + * gov.noaa.nws.ncep.common.staticData.CostalWater + * + * 12 March 2012 + * + * This code has been developed by the NCEP/SIB for use in the AWIPS2 system. + */ + +package gov.noaa.nws.ncep.common.staticdata; + +import com.vividsolutions.jts.geom.Coordinate; +import com.vividsolutions.jts.geom.Geometry; + +/** + * Class for NCEP costal waters. + * + *
+ * SOFTWARE HISTORY
+ * Date       	Ticket#		Engineer	Description
+ * ------------	----------	-----------	--------------------------
+ * 03/12		#?			B. Yin   	Initial Creation.
+ *
+ * 
+ * + * @author B. Yin + */ + +public class CostalWater extends AbstractBounds { + + + /** + * Class to hold Costal Water information + * + *
+	 * SOFTWARE HISTORY
+	 * Date       	Ticket#		Engineer	Description
+	 * ------------	----------	-----------	--------------------------
+	 * 04/12		?		B. Yin   	Initial Creation.
+	 *
+	 * 
+ * + * @author B. Yin + */ + + + + public CostalWater(){ + + } + + public CostalWater(String bid, String name,Coordinate centriod, + int numBlocks, String id, Geometry geometry) { + super(); + this.bid = bid; + this.name = name; + this.id = id; + this.numBlocks = numBlocks; + this.centriod = centriod; + this.geometry = geometry; + } + + +} diff --git a/ncep/gov.noaa.nws.ncep.common.staticdata/src/gov/noaa/nws/ncep/common/staticdata/FAArea.java b/ncep/gov.noaa.nws.ncep.common.staticdata/src/gov/noaa/nws/ncep/common/staticdata/FAArea.java new file mode 100644 index 0000000000..09c7c17448 --- /dev/null +++ b/ncep/gov.noaa.nws.ncep.common.staticdata/src/gov/noaa/nws/ncep/common/staticdata/FAArea.java @@ -0,0 +1,46 @@ +/* + * gov.noaa.nws.ncep.common.staticData.FAArea + * + * 12 March 2012 + * + * This code has been developed by the NCEP/SIB for use in the AWIPS2 system. + */ + +package gov.noaa.nws.ncep.common.staticdata; + +import com.vividsolutions.jts.geom.Coordinate; +import com.vividsolutions.jts.geom.Geometry; + +/** + * Class to hold FA area information + * + *
+ * SOFTWARE HISTORY
+ * Date       	Ticket#		Engineer	Description
+ * ------------	----------	-----------	--------------------------
+ * 02/12		?		B. Yin   	Initial Creation.
+ *
+ * 
+ * + * @author B. Yin + */ + +public class FAArea extends AbstractBounds{ + + public FAArea(){ + + } + + public FAArea(String bid, String area, String name, String statesInArea, + int numBlocks, Coordinate centriod, Geometry geometry) { + super(); + this.bid = bid; + this.area = area; + this.name = name; + this.statesInArea = statesInArea; + this.numBlocks = numBlocks; + this.centriod = centriod; + this.geometry = geometry; + } + +} diff --git a/ncep/gov.noaa.nws.ncep.common.staticdata/src/gov/noaa/nws/ncep/common/staticdata/FARegion.java b/ncep/gov.noaa.nws.ncep.common.staticdata/src/gov/noaa/nws/ncep/common/staticdata/FARegion.java new file mode 100644 index 0000000000..361f2894ba --- /dev/null +++ b/ncep/gov.noaa.nws.ncep.common.staticdata/src/gov/noaa/nws/ncep/common/staticdata/FARegion.java @@ -0,0 +1,57 @@ +/* + * gov.noaa.nws.ncep.common.staticData.FARegion + * + * 12 March 2012 + * + * This code has been developed by the NCEP/SIB for use in the AWIPS2 system. + */ + +package gov.noaa.nws.ncep.common.staticdata; + +import com.vividsolutions.jts.geom.Coordinate; +import com.vividsolutions.jts.geom.Geometry; +/** + * Class to hold FA region information + * + *
+ * SOFTWARE HISTORY
+ * Date       	Ticket#		Engineer	Description
+ * ------------	----------	-----------	--------------------------
+ * 02/12		?		B. Yin   	Initial Creation.
+ *
+ * 
+ * + * @author B. Yin + */ +public class FARegion extends AbstractBounds { + + private String region; + + public FARegion(){ + + } + + public FARegion(String bid, String region, + int numBlocks, Coordinate centriod, Geometry geometry) { + super(); + this.bid = bid; + this.setRegion(region); + this.numBlocks = numBlocks; + this.centriod = centriod; + this.geometry = geometry; + } + + /** + * @param region the region to set + */ + public void setRegion(String region) { + this.region = region; + } + + /** + * @return the region + */ + public String getRegion() { + return region; + } +} diff --git a/ncep/gov.noaa.nws.ncep.common.staticdata/src/gov/noaa/nws/ncep/common/staticdata/GreatLake.java b/ncep/gov.noaa.nws.ncep.common.staticdata/src/gov/noaa/nws/ncep/common/staticdata/GreatLake.java new file mode 100644 index 0000000000..57120d01a4 --- /dev/null +++ b/ncep/gov.noaa.nws.ncep.common.staticdata/src/gov/noaa/nws/ncep/common/staticdata/GreatLake.java @@ -0,0 +1,45 @@ +/* + * gov.noaa.nws.ncep.common.staticData.GreatLake + * + * 12 March 2012 + * + * This code has been developed by the NCEP/SIB for use in the AWIPS2 system. + */ + +package gov.noaa.nws.ncep.common.staticdata; + +import com.vividsolutions.jts.geom.Coordinate; +import com.vividsolutions.jts.geom.Geometry; + +/** + * Class to hold great lake information + * + *
+ * SOFTWARE HISTORY
+ * Date       	Ticket#		Engineer	Description
+ * ------------	----------	-----------	--------------------------
+ * 02/12		?		B. Yin   	Initial Creation.
+ *
+ * 
+ * + * @author B. Yin + */ + +public class GreatLake extends AbstractBounds { + + public GreatLake(){ + + } + + public GreatLake(String bid, String area,Coordinate centriod, + int numBlocks, String id, Geometry geometry) { + super(); + this.bid = bid; + this.area = area; + this.id = id; + this.numBlocks = numBlocks; + this.centriod = centriod; + this.geometry = geometry; + } + +} diff --git a/ncep/gov.noaa.nws.ncep.common.staticdata/src/gov/noaa/nws/ncep/common/staticdata/IStaticDataProvider.java b/ncep/gov.noaa.nws.ncep.common.staticdata/src/gov/noaa/nws/ncep/common/staticdata/IStaticDataProvider.java new file mode 100644 index 0000000000..c04241c936 --- /dev/null +++ b/ncep/gov.noaa.nws.ncep.common.staticdata/src/gov/noaa/nws/ncep/common/staticdata/IStaticDataProvider.java @@ -0,0 +1,83 @@ +/* + * gov.noaa.nws.ncep.common.staticData.IStaticDataProvider + * + * 12 March 2012 + * + * This code has been developed by the NCEP/SIB for use in the AWIPS2 system. + */ + +package gov.noaa.nws.ncep.common.staticdata; + +import gov.noaa.nws.ncep.edex.common.stationTables.StationTable; + +import java.io.File; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.List; + +import com.raytheon.uf.common.localization.LocalizationContext; +import com.raytheon.uf.common.localization.LocalizationFile; +import com.raytheon.uf.common.localization.LocalizationContext.LocalizationLevel; +import com.raytheon.uf.common.localization.LocalizationContext.LocalizationType; +import com.vividsolutions.jts.geom.Geometry; +import com.vividsolutions.jts.geom.MultiPolygon; + +/** + * Interface that contains all methods to load NCEP static data. + * This interface is also used to look up the data provider service in client side, such as PGEN. + * + *
+ * SOFTWARE HISTORY
+ * Date       	Ticket#		Engineer	Description
+ * ------------	----------	-----------	--------------------------
+ * 02/12		?		B. Yin   	Initial Creation.
+ *
+ * 
+ * + * @author B. Yin + */ + +public interface IStaticDataProvider { + public StationTable getSfStnTbl(); + public StationTable getAnchorTbl(); + public StationTable getVorTbl(); + public StationTable getVolcanoTbl(); + public HashMap getClstTbl(); + public List getSPCCounties(); + public SPCCounty findCounty( String fips); + public List getCountiesInGeometry(Geometry geo ); + + public List getAllstates(); + public HashMap getStateAbrvMap(); + + //localization + public String getPgenLocalizationRoot(); + public String getFileAbsolutePath(String fileLoczlizationPath); + public File getFile(String fileLoczlizationPath); + public LocalizationFile getStaticLocalizationFile( String fileName ); + public LocalizationFile getLocalizationFile( LocalizationContext context, String fileName ); + + public LocalizationContext getLocalizationContext( LocalizationType type, LocalizationLevel level); + + public File getStaticFile( String fname ); + public File getGeogFile(); + public File getSfcStnFile(); + public File getFirBoundsFile(); + + //This is for sigmet + public List queryNcepDB(String field, String table); + + //for TCA + public HashMap getZoneMap(); + + //for GFA + public List getFAAreas(); + public List getFAAreaX(); + public List getFARegions(); + public List getGreatLakes(); + public List getCostalWaters(); + + //for g2g + public ArrayList getG2GBounds(String tableAlias, String columnName, String columnValue); + +} diff --git a/ncep/gov.noaa.nws.ncep.common.staticdata/src/gov/noaa/nws/ncep/common/staticdata/SPCCounty.java b/ncep/gov.noaa.nws.ncep.common.staticdata/src/gov/noaa/nws/ncep/common/staticdata/SPCCounty.java new file mode 100644 index 0000000000..43ab970c63 --- /dev/null +++ b/ncep/gov.noaa.nws.ncep.common.staticdata/src/gov/noaa/nws/ncep/common/staticdata/SPCCounty.java @@ -0,0 +1,159 @@ +/* + * gov.noaa.nws.ncep.common.staticData.SPCCounty + * + * 12 March 2012 + * + * This code has been developed by the NCEP/SIB for use in the AWIPS2 system. + */ + +package gov.noaa.nws.ncep.common.staticdata; + +import com.vividsolutions.jts.geom.Coordinate; +import com.vividsolutions.jts.geom.Geometry; + +/** + * Class to hold SPC county/marine zone information + * + *
+ * SOFTWARE HISTORY
+ * Date       	Ticket#		Engineer	Description
+ * ------------	----------	-----------	--------------------------
+ * 05/10		#159		B. Yin   	Initial Creation.
+ * 04/11		?			B. Yin		Read from Raytheon's tables
+ * 01/12		?			B. Yin		Read county maps with lowest resolution.
+ * 										Fix invalid geometry problems. 
+ * 03/12					B. Yin		Moved from elements package
+ *
+ * 
+ * + * @author B. Yin + */ + +public class SPCCounty { + + + //county name + private String name; + private String fips; + private String wfo; + private String ugcId; + private String state; + private String country; + + //for marine zone + private String zoneName; + private boolean marineZone; + + private Coordinate centriod; + private Geometry shape; + + //constructor + public SPCCounty(){ + + } + + //constructor + public SPCCounty( String fips, + String name, + String wfo, + String ugcId, + String state, + String country, + String zoneName, + Coordinate centroid, + Geometry shape, + boolean marineZone ){ + this.setFips(fips); + this.setName(name); + this.setWfo(wfo); + this.setUgcId(ugcId); + this.setState(state); + this.setCountry(country); + this.setZoneName(zoneName); + this.setCentriod(centroid); + this.setShape(shape); + this.setMarineZone(marineZone); + + } + + public void setFips(String fips) { + this.fips = fips; + } + + public String getFips() { + return fips; + } + + public void setName(String name) { + this.name = name; + } + + public String getName() { + return name; + } + + public void setWfo(String wfo) { + this.wfo = wfo; + } + + public String getWfo() { + return wfo; + } + + public void setUgcId(String ugcId) { + this.ugcId = ugcId; + } + + public String getUgcId() { + return ugcId; + } + + public void setState(String state) { + this.state = state; + } + + public String getState() { + return state; + } + + public void setCountry(String country) { + this.country = country; + } + + public String getCountry() { + return country; + } + + public void setZoneName(String zoneName) { + this.zoneName = zoneName; + } + + public String getZoneName() { + return zoneName; + } + + public void setMarineZone(boolean marineZone) { + this.marineZone = marineZone; + } + + public boolean isMarineZone() { + return marineZone; + } + + public void setCentriod(Coordinate centriod) { + this.centriod = centriod; + } + + public Coordinate getCentriod() { + return centriod; + } + + public void setShape(Geometry shape) { + this.shape = shape; + } + + public Geometry getShape() { + return shape; + } + +} diff --git a/ncep/gov.noaa.nws.ncep.common.staticdata/src/gov/noaa/nws/ncep/common/staticdata/USState.java b/ncep/gov.noaa.nws.ncep.common.staticdata/src/gov/noaa/nws/ncep/common/staticdata/USState.java new file mode 100644 index 0000000000..95d626c878 --- /dev/null +++ b/ncep/gov.noaa.nws.ncep.common.staticdata/src/gov/noaa/nws/ncep/common/staticdata/USState.java @@ -0,0 +1,103 @@ +/* + * gov.noaa.nws.ncep.common.staticData + * + * 23 February 2012 + * + * This code has been developed by the NCEP/SIB for use in the AWIPS2 system. + */ + + +package gov.noaa.nws.ncep.common.staticdata; + +import com.vividsolutions.jts.geom.Coordinate; +import com.vividsolutions.jts.geom.Geometry; + +/** + * Class to hold US state information + * + *
+ * SOFTWARE HISTORY
+ * Date       	Ticket#		Engineer	Description
+ * ------------	----------	-----------	--------------------------
+ * 02/12		?		B. Yin   	Initial Creation.
+ *
+ * 
+ * + * @author B. Yin + */ + +public class USState { + + private String stateAbrv; //abbreviation + private String name; //full name + private String fips; + private Coordinate centriod; + private Geometry shape; + + //constructor + public USState(){ + + } + + //constructor + public USState( String stateAbrv, + String name, + String fips, + Coordinate centroid, + Geometry shape ){ + + this.setFips(fips); + this.setName(name); + this.setStateAbrv(stateAbrv); + this.setCentriod(centroid); + this.setShape(shape); + } + + public void setStateAbrv(String state) { + this.stateAbrv = state; + } + + public String getStateAbrv() { + return stateAbrv; + } + + public void setName(String name) { + this.name = name; + } + + public String getName() { + return name; + } + + public void setFips(String fips) { + this.fips = fips; + } + + public String getFips() { + return fips; + } + + public void setCentriod(Coordinate centriod) { + this.centriod = centriod; + } + + public Coordinate getCentriod() { + return centriod; + } + + public void setShape(Geometry shape) { + this.shape = shape; + } + + public Geometry getShape() { + return shape; + } + + public boolean intersectGeometry(Geometry geo){ + if ( shape != null ){ + return shape.intersects(geo); + } + else return false; + } + +} diff --git a/ncep/gov.noaa.nws.ncep.common.staticdata/src/gov/noaa/nws/ncep/common/staticdata/package-info.java b/ncep/gov.noaa.nws.ncep.common.staticdata/src/gov/noaa/nws/ncep/common/staticdata/package-info.java new file mode 100644 index 0000000000..e645b147cc --- /dev/null +++ b/ncep/gov.noaa.nws.ncep.common.staticdata/src/gov/noaa/nws/ncep/common/staticdata/package-info.java @@ -0,0 +1,5 @@ +/** + * Contains classes and interfaces for NCEP static data. + * + */ +package gov.noaa.nws.ncep.common.staticdata; \ No newline at end of file diff --git a/ncep/gov.noaa.nws.ncep.common/component-deploy.xml b/ncep/gov.noaa.nws.ncep.common/component-deploy.xml index d37f577e73..dd5381c323 100644 --- a/ncep/gov.noaa.nws.ncep.common/component-deploy.xml +++ b/ncep/gov.noaa.nws.ncep.common/component-deploy.xml @@ -1,11 +1,12 @@ - - - - - - - \ No newline at end of file + + + + + + + + diff --git a/ncep/gov.noaa.nws.ncep.edex.common/META-INF/MANIFEST.MF b/ncep/gov.noaa.nws.ncep.edex.common/META-INF/MANIFEST.MF index 3d55fe6462..8569b5c506 100644 --- a/ncep/gov.noaa.nws.ncep.edex.common/META-INF/MANIFEST.MF +++ b/ncep/gov.noaa.nws.ncep.edex.common/META-INF/MANIFEST.MF @@ -28,8 +28,7 @@ Require-Bundle: com.raytheon.uf.common.serialization;bundle-version="1.11.12", com.raytheon.uf.edex.pointdata;bundle-version="1.12.1174", com.raytheon.uf.common.pointdata;bundle-version="1.12.1174", com.raytheon.uf.common.status;bundle-version="1.12.1174" -Import-Package: gov.noaa.nws.ncep.common.log.logger, - gov.noaa.nws.ncep.common.tools, +Import-Package: gov.noaa.nws.ncep.common.tools, javax.measure.converter, javax.measure.quantity, javax.measure.unit diff --git a/ncep/gov.noaa.nws.ncep.edex.common/component-deploy.xml b/ncep/gov.noaa.nws.ncep.edex.common/component-deploy.xml index c4ce27a1c8..909e266200 100644 --- a/ncep/gov.noaa.nws.ncep.edex.common/component-deploy.xml +++ b/ncep/gov.noaa.nws.ncep.edex.common/component-deploy.xml @@ -5,6 +5,7 @@ + diff --git a/ncep/gov.noaa.nws.ncep.edex.common/src/gov/noaa/nws/ncep/metparameters/dbquery/util/ClimateDataDbAccessImpl.java b/ncep/gov.noaa.nws.ncep.edex.common/src/gov/noaa/nws/ncep/metparameters/dbquery/util/ClimateDataDbAccessImpl.java index 8dd74f7dbe..0e0d7135a1 100644 --- a/ncep/gov.noaa.nws.ncep.edex.common/src/gov/noaa/nws/ncep/metparameters/dbquery/util/ClimateDataDbAccessImpl.java +++ b/ncep/gov.noaa.nws.ncep.edex.common/src/gov/noaa/nws/ncep/metparameters/dbquery/util/ClimateDataDbAccessImpl.java @@ -1,7 +1,7 @@ package gov.noaa.nws.ncep.metparameters.dbquery.util; -import gov.noaa.nws.ncep.common.log.logger.NcepLogger; -import gov.noaa.nws.ncep.common.log.logger.NcepLoggerManager; +//import gov.noaa.nws.ncep.common.log.logger.NcepLogger; +//import gov.noaa.nws.ncep.common.log.logger.NcepLoggerManager; import java.math.BigDecimal; import java.util.ArrayList; @@ -13,7 +13,7 @@ import java.util.List; public class ClimateDataDbAccessImpl implements ClimateDataDbAccess { - private NcepLogger logger = NcepLoggerManager.getNcepLogger(this.getClass()); +// private NcepLogger logger = NcepLoggerManager.getNcepLogger(this.getClass()); @Override public double getTDYF(String stationId, String monthString, String monthDayString) { @@ -57,7 +57,7 @@ public class ClimateDataDbAccessImpl implements ClimateDataDbAccess { try { // objectArrayList = DirectDbQuery.executeQuery(queryString, "ncep", QueryLanguage.SQL); } catch (Exception e1) { - logger.error("VizException is thrown when trying to do DirectDbQuery.executeQuery to query stns.climo_data table, error="+e1.getMessage()); +// logger.error("VizException is thrown when trying to do DirectDbQuery.executeQuery to query stns.climo_data table, error="+e1.getMessage()); e1.printStackTrace(); } double retrievedValue = 0.0; diff --git a/ncep/gov.noaa.nws.ncep.edex.gempak.jna/component-deploy.xml b/ncep/gov.noaa.nws.ncep.edex.gempak.jna/component-deploy.xml index 44df28375f..bc28b70d62 100644 --- a/ncep/gov.noaa.nws.ncep.edex.gempak.jna/component-deploy.xml +++ b/ncep/gov.noaa.nws.ncep.edex.gempak.jna/component-deploy.xml @@ -5,6 +5,7 @@ + - \ No newline at end of file + diff --git a/ncep/gov.noaa.nws.ncep.edex.ingest.grib.util/component-deploy.xml b/ncep/gov.noaa.nws.ncep.edex.ingest.grib.util/component-deploy.xml index c3598b995d..71b169335e 100644 --- a/ncep/gov.noaa.nws.ncep.edex.ingest.grib.util/component-deploy.xml +++ b/ncep/gov.noaa.nws.ncep.edex.ingest.grib.util/component-deploy.xml @@ -5,6 +5,7 @@ + - \ No newline at end of file + diff --git a/ncep/gov.noaa.nws.ncep.edex.ingest.util/component-deploy.xml b/ncep/gov.noaa.nws.ncep.edex.ingest.util/component-deploy.xml index 09801d8934..76af1805c6 100644 --- a/ncep/gov.noaa.nws.ncep.edex.ingest.util/component-deploy.xml +++ b/ncep/gov.noaa.nws.ncep.edex.ingest.util/component-deploy.xml @@ -5,6 +5,7 @@ + - \ No newline at end of file + diff --git a/ncep/gov.noaa.nws.ncep.edex.plugin.airmet/component-deploy.xml b/ncep/gov.noaa.nws.ncep.edex.plugin.airmet/component-deploy.xml index e0a87287f5..5922cf13d5 100644 --- a/ncep/gov.noaa.nws.ncep.edex.plugin.airmet/component-deploy.xml +++ b/ncep/gov.noaa.nws.ncep.edex.plugin.airmet/component-deploy.xml @@ -5,6 +5,7 @@ + - \ No newline at end of file + diff --git a/ncep/gov.noaa.nws.ncep.edex.plugin.atcf/component-deploy.xml b/ncep/gov.noaa.nws.ncep.edex.plugin.atcf/component-deploy.xml index 64294475b3..f05b340e20 100644 --- a/ncep/gov.noaa.nws.ncep.edex.plugin.atcf/component-deploy.xml +++ b/ncep/gov.noaa.nws.ncep.edex.plugin.atcf/component-deploy.xml @@ -5,6 +5,7 @@ + - \ No newline at end of file + diff --git a/ncep/gov.noaa.nws.ncep.edex.plugin.aww/component-deploy.xml b/ncep/gov.noaa.nws.ncep.edex.plugin.aww/component-deploy.xml index f3269fd9e5..ff881e6631 100644 --- a/ncep/gov.noaa.nws.ncep.edex.plugin.aww/component-deploy.xml +++ b/ncep/gov.noaa.nws.ncep.edex.plugin.aww/component-deploy.xml @@ -5,6 +5,7 @@ + - \ No newline at end of file + diff --git a/ncep/gov.noaa.nws.ncep.edex.plugin.convsigmet/component-deploy.xml b/ncep/gov.noaa.nws.ncep.edex.plugin.convsigmet/component-deploy.xml index d2b77ce8d9..ca42cc1fe6 100644 --- a/ncep/gov.noaa.nws.ncep.edex.plugin.convsigmet/component-deploy.xml +++ b/ncep/gov.noaa.nws.ncep.edex.plugin.convsigmet/component-deploy.xml @@ -5,6 +5,7 @@ + - \ No newline at end of file + diff --git a/ncep/gov.noaa.nws.ncep.edex.plugin.convsigmet/gov.noaa.nws.ncep.edex.plugin.convsigmet/component-deploy.xml b/ncep/gov.noaa.nws.ncep.edex.plugin.convsigmet/gov.noaa.nws.ncep.edex.plugin.convsigmet/component-deploy.xml index ba134e3ea9..f91531743b 100644 --- a/ncep/gov.noaa.nws.ncep.edex.plugin.convsigmet/gov.noaa.nws.ncep.edex.plugin.convsigmet/component-deploy.xml +++ b/ncep/gov.noaa.nws.ncep.edex.plugin.convsigmet/gov.noaa.nws.ncep.edex.plugin.convsigmet/component-deploy.xml @@ -1,7 +1,7 @@ - - - - - - - \ No newline at end of file + + + + + + + diff --git a/ncep/gov.noaa.nws.ncep.edex.plugin.ffg/component-deploy.xml b/ncep/gov.noaa.nws.ncep.edex.plugin.ffg/component-deploy.xml index 5c9780191c..f6c15fb6b1 100644 --- a/ncep/gov.noaa.nws.ncep.edex.plugin.ffg/component-deploy.xml +++ b/ncep/gov.noaa.nws.ncep.edex.plugin.ffg/component-deploy.xml @@ -5,6 +5,7 @@ + - \ No newline at end of file + diff --git a/ncep/gov.noaa.nws.ncep.edex.plugin.idft/component-deploy.xml b/ncep/gov.noaa.nws.ncep.edex.plugin.idft/component-deploy.xml index fde43408f0..1759936de4 100644 --- a/ncep/gov.noaa.nws.ncep.edex.plugin.idft/component-deploy.xml +++ b/ncep/gov.noaa.nws.ncep.edex.plugin.idft/component-deploy.xml @@ -5,6 +5,7 @@ + - \ No newline at end of file + diff --git a/ncep/gov.noaa.nws.ncep.edex.plugin.intlsigmet/component-deploy.xml b/ncep/gov.noaa.nws.ncep.edex.plugin.intlsigmet/component-deploy.xml index 63c677d45d..7cf6487bf7 100644 --- a/ncep/gov.noaa.nws.ncep.edex.plugin.intlsigmet/component-deploy.xml +++ b/ncep/gov.noaa.nws.ncep.edex.plugin.intlsigmet/component-deploy.xml @@ -5,6 +5,7 @@ + - \ No newline at end of file + diff --git a/ncep/gov.noaa.nws.ncep.edex.plugin.mcidas/component-deploy.xml b/ncep/gov.noaa.nws.ncep.edex.plugin.mcidas/component-deploy.xml index 798fc4fd44..8e704fb06b 100644 --- a/ncep/gov.noaa.nws.ncep.edex.plugin.mcidas/component-deploy.xml +++ b/ncep/gov.noaa.nws.ncep.edex.plugin.mcidas/component-deploy.xml @@ -5,6 +5,7 @@ + diff --git a/ncep/gov.noaa.nws.ncep.edex.plugin.mosaic/component-deploy.xml b/ncep/gov.noaa.nws.ncep.edex.plugin.mosaic/component-deploy.xml index c307947f59..e81d1bf46b 100644 --- a/ncep/gov.noaa.nws.ncep.edex.plugin.mosaic/component-deploy.xml +++ b/ncep/gov.noaa.nws.ncep.edex.plugin.mosaic/component-deploy.xml @@ -5,6 +5,7 @@ + - \ No newline at end of file + diff --git a/ncep/gov.noaa.nws.ncep.edex.plugin.ncairep/component-deploy.xml b/ncep/gov.noaa.nws.ncep.edex.plugin.ncairep/component-deploy.xml index f64bb83d37..93d1b443c5 100644 --- a/ncep/gov.noaa.nws.ncep.edex.plugin.ncairep/component-deploy.xml +++ b/ncep/gov.noaa.nws.ncep.edex.plugin.ncairep/component-deploy.xml @@ -5,7 +5,8 @@ + - \ No newline at end of file + diff --git a/ncep/gov.noaa.nws.ncep.edex.plugin.ncccfp/component-deploy.xml b/ncep/gov.noaa.nws.ncep.edex.plugin.ncccfp/component-deploy.xml index fe17cba4e4..ecaa106e74 100644 --- a/ncep/gov.noaa.nws.ncep.edex.plugin.ncccfp/component-deploy.xml +++ b/ncep/gov.noaa.nws.ncep.edex.plugin.ncccfp/component-deploy.xml @@ -5,6 +5,7 @@ + - \ No newline at end of file + diff --git a/ncep/gov.noaa.nws.ncep.edex.plugin.ncgrib/component-deploy.xml b/ncep/gov.noaa.nws.ncep.edex.plugin.ncgrib/component-deploy.xml index 9b2a74680d..25c54510de 100644 --- a/ncep/gov.noaa.nws.ncep.edex.plugin.ncgrib/component-deploy.xml +++ b/ncep/gov.noaa.nws.ncep.edex.plugin.ncgrib/component-deploy.xml @@ -5,6 +5,7 @@ + - \ No newline at end of file + diff --git a/ncep/gov.noaa.nws.ncep.edex.plugin.ncgrib/utility/common_static/base/ncgrid/grib2vars.xml b/ncep/gov.noaa.nws.ncep.edex.plugin.ncgrib/utility/common_static/base/ncgrid/grib2vars.xml index 78db99be66..b3b3d267a4 100644 --- a/ncep/gov.noaa.nws.ncep.edex.plugin.ncgrib/utility/common_static/base/ncgrid/grib2vars.xml +++ b/ncep/gov.noaa.nws.ncep.edex.plugin.ncgrib/utility/common_static/base/ncgrid/grib2vars.xml @@ -2474,6 +2474,42 @@ 0 -9999.00 + + 888 + 10 + 3 + 192 + 0 + Hurricane Storm Surge + m + SURGE + 0 + -9999.00 + + + 888 + 10 + 3 + 193 + 0 + Extra Tropical Storm Surge + m + ETSRG + 0 + -9999.00 + + + 888 + 10 + 3 + 194 + 0 + Ocean Surface Elevation Relative to Geoid + m + ELEV + 0 + -9999.00 + 250 0 diff --git a/ncep/gov.noaa.nws.ncep.edex.plugin.ncgrib/utility/common_static/base/ncgrid/ncgribModels.xml b/ncep/gov.noaa.nws.ncep.edex.plugin.ncgrib/utility/common_static/base/ncgrid/ncgribModels.xml index 5fc2e6acec..7e6f0f1261 100644 --- a/ncep/gov.noaa.nws.ncep.edex.plugin.ncgrib/utility/common_static/base/ncgrid/ncgribModels.xml +++ b/ncep/gov.noaa.nws.ncep.edex.plugin.ncgrib/utility/common_static/base/ncgrid/ncgribModels.xml @@ -62,7 +62,29 @@
3
- + + Global Ensemble Forecast System 2.5x2.5 Degree + gefs +
7
+ 2 + 2 + + 107 + + +
3
+
+ Global Ensemble Forecast System 1x1 Degree gefs @@ -97,9 +119,9 @@ 107