con2db control_file
This utility reads data from a generalized contour data file and loads it into a CODAS database. The database is defined in the producer definition file con2db.def. The input file has the following columns:
This is not exactly the same contour format as the one generated by adcpsect. However, full description of profile time and positions is required for creating a database to be used efficiently. In order to generate such a file from a contour file generated by adcpsect and, for example the position file generated by getnav, use the Perl script
The lines must be sorted along increasing time values, then longitude and latitude values in order for con2db to work properly. This is necessary in order to detect automatically profile changes.
Data are read from the input file as float and converted according to the variable type specified in the producer definition file. Variables into which data should be loaded are specified by their name, as it appears in the producer definition file. Element of structures are not implemented. For example, bin depth is DEPTH, eastward and northward velocities are U and V, error velocity is ERROR_VEL and so on. See also
varnames(5) for more information.
In order to be used by other utilities, the profile flags and access variable structure are filled with default values. These are:
where n_var is the number of profile data which is
expected to be the number of bins.
where X is a number from 1 to 4.
The number of bins is determined as the number of different block data through the whole file. Each specified block variable is parsed and the maximal number of different values is kept. Hence, different blocks must be loaded by successive run of con2db. However, data in columns specified as block variables need not to be sorted. Profiles with less data than the largest one are filled with bad values.
The following parameters must be specified in the control file:
Year base used to determine the time in decimal days found in
the first column of the input file.
Name of database in which data from the contour file should be
loaded.
Name (with path) to the producer definition file for
con2db CODAS database.
Name (with path) of input file containing contour data to be loaded.
In addition, the following options allow to control the behaviour of con2db:
This key word can be used to improve the clarity of the control
file and specify the beginning of options. It has no effect.
This option lists which profile variables to load and from which columns they are to be read. It must be terminated with the keyword end:
This option lists which block variables to load and from which columns they are to be read. It must be terminated with the keyword end:
This option specifies an information text to be loaded as the block comment. This is quite useful since databases generated this way are not complete. Hence, it is a good idea to specify where data come from. New lines are preserved, however leading and trailing spaces are removed. The text must be terminated by the keyword end on a line by itself:
This keyword is mandatory and terminates the list of selected options.
The specified CODAS database files.
Pierre Jaccard, Geophysical Institute, University of Bergen, 1999