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

WERA HF Radar Software - .SORT Data to Gridded Spectra with RFI reduction

wera16_grid_rfi

Call: wera16_grid_rfi <path_to_.sort_file> <path_to_.spec_file> [params*.cfg]

A third 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 third parameter is supplied, the configuration is read from ~/etc/params.cfg .

As of V3.1.0 (June 2009), this program checks the signal received from the direct path to compensate for Chirp Start variations.

As of V2.0.0 (December 2007), this program calculates the range and azimuth from the WERA site to the grid points given in WGS84 coordinates. This affects the calculation of the beam forming angle and the range cell(s) involved to compute the spectrum at a grid point.

wera16_grid_rfi reads all information needed on number of channels, length of timeseries, etc. from the header (first 512 bytes of the .sort file) and the following values from PARAM_UV*.CFG (VMS) / params*.cfg (Linux):

Values in params.cfg:

        SPEC2           = .TRUE.        ! .true. = write compressed .SPEC files

C-------------------------------------------------------------------------------
C       Enable / disable RFI processing
C-------------------------------------------------------------------------------

        RFI_ENA         = .TRUE.        ! .true. = enable processing of .RFI files

C       Name and size (NX, NY) of Grid File
C
        NX              = 100
        NY              = 140
        GRID_NAME       = '/home/wera/etc/Oahu_grid_100_140.asc'

C       Name of WERA Gain File
C
        GAIN_NAME       = '/home/wera/etc/wera_gain.dat'

        !The following 7 parameters allow simultaneous use of a linear and
        !a square array within the same WERA system. They provide a mapping
        !of receiver channels to antenna numbers. A value of '0' indicates that
        !this antenna configuration does not exist in the actual WERA system.
        !
        ARR1_001        =  1            !First antenna# in linear array
        ARR2_001        = 16            !Last antenna# in linear array
        ARRD_001        = 9.35          !Distance between elements [meters]
	STEER_001       = 60            !+/- max steering angle [degrees]
        SQA1_001        =  0            !Antenna 1 of square array
        SQA2_001        =  0            !Antenna 2 of square array
        SQA3_001        =  0            !Antenna 3 of square array
        SQA4_001        =  0            !Antenna 4 of square array

                                        !Name of file for FullCalibration
        FCAL_001        = '/home/wera/etc/Koolina.fullcal'
                                        !Name of file for linear array spacing
        DIST_001        = '/home/wera/etc/antdist_Koolina.asc'
                                        !Name of file for antenna locations [LAT,LON]
        APOS_001        = '/home/wera/etc/antpos_Koolina.asc'
  

The .SPEC files are also used by Lucy Wyatt's wave algorithm. These binary files can be transfered between platforms, e.g. Linux <--> VMS by FTP in binary mode without breaking the file structrure.

Program expects  'FMSOCO'  header code
and writes       'FMSPEC' or 'FMSPC2' header code.
Look here for a complete list of header codes.

wera16_grid_rfi also adds information on the measurement grid and the name of the grid file used during processing to the header (.SPEC) or (.SPEC2):

NX=100 NY=140         --> Size of grid
NTL=  13              --> Number of FracSeries used
NFTL= 512             --> Number of lines in the spectrum
Oahu_grid_100_140.asc --> Name of grid-file used
NCOV       nnnn       --> Number of covered grid points (.SPEC2 format)
LAT=  21.866659       --> LAT(1,1), upper left corner of the grid
LON=-159.049942       --> LON(1,1), upper left corner of the grid
DGT=   1.000000       --> Grid spacing in [km]

The following box shows a typical output generated by wera16_grid_rfi :

wera@ifmpc205:~/Fortran> wera16_grid_rfi ~/data/surlitop/bre/sort/2005/246/20052460600_bre.SORT ~/data/surlitop/bre/spec/2005/246/20052460536_bre.SPEC param_uv_brest.cfg
 WERA16_Grid_rfi V2.0.0 Linux:
 *** Reading configuration from /home/wera/etc/param_uv_brest.cfg
 *** The time is  13-DEC-2007  14:39:33
 *** Now processing ~/data/surlitop/bre/sort/2005/246/20052460600_bre.SORT
 nant_sort  =       16 antennas
 Frequency  = 12.2749996 MHz
 NSER       =     2048 Samples
 T_chirp    = 0.260000 s
 F_bragg    = 0.357445 Hz
 Last RC    =      114 range cells
 RANGEresol =   1.5000 km
 RAN_OFF    =   0.5000 RC
 RAN_OFF    =      750 m
 TRUE_NORTH =       20 degrees
 MT         =     1536 samples
 SSR        =  0.000000000000 seconds
 *** Reading antenna locations from /home/wera/etc/antpos_Brezellec.asc
 W16grid_rfi: 2048 SAMPLES  03-SEP-05 06:00 UTC  Brezellec   FMSOCO FREQUENZ  12.275MHZ
 *** Reading FullCalib : /home/wera/etc/Brezellec.fullcal
 *** Reading grid coordinates ....: /home/wera/etc/Brest_grid_68_80.asc
 *** Calculating distance and angle from the radar site to grid points in WGS84 coordinates.
 *** Calculating complex window function for beam forming.
 *** Processing with RFI information.
 *** Calculating S/N of each antenna.
 *** Normalizing antenna gains.
 *** Calculating spectra
 *** Detecting interference and ships, forming beams to grid points.
 0%... 7%...15%...23%...30%...38%...46%...53%...61%...69%...76%...84%...92%...100%
 *** Result in ~/data/surlitop/bre/spec/2005/246/20052460536_bre.SPEC
 *** The time is  13-DEC-2007  14:31:30
 *** Elapsed time = 489.340 seconds.

Here are the data formats of the input (.SORT) and output (.SPEC) files.

Compilation from source:
Linux:

Source is in wera16_grid_rfi.F
Compilation and linking with './do_wera16_grid_rfi.sh'

Call with
> wera16_grid_rfi <path_to_.sort_file> <path_to_.spec_file> [params*.cfg]
e.g.
> wera16_grid_rfi /directory/20003341355_TOR.SORT /directory/20003341355_TOR.SPEC params_Gijon.cfg

You should use the same time code in the .SORT and .SPEC filenames.

VMS:

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

Program needs to be defined as an external command to take parameters
from the command line, e.g.
$ WERA16_GRID_RFI :== $$USER1:[WERA.Fortran]WERA16_GRID_RFI.EXE

Call with
$ wera16_grid_rfi <path_to_.sort_file> <path_to_.spec_file> Param_uv*.cfg
$ WERA16_GRID_RFI -
         $USER1:[WERA.Fortran]20003341355_TOR.SORT -
         $USER1:[WERA.Fortran]20003341355_TOR.SPEC -
         Param_uv_Gijon.cfg


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