ULYSSES In Space

 

Sun Banner
ULYSSES

Ulysses HISCALE Data Analysis Handbook

 

Appendix 5. Running the LAN Production

 

5.7 STATMRG

 

Document revision 8/20/85

 

A5.7.1 Overview

 

General: The program SYNCHK checks the synoptic database, creating both a directory of the database as well as a status listing to the user. It should be run every time a synoptic file is either created or deleted, which includes every time the ARCGEN program is run.

 

SYNCHK reads a directory listing of synoptic filenames, opening and reading each one to determine start and end times for each file. These start and end times are then modified to remove any overlapping sections (see below). SYNCHK then writes this 'directory' out to a new file which is used by synoptic database reading routines.

 

SYNCHK handles overlapped sections of data by determining the number of records in the overlap period in each file. The file having the most data for the period is marked as having the data. The start or end time of the other file is modified to 'remove' the overlap section from the file's 'directory' file entry.

 

SYNCHK prints out a status listing of the synoptic data base. This lists the number of files on the disk, the total amount of storage used by these files, and the start to end coverage of the synoptic database.

 

To run SYNCHK, create a list of synoptic data files called SYNLIST and then type SYNCHK; e.g.

 

% dir SYN*.DAT >SYNLIST
% synchk

 

Synoptic Data Base Checker v6-26-85
There are 3 synoptic data files.
They total 2.21 Kbytes of storage.
The data base starts 1984/326 19:47:33 and ends 1984/327 2:32:37

 

% del SYNLIST

 

(Note 'dir' is aliased to 'ls -s' and 'del' is aliased to 'rm' in the '.login' file for account ispm.)

Programming Level

 

Files needed to create SYNCHK are as follows:

 

synchk.f SYNCHK main program
synfns.f Synoptic database utility routines
synblk.inc Synoptic record definition
Makefile input file to UNIX 'make' utility to produce ARCGEN production programs

 

Files needed to run SYNCHK are

 

SYNLIST A directory listing of all SYNoptic data

 

Files created:

 

TIMESYN.DAT A time directory of the synoptic files

 

Routines in synchk.f:

 

1. Program synchk

 

The main program section for SYNCHK does the following:

a) reads in the entire list of synoptic data files;
b) for each file, gets the start/end/nrec information;
c) for each file, checks neighboring files for overlap times;
d) writes the TIMESYN.DAT file summary of the start/end times;
e) displays current data base statistics to the user.

 

2. subroutine synse( name, start, end, nrecs )

 

This subroutine is used to determine the start and end times of a file 'name', as well as how many records are in the file.

 

3. subroutine modse( index, name, start, end, nrecs )

 

This routine is called when there is a time overlap between two adjacent files whose names are name(index) and name(index+1). Using the start, end and nrecs arrays, modse determines which file has the most information in the overlap period. It then modifies the other file start/end parameters to effectively 'remove' that information from the one file. (This is the information which 'getsyn' uses to determine what file to read for what time period.)

 

Routines in synfns.f:

 

1. subroutine namsyn( itime, filnam )

 

This routine is used to create the name for a synoptic data file given the year,month,day, etc., information contained in itime. Filnam is returned as a character*16 value.

 

2. integer function opnsyn( unit, itime )

 

Opnsyn opens the synoptic database on a specified unit to a given time. It opens a file which has data on or after itime and returns the record number within that particular synoptic data file. If opnsyn has any problems, such as not being able to find such a time in the synoptic data, it will return 0.

 

3. integer function srcsyn( unit, time )

 

Srcsyn is a search function which searches a file on logical unit 'unit' for a time greater or equal to 'time'. Note: 'time' is in seconds since 1950 (use sec1950(itime)). It returns 0 if no data exists, else it returns the record number within the file for the data.

 

4. integer function getsyn( unit, irec )

 

Getsyn reads a record from the logical unit into the synoptic data common. Irec is an input parameter which, if nonzero, dictates the record number of the file to read. If zero, the next record is read in sequential style. Note: in the sequential mode, if the current file runs out of data, the next file in the synoptic data base is automatically opened.

 

Thus, using a combination of opnsyn and getsyn (with irec=0), one can read the entire synoptic database.

 

5. subroutine prtsyn

 

Prtsyn prints out the data in a synoptic data record to the standard output logical unit using data in the synoptic data common.

 

 

Next: LAN Pulse Height Archive Block Updates

 

Return to Appendix 5 Table of Contents Page

Return to HISCALE List of Appendices

Return to Ulysses HISCALE Data Analysis Handbook Table of Contents

 


Updated 8/8/19, Cameron Crane

QUICK FACTS

Manufacturer: ESA provided the Ulysses spacecraft, NASA provided the power supply, and various others provided its instruments.

Mission End Date: June 30, 2009

Destination: The inner heliosphere of the sun away from the ecliptic plane

Orbit:  Elliptical orbit transversing the polar regions of the sun outside of the ecliptic plane