Tutorial
Home Index

Using The Radar Position Library

The radar position library converts a range and beam number to a geographic or geomagnetic coordinate according to the radar operating parameters.

The example program below demonstrates how the library is used.

pro radartest

  fname=getenv('SD_RADAR')
  openr,inp,fname,/get_lun

  network=RadarLoad(inp)
  free_lun,inp

  s=RadarLoadHardware(network,path=getenv('SD_HDWPATH'))

; Find the radar information about the radar with ID code 3

  r=RadarGetRadar(network,3)

; Get the hardware information for the date in 1998

  site=RadarYMDHMSGetSite(r,1998,6,1,0,0,0)
  
; do the transform

  lat=0.0D
  lon=0.0D
  s=RadarPos(0,8,10,site,180,45,0,300.0,rho,lat,lon)
  
  print, lat,lon

end
Download this program here:radartest.pro

The program must first load the radar data tables that give the station identifiers and the hardware parameters of each radar. The station identifiers are normally stored in the file given by the environment variable SD_RADAR. The program first opens this file and the calls RadarLoad to read the table.

The next step is to load the hardware parameters for each station. The hardware files are normally stored in the directory given by the environment variable SD_HDWPATH. The program passes this environment variable to the function RadarLoadHardware which reads the tables.

The next step is to use the function RadarGetRadar to get the information about a specific radar, in this case the radar with station identifier number 3. The function returns a structure that contains the radar information.

Once the radar information is obtained, the function RadarYMDHMSGetSite is used to obtain the specific hardware configuration of the site for the given time (The hardware parameters of some of the sites change with time).

The final step is to do the transform using RadarPos. The first argument is a flag indicating whether the function should return the edge of the cell or the center point. The next two arguments are the beam and range number of the cell. Next is the site hardware determined before. The remaining arguments are the distance to the first range gate, the range separataion, the receiver rise time and the altitude at which the conversion should be done. The result of the transform is returned in rho, lat, and lon.


Back