Written by Bryan Burlingame [Part 3 of How to Create Reflectivity -10C]
Creating Cache for the Desired 3D Latitude and Longitude Grid
Create the cache for the 3D latitude and longitude grid to be utilized for all the radars using createCache. This will create a storage of data that the w2merger process (to be run later) can access. The information in the cache is relating to the size of the domain you wish to use, as well as which radars will be on that grid. The default directory for this cache is in your $HOME directory, and is titled .w2mergercache.
-
The process of creating the cache MUST BE DONE FOR ALL RADARS, here is an example of the command
createCache -o $HOME -i KXXX -T /path/to/terrain/KXXX.nc -t “50 -111 20” -b “27 -93 1” -s “0.05 0.05 1” –verbose
-
–o = creates the cache called “.w2mergercache in the $HOME directoy. w2merger will look in the $HOME directory for the cache, so best to leave it at $HOME (default is $HOME)
-
–i = the radar the cache is being created for (e.g. KXXX) MUST BE DONE FOR ALL RADARS
-
–T = the path to the terrain files so any terrain obstructions for a radar will be known. . You can obtain these data, if you do not already have them, from ftp://ftp.nssl.noaa.gov/users/lakshman/conus_radar_blockage.tgz.
-
–t = Top (and NW corner) of the of the new lat lon grid being created.
-
-t “50 -111 20” -b “27 -93 1” -t “(north-Lat) (west-Lon) (vertical levels)”
-
–b = Bottom (and SE corner) of the of the new lat lon grid being created.
-
-b “27 -93 1” -b “(south-Lat) (east-Lon) (lowest vertical level)”
-
–s = The spacing done between the grid points
-
-s “0.05 0.05 1” -s “(Lat spacing) (Lon spacing) (vertical level spacing (km))”
-
-
MUST BE DONE FOR ALL RADARS, new radars will be added into the first cache created.
-
*THE –t –b –s variables used must be the same that are passed when using w2merger below
-
Merging Radar Data to Common Lat/Lon 3D Grid and Interpolating Reflectivity to the -10˚C Isotherm in RAP/RUC Data
The next 3 commands need to be run simultaneously, and in the order specified. This will merge the radar data and will also interpolate it to the RAP data (The shell script I created ran w2simulator in the background, sleep for 2 seconds, then started w2merger and w2segmotionll and worked). After you begin the simulator, it will prompt you to begin other algorithms; at this time, begin the w2merger and w2segmotionll.
-
w2simulator– This is the command that synchronizes the process and will read in all the various radar directories (AND THE RAP code_index.xml mentioned above), and output the data into index_N.fam directories which are used as the input for the w2merger.
-
N corresponds to the number of files read into the simulator, one is created per file.
w2simulator -i “/path/to/radar1/code_index.xml /path/to/radar2/code_index.xml /path/to/more/radars/code_index.xml /path/to/rap/code_index.xml” -o /path /simulation -b 20130515-000258 -e 20130515-010700 –verbose
-
–i = is the path to the radar xml files, and should also include the path to the RAP .xml file created using nse
-
–o = is the output path for where the code_N.fam files are put.
-
This is the input path for w2merger
-
-
–b = beginning time of the simulator
-
–e = end time of the simulator
-
Both –e and –b must be of the format (YYYYMMDD-HHMMSS)
-
-
w2merger– This is the command that pulls in the radar and RAP data from the various sources and merges it together onto the grid that was created using createCache. Note that the input in w2merger is the output from w2simulator.
w2merger -i “$COMMON/simulation/index_0.fam $COMMON /simulation/index_1.fam $COMMON /simulation/index_2.fam” -o $COMMON/merged -I ReflectivityQC:00.50 -M $COMMON/segmotion -e 60 -C 5 -t “50 -111 20” -b “27 -93 1” -s “0.05 0.05 1” -a Isotherms –verbose
-
–i = is the path to radar/RAP files that were created by running the w2simulator command. This should be same path as output path of w2simulator, linking to the index_N.fam files in that directory.
-
–o = is the out path of the now merged files (Should be used as input into w2segmotionll)
-
–I = (capitol i) is the variable you wish to merge (eg. ReflectivityQC:00.50 is the quality controlled 0.5 degree reflectivity)
-
–M = tells the merger to refer to and include the output from w2segmotionll. w2merger and w2segmotionll work together in a feedback process.
-
–e 60 = to make an output once every 60 seconds. Doing it without the -e option will cause a rapid update grid that your I/O hardware may not be able handle properly.
-
–C 5 = changes the way data values are combined if they overlap in both space and time. 5 (TimeAndDistanceWeighted) means that the overlapped data are weight with respect to both distance and time so that later data are weighted higher. This is the “common” selection
-
–t –b –s =SAME AS createCache. For meaning of these arguments, refer back to #8 (e-g). The values should be the same as the grid created in this step.
-
–a = to specify the algorithms you wish to run on the 3D grid.
-
w2segmotionll– This will get motion estimates from the data and feed it into w2merger. Optional, but was recommended within the user guide for multiple radar cases. It corrects for time differences between radar elevations scans (from the same or different radars) by advecting older data before blending.The output directory should be specified in w2merger by passing the –M flag.
w2segmotionll -i $COMMON /merged/code_index.fam -o $COMMON /segmotion -T MergedReflectivityQC -O 5 –verbose
-
–i = is the input path for the code_index.fam directory. This is created by the w2merger command (-o in w2merger). Although it is a directory, when entering the path in the w2segmotionll command, do not have the / at the end.
-
–o = is the output path of the motion estimates, once again is the same as the –M flag passed in w2merger
-
–T = this flag tells the w2segmotionll command what variable to take the motion estimates from.
-
–O = changes the time interval over which motion is computed. If O = 30, then frames at least 30 minutes apart are used in the motion estimation.