Rocket I
S
D
A
T

Page maintained by
Reine Gill

Howto setup and run a Viking Isdat dbh

This document will explain for you how to install a Viking Isdat dbh and how to process the viking raw data to a fashion that isdat likes.

Hardware

There is one special hardware (or operating) requirement. The program to load the Viking data files (loadVikCD) can only be built on the Solaris platform where it once was developed. I have not tried on a Solaris86 system, If anyone tries, please report. The Isdat Viking dbh works on several platforms like FreeBSD86, Linux86, SolarisSparc ... once the data files are in place.

Getting isdat up

The way to retrieve the necessary software is through cvs, Viking is a old satellite project and the source code is freely available. Follow the instructions in the cvs howto to download the code.

Build instructions can be found in the build howto. After a successful build the server needs to be configured. Edit $ISDAT_HOME/config/isdat.server file and change the row *.viking.data to suite your configuration.

Data files

Isdat can read data from the V2, V4L and V4H experiments. To retrieve the necessary data files contact the respective instrument team, Viking experiments. Once you have the data, proceed. In the case of V2, V4* you will have files named like vik401. and perhaps vik402. (but se below), 40 is the orbit number and some orbits are split into two files hence the 1 and sometimes also a 2 file. These files contains all data and needs to be processed for Isdat to read them. this is done using a program in the Isdat suite called loadVikCD. There are some things to think of when using this program. Run it from a Solaris environment. Data files will end up in the *.viking.data directory from isdat.server. There are two modes, an older and not working graphical interface as well as a newer simple command line interface. To use the command line interface simply add the --noX option. Add the names of the files you want to unpack to the command line. If any data file happens to already exist a question will pop up asking you if you want to append to the file or overwrite, If the orbit is split and the first datafile already is loaded the answer is yes, otherwise no. Use the option --append to skip the question.
All this opens up for a new trap. First make shure the data directory is clean of the orbits you now want to load or they might get appended. If you add a splitted orbit make shure you do it in one loadVikCD run, for example:

loadVikCD --noX --append vik401. vik402.

Will produce correct data and index-files, while running:

loadVikCD --noX --append vik401.
loadVikCD --noX --append vik402.


Will give a correct datafile but a corrupted index file.

Yet another trap is that the file naming convention is not 100% clean. The data files on the CDs can be named as vik4611. or VIK4611. and also VIK4611 (without dot). In the later case loadVikCD has an special option to use, --noDot. Use as:

loadVikCD --noX --append --noDot VIK401 VIK402

Some data files are not readable with loadVikCD, it then gives the error:

err in read on raw, error: 4

and exits, no orbit*.d and orbit*.i files are then created.

Trap!!!, some data files are duplicated on the CDroms so that the same file exists on several CDs, if you then read directly from the CDs you will get double appended .d and .i files.

When all data is in place you will have files named orbit*.d and orbit*.i in the viking data directory. Some of these might be empty.

Test the installation

A simple test is to just start a dbh from the command line:

dbh :10 &

use iscmd to query the database:

iscmd q unix:10
Viking
Test

If the test looks like above, the dbh is linked propperly with the Viking server module. Now check that it finds the data files with:

iscmd c unix:10/Viking/*/V4L
1986-02-28 10:07:30.061495929 6602.719058033
1986-02-28 14:22:34.455670405 5188.814976952
1986-02-28 18:52:31.802422291 3452.709965874
1986-02-28 22:59:42.645229912 4374.12625114
1986-03-01 03:30:29.792125542 6873.919840825
1986-03-01 05:25:03.711966367 0.0
1986-03-01 12:40:23.887359424 938.702709463
1986-03-01 17:15:04.884930038 1800.305196385
1986-03-01 17:45:05.190126423 0.0
1986-03-02 01:15:36.768150145 5408.415610806
1986-03-02 05:53:29.016272783 6648.919191385
1986-03-02 10:53:51.418292494 4273.212334165
1986-03-02 14:25:21.304920477 4783.363806662

If you get something like abowe, the files are found and you can start poking for data, the command to retrive 200 seconds of magnetic filed from 1986-02-28 18:52:31 is:

iscmd d unix:10/Viking/*/V2/B 1986-02-28 18:52:31 200

You might need to try several times and durations before finding data, when you get data from iscmd you know the dbh engine is set up propperly.

Also Notice that there is a warning displayed when reading orbit 1283:

WARNING this is orbit number 1283
on this orbit the satellite time word goes
from the value FFFFFFFF to 0 (hex).
Therefore the computed UT times may be wrong
Sorry......................Gunnar

Conclution

To read in a lot of Viking orbits int Isdat is not just a simple command line operation. You must be careful and observant. Files can easely be wtitten to twice and then corrupt, split files can be a trap and whatch out if you need to use the --noDot option.