|
__email__ = ' pollard@alum.mit.edu '
|
|
__LICENSE__ = ' \nCopyright (c) 2004,\nAll rights reserved.\n\n ...
|
|
MISSING_RE = re.compile(r'^[ M/] + $')
|
|
TYPE_RE = re.compile(r'^(?P< type > METAR| SPECI) \s+ ')
|
|
STATION_RE = re.compile(r'^(?P< station > [ A- Z] [ A- Z0- 9] {3} ) \s+ ')
|
|
TIME_RE = re.compile(r'(?x) ^(?P< day > \d\d) (?P< hour > \d\d) (?P< min ...
|
|
MODIFIER_RE = re.compile(r'^(?P< mod > AUTO| FINO| NIL| TEST| CORR? | R...
|
|
WIND_RE = re.compile(r'(?x) ^(?P< dir > [ \dO] {3} | [ 0O] | ///| MMM| VRB) ...
|
|
VISIBILITY_RE = re.compile(r'(?x) ^(?P< vis > (?P< dist > M? ( \d\s* ) ? \...
|
|
RUNWAY_RE = re.compile(r'(?x) ^( RVRNO| (?P< name > \d\d( RR? | LL? | C) ? ...
|
|
WEATHER_RE = re.compile(r'(?x) ^(?P< int > ( -| \+| VC) * ) (?P< desc > ( MI...
|
|
SKY_RE = re.compile(r'(?x) ^(?P< cover > VV| CLR| SKC| SCK| NSC| NCD| BK...
|
|
TEMP_RE = re.compile(r'(?x) ^(?P< temp > ( [ M-] ) ? \d+ | //| XX| MM) /(?P< ...
|
|
PRESS_RE = re.compile(r'(?x) ^(?P< unit > A| Q| QNH| SLP) ? (?P< press > [ ...
|
|
RECENT_RE = re.compile(r'(?x) ^RE(?P< desc > MI| PR| BC| DR| BL| SH| TS| ...
|
|
WINDSHEAR_RE = re.compile(r'^( WS\s+ ) ? ( ALL\s+ RWY| RWY(?P< name > \d...
|
|
COLOR_RE = re.compile(r'(?x) ^( BLACK) ? ( BLU| GRN| WHT| RED) \+? ( /? ( B...
|
|
TREND_RE = re.compile(r'^(?P< trend > TEMPO| BECMG| FCST| NOSIG) \s+ ')
|
|
REMARK_RE = re.compile(r'^( RMKS? | NOSPECI| NOSIG) \s+ ')
|
|
AUTO_RE = re.compile(r'^AO(?P< type > \d) \s+ ')
|
|
SEALVL_PRESS_RE = re.compile(r'^SLP(?P< press > \d\d\d) \s+ ')
|
|
PEAK_WIND_RE = re.compile(r'(?x) ^P[ A- Z] \s+ WND\s+ (?P< dir > \d\d\d...
|
|
WIND_SHIFT_RE = re.compile(r'(?x) ^WSHFT\s+ (?P< hour > \d\d) ? (?P< m ...
|
|
PRECIP_1HR_RE = re.compile(r'^P(?P< precip > \d\d\d\d) \s+ ')
|
|
PRECIP_24HR_RE = re.compile(r'(?x) ^(?P< type > [ 67] ) (?P< precip > \d...
|
|
PRESS_3HR_RE = re.compile(r'(?x) ^5(?P< tend > [ 0- 8] ) (?P< press > \d\...
|
|
TEMP_1HR_RE = re.compile(r'(?x) ^T(?P< tsign > [ 01] ) (?P< temp > \d\d\...
|
|
TEMP_6HR_RE = re.compile(r'(?x) ^(?P< type > [ 12] ) (?P< sign > [ 01] ) (? ...
|
|
TEMP_24HR_RE = re.compile(r'(?x) ^4(?P< smaxt > [ 01] ) (?P< maxt > \d\d...
|
|
UNPARSED_RE = re.compile(r'(?P< group > \S+ ) \s+ ')
|
|
LIGHTNING_RE = re.compile(r'(?x) ^( (?P< freq > OCNL| FRQ| CONS) \s+ ) ? ...
|
|
TS_LOC_RE = re.compile(r'(?x) TS( \s+ (?P< loc > ( OHD| VC| DSNT\s+ | \s+ ...
|
|
loc_terms = [ ( ' OHD ' , ' overhead ' ) , ( ' DSNT ' , ' distant ' ) , ( ' AND ' , ...
|
|
SKY_COVER = { ' /// ' : '
' , ' BKN ' : ' broken ' , ' CLR ' : ' clear ' , ' FEW ...
|
|
CLOUD_TYPE = { ' ACC ' : ' altocumulus castellanus ' , ' ACSL ' : ' stand ...
|
|
WEATHER_INT = { ' + ' : ' heavy ' , ' +VC ' : ' nearby heavy ' , ' - ' : ' ligh ...
|
|
WEATHER_DESC = { ' BC ' : ' patches of ' , ' BL ' : ' blowing ' , ' DR ' : ' lo ...
|
|
WEATHER_PREC = { ' // ' : '
' , ' DZ ' : ' drizzle ' , ' GR ' : ' hail ' , ' GS ' : ...
|
|
WEATHER_OBSC = { ' BR ' : ' mist ' , ' DU ' : ' dust ' , ' FG ' : ' fog ' , ' FU ' : ...
|
|
WEATHER_OTHER = { ' DS ' : ' dust storm ' , ' FC ' : ' funnel cloud ' , ' PO ...
|
|
WEATHER_SPECIAL = { ' +FC ' : ' tornado ' }
|
|
COLOR = { ' BLU ' : ' blue ' , ' GRN ' : ' green ' , ' WHT ' : ' white ' }
|
|
PRESSURE_TENDENCY = { ' 0 ' : ' increasing, then decreasing ' , ' 1 ' : ...
|
|
LIGHTNING_FREQUENCY = { ' CONS ' : ' constant ' , ' FRQ ' : ' frequent ' , ...
|
|
LIGHTNING_TYPE = { ' CA ' : ' cloud-to-air ' , ' CC ' : ' cloud-to-cloud ' ...
|
|
REPORT_TYPE = { ' AUTO ' : ' automatic report ' , ' COR ' : ' manually co ...
|
|
debug = True
|