easily download and plot NEXRAD weather radar reflectivity data
Project description
Nexrad Quick-plot
Easy Python download and plot NEXRAD N0Q compositive reflectivity. Uses RGB high resolution PNG images of North America.
Tested with pytest
, flake8
and mypy
type checking.
Install
python -m pip install -e .
Usage
RGB data scaling: NEXRAD N0Q base reflectivity maps.
- Black: No Data
- -32 dBZ .. 90 dBZ
- 0.5 dBZ increment
Download NEXRAD data
Get NEXRAD reflectivity data with parallel download:
python download-nexrad.py start stop outdir
example: download from 2018-01-01 to 2018-01-02 to ~/data/nexrad
:
python download-nexrad.py 2018-01-01T00 2018-01-03T00 ~/data/nexrad
Plot NEXRAD reflectivity data
(georegistered via Cartopy)
Plot all data in directory:
python plot-nexrad.py ~/data/nexrad/
Plot a specific file (subplots if multiple files specified):
python plot-nexrad.py ~/data/nexrad/2018-01-01T12:35:00.png
Plot via file glob match:
python plot-nexrad.py ~/data/nexrad/ -pat 2018-01-01T12*.png
Keogram (specify lat or lon and value):
python plot-nexrad.py ~/data/2017-08-21/nexrad/ -keo lat 40
Coordinates
EPSG:4326 coordinates (WGS84) are in .wld files, which are generally the same for wide time spans of data. The .wld format is like:
0.005 (size of pixel in x direction)
0.0 (rotation of row) (Typically zero)
0.0 (rotation of column) (Typically zero)
-0.005 (size of pixel in y direction)
-126.0 (x coordinate of centre of upper left pixel in map units--here it's WGS84 longitude)
50.0 (y coordinate of centre of upper left pixel in map units--here it's WGS84 latitude)
Notes
Mass image downscaling
For initial analysis, the original Nexrad image size of 12200 x 5400 pixels may be too high to complete in a reasonable time. I choose to downsize by a factor of 10, which takes a long time, but is a one-time process.
mkdir orig
cp *.png orig
nice mogrify -scale 10% "*.png"
If you have trouble with this being very slow, try:
MAGICK_TEMPORARY_PATH=/run/shm nice mogrify -scale 10% "*.png"
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file NEXRAD_quickplot-0.6.3.tar.gz
.
File metadata
- Download URL: NEXRAD_quickplot-0.6.3.tar.gz
- Upload date:
- Size: 7.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | a81de5c47f9b1dcae311788841864eaccbfb1bfc837e9ba50689e341c30f876a |
|
MD5 | d8ed50081f7c91baeac9ac6e75552106 |
|
BLAKE2b-256 | be100f37e078897ba2959b25348ed5c110e64fe6915a2d8505ea2d7907ba229e |
Provenance
File details
Details for the file NEXRAD_quickplot-0.6.3-py3-none-any.whl
.
File metadata
- Download URL: NEXRAD_quickplot-0.6.3-py3-none-any.whl
- Upload date:
- Size: 7.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b685faa91cb5340e61a5db6e0c2fe247ca4de1ed6b1f2f0f64870a0358913b87 |
|
MD5 | 2d8a057e53457e854a82c48c900e0858 |
|
BLAKE2b-256 | 03a0eb8b91eabafc7879a26367f330dbeae284c46bd0a2ce0955ac82a4f3f653 |