Merge branch 'ncep_15.1.1-n' into ncep_16.1.1-n

Fixing up conflicts after putting the current dev work into 16.1.1
Conflicts:
	cave/com.raytheon.uf.viz.d2d.nsharp/META-INF/MANIFEST.MF
	cave/com.raytheon.viz.feature.awips.developer/feature.xml
	cave/com.raytheon.viz.warngen/src/com/raytheon/viz/warngen/gui/WarngenDialog.java
	edexOsgi/com.raytheon.uf.edex.plugin.npp.viirs/utility/edex_static/base/viirs/viirsHeaderMapping.xml
	edexOsgi/com.raytheon.uf.tools.cli/impl/src/pgen/retrieveActivity.py

Former-commit-id: f26cdccb3487542d8f818c30b1a003eab9b3c3ce
This commit is contained in:
Bradley Mabe 2015-12-01 12:11:48 -05:00
commit 264262f885
8 changed files with 89 additions and 27 deletions

View file

@ -257,6 +257,9 @@
<antcall target="p2.build.repo">
<param name="feature" value="com.raytheon.uf.viz.acarssounding.feature" />
</antcall>
<antcall target="p2.build.repo">
<param name="feature" value="com.raytheon.uf.viz.ncep.npp.feature" />
</antcall>
<antcall target="p2.build.repo">
<param name="feature" value="com.raytheon.viz.avnfps.feature" />
</antcall>

View file

@ -27,3 +27,4 @@ Export-Package: com.raytheon.uf.viz.d2d.nsharp,
com.raytheon.uf.viz.d2d.nsharp.display,
com.raytheon.uf.viz.d2d.nsharp.rsc
Bundle-ClassPath: com.raytheon.uf.viz.d2d.nsharp.jar
Import-Package: gov.noaa.nws.ncep.viz.soundingrequest

View file

@ -23,7 +23,7 @@ import gov.noaa.nws.ncep.edex.common.sounding.NcSoundingCube;
import gov.noaa.nws.ncep.edex.common.sounding.NcSoundingLayer;
import gov.noaa.nws.ncep.edex.common.sounding.NcSoundingProfile.ObsSndType;
import gov.noaa.nws.ncep.ui.nsharp.NsharpStationInfo;
import gov.noaa.nws.ncep.viz.common.soundingQuery.NcSoundingQuery;
import gov.noaa.nws.ncep.viz.soundingrequest.NcSoundingQuery;
import java.util.Map;

View file

@ -25,7 +25,7 @@ import gov.noaa.nws.ncep.edex.common.sounding.NcSoundingProfile;
import gov.noaa.nws.ncep.ui.nsharp.NsharpConfigManager;
import gov.noaa.nws.ncep.ui.nsharp.NsharpConfigStore;
import gov.noaa.nws.ncep.ui.nsharp.NsharpStationInfo;
import gov.noaa.nws.ncep.viz.common.soundingQuery.NcSoundingQuery;
import gov.noaa.nws.ncep.viz.soundingrequest.NcSoundingQuery;
import java.util.List;

View file

@ -22,7 +22,7 @@ package com.raytheon.uf.viz.d2d.nsharp.rsc;
import gov.noaa.nws.ncep.edex.common.sounding.NcSoundingCube;
import gov.noaa.nws.ncep.edex.common.sounding.NcSoundingLayer;
import gov.noaa.nws.ncep.ui.nsharp.NsharpStationInfo;
import gov.noaa.nws.ncep.viz.common.soundingQuery.NcSoundingQuery;
import gov.noaa.nws.ncep.viz.soundingrequest.NcSoundingQuery;
import java.util.Map;

View file

@ -66,5 +66,18 @@
<defaultColormap>NPP/VIIRS/CA (Low Light Vis)</defaultColormap>
</imageStyle>
</styleRule>
<!-- Special Ref 1.378u Satellite Rule based on sample data -->
<styleRule>
<viirsDataMatches>
<parameter>Ref</parameter>
<wavelength>1.378</wavelength>
</viirsDataMatches>
<imageStyle>
<range scale="LINEAR">
<minValue>0</minValue>
<maxValue>0.6</maxValue>
</range>
<defaultColormap>NPP/VIIRS/CA (Low Light Vis)</defaultColormap>
</imageStyle>
</styleRule>
</styleRuleset>

View file

@ -42,6 +42,11 @@
<regionInfo id="TIPQ">
<region>Puerto Rico</region>
</regionInfo>
<!-- Global region -->
<regionInfo id="TIPG">
<region>Global</region>
</regionInfo>
<!-- I1 -->
<channelInfo id="01">
@ -136,11 +141,11 @@
<resolution>750.0</resolution>
</channelInfo>
<!-- DNB replace id when known -->
<channelInfo id="10">
<channelType>Moderate</channelType>
<wavelength>0.7</wavelength>
<channel>10</channel>
<resolution>750.0</resolution>
</channelInfo>
</viirsHeaderMapping>
<!-- DNB/NCC -->
<channelInfo id="10">
<channelType>Moderate</channelType>
<wavelength>0.7</wavelength>
<channel>10</channel>
<resolution>750.0</resolution>
</channelInfo>
</viirsHeaderMapping>

View file

@ -1,15 +1,24 @@
#!/usr/bin/env python
#
##
# This script is used to extract PGEN products from EDEX.
# It can be run in batch mode by specifying the "-l", "-t", "-d", "-st", "-n", and
# "-p" options on the command line. Optionally, users can run it in interactive
# It can be run in batch mode by specifying the "-l", "-type", "-tag", "-time", "-d", "-st", "-n",
# and "-p" options on the command line. Optionally, users can run it in interactive
# mode by invoking it with no argument.
#
# Users can override the default EDEX server and port name by specifying them
# in the $DEFAULT_HOST and $DEFAULT_PORT shell environment variables.
#
# ??/?? R5250 A. Su PGEN - retrieveActivity command line interface does not work
#
# 03/18 R5801 A. Su PGEN - retrieveActivity command line interface does not work
#
# 07/02 R8536 P. Chowdhuri
# PGEN - retrieveActivity should grab latest if -d option not provided
#
#
##
#
import os
import logging
@ -68,15 +77,21 @@ def __parseCommandLine():
options = parser.parse_args()
options.interactive = False
# R8536 In the beginning it isn't known if there are records to extract
options.haverecords = False
options.latestnotime = False
if (options.label == None and options.type == None and
options.reftime == None and options.subtype == None and
options.tagId == None and
options.fullpath == None and options.name == None):
options.interactive = True
# R8536 change If a value isn't there for the --time qualifier
elif (options.reftime == None):
options.latestnotime = True
else:
if (options.label == None and options.type == None and
options.reftime == None and options.name == None):
print "Must enter values for at least one of -type, -l, -d, or -n"
print "Must enter values for at least one of -type, -tag, -time, -l, -d, or -n"
exit(0)
logger.debug("Command-line arguments: " + str(options))
@ -99,7 +114,7 @@ def main():
app.mainloop()
root.destroy()
else:
# Retrieve all activities abnd build a map of record using
# Retrieve all activities and build a map of record using
# type(subtype) as key.
mu = ActivityUtil.ActivityUtil()
activityMap = mu.getActivityMap()
@ -111,12 +126,17 @@ def main():
if ( options.subtype != None ) :
reqtype = options.type + "(" + options.subtype + ")"
# Form the matching pattern for tag ID
# Form the matching pattern for tag ID
tagID = None
if ( options.tagId != None):
tagID = "*\." + options.tagId + "\.*"
records = []
# R8536 change define the variable for data in the latest activity file
latestrec = []
# R8536 change Most recent time on the data isn't known here
latestRefTime = None
for key in activityMap.iterkeys():
recs = activityMap[key]
for rec in recs:
@ -126,27 +146,46 @@ def main():
mu.stringMatcher(options.name, rec["activityName"] ) ):
#Remove sec.msec from record's refTime
dbRefTime = rec["dataTime.refTime"]
if (latestRefTime == None):
latestRefTime = dbRefTime;
latestrec.append(rec)
dotIndex = dbRefTime.rfind(":")
if ( dotIndex > 0 ):
shortTime = dbRefTime[:dotIndex]
else:
shortTime = dbRefTime
#Replace the "_" with a whitespace in reftime.
optionTime = options.reftime
if ( latestRefTime < dbRefTime ):
latestRefTime = dbRefTime;
latestrec[0] = rec
optionTime = options.reftime
if ( optionTime != None ):
optionTime = optionTime.replace("_", " ")
if ( mu.stringMatcher( optionTime, shortTime ) ):
records.append( rec )
#Replace the "_" with a whitespace in reftime.
optionTime = optionTime.replace("_", " ");
if ( mu.stringMatcher( optionTime, shortTime ) ):
records.append( rec )
elif ( options.latestnotime ):
records=latestrec
# R8536 change if there are data records to write to files set the variable and write
for rec in records:
options.haverecords = True;
pr = ProductRetriever.ProductRetriever(rec["dataURI"], rec["activityLabel"])
if options.fullpath != None and options.fullpath.upper().startswith("Y"):
pr.setFullpath(True)
pr.getProducts()
logger.info("retrieveActivity is complete.")
# R8536 change If there's data to write most recent activity to file when "-time" isn't specified
if ( options.latestnotime and options.haverecords ):
logger.info("Latest file(s) Extracted, -time unspecified")
# R8536 change If there isn't activity data to write qualifier use could be improper (e.g. -tag "")
elif ( not options.haverecords ):
logger.info("Matching records weren't found, see qualifiers")
else:
logger.info("retrieveActivity is complete.")
#
# Interactive GUI for PGEN activity retrieval
@ -260,3 +299,4 @@ class RetrieveGui(Frame):
if __name__ == '__main__':
main()