Skip to content

Instantly share code, notes, and snippets.

View lcmcninch's full-sized avatar

Luke lcmcninch

View GitHub Profile
@lcmcninch
lcmcninch / nbm_text_download.py
Created December 31, 2024 15:07
Download the current NWS NBM Text Bulletin for a given statioin
import requests
BASE_URL = "https://www.weather.gov/source/mdl/NBM/blend_nbstx.t07z_{}.txt"
# See https://vlab.noaa.gov/web/mdl/nbm-stations-v4.2 to find your station ID
STATION = "<YOUR STATION ID HERE>"
def find_station_data(url, station) -> str | None:
"""Stream the URL looking for the station data.