mirror of
https://github.com/Unidata/python-awips.git
synced 2025-02-23 22:57:56 -05:00
methods getRadarProductIDs(), getRadarProductNames() added to DataAccessLayer
This commit is contained in:
parent
72b3dedd23
commit
8af937a344
1 changed files with 39 additions and 0 deletions
|
@ -40,6 +40,45 @@ else:
|
||||||
USING_NATIVE_THRIFT = True
|
USING_NATIVE_THRIFT = True
|
||||||
|
|
||||||
|
|
||||||
|
def getRadarProductIDs(availableParms):
|
||||||
|
"""
|
||||||
|
Get only the numeric idetifiers for NEXRAD3 products.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
availableParms: Full list of radar parameters
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
List of filtered parameters
|
||||||
|
"""
|
||||||
|
productIDs = []
|
||||||
|
for p in list(availableParms):
|
||||||
|
try:
|
||||||
|
if isinstance(int(p), int):
|
||||||
|
productIDs.append(str(p))
|
||||||
|
except ValueError:
|
||||||
|
pass
|
||||||
|
|
||||||
|
return productIDs
|
||||||
|
|
||||||
|
|
||||||
|
def getRadarProductNames(availableParms):
|
||||||
|
"""
|
||||||
|
Get only the named idetifiers for NEXRAD3 products.
|
||||||
|
|
||||||
|
Args:
|
||||||
|
availableParms: Full list of radar parameters
|
||||||
|
|
||||||
|
Returns:
|
||||||
|
List of filtered parameters
|
||||||
|
"""
|
||||||
|
productNames = []
|
||||||
|
for p in list(availableParms):
|
||||||
|
if len(p) > 3:
|
||||||
|
productNames.append(p)
|
||||||
|
|
||||||
|
return productNames
|
||||||
|
|
||||||
|
|
||||||
def getMetarObs(response):
|
def getMetarObs(response):
|
||||||
"""
|
"""
|
||||||
Processes a DataAccessLayer "obs" response into a dictionary,
|
Processes a DataAccessLayer "obs" response into a dictionary,
|
||||||
|
|
Loading…
Add table
Reference in a new issue