RADAR MENU
Import radar
data
This is a sophisticated interface that allows any graphical radar image to be georeferenced and mapped into Digital Atmosphere.
The list of radar resources is kept in the file digatmos.rdy.
Example of making a radar image |
Here is a quick tutorial on how to add a radar site. We Googled "south africa radar" and found a radar image page at http://metsys.weathersa.co.za . We go to the page for Durban and see that there is an image. Right-clicking on the image we see that the radar image is stored in http://metsys.weathersa.co.za/radar_image/DN.gif (which is good, as loopers and non-fixed filenames can be considerably more complicated to deal with). Now we need to get the latitude and longitude of this site. It's not anywhere on the page, however the website has a handy radar information page at http://metsys.weathersa.co.za/nwrn.htm. This shows Durban at 30.01S 30.93E. Make a note of that.
Now we need to import the radar image into a graphics program; we use PaintShop Pro. In your browser, right-click on the image and choose Copy Image. Then paste it in your software.
In another window, open Notepad and then open your digatmos.rdy file in the Digital Atmosphere directory. Start a new line at the top of the data block (anywhere in the list is fine, but entering new items at the top we can see the column headers more conveniently).
In your graphics program, position the cursor on the very center of the radar site and read the X/Y coordinates, wherever your graphics program displays it. This shows a center position of304,367(X=304,Y=367). Enter this into digatmos.rdy under XXX YYY. So far it should look like this:
Now we need to find the top left and bottom right of the part of the image containing valid radar information. This image has a border box enclosing the radar product; the legends are outside of it and the radar image is inside of it. We can use the border box. The top left is (0,54) and bottom right is (612,665). Enter this under LEFX,TOPY and RGTX,BOTY.
Now we determine the maximum range of the radar scan. This can be seen easily with the 200 km ring. So the range will be 200 km. Enter that under RNG. Now we need to determine a scale in pixels per km. This is an easy task since the range rings and site center are obvious. Since the leftmost extent of the 200 km ring is at X=0 and the radar center is X=304, this means that we have 304 pixels per 200 km of distance. Do the division and we get 304/200 = 1.52. Fit this figure under SCALE.
Now put the latitude and longitude under LATITU LONGITU. Note that if your figures came in degrees-minutes-seconds you need to convert them to decimal values before entering them here. Fortunately the South Africa radar information page gave us decimal degrees. Always use negative for westerly longitudes and southerly latitudes. So we will be entering -30.01 30.93.
Now let's get the URL of the image. Simply right-click on the radar image in your browser and choose Copy Image Location. Paste this under URL in digatmos.rdy. In this case the image is at http://metsys.weathersa.co.za/radar_image/DN.gif .
Under FMT we need to enter the image format type. Typically you just use the extension on the URL, which in this case is gif. Other types seen may be jpg and png. Some sources use the wrong image type on the filename, in which case the image will not display in Digital Atmosphere and you will have to see if the site is posting, say, a JPG using a PNG filename (this kind of thing is happening with Canadian radar images).
Now we need to develop a color table to tell Digital Atmosphere which radar colors contain information. Scroll to the bottom of the digatmos.rdy file and start a new TABLE= line using a value that is not in use. If you're using the default Digital Atmosphere digatmos.rdy file, you'll probably be starting a TABLE=05 line. So enter TABLE=05 followed by two forward-slashes and a note telling you what this table is for. We recommend:
TABLE=05 // South African radars
Now we need to enter the color information for each intensity level. The South African radar source has a handy scale on the right side. View this in your graphics program. Now you need to use whatever tool will let you hover over pixels and show you the color value using RGB numbers (i.e. three numbers, each ranging from 0, dark, to 255, bright, indicating the numerical level of red, green, and blue). In PaintShop Pro it is the eyedropper icon (pick up color). If you hover over the "0 dBz" level, which is gray, you should see it has R=90 G=89 B=90. We enter a line using this format:
LEVEL=dbz,red,green,blue,threshold
The red, green, and blue are self-explanatory. The dbz is the dBz level from the scale; it's only used for color mapping. If no scale is provided you can use 0 for weak echoes ranging up to 60 for heavy levels. Finally threshold is a value used to "accept" pixels that are close to the required R,G,B values... we will use 10. However it may be important to set this for JPG files where color drift may occur. Threshold should usually be 10, but you can increase it to 50 or 100 if lossy JPGs are used and "holes" are appearing in the generated radar images. Basically Digital Atmosphere looks at the numerical difference in red, blue, and green and adds up these differences (using the absolute value) to gauge the pixel against the threshold. So if you define RGB=10,10,10 and the program sees a pixel with RGB=30,30,30, this adds up to a difference of 60. The pixel will be treated as part of your level definition as long as the threshold value doesn't exceed 60.
When we are done defining all levels it will look like this:
TABLE=05 // South African radar
LEVEL=00,090,089,090,10
LEVEL=05,074,060,140,10
LEVEL=10,000,089,000,10
LEVEL=20,000,113,000,10
LEVEL=30,008,125,222,10
LEVEL=35,024,069,231,10
LEVEL=36,107,012,198,10
LEVEL=39,198,016,132,10
LEVEL=42,189,101,132,10
LEVEL=45,206,134,057,10
LEVEL=48,247,195,049,10
LEVEL=51,255,251,000,10
LEVEL=54,255,154,090,10
LEVEL=57,255,093,008,10
LEVEL=60,255,052,024,10
LEVEL=65,189,190,189,10
LEVEL=70,214,211,214,10
Note that extraneous zeroes have been prefixed to make numbers two or three digits. This is optional, and has been done here to make the file look neater. We will also skip South Africa's 80 dBz since it matches the basemap color (white) and may give undesirable results.
Finally we need to hook up this table number (05) with the Durban radar entry above. Put this number under CO to point it at the table.
We're done! Now generate a map in Digital Atmosphere for Durban (the ICAO is FADN) and use a tight zoom level of about 300 or 400 nm. Now use Radar > Import Images and Clear All and then check Durban.
Note that there are traces of radar range rings. This cannot be avoided since it is an artifact on the original image. The outer red radar range ring is provided by Digital Atmosphere to mark the maximum extent of radar information and can be shut off by putting RANGERING=0 instead of RANGERING=1 before the TABLE= entries in digatmos.rdy. The palette can also be changed in this section to something more desirable.