https:///weradocs/rad2uv.shtml Last update:

WERA HF Radar Software - Combine Radial Components (Beam Forming and Direction Finding)

rad2uv

Call: rad2uv [params*.cfg]

An optional parameter can be used to pass the name of a configuration file. This file must be located in ~/etc e.g. ~/etc/params_Hawaii.cfg . If no optional parameter is supplied, the configuration is read from ~/etc/params.cfg . Note, that you only have to pass the file name. The directory ~/etc/ is hard-wired within rad2uv.

As of December 2007, this program calculates the range and azimuth from the WERA site to the grid points given in WGS84 coordinates. When combining radial components at a grid point, the WGS84 backward angles from the grid point to the radar site are used. Note, that due to the great circle approach, foreward and backward angle do not always differ by 180 degrees.
In case of Direction Finding, the WGS84 foreward angle and range is used to identify the radial components within the radius R_AVERAGE around the grid point which are averaged to calculate the current velocity.

Program expects 'FMRADG', 'FMRADB' or 'FMRADD' header code.
Look here for a complete list of header codes.

Program looks for files containing names of .crad files to be combined:
/home/wera/etc/Ranam1.dat,
/home/wera/etc/Ranam2.dat, ...,
/home/wera/etc/Ranam10.dat
e.g.

/home/wera/etc/Ranam1.dat : /home/wera/data/Torres/20003341355_TOR.crad
/home/wera/etc/Ranam2.dat : /home/wera/data/Penas/20003341405_PEN.crad
Note, that if data from more than two sites (radial components) are available, the 2-dim value is calculated by an overdetermined system of equations using the accuracy of the radial components as a weight to the least-squares solution.

The program reads following values from PARAM_UV.CFG (VMS) / params.cfg (Linux):

C	Maximum number of RanamX.dat files in NST
C
        NST             =  2            !Number of WERA sites (radial files)

        MIN_CONTRIB     =  3            !Direction Finding, filter parameter
        NUM_TRIES       =  4            !Direction Finding, filter parameter
        R_AVERAGE	=  3.0		!Direction Finding, radius around a grid 
                                        !point to average radial components [km]
        VARX            =  1.5          !Variance of radial comp must be less [m/s]
        SIG_CUT         =  0.5          !Accuracy of 2-dim current must be less
        !
        MAX_CUR         =  4.0          !Maximum 2-dim current allowed [m/s]
        NEAR_CUT        =  9.0          !Direction Finding, when averaging near
                                        !to a site, only include +/- NEAR_CUT d
        MAX_GDOP        =  5.0          !Maximum GDOP allowed

C	Name and size (NX, NY) of Grid File
C
C	Values used to generate Gijon_grid_60_60.asc :
C	Spacing [km] 1.0
C	Upper left corner: LAT 44 5.8  LON -5 -52.0
C
	NX              = 60
	NY              = 60
	GRID_NAME	= '/home/wera/etc/Gijon_grid_60_60.asc'

C	Name of Watt File
C
	WATT		= .TRUE.		!.true. = process Watt file
C	WATT		= .FALSE.		!.true. = process Watt file
	WATT_NAME	= '/home/wera/etc/Gijon_watt_60_60.asc'

	UV_DIR          = '/home/wera/data/uv/'  !Directory for 2-dim .UV
	ASC_DIR         = '/home/wera/data/asc/' !Directory for 2-dim .ASC
        !
	CODE 		= 'gij' 	!Code in 2-dim current file
	!
	!To generate a GDOP file, run rad2uv once with WRITE_GDOP = .TRUE.
	WRITE_GDOP	= .FALSE.	!.true. = write GDOP file
C	WRITE_GDOP	= .TRUE.	!.true. = write GDOP file
C	Name of GDOP File
	GDOP_NAME	= '/home/wera/etc/Gijon_GDOP_60_60.dat'
	!
	INTER		= .TRUE.	!.true. = interpol
C	INTER		= .FALSE.	!.true. = interpol
C	LIE		= .TRUE.	!.true. = extrapol
	LIE		= .FALSE.	!.true. = extrapol
C	TRIANG		= .TRUE.	!.true. = Triangle-Interpolation
	TRIANG		= .FALSE.	!.true. = Triangle-Interpolation

MAX_CUR:     Always used.
             Sets the 2-dim current to 'gap' when the absolute value is
             larger than MAX_CUR.
MAX_GDOP:    Always used.
             Limit the increase of error due to geometry between the radar
             sites to MAX_GDOP.
VARX:        Always used.
             Limit the variance of an averaged radial component to VARX. If a
             value greater than VARX is found, set radial component to 'gap'.
SIG_CUT:     Always used.
             Limit the accuracy of 2-dim current to SIG_CUT. If a value
             greater than SIG_CUT is found, set 2-dim current to 'gap'.
R_AVERAGE:   Used when processing data delivered by wera16_beam or wera4_dir.
             Interpolation from the given radial grid to the carthesian grid
             requires averaging of radial components within a circle around
             the requested grid point. All radial components found within
             a radius R_AVERAGE are averaged to give the radial component to
             be combined to the 2-dim current field.
MIN_CONTRIB: Used when processing data delivered by wera16_beam or wera4_dir.
             All radial components found within a radius R_AVERAGE are
             averaged to give the radial component to be combined to the
             2-dim current field. If there are less than MIN_CONTRIB
             contributions to this average, the data is discarded.
NEAR_CUT:    Used when processing data delivered by wera16_beam or wera4_dir.
             Limit the radial components found within a radius R_AVERAGE to
             +/- NEAR_CUT degrees from the site to the grid point. Avoids
             incorrect averages if very close to the site.
NUM_TRIES:   Used within wera4_dir and within rad2uv only when data from
             old CODAR radial files are processed.

INTER:       Interpol current field using available radial components
LIE:         Extrapolate current field using available radial components
TRIANG:      Extrapolate current field from center to the edges where no
             radial components are available.

For Linux the directory strings must end with '/'

WATT_NAME can be used to force the current speed at selected grid points to ZERO. This is especially usefull, when interpolation / extrapolation near to wadden areas is enabled. The logical WATT can be used to enable WATT_NAME to be processed by rad2uv. For further remarks look at Make_Grid. There may be many other parameters defined in the /home/wera/etc/params.cfg file, which are required for other programs. These are ignored by rad2uv.

Two versions of the resulting 2-dim current file are written:

1. Formatted in ASC_DIR:  <time_code>_<CODE>.cur_asc
[2. Unformatted in UV_DIR: <time_code>_<CODE>.cur_uv] ... only if WRITE_UV = .true. in rad2uv.F

<time_code> is taken from the first .crad file e.g. in Ranam1.dat
and has the form yyyydddhhmm.crad:  year,day_in_year,hour,minute
            e.g. 20003341355.crad:  Year 2000, Day 334, Hour 13, Minute 55
The following box shows a typical output generated by rad2uv:

wera@ifmpc143:~/Fortran > rad2uv params_brest.cfg
 rad2uv V2.0.0 Linux:
 *** Reading configuration from /home/wera/etc/params_brest.cfg
 Combining Radails from: /home/wera/data/gar/cwrad/20052212348_gar.crad
 *** MAX_CUR is set to     5.00 m/s.
 *** MAX_GDOP is set to    4.50
 *** VARX is set to ...    3.00
 *** SIG_CUT is set to     0.50
 Combining Radails from: /home/wera/data/bre/cwrad/20052212348_bre.crad
 *** MAX_CUR is set to     5.00 m/s.
 *** MAX_GDOP is set to    4.50
 *** VARX is set to ...    3.00
 *** SIG_CUT is set to     0.50
 *** Interpolating ...
 Result in: /home/wera/data/surlitop/asc/20052212348_sur.cur_asc

Here is the data formats of the output (.cur_asc) file.

Compilation from source:
Linux:

Source is in rad2uv.F
Compilation and linking with '. do_rad2uv.sh'

After passing the input radial files via RanamNN.dat, call with
> rad2uv

VMS:

Source is in rad2uv.F
Compilation and linking with @rad2uv

After passing the input radial files via RanamNN.dat, call with
$ run rad2uv


Comments to: gurgel@ifm.uni-hamburg.de (Klaus-Werner Gurgel)