loadchil
loadchil is a `mex' file that reads Chilbolton data
directly into matlab. A mex file
is basically compiled C code that can be dynamically linked in to the
matlab process when the function it provides is called from within
matlab. This gives it a distinct speed advantage over a program
written in the interpreted matlab language. The processing options are shared with
chil2a,
chil2nc and
loadchil.
Additional options are given below. To run you will need the mex file
to be in your matlab path. The compiled mex file has the name
loadchil.mex*, where the `*' is a suffix denoting
the operating system, such as sol for Solaris or
glx for Linux (glibc 2.x). Within matlab the function can be
called either in its functional form, e.g.
loadchil('6134new.dat', '4', '-coords', 'Zcal', '5');
or in its command-line form, e.g.
loadchil 6134new.dat 4 -coords -Zcal 5;
Arrays read into matlab
The radar parameters that can be read in are
- Zh
- Radar reflectivity (in dBZ) using horizontal polarisation.
- Zdr
- Differential reflectivity (in dB).
- Ldr
- Linear depolarisation ratio (in dB).
- phi_dp
- Differential phase shift (degrees).
- v
- Radial velocity (in m/s) measured at horizontal polarisation, where
positive indicates towards the radar.
- v1, v2
- CAMRa measures two velocities: v1 is the velocity
measured using only horizontally-polarised pulses, and v2 is
that measured using both horizontally- and vertically-polarised
pulses. Both are in m/s. The folding velocity of v2 is twice
that of v1.
- width
- Doppler spectral width (in m/s).
- sigma_v
- Standard deviation of the raw (usually 64-pulse) mean velocities (in
m/s). This parameter is calculated from v in cloud data when some
averaging is applied.
- x
- Distance of each pixel east of Chilbolton, in km. Only set for
scanning data when the -coords option is selected.
- y
- Distance of each pixel north of Chilbolton, in km. Only set for
scanning data when the -coords option is selected.
- z
- Distance of each pixel above the height of Chilbolton, in km. This
takes no account of the curvature of the earth. Only set for scanning
data when the -coords option is selected.
- r
- Distance of each pixel from Chilbolton along the ground. Only set
for scanning data when the -coords option is selected.
Vectors read into matlab
- range
- The range to the centre of each gate in kilometres.
- elev
- The elevation angle of each ray in degrees.
- azim
- The azimuth angle of each ray in degrees clockwise from due
west.
- utc
- The time of each ray in decimal hours UTC.
- full_date
- The date of each ray in the form YYYYMMDD.
- nez
- The noise-equivalent reflectivity at 1 km (in dBZ) for each ray. This
parameter is only calculated if the -process or -oscillator options
are selected. If the data is calibrated using the -Zcal option then
this parameter is calibrated also.
Scalars read into matlab
Note that the writing of many of these scalars can be suppressed by
employing the -basicsonly option.
- latitude, longitude, altitude
- The longitude (degrees N), latitude (degrees E) and altitude (m)
of the radar site. Currently this is correct only for the Chilbolton
site.
- file, raster, scan
- The file (tape), raster and scan numbers of the last raster.
- system, freq
- The system ID (0=unknown, 1=CAMRa, 2=Rabelais, 3=Galileo,
4=Singapore) and frequency (GHz) of the radar that took the data.
- start_sec, start_min, start_hour, day, month, year
- The second, minute, hour, day, month and year of the start of the
last raster that was loaded. These are present only because they were
produced by the previous program used to load scanning data.
- sweepm
- The sweep mode in `universal radar format' (0=calibration scan,
1=PPI, 2=coplane, 3=RHI, 4=vertical, 5=dwell, 6=manual, 7=idle).
- drange
- Range gate spacing in kilometres.
- min_gate, max_gate
- The minimum and maximum gates in clock units (only useful if you want
to perform your own range correction).
- range_offset
- The range offset that has been applied to the data, in kilometres.
Additional options
- -basicsonly
- Suppress the non-essential scalars that tend to clutter up the
matlab workspace (day, month, year, file, raster, scan, latitude,
longitude, altitude, start_hour, start_min, start_sec, min_gate,
max_gate).
- -coords
- Output extra coordinate matrices x, y,
z and r. These enable the data to be plotted
easily, e.g. for an PPI:
pcolor(x,y,Zh); shading flat
Or an RHI:
pcolor(r,z,Zh); shading flat
- -earthcoords
- As -coords, but taking account of the curvature of
the earth in the calculation of z.