Monday, May 2, 2022

Viewing Blend Output

Viewing Blend Output

The National Weather Service provides public access to output from its National Blend of Models. I use the page at NOMADS. There, after selecting directories first for the latest date and then for the latest hour (UTC; latest hour becomes available near the end of that hour or a few minutes into the next hour), I select the "text" directory. Then (using Safari browser) I control-click->Download_Linked_File for whichever file(s) cover(s) the period of interest. In NBM terminology: h=hourly (1 day), s=short-range (3 days), e=extended-range (7 days), x=super-extended-range (8-10 days). Each file takes about 20 seconds to download. Meanwhile I've moved on to other web browsing. Later, offline, in the Terminal application I use the following little shell script to peruse one station at a time.

#!/bin/zsh
# The first $1 is the station identifier, which needs to be provided as an argument to the script.
# The second $1 is the beginning of the awk range pattern, looking for "sta" in field number 1.
awk -v sta="$1" '$1 ~ sta, /SOL/ ' IGNORECASE=1 Downloads/blend_nb[hsex]tx*

The IGNORECASE variable is recognized by the GNU version of awk, installed using Homebrew overriding the pre-installed awk. The setting can be removed for portability, but then one has to remember to capitalize the station (i.e., ./myb DMA vs. lazier fingers ./myb dma).

A list of available stations can be searched here. A complete key to the text bulletins can be found here.