This is a code to easily extract precipitation values (or any value, really) out of a lat/lon cell in a NetCDF of a NEXRAD level 3 product grid.
You can run it, for example, by typing at the command line:
>>> python radar_netcdf.py -vwp --ncfile='KBOU_SDUS35_N1PFTG_201106091630.nc' --varname=Precip1hr --lat=40 --lon=-100
The general syntax is:
radar_netcdf [-hvwp] --ncfile=$netcdfFileName --varname=$varname \ [--lat=$lat] [--lon=$lon] [--outfile=$outfile] [--help]
where $lat/$lon are of the point of interest, and are optional, and $outfile is used only if --lat and --lon are defined
Written by Andy Wickert on 17 August, 2011
Sometime in the future I will work on a whole script to get data off the internet, get the parts that we would need, convert the data into a standard NetCDF, and pull the info out. But this is a start.
|Nr. of publications:||1|
|h-index:||--"--" is not a number.|
|Featured publication(s)||Year||Model described||Type of Reference||Citations|
Wickert, A.D.; 2012. NEXRAD-extract, version 0.1.. , , . 10.1594/IEDA/100150|
Source code ref.
|See more publications of NEXRAD-extract|
Nothing yet, but it might be incorporated in some work with Francis Rengers on gully incision in West Bijou Creek: see http://cires.colorado.edu/science/groups/tucker/Natural-Experiments/index.html
>>> python radar_netcdf.py --help
will give you the following help information (as of 28 April 2012, and unchanged since the code was first completed):
Options: -h, --help show this help message and exit -v If selected, turns on verbosity -w Write the value at the given lat/lon to file -p Plots radar output --ncfile=NCFILE NetCDF filename --varname=VARNAME NetCDF variable to get, e.g., 'Precip1hr' --lat=LAT Latitude of point to get data. Optional, default = none --lon=LON Longitude of point to get data. Optional, default = none --outfile=OUTFILE Output file for lat/lon data on precip. Optional: only used if lat/lon are defined, default = NEXRAD_ll_out.txt.
You need a NetCDF of a Nexrad Level III weather radar product. NOAA has a nice Java tool to obtain NetCDF's from their own data format: http://www.ncdc.noaa.gov/oa/radar/radar-decoding-easy.html
Right now, the code will only output values (e.g., precip) to a file. I may work on making it be able to do latitude, longitude, and/or time as well.