Merge radars into 3D Mosaic

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.

        1. 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

    1. 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)

    2. i = the radar the cache is being created for (e.g. KXXX) MUST BE DONE FOR ALL RADARS

    3. 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.

    4. t = Top (and NW corner) of the of the new lat lon grid being created.

    5. -t “50 -111 20” -b “27 -93 1” -t “(north-Lat) (west-Lon) (vertical levels)”

    6. b = Bottom (and SE corner) of the of the new lat lon grid being created.

    7. -b “27 -93 1” -b “(south-Lat) (east-Lon) (lowest vertical level)”

    8. s = The spacing done between the grid points

      1. -s “0.05 0.05 1” -s “(Lat spacing) (Lon spacing) (vertical level spacing (km))”

  1. MUST BE DONE FOR ALL RADARS, new radars will be added into the first cache created.

    1. *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.

  1. 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.

    1. 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

    1. i = is the path to the radar xml files, and should also include the path to the RAP .xml file created using nse

    2. o = is the output path for where the code_N.fam files are put.

      1. This is the input path for w2merger

    3. b = beginning time of the simulator

    4. e = end time of the simulator

      1. Both –e and –b must be of the format (YYYYMMDD-HHMMSS)

  1. 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

  1. 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.

  2. o = is the out path of the now merged files (Should be used as input into w2segmotionll)

  3. I = (capitol i) is the variable you wish to merge (eg. ReflectivityQC:00.50 is the quality controlled 0.5 degree reflectivity)

  4. M = tells the merger to refer to and include the output from w2segmotionll. w2merger and w2segmotionll work together in a feedback process.

  5. 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.

  6. 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

  7. 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.

  8. a = to specify the algorithms you wish to run on the 3D grid.

  1. 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

  1. 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.

  2. o = is the output path of the motion estimates, once again is the same as the –M flag passed in w2merger

  3. T = this flag tells the w2segmotionll command what variable to take the motion estimates from.

  4. 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.