pyiem.nws.products.metarcollect module#
Encapsulates a text product holding METARs.
- pyiem.nws.products.metarcollect.normalize_temp(val)[source]#
When temperatures are close to an int, return that int!
- pyiem.nws.products.metarcollect.wind_logic(iem, mtr)[source]#
Hairy logic for now we handle winds.
- Parameters:
mtr (Metar)
- pyiem.nws.products.metarcollect.to_metar(textprod, text)[source]#
Create a METAR object, if possible
- Return type:
Metar
- pyiem.nws.products.metarcollect.over_wind_threshold(mtr)[source]#
Is this METAR over the wind threshold for alerting
- Parameters:
mtr (Metar)
- Return type:
- pyiem.nws.products.metarcollect.to_iemaccess(txn, mtr, iemid, tzname, force_current_log=False, skip_current=False)[source]#
Persist parsed data to IEMAccess Database.
- Parameters:
txn (psycopg.cursor) – database cursor / transaction
mtr (Metar) – Metar instance
iemid (int) – The iem station identifier
tzname (str) – Local timezone of station.
force_current_log (boolean) – should this ob always go to current_log
skip_current (boolean) – should this ob always skip current table
- class pyiem.nws.products.metarcollect.METARCollective(text, utcnow=None, ugc_provider=None, nwsli_provider=None)[source]#
Bases:
TextProductA TextProduct containing METAR information