==========================================================================
MODIS MOD17 L4 Tile 500M Gridded PRODUCT: Annual Net Primary Productivity NPP

Revision 6.0.2 Fri June 14 5:01:00 EST 2013 Sudipta Sarkar
Revision 5.2.3
Revised:  Sat Apr 01 15:01:00 MST 2006 Petr Votava
Revised:  Thu Mar 23 11:10:00 MST 2006 Maosheng Zhao
Revised:  Thu Feb 17 15:20:00 MST 2006 Maosheng Zhao
Revised:  Thu Oct 06 15:26:00 MST 2005 Maosheng Zhao
Revised:  Mon Jun 20 17:26:00 MST 2005 Maosheng Zhao
Revised:  Fri Feb 16 00:01:00 PST 2005 _PV_
Revised:  Thu Oct 31 05:24:08 MST 2002
Revised:  Wed Oct 23 11:29:00 PST 2002
Revised:      Sep 10 10:00:00 MST 2002
Revised : Fri Mar 10 12:41:21 MST 2000
Original: Tue Jul 14 16:53:59 MDT 1998

Product Identifier: MOD_PR17A3 Annual Net Primary Productivity NPP

Description:
    !!! NEW IN v6.0.2 implemented by LDOPE
     -- Input and output file resolutions changed from 1KM to 500M
     -- Output ESDT changed from MOD17A3 to MOD17A3H
     
    !!! NEW IN v.5.1.3
     -- Correct MOD17A2 filename of LOCALGRANULEID in metadata caused by the bad
        side effect from the correction of NDAYS_COMPOSITED problem last time

        Modules influenced:
        ecsmeta.c
        psn_defs.h

    !!! NEW IN v.5.1.2  Thu Feb 17
    -- Correct NDAYS_COMPOSITED problem for abstract one extra day and control
        the maximum days of year, 365 or 366

        Modules influenced:
        psn_pars.c
        psn_emd.c
        psn_defs.h

    !!! NEW IN v.5.1.0  Thu Oct 06
    -- modified annual NPP (MOD17A3) equation by altering algorithm for growth
        respiration (Rg).  The previous Rg dependent on annual maximum LAI is
        unreasonable, because maximum LAI is strongly related to biomass, a
        state variable, but Rg is a flux variable, and it is part of remainder of
        GPP subtracted by maintenance respiration (Rm). Currently, Rg is assumed
        to account for 25% of NPP, in other words,
        NPP = 0.8*(GPP - Rm)

    -- modified constant q10_mr with value of 2.0 to
         q10_mr = 3.22 - 0.046*tavg
        the above equation is based on the review work by Tjoelker et al. in 2001
        Citation:
        Tjoelker M. G., J. Oleksyn and P. Reich, 2001, Modelling respiration of
        vegetation: evidence for a general temperature-dependent Q10. Global Change
        Biology, 7: 223-230.

    -- update BPLUT again based on the recent MODIS GPP validation works from
        Bigfoot project and that in our lab.  We increased light use efficiency
        for most forest biomes, and reduced that for most xeric biomes.  We also
        made little changes to other parameters to keep up with all the above changes

        The changes will affect MOD17A1, A2 and A3.  The change will improve the
        quality of MOD17.

        Modules influenced:
        psn_defs.h
        psn_calc.c

    !!! NEW IN v.5.0.2  Mon Jun 20
    -- incorporate GMAO (previous DAO) smoothing in the source code. Detailes are at
        Zhao M., F. A. Heinsch, R. R. Nemani, and S. W. Running, 2005,
        Improvements of the MODIS terrestrial gross and net primary production
        global data set. Remote Sensing of Environment, 95:164-176.

        The change will affect MOD17A1, A2 and A3, and will eliminate the big
        DAO footprint on MOD17 images. In the end, the change will improve the
        quality of MOD17

        Modules influenced:
        psn_defs.h
        psn_prot.h
        psn_clim_adt.c
        psn_clim.c
        psn_clos.c
        psn_grid.c
        psn_xlate.c

   !!! NEW IN v.5.0.1
    -- new QA bit layout to reflect the upstream changes in MOD15 and MOD17A2
       0,0  MODLAND_QC bits
           '0' =  Good Quality
           '1' =  Other Quality
	   
    The MOD_PR17A3 (PGE 38) is the MODIS AM-1 Level 4 1km annual Net Primary
    Productivity data product. The PGE 36 daily algorithm updates the 
    cumulative (intermediate) tiled product, adding the current data
    day's PSN measure to each pixel in the tile.  At the conclusion
    of each 8-day period (indicated via a PGE 37 production rule), 
    the PSN algorithm takes the PSN values accumulated over the 8-day
    period, and simply writes these (tiles) out as the official archived
    "8-day composite" PSN product, MODIS Parameter 3716.    

    Note that the same temporal accumulation scheme is used to produce the
    annual Net Primary Productivity (NPP) product, where a total of
    (45) 8-day PSN products (stored in the intermediate gridfield 
    Gpp_Rm_1km) are incrementally summed over the course
    of a given year, to eventually be output at the end of each 
    year as the archived NPP annual product MODIS Parameter 2703).
   

   The definitions of the following MOD_PR17A2 specific (PSA)
   PRODUCT SPECIFIC ATTRIBUTES are defined in the ArchiveMetadata.0 block as
     ADDITIONALATRIBUTENAME{7..8}.  These are represented using
     the ECS "INTEGER" data type, with percent values ranging {0..100} :

     PSA Name            Definition
	---------------------------------------------------------------------
    N_DAYS_COMPOSITED       Number of days {1..8} contributing to final 
                            composite. This is fixed at (1) for MOD_PR17A1
                            (PGE 36), but should range from {1..8} for MOD_PR17 
                            (PGE 37).
    QAPERCENTGOODNPP        Tile-wise % of good or excellant quality NPP
                            pixels.

Point of Contact:
   Petr Votava (software engineer)
   votava@ltpmail.gsfc.nasa.gov

   MUM-API: Joseph M Glassy, (contract software engineer)
            Lupine Logic, Inc.
            PO Box 9303
            Missoula, MT 59802
            Email: modis_support@lupinelogic.com
            Voice:(406) 541-3972
            Web  : www.lupinelogic.com

Principal Investigator(s):
   Steven W. Running
   NTSG Lab, School of Forestry
   University of Montana
   Missoula,MT 59812
   Email: swr@ntsg.umt.edu
   Voice: (406) 243-6311
   Fax  : (406) 243-4510
   WWW  : www.forestry.umt.edu/ntsg

===========================================================================


===========================================================================
A note to clarify MOD17 (PSN/NPP) 500M Level 4, Version 2.1 
ALGORITHM, ESDT, and FILE designations:


PROCESS IDs  Status       Description                         PGE    ESDT
-----------------------------------------------------------------------------
MOD_PR17A1   temporary    500M intermediate terms GPP-RM etc   PGE 36 MOD17A1H
MOD_PR17A2   archived     8-day composite GPP and PSN at 500M  PGE 37 MOD17A2H
MOD_PR17A3   archived     Annual NPP at 500M                   PGE 38 MOD17A3H
-----------------------------------------------------------------------------



============================================================================
Generic Constructs

ECS Metadata Strings:

   Notes:
      1. "FR" is an abbreviation for "FREE_RANGE".
      2. "D/T" is an abbreviation for "DATE/TIME"
      3. (A) means that multiple values are stored within a single array.
      4. A value of "Variable" indicates that this value will vary
         according to the granule being processed.
      5. "M" means class M.
      6. (C) means that multiple values are stored as class members.

CoreMetadata.0
    This string will contain the following PVL fields:

                                                     #
        Field Name                        Data      of   Value
                                          Type    Values
  GROUP = INVENTORYMETADATA

    GROUP = CollectionDescriptionClass
        SHORTNAME                         STRING     1   "MOD17A3H"
        VERSIONID                         INTEGER    1   "6"
    END_GROUP = CollectionDescriptionClass

    GROUP = ECSDataGranule        
        REPROCESSINGPLANNED               STRING     1   "further update is anticipated"
        REPROCESSINGACTUAL                STRING     1   Variable
        LOCALGRANULEID                    STRING     1   Variable
        DAYNIGHTFLAG                      STRING     1   Variable
        PRODUCTIONDATETIME                D/T        1   Variable
        LOCALVERSIONID                    STRING     1   Variable
    END_GROUP = ECSDataGranule

    GROUP = PGEVersionClass
        PGEVERSION                        STRING     1   "6.0.2"
    END_GROUP = PGEVersionClass

    GROUP = InputGranule
        INPUTPOINTER                      STRING   FR(A) Variable
    END_GROUP = InputGranule

    GROUP = RangeDateTime
        RANGEBEGINNINGDATE                DATE       1   Variable
        RANGEBEGINNINGTIME                TIME       1   Variable
        RANGEENDINGDATE                   DATE       1   Variable
        RANGEENDINGTIME                   TIME       1   Variable
    END_GROUP = RangeDateTime

    GROUP = SpatialDomainContainer
      GROUP = HorizontalSpatialDomainContainer
        GROUP = GPolygon
          GROUP = GRing
              EXCLUSIONGRINGFLAG          STRING     1   "N"
          END_GROUP = GRing

          GROUP = GRingPoint
              GRINGPOINTLATITUDE          DOUBLE   4(A)  Variable
              GRINGPOINTLONGITUDE         DOUBLE   4(A)  Variable
              GRINGPOINTSEQUENCENO        INTEGER  4(A)  Variable
          END_GROUP = GRingPoint
        END_GROUP = GPolygon
      END_GROUP = HorizontalSpatialDomainContainer
    END_GROUP = SpatialDomainContainer

    GROUP = MeasuredParameter
        PARAMETERNAME                     STRING     1   "MOD_PR17A3"

        GROUP = QAFlags
            AUTOMATICQUALITYFLAG          STRING     1    "Pass"
            AUTOMATICQUALITYFLAGEXPLANATION
                                          STRING     1    "No automatic quality assessment is performed in the PGE"            
            SCIENCEQUALITYFLAG            STRING     1    Variable
            SCIENCEQUALITYFLAGEXPLANATION
                                          STRING     1    "See http://landweb.nascom.nasa.gov/cgi-bin/QA_WWW/qaFlagPage.cgi?sat=terra
                                                           for the product Science Quality status"
        END_GROUP = QAFlags

        GROUP = QAStats
            QAPERCENTINTERPOLATEDDATA      INTEGER    1   Variable
            QAPERCENTMISSINGDATA           INTEGER    1   Variable
            QAPERCENTOUTOFBOUNDSDATA       INTEGER    1   Variable
            QAPERCENTCLOUDCOVER            INTEGER    1   Variable
        END_GROUP = QAStats
    ENDGROUP = MeasuredParameter

    GROUP = AdditionalAttributes
        ADDITIONALATTRIBUTENAME          STRING   FR(C) Variable
        PARAMETERVALUE                   STRING   FR(C) Variable

        ADDITIONALATTRIBUTENAME.1  = QAPERCENTGOODQUALITY
        ADDITIONALATTRIBUTENAME.2  = QAPERCENTOTHERQUALITY        
        ADDITIONALATTRIBUTENAME.5  = HORIZONTALTILENUMBER
        ADDITIONALATTRIBUTENAME.6  = VERTICALTILENUMBER
        ADDITIONALATTRIBUTENAME.7  = TileID

        *******************************************************
        * Other SCF defined PSA attributes:
        *******************************************************

        ADDITIONALATTRIBUTENAME.8  = NDAYS_COMPOSITED
        ADDITIONALATTRIBUTENAME.9  = QAPERCENTGOODPSN
	ADDITIONALATTRIBUTENAME.10  = QAPERCENTGOODNPP
	
    END_GROUP = AdditionalAttributes

    GROUP = AssociatedPlatformInstrumentSensor
        ASSOCIATEDPLATFORMSHORTNAME                STRING     1   "Terra/Aqua"
        ASSOCIATEDINSTRUMENTSHORTNAME              STRING     1   "MODIS"
        ASSOCIATEDSENSORSHORTNAME                  STRING     1   "MODIS"
    END_GROUP = AssociatedPlatformInstrumentSensor

  ENDGROUP = INVENTORYMETADATA

ProductMetadata.0

    This string will contain the following PVL fields:

                                                     #
        Field Name                        Data      of   Value
                                          Type     Values
                                                    
GROUP = ARCHIVEDMETADATA

    GROUP = BoundingRectangle
        NORTHBOUNDINGCOORDINATE           DOUBLE     1   Variable
        SOUTHBOUNDINGCOORDINATE           DOUBLE     1   Variable
        EASTBOUNDINGCOORDINATE            DOUBLE     1   Variable
        WESTBOUNDINGCOORDINATE            DOUBLE     1   Variable
    END_GROUP = BoundingRectangle


    ALGORITHMPACKAGEACCEPTANCEDATE        STRING     1   "2005-02-11"
    ALGORITHMPACKAGEMATURITYCODE          STRING     1   "Normal"
    ALGORITHMPACKAGENAME                  STRING     1   "MOD17A3"
    ALGORITHMPACKAGEVERSION               STRING     1   "6"
    INSTRUMENTNAME			  STRING     1	 "Moderate Resolution Imaging Spectroradiometer"
    PROCESSINGDATETIME                    STRING     1   Variable
    GEOANYABNORMAL                        STRING     1   Variable
    GEOESTMAXRMSERROR                     DOUBLE     1   Variable
    LONGNAME  
             "MODIS/Terra Net Primary Production Yearly L4 Global 500M SIN Grid"  STRING     1
    PROCESSINGCENTER                      STRING     1   "MODAPS"
    LOCALINPUTGRANULEID                   STRING   FR(A) Variable
    NUMBEROFGRANULES                      INTEGER    1   Variable
    GRANULEDAYNIGHTFLAG                   STRING   FR(A) Variable
    NUMBEROFORBITS                        INTEGER    1   Variable
    CHARACTERISTICBINANGULARSIZE          DOUBLE     1   Variable
    CHARACTERISTICBINSIZE                 DOUBLE     1   Variable
    DATACOLUMNS                           INTEGER    1   Variable
    DATAROWS                              INTEGER    1   Variable
    GLOBALGRIDCOLUMNS                     INTEGER    1   Variable
    GLOBALGRIDROWS                        INTEGER    1   Variable
    NADIRDATARESOLUTION                   STRING     1   "500m"
    MAXIMUMOBSERVATIONS			  INTEGER    1   Variable
    COVERAGECALCULATIONMETHOD		  STRING     1   "area"
    SPSOPARAMETERS			  STRING     2   "3716"

ENDGROUP = ARCHIVEDMETADATA

StructuralMetadata.0
    This string will be populated automatically by HDF-EOS.

Grid Structure: MOD_Grid_MOD17A3H

    Data Fields:
	Npp_500M, Npp_QC_500M

    Dimensions:

	Dimension       Dimension Name              Value
	
	Dimension_0     YDim:MOD_Grid_MOD17A3H       "DataRows"
	Dimension_1     XDim:MOD_Grid_MOD17A3H       "DataColumns"

    Corner Locations:

        Corner                Values

        UpperLeftPointMtrs    (Variable, Variable)

        LowerRightPointMtrs   (Variable, Variable)

    Geographic Grid Projection Parameters:

         Sinusoidal Projection
            Projection            GCTP_SNSOID
            ProjParam[0]          6371007.181
            ProjParam[1 to 7]     0.0
            ProjParam[8]          0.0
            ProjParam[9]          0.0
            ProjParam[10]         0.0
            ProjParam[11 to 12]   0.0
            Spherecode            -1
            GridOrigin            HDFE_CENTER


        Integrized Sinusoidal Projection
            Projection        GCTP_ISINUS
            ProjParam[0]          6371007.181
            ProjParam[1 to 7]     0.0
            ProjParam[8]          21600
            ProjParam[9]          0.0
            ProjParam[10]         1.0
            ProjParam[11 to 12]   0.0
            Spherecode            -1
            GridOrigin            HDFE_GD_UL


===========================================================================

Data Field_1
------------

	Data Field Name: Npp_500M

	Description: Net Primary Productivity, 500M resolution

    Type: HDF-int16

	Dimensions:

		Dimension Name		Value

		YDim			MOD_Grid_MOD17A3H
		XDim			MOD_Grid_MOD17A3H
	
	HDF Attributes:
                                  Number of
                                  Values or
                                    Max.
        Attribute        Data      String    Value
                         Type      Length

        long_name        STRING      71      "MOD17A3H --MODIS Gridded 500M Net Primary Productivity (NPP)"
        units            STRING      8       "kg_C_m^2"
        valid_range      INT16       2       -30000,32700
        _FillValue       INT16       1       32767
        scale_factor     FLOAT64     1       0.0001
        add_offset       FLOAT64     1       0.0
        scale_factor_err FLOAT64     1       0.0
        add_offset_err   FLOAT64     1       0.0
        calibrated_nt    INT32       1       22

        Data (HDF NCSA style) conversions (to and from digital to analytical):
        Npp_500M     = scale_factor * (Digital_form - add_offset)
        Digital_Form = (Npp_500M / scale_factor) + add_offset



Data Field_2
------------

  Data Field Name: Npp_QC_500m

  Description: Npp_QC_500m, (bad_Qc days / total days) in growing season

  BITS BITFIELD
  -------------
        0,0  MODLAND_QC bits
             '0' =  Good Quality 
             '1' =  Other Quality 

        1,1 SENSOR
             '0' = Terra
             '1' = Aqua

        2,2  DEADDETECTOR
             '0' = Detectors apparently fine for up to 50% of channels 1,2
             '1' = Dead detectors caused >50% adjacent detector retrieval

        3,4  CLOUDSTATE (this inherited from Aggregate_QC bits {0,1} cloud state)
             '00' = 0 Significant clouds NOT present (clear)
             '01' = 1 Significant clouds WERE present
             '10' = 2 Mixed cloud present on pixel
             '11' = 3 Cloud state not defined,assumed clear

        5,7  SCF_QC (3-bit, (range '000'..100') 5 level Confidence Quality score.
             '000' = 0, Very best possible
             '001' = 1, Good,very usable, but not the best(saturation in FPAR/LAI has occured)
             '010' = 2, Substandard due to geometry problems - use with caution
             '011' = 3, Substandard due to other than geometry problems - use with caution
             '100' = 4, Couldn't retrieve pixel (NOT PRODUCED AT ALL - non-terrestrial biome)
	     '111' = 7, Fill Value
   
    Type: HDF-uint8

	Dimensions:

		Dimension Name		Value

		YDim			MOD_Grid_MOD17A3H
		XDim			MOD_Grid_MOD17A3H
	

	HDF Attributes:
                                  Number of
                                  Values or
                                    Max.
        Attribute        Data      String    Value
                         Type      Length

        long_name        STRING      71      "NPP_QC_500M"
        units            STRING      11      "Unitless"
        valid_range      UINT8       2       0  254
        _FillValue       UINT8       1       255

============================================================================

Last updated: October 24, 2019