RD_TO_DF - DF FILE CREATION
Under CDIP's new processing structure, rd_to_df is the program that
creates diskfarm files from the raw data (rd) files. It handles
both smart station and sun data, whether from directional buoys
or any other type of sensor.
A. Program flow
For all stations and files, rd_to_df performs the following steps:
1 -> read in the rd header and data;
2 -> format the data;
3 -> create per-channel df files using an archive-generated header
and the formatted data; and
4 -> update the index file
Because the format of directional buoy data is different than all
other data types, the details of buoy and non-buoy processing differ.
For buoys, rd_to_df checks the syncs and counters and fills in missing
data where necessary. For non-buoy stations, it checks syncs and time tags,
strips them out of the data, splits the channels if necessary, and
then calibrates the data.
The program can be run in two modes - the default mode and 'field' mode.
Field mode is used by shore stations to process data for the local real
The subroutines in rd_to_df are associated either with buoy data or
non-buoy data. Their functions are described below:
edit_dw_vecs.f - checks for breaks in data; marks missing data
get_dw_sync.f - finds datawell sync words
bad_dw_df.f - flags bad data in a file
read_tagged_data.f - checks the syncs and time-tags in a file
clean_channels.f - removes the syncs and time-tags from the
get_sync.f - finds a smart station time tag
split_channels.f - splits the channels in radio modem data
calibrate.f - calibrates any type of data