pyiem.nws.products.pirep module#

Pilot Reports (PIREP)

This module attempts to process and store atomic data from PIREPs. These are encoded products that look like so:

UBUS01 KMSC 221700 EAU UA /OV EAU360030/TM 1715/FL350/TP B737/TB CONT LGT-MOD CHOP = EHY UA /OV MBW253036 /TM 1729 /FL105 /TP C206 /SK FEW250 /TA M06 /TB NEG /RM SMTH=

Unfortunately, there is not much documentation of this format and the feed of this data contains a bunch of formatting errors.

class pyiem.nws.products.pirep.Pirep(text, utcnow=None, ugc_provider=None, nwsli_provider=None)[source]#

Bases: TextProduct

Class for parsing and representing PIREPs found in NWS text products.

parse_reports()[source]#

Actually do the parsing of the product that generates the reports stored within the self.reports list

process_pirep(report)[source]#

Convert this report text into an actual PIREP object

compute_loc(loc, dist, bearing)[source]#

Figure out the lon/lat for this location

compute_pirep_valid(hour, minute)[source]#

Based on what utcnow is set to, compute when this is valid

sql(txn)[source]#

Save the reports to the database via the transaction

assign_cwsu(txn)[source]#

Use this transaction object to assign CWSUs for the pireps

get_jabbers(_uri, _uri2=None)[source]#

get jabber messages

pyiem.nws.products.pirep.parser(buf, utcnow=None, ugc_provider=None, nwsli_provider=None)[source]#

A parser implementation