File format for RAL cloud radar data

The files contain altitude profiles (typically from 0 - 16 km) of the (Rayleigh scattered) radar return signal power. These have neither been range corrected nor converted into cloud products. Data are typically recorded at intervals of 30 m in altitude and 30 s in time.
Click here to find out about the contents of other files.

Data availability:
Data are available from April 2005 until June 2006. There are a number of gaps in the dataset Refer to Instrument performance weblog.

File naming convention:

YYYY is a 4-digit year
MM is a zero-padded 2-digit month [01 - 12]
DD is a zero-padded 2-digit day [01 - 31]
FN is the zero-padded two-digit file number [01 -> ]. There is typically only a single file per day, but a new file is created every time the radar is stopped. As described below, all files for a single day can be concatenated for easy reading.

i.e. 20050414-01.crd is the first file for 14th April 2005 (there are 3 files for this day).
Click here for the background to the file naming convention for other data sets.

File location: /badc/mst/data/ral-cloud-radar/original-file-format/
Click here for the location of other files.

Archiving convention: YYYY/MM
Click here for a further explanation.

Data availability
Data are available from 14th April 2005 onwards. However, because the instrument was not designed with an active cooling system, it must be switched off during hot weather to prevent overheating. Data are not therefore available on a continuous basis. The instrument is likely to remain at the MST radar site until at least September 2005.

File format
Although there are long-term plans to rewrite the data in standard-format files, at present they are only available in the original (non-standard format) files, which are nevertheless easy to read. Users should note that the data were acquired on an AppleMac, which uses a different end-of-line character to that used for Linux/Unix and Windows systems. Although this should not present a problem for reading the data into a program, some text editors will show the file contents on a single line.
Click here for more details on how to overcome this problem.

Each file contains 3 header lines beginning with a "#". These do not contain any information required for reading the data and so can simply be ignored. The spacings of the header lines for file 20050414-01.crd, shown below, have been modified for ease of viewing, and the third line has been shown split across two lines:

#RCR - RAL Cloud Radar Data File, Version 4, (log scan data)
#Location: MST Radar Site, Capel Dewi
#Date   Time   Range (km)   Averaging   Sky Temp. (K)   Temp. Mon.
   Status   <512 tab-separated Scan Data Points>
Each subsequent line then contains a single profile of radar return signal powers together with the relevant observation parameters, all tab-separated ("\t"). The beginning of the first data line for file 20050414-01.crd is shown in green, with descriptors (which do not appear in the file) shown in red:
14/4/05   16:15:15   8   1200   -11962.1    -261.7   1   -98.19    -97.79 . . .
 D/M/YY   hh:mm:ss   MR  NAV     SKY         INT     ST   P1        P2
D/M/YY gives the UTC day [1 - 31], month [1 - 12], and 2-digit zero-padded year [00 - 99] of the profile. The day and month are not zero padded

hh:mm:ss gives the UTC 2-digit zero-padded hour [00 - 23], minute [00 - 59] and second [00 - 59] of the profile.

MR gives the maximum range (km) from the radar [8, 16 or 32] for data recorded in this profile. There are always 512 data points in a profile, so the range (km) from the radar for a given data point number, point_nr [1 - 512], is given by
point_nr/512 * MR
Since the radar is located at 50 m above mean sea level, 0.05 km must be added to the range values to give altitude. Care should taken since not all profiles within a given file necessarily share the same value of MR. When the radar shuts down unexpectedly, its default mode on reboot is to interlace 16 and 32 km observations.

NAV gives the number of chirps averaged together to give this profile.

SKY gives the sky temperature measured by the receiver when the transmitter is off. However, it should be ignored as it is completely uncalibrated.

INT gives the internal temperature. However, the monitor is not working at the moment.

ST gives the instrument status. This number can be ignored.

P1, P2 . . . P512 give the 512 range-sampled radar return signal powers (dB). Note that:
P_dB = 10 × log10[P_linear]
The powers have not been range-corrected although they have been scaled according to some instrument parameters, such as output power, receiver sensitivity and antenna gain.
Where more than one file exists for a day, the files can be simply concatenated and then read with a routine of the form:
while not EOF
  read line
  if line does not start with a "#"
    extract observation parameters and power profile from line
The data volume of these files is rather large. Although this is not a problem for profiles separated at 30 s intervals, when the radar shuts down unexpectedly, its default mode on reboot is to record profiles at 10 s intervals. If this causes memory problems for a file reading routine, the simplest solution is to only store data from every third profile.

End-Of-Line Character Issues
The end-of-line character is a carriage return ("\r" or decimal 13) on an AppleMac, a line feed ("\n" or decimal 10) on Linux/Unix, but a carriage return plus a line feed on Windows. A file reading program shouldn't have a problem with this issue and even some text editors, such as Emacs, are able to recognise that the file is of Mac origin and to display it appropriately. However, other text editors, such as vi, effectively display the file as one continuous line.

The following BASH script will automatically create new files with the appropriate EOL character on a Linux/Unix system. The new files have the extension "crdu" and the original files are left untouched.
# Shell script to convert AppleMac EOL characters to Linux/Unix EOL
# characters for RAL cloud radar data files. It leaves the original
# files, with extensions "crd", as they are and creates new files
# with extensions "crdu".
# Intructions for use:
# 1) Cut and paste this script to file, e.g. "convert.bash", in
#    the directory where the original files are found
# 2) Make the script executable, e.g. with the command: 
#      chmod 750 convert.bash
# 3) Run the script with the command: 
#      ./convert.bash
for orig_name in *.crd
  echo Converting $orig_name to $new_name
  tr "\r" "\n" < $orig_name > $new_name

Internal Links:
Return to the top of the page
A description of the instrument
Gaining access to the data
File naming convention
Data archiving convention
Data locations
The contents of other data files