From Lrose Wiki
Full elle tutorial
This workflow will convert raw radar files to the CfRadial format and estimate the surface rain rate, emphasizing some parameters that need to be defined for each application. This workflow assumes that soundings need to be estimated from GFS analysis data. Note, the current parameter files are currently optimized to work on Unix systems.
Download parameter files
- Download the elle_full.tar.gz file
- Extract contents into the desired directory
tar -zxvf elle_full.tar.gz
The user can create their own parameter files for each function as shown in this example, but then directories in each parameter file will need to be set manually. The environment files included in the elle_full.tar.gz file will set the directory structure with modifications to only two lines of code.
Set up environment variables
- Either place the raw radar data in a subdirectory of elle_full called "raw" or make a note of the path to the radar data.
- In /elle_full/env_dirs, edit the directories (note: there is purposely no slash at the beginning of PROJ). Together, HOMED/PROJ should direct you to the elle_full directory. RAW is the full path to the raw radar data.
export HOMED="/path/to/home/directory" export PROJ=“short/path/to/elle_full” export RAW="/path/to/elle_full/raw"
- In /elle_full/env_vars, edit radar name (e.g., KHGX for Houston). This will set future directories in other parameter files and reduce the number of edits that need to be made.
export RADAR_NAME="RADAR" export radar_name="radar"
- In /elle_full/env_vars, set the coefficients for the rain rate equations. More information regarding the equations available in LROSE are described on this page and on page 4 of this AMS manuscript. The default Z-R relationship included in env_vars is from the Mismo dataset.
Obtain GFS and topographic data
- Download the GFS analysis from this website. Select the AIRS option for the 0.5º domain, which is the first GFS option available. Since the tutorial includes two different files, select all UTC cycles and enter the start and end dates (02 Jun 2017). Select the batch option and enter your email. Download the data when your order is ready and put it in a folder named gfs within the elle_full directory.
- Download the topography data using the following command. FYI: the folder is approximately 22 GB. If you know which region of the globe you need, you can poke around the website to determine which subfolder is necessary for your dataset. Unzip the contents and make note of the resulting directory.
Running Radx Applications
- Set the variables in the terminal and set the dates in the format YYYYMMDD. Print out the directory structure to make sure it's pointing to the right directory.
source env_dirs source env_vars export days=“date1 date2 date3” export daysbb="date1" echo $HOMED/$PROJ
- Convert the raw file to a CfRadial file. If you have data from more than one day, run a for loop or run each day one at a time replacing $days with the date (YYYYMMDD).
/path/to/RadxConvert -params ./params/RadxConvert.* -f $RAW/$RADAR_NAME/$days/*.raw*
- Replace "RCWF" in the filename for RadxBeamBlock.RCWF.new with the name of the radar (e.g., RadxBeamBlock.KHGX.new).
- In the params folder, modify line 53 of RadxBeamBlock.RCWF.new to indicate the directory of the unzipped topographic data.
- In the params folder, modify line 170 of RadxBeamBlock.RCWF.new to indicate the radar name.
- In the params folder, modify line 188-191 of RadxBeamBlock.RCWF.new to indicate the lat, lon, and altitude (terrin + antenna height) of the radar.
- In the params folder, insert the radar wavelength (cm), horizontal (degrees), and vertical (degrees) beamwidths in lines 215, 225, and 235 of RadxBeamBlock.RCWF.new, respectively.
- In the params folder, insert the range gate, azimuth, and elevation geometries in lines 263-306 of RadxBeamBlock.RCWF.new, respectively. The range gate and azimuth fields should match the observed spacing. If your elevation angles are unevenly spaced, it might be easier to artificially set the spacing to 0.25 or 0.5 degrees. The programs will interpolate the estimated blockage to the actual elevation angle later. The max elevation angle will depend on the radar location. Near Houston, TX, for example, only 2-3 degrees is probably sufficient, but a 10-20 degrees might be necessary near Taiwan.
- Run RadxBeamBlock for the RCWF radar location
/path/to/RadxBeamBlock -params ./params/RadxBeamBlock.$RADAR_NAME.*
- In the params directory, rename the Grib2toMdv.gfs.taiwan file to whatever you prefer.
- In Grib2toMdv.gfs.taiwan, insert the projection parameters in lines 764-770. PROJ_LATLON is a fine choice and does not require the other parameters to be set.
- In Grib2toMdv.gfs.taiwan, insert the desired output grid in lines 792-798. minx (lon) and miny (lat) set the lower left corner of the box around the radar, dx and dy indicate the spacing in degrees, and nx and ny indicate the number of points.
- In Mdv2SoundingSpdb.gfs, insert the radar lat, lon, and elevation in lines 286-289.
- Convert the GFS Grib2 files to Mdv (Grib2toMdv) and then extract the sounding closest to the RCWF radar (Mdv2SoundingSpdb)
/path/to/Grib2toMdv -params ./params/Grib2toMdv.* -f ./gfs/*.grb2 /path/to/Mdv2SoundingSpdb -params ./params/Mdv2SoundingSpdb.* -f ./gfs/mdv/$i/*.mdv
- Ensure that you have the proper pid_thresholds file for your radar. Make any necessary modifications.
- Make sure the filtering/processing parameters in RadxKdp, RadxPid, and RadxRate are appropriate for your needs.
- In RadxPid.new, insert the accurate path to your pid_thresholds file in line 27.
- In RadxRate.new, make sure the paths to the RadxKdp, RadxPid, and rain rate parameter files are correct in lines 284, 303, and 350.
- Run RadxRate to calculate Kdp, the PID, and various rain rates. If you have data from more than one day, run a for loop or run each day one at a time replacing $days with the date (YYYYMMDD).
/path/to/RadxRate -params ./params/RadxRate.* -f ./convert/$RADAR_NAME/$days/*.nc
- In RadxQpe.new, set your preferred output azimuthal resolution in line 32.
- In RadxQpe.new, check that the path to the beamblock file matches the path in line 269.
- Run RadxQpe to estimate the near-surface rainfall using the hybrid method. If you have data from more than one day, run a for loop or run each day one at a time replacing $days with the date (YYYYMMDD).
/path/to/RadxQpe -params ./params/RadxQpe.* -f ./rate/$RADAR_NAME/$days/*.nc
- In the elle_full directory, you should now see 3 new directories: convert, rate, and qpe. You can look through the the files in those directories to inspect the new files and check the quality of the data.
Run programs from a sample script
- If you'd like to run these applications through a script or on a cluster, you can use the script run_radx.sh (or make your own!). Follow all of the steps above, except for last item in each subsection where you run the Radx applications. Make sure you source the env_dirs and env_vars files.
- Edit directories in run_radx.sh script (lines 3 and 12)
cd /PATH/TO/elle_full rdir="/PATH/TO/lrose/bin"
- Edit the days (YYYYMMDD) in run_radx.sh script (lines 10-11)
days="date1 date2 date3..." daysbb="date1"
- Make the file executable, if it isn't already
chmod u+x run_radx.sh
- Run shell script
- In the elle_full directory, you should now see 4 new directories: beamblock, convert, rate, and qpe.