MODIS L2 Fire Version 6 File Specification
Revision 6.2.3, 4 September 2014

This document specifies the format for the Aqua MODIS Level 2 Active
Fire product (MYD14).

Point of Contact:   
	Louis Giglio (PI)
	University of Maryland
	Department of Geographical Sciences
	College Park, MD 20742
	(301) 405-0064
	lgiglio@umd.edu

	Chris Justice (Co-I)
	Department of Geographical Sciences
	University of Maryland
	College Park, MD 20742
	(301) 405-0064
	cjustice@umd.edu


1. ECS Granule Metadata

1.1 CoreMetadata.0

ECS Core metadata are inconveniently stored in a single HDF attribute as a
large string of PVL text.

Name				ECS Type
----				--------
LocalGranuleID			string

SizeMBECSDataGranule		double

ProductionDateTime		DATETIME

DayNightFlag			string

ReprocessingActual		string

ReprocessingPlanned		string

LocalVersionID			string

ScienceQualityFlag		string

AutomaticQualityFlagExplanation	string

AutomaticQualityFlag		string

OperationalQualityFlagExplanation	string

OperationalQualityFlag		string

ScienceQualityFlagExplanation	string

QAPercentMissingData		integer

EquatorCrossingDate		DATE

EquatorCrossingTime		TIME

OrbitNumber			integer

EquatorCrossingLongitude	double

VersionID			integer

ShortName			string

GRingPointLongitude		double

GRingPointLatitude		double

GRingPointSequenceNo		integer

ExclusionGRingFlag		string

RangeEndingDate			DATE

RangeEndingTime			TIME

RangeBeginningDate		DATE

RangeBeginningTime		TIME

InputGranule			string

InputPointer			string

PGEVersion			string

AncillaryInputPointer		string

AncillaryInputType		string

AssociatedSensorShortName	string

AssociatedPlatformShortName	string

AssociatedInstrumentShortName	string


The following will be the AdditionalAttributes set:

     AdditionalAttribute.1 = QAPERCENTGOODQUALITY (integer)
     AdditionalAttribute.2 = QAPERCENTOTHERQUALITY (integer)
     AdditionalAttribute.3 = QAPERCENTNOTPRODUCEDCLOUD (integer)
     AdditionalAttribute.4 = QAPERCENTNOTPRODUCEDOTHER (integer)
     AdditionalAttribute.5 = FirePixels (integer)
     AdditionalAttribute.6 = GRANULENUMBER (integer)
     AdditionalAttribute.7 = PROCESSVERSION (string)



1.2 ArchiveMetadata.0

ECS Archive metadata are also inconveniently stored in a single HDF
attribute as a large string of PVL text.


Name				ECS Type
----				--------
AlgorithmPackageAcceptanceDate	string

AlgorithmPackageMaturityCode	string

AlgorithmPackageName		string

AlgorithmPackageVersion		string

SystemFileName			string

AncillarySystemFileName		string

LongName			string

ProcessingCenter		string

SPSOParameters			string

NorthBoundingCoordinate		double

SouthBoundingCoordinate		double

EastBoundingCoordinate		double

WestBoundingCoordinate		double

InstrumentScansProcessed	integer

PercentLand			integer

scistate			integer

sciabnorm			integer

CloudPixels			integer

NoFirePixels			integer

GlintPixels			integer

UnknownPixels			integer

WaterPixels			integer

CloudAdjacentFirePixels		integer

WaterAdjacentFirePixels		integer

InternalCloudMask		string

DESCRrevision			string

ProductionHistory		string

ProcessingEnvironment		string



2. Product-Specific Granule Metadata

The following fields are stored as individual HDF attributes.  Many are
duplicates of the ECS Core and Archive metadata fields to prevent users from
having to parse metadata stored in the confusing PVL format mandated by the
ECS.


Name			Type	Description
----			----	-----------
FirePix			int32	Total number of fire pixels detected in granule.

LandFirePix		int32	Number of fire pixels detected over land in
				granule.

WaterFirePix		int32	Number of fire pixels detected over water in
				granule.

MissingPix		int32	Number of pixels classified as "missing"
				in granule.

LandPix			int32	Number of land pixels in granule.

WaterPix		int32	Number of water pixels in granule.

CoastPix		int32	Number of coast pixels in granule.

WaterAdjacentFirePix	int32	Number of fire pixels having one or more
				adjacent water pixels.

CloudAdjacentFirePix	int32	Number of fire pixels having one or more
				adjacent cloud pixels.

UnknownLandPix		int32	Number of land pixels classified as "unknown"
				in granule.

UnknownWaterPix		int32	Number of water pixels classified as "unknown"
				in granule.

LandCloudPix		int32	Number of cloud pixels over land in granule.

WaterCloudPix		int32	Number of cloud pixels over water in granule.

GlintPix		int32	Number of pixels in sun glint region.

GlintRejectedPix	int32	Number of apparent fire pixels rejected as
				false alarms caused by sun-glint.

CoastRejectedLandPix	int32	Number of apparent land fire pixels rejected as
				coastal false alarms.

HotSurfRejectedPix	int32	Number of apparent land fire pixels rejected as
				desert-boundary false alarms.

ClearingRejectedPix	int32	Number of apparent land fire pixels rejected as
				false alarms caused by small forest clearings.

CoastRejectedWaterPix	int32	Number of apparent water fire pixels rejected
				as unmasked land- or coast-pixel false alarms.

DayPix			int32	Number of daytime pixels in granule.

NightPix		int32	Number of nighttime pixels in granule.

MissingRadPix		int32	Number of pixels having missing radiance
				values in one or more bands used by algorithm.

MissingGeoPix		int32	Number of pixels having missing geolocation
				data.

Satellite		string	"Aqua"

ProcessVersionNumber	string	Internal version number (e.g. "6.1.0").

MOD021KM input file	string	1 km L1B input file name.

MOD03 input file	string	Geolocation input file name.

SystemID		string	Unix/Linux system information


3. HDF Dimension Names


Dimension      Name                          Value
---------      ----                          -----
Dimension_1    Number_of_scan_lines          # of input scan lines * 10
Dimension_2    Pixels_per_scan_line          1354
Dimension_3    Number_of_active_fires        # of active fires detected 
Dimension_4    cmg_cells_day                 # of CMG cells covered by swath
Dimension_5    cmg_cells_night               # of CMG cells covered by swath
Dimension_6    cmg_values                    8


4. Scientific Data Sets

All data stored within the following two-dimensional Scientific Data Sets
are Level 2 granules, and  correspond on a pixel-to-pixel basis with other
1-km Level 2 granules generated by other MODIS PGEs.


Name                Type      Dimensions
----                ----      ----------
fire mask           uint8     Dimension_1, Dimension_2

SDS Attributes:

Attribute                Type      Quantity  Value
---------                ----      --------  -----
long_name                string         1    fire mask
Nadir Data Resolution    string         1    1 km
valid_range              uint8          2    0, 9
_FillValue               uint8          1    0

Value	Description
-----	-----------
  0	not processed (missing input data)
  1	not processed (obsolete; not used in post-launch product)
  2	not processed (other reason)
  3	non-fire water pixel
  4	cloud (land or water)
  5	non-fire land pixel
  6	unknown (land or water)
  7	fire (low confidence, land or water)
  8	fire (nominal confidence, land or water)
  9	fire (high confidence, land or water)

-----------------------------------------------------------------------------

Name                Type      Dimensions
----                ----      ----------
algorithm QA        uint32    Dimension_1, Dimension_2

SDS Attributes:

Attribute                Type      Quantity  Value
---------                ----      --------  -----
long_name                string         1    algorithm QA
units                    string         1    bit field
Nadir Data Resolution    string         1    1 km


Bit       Description
---       -----------
0-1       land/water state
               00 = water
               01 = coast
               10 = land
               11 = UNUSED

2         3.9 micron high-gain flag
               0 = band 21 used
               1 = band 22 used

3         atmospheric correction (0 = not performed, 1 = performed)

4         day/night algorithm (0 = night, 1 = day)

5         potential fire pixel
               0 = no (if no, remaining QA fields except bit 23 are not set)
               1 = yes

6         spare (set to 0)

7-10      background window size parameter, R
               R = 0: unable to characterize background
               R > 0: background characterized with (2R+1) by (2R+1) window

11        360 K T21 test (0 = fail, 1 = pass)
12        DT relative test i (0 = fail, 1 = pass)
13        DT absolute test ii (0 = fail, 1 = pass)
14        T21 relative test (0 = fail, 1 = pass)
15        T31 relative test (0 = fail, 1 = pass)
16        background fire T21 deviation test (0 = fail, 1 = pass)

17-19     spare (set to 0)

20        adjacent cloud pixel (valid only if fire mask = 7, 8, or 9)
               0 = no
               1 = yes

21        adjacent water pixel (valid only if fire mask = 7, 8, or 9)
               0 = no
               1 = yes

22-23     sun-glint level (0-3)

24        sun glint rejection flag (0 = false, 1 = true)

25        land-pixel desert boundary rejection flag (0 = false, 1 = true)

26        land-pixel coastal false alarm rejection flag (0 = false, 1 = true)

27        land-pixel forest clearing rejection test (0 = false, 1 = true)

28        water-pixel coastal false alarm rejection flag (0 = false, 1 = true)

29-31     spare (set to 0)

Note: For coast pixels, bits 24-28 will have a value of 0.

-----------------------------------------------------------------------------

The following Scientific Data Sets comprise the "Fire Pixel Table"; each is a
one-dimensional SDS having Dimension_3 elements and contains information
about each fire pixel.  Each column of this table is (somewhat confusingly)
stored as a separate SDS to work around deficiencies in the HDF format.


Name		Type		Description
----		----		-----------
FP_line		int16		granule line of fire pixel

FP_sample       int16		granule sample of fire pixel

FP_latitude	float32		latitude of fire pixel (degrees)

FP_longitude	float32		longitude of fire pixel (degrees)

FP_R2		float32		channel 2 reflectance of fire pixel

FP_T21		float32		channel 21/22 brightness temperature of fire
				pixel (kelvins)

FP_T31		float32		channel 31 brightness temperature of fire
				pixel (kelvins)

FP_MeanT21	float32		channel 21/22 brightness temperature of
				background (kelvins)

FP_MeanT31	float32		channel 31 brightness temperature of
				background (kelvins)

FP_MeanDT	float32		mean background brightness temperature
				difference (kelvins)

FP_MAD_T21	float32		channel 21/22 brightness temperature
				mean absolute deviation of background

FP_MAD_T31	float32		channel 31 brightness temperature
				mean absolute deviation of background

FP_MAD_DT	float32		mean absolute deviation of background
				brightness temperature difference (kelvins)

FP_power	float32		fire radiative power (megawatts)

FP_AdjCloud	uint8		number of adjacent cloud pixels (3 x 3 box)

FP_AdjWater	uint8		number of adjacent water pixels (3 x 3 box)

FP_WinSize	uint8		background window size

FP_NumValid	int16		number of valid background pixels

FP_confidence	uint8		detection confidence (%), range 0-100

FP_land		uint8		1 = land fire pixel
				0 = water fire pixel (i.e., glas flare)

FP_MeanR2	float32		background channel 2 reflectance

FP_MAD_R2	float32		channel 2 reflectance mean absolute
				deviation of background

FP_ViewZenAng	float32		view zenith angle (degrees)

FP_SolZenAng	float32		solar zenith angle (degrees)

FP_RelAzAng	float32		relative azimuth angle (degrees)

FP_CMG_row	int16		CMG row (used for CMG production)

FP_CMG_col	int16		CMG column (used for CMG production)

-----------------------------------------------------------------------------

Data stored within the CMG Scientific Data Sets are used in the production of
the fire CMG product.

Name                Type      Dimensions
----                ----      ----------
CMG_day            uint16     Dimension_4, Dimension_6
CMG_night          uint16     Dimension_5, Dimension_6