Merge "Omaha #3098 Changes to also look at 'Wx' occasional (TEMPO) data." into omaha_14.4.1
Former-commit-id:cff10fda0d
[formerly1e0c34575d
] [formerlycff10fda0d
[formerly1e0c34575d
] [formerlya8e8e6bca8
[formerly 0e860418676f9f175d22225cc50a0ad23c0db236]]] Former-commit-id:a8e8e6bca8
Former-commit-id:0aeb4ca76c
[formerlydfd2f3d071
] Former-commit-id:99f7f6da90
This commit is contained in:
commit
886c8a73ed
1 changed files with 28 additions and 9 deletions
|
@ -134,6 +134,8 @@
|
||||||
#* ------------ ---------- ----------- --------------------------
|
#* ------------ ---------- ----------- --------------------------
|
||||||
#* Initial creation.
|
#* Initial creation.
|
||||||
#* Mar 07, 2013 1735 rferrel Use SiteGridManager to limit calls to server.
|
#* Mar 07, 2013 1735 rferrel Use SiteGridManager to limit calls to server.
|
||||||
|
#* Jun 03, 2014 2715 rferrel WxTarDelta and WxGridDelta method changed to also check
|
||||||
|
#* ocassional (TEMPO) values.
|
||||||
##
|
##
|
||||||
|
|
||||||
import logging, time, cPickle
|
import logging, time, cPickle
|
||||||
|
@ -412,9 +414,17 @@ Arguments: WX (list)"""
|
||||||
def method(self, taf, grids):
|
def method(self, taf, grids):
|
||||||
self.setmsg('%s forecasted but not in grids',
|
self.setmsg('%s forecasted but not in grids',
|
||||||
' or '.join(self.args['wx']))
|
' or '.join(self.args['wx']))
|
||||||
if 'wx' not in taf or 'pstr' not in taf['wx']:
|
|
||||||
|
# In AWIPS I only checked taf['wx']['pstr'].
|
||||||
|
# This change allows current TEMPO values to be checked.
|
||||||
|
if 'wx' not in taf:
|
||||||
|
return False
|
||||||
|
if 'pstr' in taf['wx']:
|
||||||
|
wx = taf['wx']['pstr']
|
||||||
|
elif 'ostr' in taf['wx']:
|
||||||
|
wx = taf['wx']['ostr']
|
||||||
|
else:
|
||||||
return False
|
return False
|
||||||
wx = taf['wx']['pstr'] # only prevailing conditions
|
|
||||||
if not Avn.any(self.args['wx'], Avn.curry(_WX, wx)):
|
if not Avn.any(self.args['wx'], Avn.curry(_WX, wx)):
|
||||||
return False
|
return False
|
||||||
if 'wx' not in grids:
|
if 'wx' not in grids:
|
||||||
|
@ -443,18 +453,27 @@ Arguments: WX (list)"""
|
||||||
def method(self, taf, grids):
|
def method(self, taf, grids):
|
||||||
self.setmsg('%s occured in grids but not forecasted',
|
self.setmsg('%s occured in grids but not forecasted',
|
||||||
' or '.join(self.args['wx']))
|
' or '.join(self.args['wx']))
|
||||||
if 'wx' not in grids or 'pstr' not in grids['wx']:
|
|
||||||
return 0
|
# AWIPS I only checced grids['wx']['pstr'].
|
||||||
wx = grids['wx']['pstr'] # only prevailing conditions
|
# This change allows current TEMPO values to be checked.
|
||||||
|
if 'wx' not in grids:
|
||||||
|
return False
|
||||||
|
if 'pstr' in grids['wx'] :
|
||||||
|
wx = grids['wx']['pstr']
|
||||||
|
elif 'ostr' in grids['wx']:
|
||||||
|
wx = grids['wx']['ostr']
|
||||||
|
else:
|
||||||
|
return False
|
||||||
|
|
||||||
if not Avn.any(self.args['wx'], Avn.curry(_WX, wx)):
|
if not Avn.any(self.args['wx'], Avn.curry(_WX, wx)):
|
||||||
return 0
|
return False
|
||||||
if 'wx' not in taf:
|
if 'wx' not in taf:
|
||||||
return 1
|
return True
|
||||||
if 'pstr' in taf:
|
if 'pstr' in taf:
|
||||||
wx = taf['wx']['pstr']
|
wx = taf['wx']['pstr']
|
||||||
if Avn.any(self.args['wx'], Avn.curry(_WX, wx)):
|
if Avn.any(self.args['wx'], Avn.curry(_WX, wx)):
|
||||||
return 0
|
return False
|
||||||
if 'ostr' not in taf['wx']:
|
if 'ostr' not in taf['wx']:
|
||||||
return 1
|
return True
|
||||||
wx = taf['wx']['ostr']
|
wx = taf['wx']['ostr']
|
||||||
return not Avn.any(self.args['wx'], Avn.curry(_WX, wx))
|
return not Avn.any(self.args['wx'], Avn.curry(_WX, wx))
|
||||||
|
|
Loading…
Add table
Reference in a new issue