VIIRS Geolocation Product File Specifications for Image-resolution Bands
		 	         Version 2.0.9
			       November 30, 2018

This document describes the format and content of the NASA standard VIIRS geolocation product 
(VNP03, VJ103), specifically for the image-resolution (I) bands.  This specification is applicable 
to VIIRS geolocation products derived from the Suomi National Polar-orbiting Satellite System (SNPP) 
and Joint Polar-orbiting Satellite System-1 (JPSS-1/NOAA-20) missions; subsequently, it will extend 
to cover other JPSS missions as well in the future.  The product is stored as a Network Common Data 
Form (netCDF) file for each VIIRS data granule.  It contains:

	Geodetic position (latitude, longitude, and height above geoid)for the center of each VIIRS 
	Earth View observation, according to World Geodetic System 1984 (WGS84) standard.

	Sun and satellite ('sensor') bearings for each VIIRS Earth View observation.

	EOS land/sea mask values for the center of each VIIRS Earth View observation.

	Sun and Moon positions with respect to VIIRS for each scan.

	Instrument parameter information sufficient to enable geolocation for specific bands and 
	sub-pixel ground location.

The specification is organized into four sections:  Global Attributes;
Scan-Level Attributes; Geolocation Attributes; and Navigation Data. The metadata
are intended to satisfy two sets of requirements:

* Help users organize, ingest, catalog, and search data products
* Help users with their product documentation needs.

Global metadata attributes include core, product-specific, structural, and VIIRS-specific metadata. 
The Scan-Level Attributes include scan-level metadata, spacecraft ephemeris, and spatial element 
geolocation values.

The baseline netCDF implementation of this product is as follows: Granule metadata are stored in 
individual netCDF attributes.  The remaining file-level parameters are stored as netCDF scientific 
data sets (SDS) with specified dimensions. Any exceptions to this baseline are noted for the individual 
field.  A few geolocation fields exist only in the Day-Night Band (DNB) version of the product. These 
fields are appropriately listed separately at the end of that section.

The scan data are stored as SDSs.  Multi-dimensional fields are stored with the scan dimension varying 
least.  Three categories of scan-level data exist:  scan-level metadata, geolocation data, and navigation 
data. The netCDF dimension names and nominal dimension lengths used for each category are listed in the 
Global Attributes section. The geolocation fields are all defined as two-dimensional arrays with their 
dimensions corresponding to the along-track and along-scan dimensions.

The array indexing is row-dominant, consistent with netCDF convention.

The example fields and their values listed below were extracted from an SNPP-VIIRS geolocation product. 
Values for many fields are expected to change on a granule to granule basis.


1.  	Global Attributes

1.1	Dimensions

The following dimensions define the size of all the array fields in the SDSs:

Name			Description				Example
----			-----------				-------
number_of_scans		The number of scans in the granule	202
number_of_lines		The number of lines in the granule	6464
number_of_pixels	The number of pixels per line		6400
vector_elements		The number of spatial dimensions	3
quaternion_elements	The number of values in the quaternions	4


1.2  Global Metadata

The data-type field listed below is relevant for I/O of these fields only, since each metadata set is 
stored as a single text block.  The supported data types include the following: string, double 
(64-bit floating point number), float32 (32-bit floating point number), integer (32-bit integer), 
ubyte (unsigned 8-bit integer), and short (16-bit integer).

 Metadata Name			Data Type       Example
 -------------         	   	--------        ---------
 title				string		"VIIRS I-band Geolocation Data"
 platform			string		"Suomi-NPP"
 product_name			string		"VNP03IMG.A2018334.0654.001.2018334131826.nc"
 LocalGranuleID			string		"VNP03IMG.A2018334.0654.001.2018334131826.nc"
 LongName			string		"VIIRS/NPP Imagery Resolution Terrain Corrected Geolocation 6-Min L1 Swath 375m"
 ShortName			string		"VNP03IMG"
 processing_version		string		"v2.0.3"
 Conventions			string		"CF-1.6"
 institution			string		"NASA Goddard Space Flight Center, VIIRS L1 Processing Group" ;
 license			string		"http://science.nasa.gov/earth-science/earth-science-data/data-information-policy/"
 naming_authority		string		"gov.nasa.gsfc.VIIRSland"
 date_created			string		"2018-11-30T08:18:26Z"
 ProductionTime			string		"2018-11-30T08:18:26Z"
 keywords_vocabulary		string		"NASA Global Change Master Directory (GCMD) Science Keywords"
 stdname_vocabulary		string		"NetCDF Climate and Forecast (CF) Metadata Convention"
 creator_name			string		"VIIRS L1 Processing Group"
 creator_email			string		"modis-ops@lists.nasa.gov"
 creator_url			string		"http://ladsweb.nascom.nasa.gov"
 project			string		"VIIRS L1 Project"
 publisher_name			string		"LAADS"
 publisher_url			string		"http://ladsweb.nascom.nasa.gov"
 publisher_email		string		"modis-ops@lists.nasa.gov"
 processing_level		string		"GEO"
 cdm_data_type			string		"swath"
 number_of_filled_scans		integer		202
 OrbitNumber			integer		36744
 history			string		"geolocate_viirs.exe PGE501.1.AS5110.NPP_OPS.2018-334T06:54.NA.2018-334T13:18:24.4361511.pcf"
 source				string		"VNP01.A2018334.0654.001.2018334131548.nc,VIIRS_NPP_CAL_STATIC_LUT_v2.0.0.26_20181025_vcst.nc,VIIRS_NPP_CAL_RSB_DYNAMIC_LUT_20120103_20181229_v2.0.0.26_20181025_vcst.nc,VIIRS_NPP_CAL_DNB_DYNAMIC_LUT_20120121_20190126_v2.0.0.26_20181025_vcst.nc,VIIRS_NPP_CAL_STRAYLIGHT_DYNAMIC_LUT_20120123_20190105_v2.0.0.26_20181025_vcst.nc,VIIRS_NPP_CMN_LUT_v2.0.0.26_20181025_vcst.nc,VIIRS_NPP_GEO_LUT_20130425152500_vcst.nc,off_USNO-PolarWander-UT1-ANC_Ser7_USNO_000f_20181130_201811300000Z_20181130000105Z_ee20181207120000Z_np.ascii"
 time_coverage_start		string		"2018-11-30T06:54:00.000Z"
 TAI93_leapseconds		integer		10
 time_coverage_end		string		"2018-11-30T07:00:00.000Z"
 PGE_StartTime			string		"2018-11-30 06:54:00.000"
 PGE_EndTime			string		"2018-11-30 07:00:00.000"
 StartTime			string		"2018-11-30 06:54:00.000"
 EndTime			string		"2018-11-30 07:00:00.000"
 PGE_Name			string		"PGE501"
 VersionId			string		"001"
 startDirection			string		"Descending"
 endDirection			string		"Descending"
 DayNightFlag			string		"Night"
 format_version			integer		2
 instrument_number		integer		2
 GRingPointSequenceNo		integer[4]	1, 2, 3, 4
 PGEVersion			string		"2.0.9"
 GRingPointLatitude		double[4]	-56.3128, -49.24005, -30.56964, -35.64502
 GRingPointLongitude		double[4]	-71.19838, -117.5293, -104.2118, -71.22906
 geospatial_lat_units		string 		"degrees_north"
 geospatial_lon_units		string 		"degrees_east"
 geospatial_lat_min		double 		-56.46531
 geospatial_lat_max		double 		-30.56964
 geospatial_lon_min		double 		-117.5293
 geospatial_lon_max		double 		-71.19838
 SouthBoundingCoordinate	double 		-56.46531
 NorthBoundingCoordinate	double 		-30.56964
 WestBoundingCoordinate		double 		-117.5293
 EastBoundingCoordinate		double 		-71.19838
 AlgorithmVersion		string 		"NPP_PR03_L1WG v2.0.3"
 RangeBeginningTime		string 		"06:54:00.000000"
 AlgorithmType			string 		"SCI"
 RangeEndingTime		string 		"07:00:00.000000"
 ProcessingEnvironment		string 		"Linux minion7127 3.10.0-862.14.4.el7.x86_64 #1 SMP Wed Sep 26 15:12:11 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux"
 identifier_product_doi		string 		"10.5067/VIIRS/VNP03IMG.001"
 identifier_product_doi_authority string 	"http://dx.doi.org"
 SatelliteInstrument		string 		"NPP_OPS"
 RangeBeginningDate		string 		"2018-11-30"
 RangeEndingDate		string 		"2018-11-30"
 InputPointer			string 		"VNP01.A2018334.0654.001.2018334131548.nc,TLE-AUX_npp_20181130051605Z_20181129195100Z_ee00000000000000Z_-_c3s-_ops_all-_ops.txt,off_USNO-PolarWander-UT1-ANC_Ser7_USNO_000f_20181130_201811300000Z_20181130000105Z_ee20181207120000Z_np.ascii,VIIRS_NPP_CAL_STATIC_LUT_v2.0.0.26_20181025_vcst.nc,VIIRS_NPP_CMN_LUT_v2.0.0.26_20181025_vcst.nc,VIIRS_NPP_GEO_LUT_20130425152500_vcst.nc"
 ProcessingCenter		string 		"MODAPS-NASA"

2.  	Scan-level Data

SDS Name 	Description          			Format
-------- 	-------------         			--------
scan_start_time	Scan start-time in TAI93 seconds	double(number_of_scans)
		SDS Attributes:
		Attribute Name		Format    	Example
		--------------		------	  	-------
	 	long_name		string		"Scan start time (TAI93)"
		units			string		"seconds"
		_FillValue		double		-999.9
		valid_min		double		0.0
		valid_max		double		2000000000.0

scan_end_time	Scan-ending time in TAI93 seconds	double(number_of_scans)
                SDS Attributes:
                Attribute Name          Format          Example
                --------------          ------          -------
                long_name               string          "Scan end time (TAI93)"
                units                   string          "seconds"
                _FillValue              double          -999.9
                valid_min               double          0.0
                valid_max               double          2000000000.0

ev_mid_time	Mid-time of the Earth viewing portion	double(number_of_scans)
		of each scan in TAI93 seconds
                SDS Attributes:
                Attribute Name          Format          Example
                --------------          ------          -------
                long_name               string          "Earth view mid time (TAI93)"
                units                   string          "seconds"
                _FillValue              double          -999.9
                valid_min               double          0.0
                valid_max               double          2000000000.0

HAM_side	Half-Angle Mirror side			ubyte(number_of_scans)
                SDS Attributes:
                Attribute Name          Format          Example
                --------------          ------          -------
                long_name               string          "Half-angle mirror side"
                _FillValue              ubyte		255
                valid_min               ubyte		0
                valid_max               ubyte		1

sensor_mode     VIIRS sensor mode                       ubyte(number_of_scans)
                SDS Attributes:
                Attribute Name          Format          Example
                --------------          ------          -------
                long_name               string          "Half-angle mirror side"
                _FillValue              ubyte           255
		flag_values		ubyte[7]	0, 1, 2, 3, 4, 5, 6
		flag_meanings		string		"Launch Activation Outgas Diagnostic Day Night Safe"

scan_quality	VIIRS Geolocation scan quality flags	short(number_of_scans)
		SDS Attributes:
		Attribute Name		Format		Example
		--------------		------		-------
		long_name		string		"Geolocation scan quality flags"
		_FillValue		short		-999
		flag_masks		short[15]	1, 2, 3, 4, 8, 12, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096
		flag_meanings		string		"eaGap_small eaGap_medium eaGap_large HAMRTA_encoder_corrupt_fullScan HAMRTA_encoder_corrupt_partScan HAMRTA_encoder_missing_packets SAA solar_eclipse lunar_eclipse(DNB_only) spare(unused) SCE_Side_A_B SCE_side_invalid HAM_non-nominal_start Synch_loss Sector_rotation"


3.  Geolocation Data

SDS Name	Description          		Format
-------- 	-------------         		--------
latitude	Geodetic latitude		float32(number_of_lines, number_of_pixels)
		SDS Attributes:
		Attribute Name	Format 	   	Example
		--------------  ------  	-------
		long_name	string		"Latitudes of pixel locations"
		units		string		"degrees_north"
		_FillValue	float32		-999.9
		valid_min	float32		-90.0
		valid_max	float32		90.0

longitude	Geodetic longitude		float32(number_of_lines, number_of_pixels)
		SDS Attributes:
		Attribute Name	Format		Example
		--------------	------		-------
		long_name	string		"Longitudes of pixel locations"
		units		string		"degrees_east"
		_FillValue	float32		-999.9
		valid_min	float32		-180.0
		valid_max	float32		180.0

height		Terrain height			short(number_of_lines, number_of_pixels)
		SDS Attributes:
		Attribute Name	Format		Example
		--------------	------		-------
		long_name	string		"Terrain height at pixel locations"
		units		string		"meters"
		_FillValue	short		-32767
		valid_min	short		-1000
		valid_max	short		10000
		scale_factor	float32		1.0
		add_offset	float32		0.0

range		Range from satellite to pixel	short(number_of_lines, number_of_pixels)
		SDS Attributes:
		Attribute Name	Format		Example
		--------------	------		-------
		long_name	string		"Satellite-to-pixel range"
		units		string		"meters"
		_FillValue	short		-32768
		valid_min	short		0
		valid_max	short		32767
		scale_factor	float32		100.0
		add_offset	float32		800000.0

sensor_azimuth	Sensor azimuth angle		short(number_of_lines, number_of_pixels)
		SDS Attributes:
		Attribute Name	Format		Example
		--------------	------		-------
		long_name	string		"Sensor azimuth angle at pixel locations"
		units		string		"degrees"
		_FillValue	short		-32768
		valid_min	short		-18000
		valid_max	short		18000
		scale_factor	float32		0.01
		add_offset	float32		0.0

sensor_zenith	Sensor zenith angle		short(number_of_lines, number_of_pixels)
		SDS Attributes:
		Attribute Name	Format		Example
		--------------	------		-------
		long_name	string		"Sensor zenith angle at pixel locations"
		units		string		"degrees"
		_FillValue	short		-32768
		valid_min	short		0
		valid_max	short		18000
		scale_factor	float32		0.01
		add_offset	float32		0.0

solar_azimuth	Solar azimuth angle		short(number_of_lines, number_of_pixels)
		SDS Attributes:
		Attribute Name	Format		Example
		--------------	------		-------
		long_name	string		"Solar azimuth angle at pixel locations"
		units		string		"degrees"
		_FillValue	short		-32768
		valid_min	short		-18000
		valid_max	short		18000
		scale_factor	float32		0.01
		add_offset	float32		0.0

solar_zenith	Solar zenith angle		short(number_of_lines, number_of_pixels)
		SDS Attributes:
		Attribute Name	Format		Example
		--------------	------		-------
		long_name	string		"Solar zenith angle at pixel locations"
		units		string		"degrees"
		_FillValue	short		-32768
		valid_min	short		0
		valid_max	short		18000
		scale_factor	float32		0.01
		add_offset	float32		0.0

land_water_mask	Land/Water mask			ubyte(number_of_lines, number_of_pixels)
		long_name	string		"Land/Water mask at pixel locations"
		_FillValue	ubyte		255
		flag_values	ubyte[8]	0, 1, 2, 3, 4, 5, 6, 7
		flag_meanings	string		"Shallow_Ocean Land Coastline Shallow_Inland Ephemeral Deep_Inland Continental Deep_Ocean"

quality_flag	Pixel-level quality flags	ubyte(number_of_lines, number_of_pixels)
		SDS Attributes:
		Attribute Name	Format		Example
		--------------	------		-------
		long_name	string		"Geolocation pixel quality flags"
		flag_masks	ubyte[4]	1, 2, 4, 8
		flag_meanings	string		"Input_invalid Pointing_bad Terrain_bad SolarAngle_bad"
		
4.	Navigation Data

SDS Name	Description          			Format
-------- 	-------------         			--------
att_quat_ev	Attitude quaternion at mid-time		float32
		for the Earth view			(number_of_scans, quaternion_elements)
		SDS Attributes:
		Attribute Name	Format 	   	Example
		--------------  ------ 		-------
		long_name	string		"Attitude quaternions at EV mid-times (J2000 to spacecraft)"
		_FillValue	float32		-999.9
		valid_min	float32		-1.0
		valid_max	float32		1.0

att_ang_start	Attitude angles at start-time		float32 (number_of_scans, vector_elements)
		SDS Attributes:
		Attribute Name	Format		Example
		--------------	------		-------
		long_name	string		"Attitude angles (roll, pitch, yaw) at EV start-times"
		units		string		"degrees"
		_FillValue	float32		-999.9
		valid_min	float32		-180.0
		valid_max	float32		180.0

att_ang_end	Attitude angles at end-time	float32(number_of_scans, vector_elements)
		SDS Attributes:
		Attribute Name	Format		Example
		--------------	------		-------
		long_name	string		"Attitude angles (roll, pitch, yaw) at EV end-times"
		units		string		"degrees"
		_FillValue	float32		-999.9
		valid_min	float32		-180.0
		valid_max	float32		180.0

att_ang_mid	Attitude angles at mid-time	float32(number_of_scans, vector_elements)
		SDS Attributes:
		Attribute Name	Format		Example
		--------------	------		-------
		long_name	string		"Attitude angles (roll, pitch, yaw) at EV mid-times"
		units		string		"degrees"
		_FillValue	float32		-999.9
		valid_min	float32		-180.0
		valid_max	float32		180.0

orb_pos_ev_start  Orbit position at scan-start	float32(number_of_scans, vector_elements)
		SDS Attributes:
		Attribute Name	Format		Example
		--------------	------		-------
		long_name	string		"Orbit position vectors at EV start-times (ECR)"
		units		string		"meters"
		_FillValue	float32		-9999999.0
		valid_min	float32		-7300000.0
		valid_max	float32		7300000.0

orb_pos_ev_end	Orbit position at scan-end	float32(number_of_scans, vector_elements)
                SDS Attributes:
                Attribute Name  Format          Example
                --------------  ------          -------
                long_name       string          "Orbit position vectors at EV end-times (ECR)"
                units           string          "meters"
                _FillValue      float32         -9999999.0
                valid_min       float32         -7300000.0
                valid_max       float32         7300000.0


orb_pos_ev_mid	Orbit position at mid-scan	float32(number_of_scans, vector_elements)
                SDS Attributes:
                Attribute Name  Format          Example
                --------------  ------          -------
                long_name       string          "Orbit position vectors at EV mid-times (ECR)"
                units           string          "meters"
                _FillValue      float32         -9999999.0
                valid_min       float32         -7300000.0
                valid_max       float32         7300000.0
orb_vel_ev_start  Orbit velocity at scan-start  float32(number_of_scans, vector_elements)
                SDS Attributes:
                Attribute Name  Format          Example
                --------------  ------          -------
                long_name       string          "Orbit velocity vectors at EV start-times (ECR)"
                units           string          "meters/second"
                _FillValue      float32         -9999999.0
                valid_min       float32         -7600.0
                valid_max       float32         7600.0

orb_vel_ev_end  Orbit velocity at scan-end      float32(number_of_scans, vector_elements)
                SDS Attributes:
                Attribute Name  Format          Example
                --------------  ------          -------
                long_name       string          "Orbit velocity vectors at EV end-times (ECR)"
                units           string          "meters/second"
                _FillValue      float32         -9999999.0
                valid_min       float32         -7600.0
                valid_max       float32         7600.0


orb_vel_ev_mid  Orbit velocity at mid-scan      float32(number_of_scans, vector_elements)
                SDS Attributes:
                Attribute Name  Format          Example
                --------------  ------          -------
                long_name       string          "Orbit velocity vectors at EV mid-times (ECR)"
                units           string          "meters/second"
                _FillValue      float32         -9999999.0
                valid_min       float32         -7600.0
                valid_max       float32         7600.0

solar_j2000	Solar vectors in J2000 frame	float32 (number_of_scans, vector_elements)
		SDS Attributes:
		Attribute Name	Format		Example
		--------------	------		-------
		long_name	string		"Solar unit vectors in J2000 frame"
		_FillValue	float32		-999.9
		valid_min	float32		-1.0
		valid_max	float32		1.0

solar_inst	Solar vectors in VIIRS frame	float32(number_of_scans, vector_elements)
		SDS Attributes:
		Attribute Name	Format		Example
		--------------	------		-------
		long_name	string		"Solar unit vectors in VIIRS frame"
		_FillValue	float32		-999.9
		valid_min	float32		-1.0
		valid_max	float32		1.0

earth_sun_distance	Earth to Sun distance	float32(number_of_scans)
		SDS Attributes:
		Attribute Name	Format		Example
		--------------	------		-------
		long_name	string		"Earth-Sun distance"
		units		string		"AU"
		_FillValue	float32		-999.9
		valid_min	float32		0.98
		valid_max	float32		1.02

lunar_j2000	Lunar vectors in J2000 frame	float32(number_of_scans, vector_elements)
		SDS Attributes:
		Attribute Name	Format		Example
		--------------	------		-------
		long_name	string		"Lunar unit vectors in J2000 frame"
		_FillValue	float32		-999.9
		valid_min	float32		-1.0
		valid_max	float32		1.0

lunar_inst	Lunar vectors in VIIRS frame	float32(number_of_scans, vector_elements)
		SDS Attributes:
		Attribute Name	Format		Example
		--------------	------		-------
		long_name	string		"Lunar unit vectors in VIIRS frame"
		_FillValue	float32		-999.9
		valid_min	float32		-1.0
		valid_max	float32		1.0

earth_moon_distance	Earth to Moon distance	float32(number_of_scans)
		SDS Attributes:
		Attribute Name	Format		Example
		--------------	------		-------
		long_name	string		"Earth-Moon distance"
		units		string		"meters"
		_FillValue	float32		-999.9
		valid_min	float32		3.5e+08
		valid_max	float32		4.2e+08