Skip to content
/ pyIEM Public

A collection of python support things that make my weather processing work, work.

License

Notifications You must be signed in to change notification settings

akrherz/pyIEM

Folders and files

NameName
Last commit message
Last commit date
Jan 7, 2025
Jan 3, 2025
Dec 2, 2024
Feb 27, 2025
Feb 27, 2025
Jan 29, 2025
Mar 26, 2021
Jan 11, 2021
Feb 20, 2025
Jul 15, 2019
Feb 27, 2025
Jul 15, 2015
Dec 20, 2024
Jul 14, 2023
Sep 10, 2023
Jan 2, 2025
Feb 20, 2025
Jan 17, 2024

Repository files navigation

pyIEM

A collection of python code that support various other python projects I have and the Iowa Environmental Mesonet. A goal here is to upstream anything useful into Unidata's MetPy and also remove any redundant code.

CodeCov

Current release info

Name Downloads Version Platforms
Conda Recipe Conda Downloads Conda Version Conda Platforms

Dependencies

Python 3.9+ is required. Python releases 3.9 through 3.11 are actively tested and supported within this repository.

The codebase currently makes direct database calls with hardcoded assumptions of the hostname iemdb.local and database names. Someday, I'll use a proper ORM and software design techniques to make this more extensible for others!

Installation

Since this library depends on Cartopy, you likely do not want to let pip install Cartopy. So the installation options are either:

  1. Install Cartopy via some other mechanism than pip.
  2. Install pyiem via pip.

Or:

  1. Install pyiem via conda using the conda-forge channel.

How to use NWS product ingestors

This library provides a number of parsers for various NWS products. The implementation of these parsers can be found with my pyWWA project. The main limitation is that the pyWWA parsers use Twisted Python and thus have a somewhat steep learning curve. The pyIEM parsers do not require the usage of Twisted though, so how does one use them?

The general entry point for a text product is the parser method of pyiem.nws.products. So given a NWS text file, the code would look like.

from pyiem.nws.products import parser
text = open('MYFILE.txt').read()
prod = parser(text)
print(prod.get_product_id())

The actual methods and attributes on the prod object above will vary depending on the type of product involved.

About

A collection of python support things that make my weather processing work, work.

Resources

License

Stars

Watchers

Forks

Packages

No packages published