pyOPAWS is intended to be a replacement package for David Dowell and Lou Wicker's OPAWS radar gridding software (Observation Processing and Wind Synthesis) that was originally created in the late 1990's and became used by a number of groups during the last 10 years. The original code was capable of reading DORADE sweep files and later CFradial files created from operational radars or a variety of mobile radars. The code is intended to replace the original fortran and C code, be able to process WSR-88D level-II files directly. However, it is not capable or reading DORADE format, only level-II and CFradial are supported. This is due to the use of the python ARM-CART toolkit for radar ingest and processing as its base
Example command lines for lvl2_plot.py:
-
python lvl2_plot.py -f KDDC20160525_001527_V06.gz -q None -p 1 -u phase
creates plot of 6 variables (REF, VR, SPEC_W, Zdr, KDP, PHIDP), no QC, plot 2nd tilt level, phase unfolding
-
python lvl2_plot.py --plot2 -f KDDC20160525_001527_V06.gz -q None -p 1 -u phase
creates plot of REF and VR, no DBZ QC, plot 2nd title, phase unfolding
-
python lvl2_plot.py --plot2 -f KDDC20160525_001527_V06.gz -q MetSignal -p 1 -u phase
creates plot of REF and VR, MetSig QC, plot 2nd title, phase unfolding
Example command lines for opaws2d.py:
-
python opaws2d.py -f KDDC20160525_001527_V06.gz -q None -p 1 –w -u phase
opaws2d with no QC, plot 2nd tilt level, phase unfolding, -w to DART and netCDF files
-
python opaws2d.py -f KDDC20160525_001527_V06.gz -q None -p 1 –w -u region opaws2d with no QC, plot 2nd tilt level, region unfolding, write out DART and netCDF files
-
python opaws2d.py -f KDDC20160525_001527_V06.gz -q MetSignal -u phase opaws2d with MetSig QC, plot 2nd title, phase unfolding, write out DART and netCDF files
You can compare the outputs from your tests to the files in KDDC directory
Parameters controling the regridding of the data can be found in the python dictionarys at the top of opaws2d.py. They are structured to match many of the common parameters found in the OPAWS namelist (but not all features have been reproduced). See the file for more details.
The current fortran-based OPAWS was written to do two things: create a 3D Cartesian interpolated for dual-doppler analysis, or as a second (and added later option) superobb reflectivity and radial velocity data for storm-scale data assimilation. Lacking was quality control on the data itself, a minimal unfolding technique, and only thresholding reflectivity as a form of QC. pyOPAWS is written with several goals:
-
modernize the data analysis with python (less code)
-
read level-II files directly (useful for realtime applications, as well as case studies)
-
incorporate the velocity unfolding algorithms available in the python ARM-CART toolkit
-
Incorporate reflectvity (and velocity, where needed) quality control via use of dual-pol data available from most radars today.
Python packages Required: pyart, numpy, scipy, optparse, netCDF4, datetime, pyproj. Was built based on the Anaconda-2 system.
- To run the lvl-2 plotting, you can simply run the script.
- To run the opaws2d.py script, you must first:
- fcompile_cressman.py – compiles the fortran cressman routine, assumes GNU compiler is installed before the Anaconda python was installed. Note: “conda install libgfortran” can be helpful.
- Once a “cressman.so” exists and can be loaded – opaws2d is ready to run
There are several current limitations of the software - and the velocity unfolding has an important "buyer beward clause..."
-
Opaws2d.py has only been extensively tested on WSR-88D level-II archive files. In theory (not practice), it should work on CFradial files with little modification (there is already the ability to read in data). It has not yet been tested on CFradial files - particularily with the data QC. Use "-q None" if you want to grid a CFradial file.
-
Split cut level-II files created from the superres levels are difficult to manage. For example, the reflectivity and dual-pol variables are all on one sweep, and radial velocity is on the next sweep. The code "maps" which levels go together, BUT, on superres radial velocity sweeps, there is ALSO reflectivity (only). So for simple masking, the reflectivity collected with the radial velocity is used. For more complicated QC, then the mapped sweep is used to QC the radial velocity.
-
For level-II collection with dual-PRF (PRT?), I cannot find documentation as to what velocity field is stored in the level-II file, except that it is NOT unfolded. The pyART unfolding algorithms CANNOT handle multiple nyquists on a single sweep, which is what is stored in the file. The way it currently works is that the nyquist velocity for a sweep is reset to the minimum nyquist velocity on that sweep, and then the unfolding algorithm is applied. Comparing to level-III data from the same sweep, it seems to work. But its unclear what is going on here, and if anyone knows better - please contact me.
To test the scripts:
Copy from KDDC directory the file: KDDC20160525_001527_V06.gz into the main directory. Try several of the commands listed above.
Lvl2 files will be placed in a directory called “images”, and opaws2d files will be placed in a directory called “opaws_files”.
Plots of gridded superobbed fields (REF and VR) are placed in the main directory when created.
I wish to thank David Dowell, Robin Tanamachi, Dan Dawson, Glen Romine, Wen-Chau Lee, Corey Potvin, and Mike Coniglio for their help in the development and maintanance of the original OPAWS code. A version of the original software can be found on GitHub at this link.
I also wish to thank developers of the py-ART software, Scott Collis and Jon Helmus for their package - this rewrite would not have occured without their development of their package.
People wishing to contribute to this project are very much welcome, please email me at Louis.Wicker @ noaa.gov. If you plan to do much development, please make your own branch, and we can collaborate to get things pulled into the main branch at a later date.
We welcome contributions for all used of Py-ART provided the code can be distributed under the XXXX license.