pyiem.nws.products package#

Submodules#

Module contents#

A generalized parser frontend.

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

Omnibus parser of NWS Text Data

This is intended to be a catch-all parser of text data. As it currently stands, it does not correctly hand products off to the correct sub-processor, but some day it will!

Parameters:
  • text (str) – The actual product text, this can have the <cntr>-a character to start the string.

  • utcnow (datetime, optional) – What is the current time, this is useful for when ingesting old data. Many times, the product does not contain enough information to assign a current valid timestamp to it. So we need to know the current timestamp to do the relative computation.

  • ugc_provider (UGCProvider, optional) – Provides UGC information for product parsing.

  • nwsli_provider (dict, optional) – Provides NWS Location Identifiers to allow lookup of geographic information for station identifiers.

Returns:

A TextProduct instance

Return type:

TextProduct