/* @(#) File name: fire_sdf.h Release: 1.1 Date: 7/29/94, 09:36:07 */ #ifndef fire_sdf_INCLUDED #define fire_sdf_INCLUDED /**************************************************************************** INCLUDE FILE PROLOG PURPOSE/DESCRIPTION: This INCLUDE file contains the definitions for the fields positions, keywords specified in the "FIRE-standard-format", and the data structures for manipulating FIRE CI1 & CI3 data tapes. *****************************************************************************/ /**** The following constants define the vtoc file positions. ****/ #define BEG_GMT 22 #define END_GMT 37 #define BEG_LATLON 52 #define AUX_FLDS 81 #define RECSIZE 80 /* Header file logical rec. size */ #define TOCSIZE 160 /* VTOC file logical rec. size */ /**** The following 2 constants reference the starting position in the VTOC file and the header records of the ancillary file and the observation data file. ************************/ #define DATEGMT_FLDS 21 /* Date and gmt fields */ #define LATLON_FLDS 51 /* Latitude & longitude fields */ /**** The following constant references the starting position in the standard tape header file. However, SRB data tapes have changed to include the prefix field. The SRB data tapes size field should start at the 60th position. *********************************/ #define HD_SIZ_FLDS 67 /* Start position of logical & physical rec. size fields */ /**************************************************************************** The following keywords are used to identify the DDR section in the header file, and observation data file and the ancillary file. *****************************************************************************/ #define KEY_DDR "RECORD NAME: " /* Keyword signals DDR begins. */ #define END_GENERAL "END OF GENERAL SEGMENT" #define END_ANCILLARY "END OF ANCILLARY SEGMENT" #define END_OBSERVE "END OF OBSERVATION SEGMENT" /** The constant END_VAR signals variable record is over. It should be ** "INSTRUMENT DESCRIPTION:", but the data set ci1_tovs_861013_1102 ** (tape p9963) header file misspell the word DESCRIPTION (that's why ** the half completed keyword definition). ****/ #define END_VR "INSTRUMENT DESCRI" typedef struct ddr_var { char mnemonic[9]; /* 8-character mnemonic for field name */ int size; /* size of integer */ char disp_form[9]; /* C output format string, translated from Fortran display format. */ unsigned int N; /* Scaling constant N */ unsigned int b; /* Constant b=7,15,31 for 1,2,4-byte floating point value, or, b=0 for integers.*/ int A; /* Scaling constant A */ float min; /* Miminum allowable value */ float max; /* Maximum allowable value */ } ddr_var; #define NULL_VAL 0x7FFF typedef struct header { int nvars; /* # of data variables in this DDR record */ int npfx; /* Size of prefix area, for SRB data only */ int lrsiz; /* Logical record size */ int blksiz; /* Physical record (block) size */ char rec_name[12]; /* Ancillary or observation record name */ ddr_var *vd_ptr; /* Pointer to list of Variable descriptor(s) */ } header; /*** The following constants are the VTOC field positions. ***/ #define FSEQ_NUM 4 #define REC_NUM 6 typedef struct vtoc_data { int fnum; /* File sequence number, chars. 1-4 */ int rnum; /* Data record # within a file, chars. 6-11 */ char fname[9]; /* File name, chars. 13-20 */ char i_date_gmt[15]; /* Earliest observation date and gmt in file */ char o_date_gmt[15]; /* Latest observation date and gmt in file */ float nlat_max; /* Northern most lat. covered by data in file */ float slat_max; /* Southern most lat. covered by data in file */ float wlon_max; /* Western most long. covered by data in file */ float elon_max; /* Eastern most long. covered by data in file */ char aux_file[81]; /* Free to be defined by each data */ } vtoc_data; /** Since FIRE CI1 and FIRE-MS SDF formatted files have a lot of ** discrepancies in following the Standard Data Format, exceptions ** have to be made for some SDF data sets prcessing. That's the ** reason for the following structure, so that main routine can be ** told to do special processing as needed, but keep in one executable. **/ struct header_id { char *fire_id; char *producer; } static sdf_list [] = { {"FIRE.CIIFO.CSU .000001.0.19861013.19861102", "Paul F. Hein"}, {"FIRE.CIIFO.ARC .000001.0.19861013.19861102", "FRANCISCO P. J. VALERO"}, {"FIRE.CIIFO.GSFC.000001.0.19861013.19861103", "Dr. David O'C. Starr"}, {"FIRE.CIIFO.UWIS.000001.0.19861102.19861102", "DON WYLIE"}, {"FIRE.CIIFO.GSFC.000001.0.19861013.19861102", "DENNIS HLAVKA/JIM SPINHIRNE"}, {"FIRE.MSIFO.CSU .000001.0.19870707.19870714", "Paul F. Hein"}, {"FIRE.MSIFO.CSU .000001.0.19870630.19870719", "PAUL E. CIESIELSKI"}, {"FIRE.MSIFO.PSUS.000002.0.19870701.19870719", "MR. WILLIAM J. SYRETT"}, {"FIRE.CIIFO.GSFC.000001.0.19870708.19870718", "DENNIS HLAVKA/JIM SPINHIRNE"}, {"FIRE.MSIFO.CSU .000001.1.19870630.19870719", "Paul F. Hein"}, {"FIRE.MSIFO.UKMO.000002.0.19870707.19870713", "DR S NICHOLLS"}, {"FIRE.MSIFO.UKMO.000002.0.19870714.19870718", "DR S NICHOLLS"}, {"FIRE.MSIFO.UKMO.000001.0.19850729.19850729", "DR S NICHOLLS"} } ; #ifdef SRB #define SIZ_FLDS 60 /* Sizes of prefix, logical record, and block areas, SRB modified fld */ #define KEYWORD_AUX "AUXFIL=" /* Keyword for the ancillary file. */ #define AUXNAME "((NONE))" /* Indicate an ancillary file, SRB specific. */ #define DATA_VAR "RECORD-DATA-AREA" #define VAR_BEGIN "BEGIN" #define END_VAR "DATA-DESCRIPTION-RECORD-SUBSECTION" /**** PREFIX area, which is the same in both ancillary and observation data **** record. ****/ typedef struct prefix { int fnum; /* File sequence number */ int rnum; /* Data record # within a file */ int cksm; /* Checksum */ int rsiz; /* Logical record size */ int nrec; /* Number of logical record per physical rec. */ int pfx; /* Reserved prefix data */ } prefix; #endif /* SRB */ #endif /* fire_sdf_INCLUDED */