McIDAS Programmer's Manual

Chapter 6 - Format of the Data Files

This chapter describes the formats of the data files developed for applications running under McIDAS-X. The data files are presented alphabetically with the following information:

This chapter describes these file formats:

File

Description

AREAnnnn

Area (image) files

DC*

MD schema definition files

*.ET

Enhancement save files

FRAMED

Panel configuration file

FRAMENH.001

Frame enhancement table

FRAMEn.p

Image frame files

GMSCAL

GMS calibration file

GRIDnnnn

Grid files

*.GRX

Graphics save tables for McIDAS-X

HIRSCRPF

HIRS calibration reference parameters

HIRSTAUL

HIRS transmittance coefficients

MDXXnnnn

MD files

MSUSCRPF

MSU calibration reference parameters

OUTL*

Base map files

SATANNOT

Image annotation description file

SATBAND

Image annotation description file

SKEDFILE

Scheduled McIDAS commands

UC

McIDAS User Common

VASTBLS

VAS calibration tables

VIRTnnnn

Virtual graphics files

AREAnnnn

Area (image) files, where nnnn is a user-defined number.

In McIDAS-X, images are stored in binary files called areas. Each area file is a collection of information that defines the image and its associated ancillary data.

Area files are usually named AREAnnnn, where nnnn is a four-digit number between 0000 and 9999. This number is called the area file number. For example, AREA0013 is the name of the file containing area 13.

Areas do not have to follow this standard naming convention. The file masking option of DSSERVE may be used to access a data file of any name through the ADDE.

Area files consist of these six blocks:

Some blocks also contain satellite-specific information, which is located in the Image-specific characteristics section. For area file Application Program Interfaces (APIs), refer to the API functions list.

 

For more information about reading, writing and deleting image data, see the section titled Image data in Chapter 5, Accessing Data .

Directory block

The first 64 words of an area file contain the directory block for the image. The directory lists ancillary information about the image, such as the number of lines and data points per line, the satellite ID and the number of spectral bands. The data in the directory is stored as 32-bit (4-byte) twos- complement binary integers or as ASCII characters.

Each of the directory's 64 words is described below. Since some of the words are satellite specific, see the section titled Image-specific characteristics that follows. All byte offsets and pointers are zero-based. Note that all data shown as yyyddd are the year and day-of-year. The yyy values are the actual year modulo 1900.

Word

Description

1

relative position of the image object in the ADDE dataset

2

image type (currently=4)

3

SSEC sensor source number; see the Appendices

4

nominal year and Julian day of the image, yyyddd

5

nominal time of the image, hhmmss

6

upper-left image line coordinate

7

upper-left image element coordinate

8

reserved

9

number of lines in the image

10

number of data points per line

11

number of bytes per data point

12

line resolution

13

element resolution

14

number of spectral bands

15

length of the line prefix

16

SSEC project number used when creating the file

17

year and Julian day the file was created, yyyddd

18

file creation time, hhmmss

19

spectral band map, bands 1-32

20

spectral band map, bands 33-64

21 - 24

reserved for sensor-specific data

25 - 32

memo field; 32 ASCII characters

33

reserved

34

byte offset to the start of the data block

35

byte offset to the start of the navigation block

36

validity code

37 - 44

PDL (Program Data Load); used for pre-GOES-8 satellites

45

source of band 8; used for GOES AA processing

46

actual image start year and Julian day, yyyddd

47

actual image start time, hhmmss; in milliseconds for POES data

48

actual image start scan

49

length of the prefix documentation

50

length of the prefix calibration

51

length of the prefix band list

52

source type; satellite-specific (ASCII)

53

calibration type; satellite-specific (ASCII)

54 - 56

reserved

57

original source type

58

units

59

scaling

60

byte offset to the supplemental block

61

number of entries in the supplemental block

62

reserved

63

byte offset to the start of the calibration block

64

number of comment cards

 

 

For more information about image data, see the section titled Image data in Chapter 5, Accessing Data. For more information about coordinate systems, see the section titled Coordinate systems in Chapter 2, Learning the Basics .

Navigation block

The navigation (NAV) block contains the information for determining the location of data points in physical space. Word 35 of the directory block contains the byte offset to the start of the navigation block. If an image isn't navigated, word 35 is zero. The NAV block format varies with each satellite; see the section titled Image-specific characteristics that follows.

Calibration block

The calibration (CAL) block contains information for converting image data from its stored (internal) units to more meaningful units such as radiance or albedo. The presence of this block depends on the implementation of the satellite-specific calibration. Word 63 of the directory block contains the byte offset to the start of the calibration block. If there is no CAL block, word 63 is zero. The calibration block format varies with each satellite; see the section titled Image-specific characteristics that follows.

Supplemental (or auxiliary) block

The supplemental (or auxiliary) block contains additional information that is specific to a data type. For example, information specific to radar data is stored in this block. Also, the latitude/longitude grid for the LALO navigation is stored in this block. Word 60 of the directory block contains the byte offset to the start of the supplemental block. Word 61 contains the total number of entries in the supplemental block. If there is no supplemental block, words 60 and 61 are zero.

Data block

The data block contains the actual image data values. Any data point in an image or image sector can be located with image and file coordinates.

An area file may be produced from an image by sampling or averaging the data. In the case of multiband images, the file may include only a portion of the measured spectral bands, so that each element contains fewer data values than are contained in the original image. To map an area back to the original image, these two formulas are used:

Image Line = UpperLeftLine + (File Line * LineResolution)
Image Element = UpperLeftEle + (File Element * ElementResolution)

UpperLeftLine is the line coordinate of the first image line and UpperLeftEle is the element coordinate of the first image element. File Line and File Element are zero-based.

When LineResolution and ElementResolution are both 1, the image resolution is 1, or full resolution. If the image resolution is 4, every fourth line and element of an image originally at resolution 1 are included in the image. Each sensor has its own scan resolution, so an image resolution of one will mean different geographic resolutions from one satellite to another.

Each line is divided into two parts: the line prefix and the actual data values as shown below. The line prefix contains information about the image and the particular line.


 line prefix 1 line data 1 line prefix 2 line data 2 etc.
|_____________|___________|_____________|___________|___...
0 byte numbers increase >>

Although the size and content of the line prefix depend on the image source defined in word 52 of the directory block, each line in an image has the same prefix length. Word 15 of the directory block contains the length of the line prefix, in bytes. If no line prefix exists, word 15 is zero.

The line prefix may contain any region shown in the diagram below and described in the following table; the regions' lengths are multiples of four bytes.

 validity code   documentation   calibration   band list
|______________|_______________|_____________|___________|
0 byte numbers increase >>

Region

Description

validity code

Verifies the existence of the data portion of the image line. It is a constant value within each image and is stored in word 36 of the directory block. Comparing the value in the directory with the value of the validity code determines if data exists for an image line. If a line of data is missing, the corresponding place in the data file is either filled with zeros or flagged using non-matching validity codes.

documentation

Holds the documentation specific to each satellite. Word 49
of the directory block defines the length of the prefix documentation.

calibration

Holds the calibration coefficients for the data; needed when coefficients vary between image lines. Word 50 of the directory block defines the length of the prefix calibration.

band list

Contains an ordered list of the spectral bands comprising the data portion of the image line. Word 51 of the directory block defines the length of the prefix band list. Each band number is stored in a byte; thus, the range is 1 to 255.

Word 34 of the directory block contains the byte offset to the start of the data block. Each line in an image is the same length and a multiple of four bytes. To calculate the length of a line prefix, the line data, or the entire data block, use the formulas below.

line prefix length = doc + cal + band + 4 (if valcode is present)
line data length = nbands*nele*nbytes
line length = line prefix length + line data length
data block length = nlines * line length

The parameters used in these formulas are defined in the directory block and provided in the table below.

Parameter

Directory block word

Definition

valcode

36

length of the prefix validity code; if nonzero, the length is four bytes; otherwise it is zero

doc

49

length of the prefix documentation

cal

50

length of the prefix calibration

band

51

length of the prefix band list

nbands

14

number of bands per line

nele

10

number of data points per line

nbytes

11

number of bytes per band

nlines

9

number of lines in the image

Comment block

An area file may contain a comment (AUDIT) block containing a variety of textual information such as a list of commands run on the image object to date. Each comment record is 80 ASCII characters. Word 64 of the directory block contains the number of comment records, or cards.

TIP data

TIP (TIROS-N Information Processor) data is extracted from the AVHRR, GAC and LAC data described in the previous section. TIP data also contains information received from the MSU (Microwave Sounding Unit), the HIRS (High Resolution Infrared Sounder), and the SSU (Stratospheric Sounding Unit). These three sources measure incoming radiation in the infrared and microwave spectrum.

The navigation block for TIP data is filled with zeros; no calibration information is needed.

TIP directory block

Word

Value

Description

14

1

19

1

band map value

49

196

length of the line prefix documentation

50

0

length of the line prefix calibration

51

0

line prefix band list

52

TIRO

image source type; 4 bytes ASCII

53

RAW

calibration type; 4 bytes ASCII

TIP data block

TIP data is transmitted as 10 bits and stored as 16 bits. The 10-bit data is formatted as follows, with x representing a data bit and the rest being zero-filled after shifting: | 0 | x | x | x | x | x | x | x | x | x | x | 0 | 0 | 0 | 0 | 0 |

The line prefix for the data block contains the information below.

Region

Description

validity code

optional, but recommended to flag missing data, which requires zeros as placeholder data or a validity code that does not match the value in the area directory

documentation

196-byte DOC section from the signal transmission

calibration

0 bytes; not needed for TIP data

band list

0 bytes; not needed for TIP data

GMS

The following section describes the navigation and calibration for the visible and infrared channels of the Geostationary Meteorological Satellites, GMS-4 and GMS-5. GMS-4 has one channel of visible and one channel of infrared data. GMS-5 has two channels for visible and two channels for infrared data; only one channel of each is used. The remaining two channels are reserved for backup.

For a complete description of the line documentation fields, see NOAA Technical Memorandum NESS 107 , 1988. The band information for TIP data is provided in this manual in Appendix B, Image Information.

The tables referenced in this section are from the document Revision of GMS Stretched-VISSR Data Format , Japan Meteorological Agency, October 1993.

GMS navigation block

The following three tables list the words used in the GMS navigation block. These are 1-byte words. The first table lists all the words in the GMS navigation block and the following two tables list the words used in the attitude prediction data sub-blocks and the orbit prediction data sub-blocks.

The Type column in the tables below shows scaled integers in the format R*M.N. The R indicates real numbers, M is the number of bytes and N is the exponent.

The GMS data is also formatted using the navigation block format of GOES-7 data. The section GOES-7 AAA navigation block describes the GOES-7 navigation block.

Word

Type

Description

1-6

R*6.8

observation start time (MJD)

7-10

R*4.8

VIS channel stepping angle along line (rad)

11-14

R*4.8

IR channel stepping angle along line (rad)

15-18

R*4.10

VIS channel sampling angle along pixel (rad)

19-22

R*4.10

IR channel sampling angle along pixel (rad)

23-26

R*4.4

VIS channel center line number of VISSR frame

27-30

R*4.4

IR1 channel center line number of VISSR frame

31-34

R*4.4

VIS channel center pixel number of VISSR frame

35-38

R*4.4

IR1 channel center pixel number of VISSR frame

39-42

R*4.0

number of sensors of VIS channel

43-46

R*4.0

number of sensors of IR channel

47-50

R*4.0

VIS total line number of VISSR frame

51-54

R*4.0

IR total line number of VISSR frame

55-58

R*4.0

VIS pixel number of one line

59-62

R*4.0

IR pixel number of one line

63-66

R*4.10

VISSR misalignment angle around x-axis (rad)

67-70

R*4.10

VISSR misalignment angle around y-axis (rad)

71-74

R*4.10

VISSR misalignment angle around z-axis (rad)






75-78
79-82
83-86
87-90
91-94
95-98
99-102
103-106
107-110






R*4.7
R*4.10
R*4.10
R*4.10
R*4.7
R*4.10
R*4.10
R*4.10
R*4.7

These words are modified as a function of the horizon
points. See words 11-14 in Table A.1 in the document
Revision of GMS Stretched-VISSR Data Format

element of VISSR misalignment matrix
row 1 and column 1
row 2 and column 1
row 3 and column 1
row 1 and column 2
row 2 and column 2
row 3 and column 2
row 1 and column 3
row 2 and column 3
row 3 and column 3

111-114

R*4.4

IR2 channel center line of VISSR frame

115-118

R*4.4

IR3 channel center line number of VISSR frame

119-122

R*4.4

IR2 channel center pixel number of VISSR frame

123-126

R*4.4

IR3 channel center pixel number of VISSR frame

127-240

not used

241-246

R*6.8

daily mean of Satellite Spin Rate (rpm)

247-256

not used

257-617

attitude prediction data sub-blocks 1 through 10 (10 similar attitude prediction data sub-blocks are repeated). See the table below.

618-2352

orbit prediction data sub-blocks 1 through 8 (eight similar orbit prediction data sub-blocks are repeated); see the table below.

The table below describes an attitude data prediction sub-block. The GMS navigation block contains ten attitude data prediction sub-blocks that occupy words 257-617. Each block occupies 36 words.

Word

Type

Description

1-6

R*6.8

prediction time (UTC represented in MJD)

7-12

BCD*6

anno domini represented by BCD (YYMMDDHHmmSS: year, month, day, hour, minute, second)

13-18

R*6.8

angle between z-axis and satellite spin axis projected on yz-plane in mean of 1950.0 coordinates (rad)

19-24

R*6.11

angle between satellite spin axis and yz-plane in mean of 1950.0 coordinates (rad)

25-30

R*6.8

dihedral Angle between the Sun and the Earth measured clockwise seeing from North (rad)

31-36

R*6.8

spin Rate: spin speed of satellite (rpm)

The table describes the orbit prediction data sub-block. The GMS navigation block contains eight orbit prediction sub-blocks that occupy words 618-2352. Each block occupies 182 words.

Word

Type

Description

1-6

R*6.8

prediction time (UTC represented in MJD)

7-48

not used

49-54

R*6.6

x component of satellite position in Earth-fixed coordinates (m)

55-60

R*6.6

y component of satellite position in Earth-fixed coordinates (m)

61-66

not used

67-84

not used

85-90

R*6.8

Greenwich sidereal time in true of data coordinates (deg)

91-102

not used

103-108

R*6.8

right ascension from the satellite to the sun in the Earth-fixed coordinates (deg)

109-114

R*6.8

declination from the satellite to the sun in the Earth-fixed coordinates (deg)

115-128

not used

129-134
135-140
141-146
147-152
153-158
159-164
165-170
171-176
177-182

R*6.12
R*6.14
R*6.14
R*6.14
R*6.12
R*6.16
R*6.12
R*6.16
R*6.12

Element of nutation and precession matrix
row 1 and column 1
row 2 and column 1
row 3 and column 1
row 1 and column 2
row 2 and column 2
row 3 and column 2
row 1 and column 3
row 2 and column 3
row 3 and column 3

GMS calibration block

The GMS calibration block contains both directory and data conversion tables located in sub-blocks that follow the directory. The 128-word directory block, shown below, indicates the locations of the six sub-blocks. The starting byte offset for each sub-block varies with the data; therefore, it is shown as a variable in the directory below.

Word

Value

Description

0

GMS5

4-byte ASCII identifier

1

0x58

directory block length in bytes

2

COEF

4-byte ASCII identifier for sub-block 1

3

starting byte offset from word 0

4

4VIS or 5VIS

identifies sub-block 2

5

starting byte offset from word 0

6

4IR or 5IR1

identifies sub-block 3

7

starting byte offset from word 0

8

5IR2

identifies sub-block 4

9

starting byte offset from word 0

10

5IR3

identifies sub-block 5

11

starting byte offset from word 0

12

SPAR

identifies spares block, sub block 6

13

starting byte offset from word 0

14-21

not used

22-85

Words 1 to 256 of GMS 4-or -5 calibration block; see the table below

86-127

reserved for future tables (GMS-6, etc.)

The table below describes the calibration data sub-blocks, not all of which may be filled. The calibration data, which follows the directory, has a length of 6400 bytes.

See table A-7 in the Revision of GMS stretched-VISSR data format document for a complete description of the data block.

Byte

Descriptions

1-4

calibration information ID

5-10

data generated date (YYYYMMDDHHmm)

11

sensor selection

12-256

sub-block 1; infrared radiance calculations

257-1280

sub-block 2; visible level-to-albedo conversion tables; four 64-level tables for VIS1 through VIS4 detectors

1281-2304

sub-block 3; IR1 level-to-temperature conversion table

2305-3328

sub-block 4; IR2 level-to-temperature conversion table

3329-4352

sub-block 5; IR3 level-to-temperature conversion table

4353-6400

sub-block 6; spares

The prefixes for each scan line of visible data must contain a code indicating the detector used. The first four bytes of the documentation section should contain the following information.

Code

Description

00000000

not a visible band

6C6C0000

detector 1 of the visible band

B4B40000

detector 2 of the visible band

D8D80000

detector 3 of the visible band

FCFC0000

detector 4 of the visible band

DMSP

The Defense Meteorological Satellite Program (DMSP) satellites are polar orbiting satellites. DMSP has two sensors: the Operational Linescan System (OLS) and the Special Sensor for Microwave Imagery (SSM/I) data. The following sections describe the navigation and calibration blocks for each sensor.

DMSP Navigation Block

The table below lists the contents of the DMSP navigation block. The block contains 128 words and is used for all DMSP signal types.

Word

Value

Description

1

DMSP

navigation type; indicates the signal type being navigated

2

sensor source, year and date of the signal; ssyyddd

3

nominal time of image; hhmmss

4

1

orbit type; set to one

5

epoch date from the ASCII record below; yyddd

6

epoch time from the ASCII record below; days*1.e9

7

mean motion from the ASCII record below; deriv*1.e9

8

mean motion from ASCII record below; accel and mantissa

9

mean motion from the ASCII record below; accel and expon

10

bstart and mantissa; usually not used

11

b-start and expon; usually not used

12

inclination from the ASCII record below

13

right ascension of ascending node from the ASCII record below; deg*1.e6

14

eccentricity from the ASCII record below; ecc*1.e6

15

argument of perigee from the ASCII record below; per,deg*1e7

16

mean anomaly from the ASCII record below; anomaly*deg*
1.e6

17

mean motion; revs/day*1.e7

18-44

unused

45

data type; OLS, MT, MT2 or MI

46

ascending LT; 0=morning, 1=evening

47

number of first scan to navigate

48

time of first scan; sec*1.e3

49

scan flipped flag; 0=no 1=yes

50

element flipped flag; 0=no 1=yes

51

unused

52

number of elements per scan

53-120

unused

121-128

32-character ASCII record

The DMSP navigation block includes a 0-based, type 8 ASCII record, in words 120-127, that contains the scaled integer values used by the navigation block. The table below describes the ASCII record.

Character numbers

Description

3-4

spacecraft ID

6-17

epoch date; a decimal point indicates a fraction of a day

18-25

mean motion derivative

26-28

mean motion acc mantissa

28-30

mean motion acc exponent

32-39

inclination

41-48

RA of ascending mode

50-56

eccentricity

58-65

perigee

67-74

mean anomaly

76-85

mean motion

DMSP Calibration

The OLS and microwave sensors use different calibration. The OLS calibration uses only one pair of of gain and offset parameters to transform infrared pixel values to radiance. The offset is set to 190.0 and the gain is set to .4706. The calibration module kbxols.dlm contains the offset pair. The visible pixels are not calibrated.

For the microwave sensors, each data line is calibrated and the information is stored in the documentation section. A postprocessor, DMSPCAL, calculates the gains and offsets from the information in the documentation section. The table below describes the calibration documentation for each line of data.

Bytes

Description

0-1

validity code

2-4

hot load temperatures; two measurements in byte 2, one measurement in byte 3

5-6

radiometer temperatures; forward radiometer temperature

7-13

instantaneous gain; one for each channel; these are calculated from the hot load temperatures and cold counts
hotloadavg = average of 3 hotload temperatures
hotcountavg = average of band hot counts
coldcountbandavg = avg of band cold counts
instantaneousbandgain = (hotloadavg-2.7k)/
(hotcountbandavg-coldbandavg)

14-15

reference voltages; reference voltage and reference return both from block 6

16-20

cold voltages band 1

21-25

hot voltage band 1

26-30

cold voltages band 2

31-35

hot voltages band 2

36-40

cold voltages band 3

41-45

hot voltages band 3

46-50

cold voltages band 4

51-55

hot voltages band 4

56-60

cold voltages band 5

61-65

hot voltages band 5

66-70

cold voltages band 6

71-75

hot voltages band 6

76-80

cold voltages band 7

81-85

hot voltages band 7

When DMSPCAL is run, a gain and offset for each channel is placed in the calibration section of each scan line prefix. The table below describes the byte location of each gain and offset pair.

Bytes

Description

0-1

gain, band 1

2-3

offset, band 1

4-5

gain, band 2

6-7

offset, band 2

8-9

gain, band 3

10-11

offset, band 3

12-13

gain, band 4

14-15

offset, band 4

16-17

gain, band 5

18-19

offset, band 6

20-21

offset, band 6

22-23

gain, band 7

24-25

offset, band 7

Geographic Projections

The structure of the succeeding words of the following geographic projections are listed here:

Lambert Conformal

If the type is LAMB, this is the structure of the succeeding words:

Word

Description

2

image line of the North Pole

3

image element of the North Pole

4

standard latitude 1, DDDMMSS

5

standard latitude 2, DDDMMSS

6

spacing at standard latitude, M

7

normal longitude, DDDMMSS

8

radius of the planet, M

9

eccentricity of the planet, x1000000

10

coordinate type, &ge 0 planetodetic, < 0 planetocentric

11

longitude convention, &ge 0 west positive, < 0 west negative

12-120

reserved

121-128

memo entry; up to 32 characters of comments

Mercator

If the type is MERC, this is the structure of the succeeding words:

Word

Description

2

image line of the equator

3

image element of the equator

4

standard latitude

5

spacing at standard latitude, meters

6

normal longitude, DDDMMSS

7

radius of the planet, M

8

eccentricity of the planet, x1000000

9

coordinate type, &ge 0 planetodetic, < 0 planetocentric

10

longitude convention, &ge 0 west positive, < 0 west negative

11-120

reserved

121-128

memo entry; up to 32 characters of comments

Polar Stereographic

If the type is 'PS ' (four characters), this is the structure of the succeeding words:

Word

Description

1

PS

2

image line of the North Pole

3

image element of the North Pole

4

standard latitude, DDDMMSS

5

spacing at standard latitude, M

6

normal longitude, DDDMMSS

7

radius of the planet, M

8

eccentricity of the planet, x1000000

9

coordinate type, &ge 0 planetodetic, < 0 planetocentric

10

longitude convention, &ge 0 west positive, < 0 west negative

11-120

reserved

121-128

memo entry; up to 32 characters of comments

Radar

If the type is RADR, this is the structure of the succeeding words:

Word

Description

2

row (image coordinates) of the radar site

3

column (image coordinates) of the radar site

4

latitude of the radar site, DDDMMSS

5

longitude of the radar site, DDDMMSS

6

pixel resolution, meters

7

rotation of north from vertical, degrees x1000

8

if present, same as 6, but only for longitude direction

Rectilinear

If the type is RECT, this is the structure of the succeeding words:

Word

Description

2

a particular image row number

3

latitude corresponding to word 2, degrees x10000

4

a particular image column number

5

longitude corresponding to word 4, degrees x10000

6

latitude degrees/image line, degrees x10000

7

longitude degrees/image line, degrees x10000

8

radius of the planet, meters

9

eccentricity of the planet, x1000000

10

coordinate type, &ge 0 planetodetic, < 0 planetocentric

11

longitude convention, &ge 0 west positive, < 0 west negative

API functions

Function

Description

mcadir

opens a connection to read the directory block from an image object

mcadrd

reads the directory block from an image object

mcaget

opens a connection to read the data block from an image object

mcalin

reads the data portion of the current image line

mcapfx

reads the prefix portion of the current image line