==========================================================================
MODIS MOD17 L4 Tile 500M Gridded PRODUCT: gap-filled PSN (First-of-Year Initialization, daily)

Revision 6.0.17 Mon Sep 16 2:01:00 EST 2019 Maosheng Zhao based on 6.0.2 MOD17A1.fs
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:  Wed Feb 16 23:55:00 PST 2005, _PV_
Revised:  Wed Oct 30 17:18:06 MST 2002, JMG Lupine Logic, Inc.
Revised:  Wed Oct 23 11:11:11 PST 2002
Revised:  Wed Nov 29 14:17:19 MST 2000
Revised:  Fri Mar 10 10:30:02 MST 2000
Revised:  Wed Jun 17 13:50:23 MDT 1998
Original: Fri Mar  6 10:53:20 MST 1998

Product Identifier: MOD_PR17A1 gap-filled PSN 500m gridded DAILY intermediate
                    temporary product

Description:

    The MOD_PR17A0.exe (PGE 36) annually produces new initialized
    MODIS AM-1 Level-4 500m daily temporary intermediate Photosynthesis data
    product.

    Gap-filled (GF) process is to first temporally fill unreliable FPAR/LAI
    from MOD15A2H using the reliable FPAR/LAI, and then calculate Gpp/PsnNet
    using these gap-filled FPAR/LAI as proposed by Zhao and his colleagues
    (Zhao et al., 2005). The GF MOD17 are meant to be equivalent of the same
    that was being produced from SCF.

    This product tile is used in the following ways by each
    of the MOD17 suite of PGEs:

    PGE              Action Performed On MOD17A1 Daily Intermediate Files
    ----------------------------------------------------------------------
      MOD_PR17A0     Writes fresh, zero'ed out copy of MOD17A1
      MOD_PR17A1     Reads, writes (updates) existing MOD17A1
      MOD_PR17A2     Reads SDS in existing MOD17A1
      MOD_PR17A3     Reads, writes (resets 1) SDS in existing MOD17A1

    This daily intermediate "updatable" product is NOT ARCHIVED but
    DOES need to  remain "resident" on the production disk/tape system as
    a temporary intermediate" for the duration of a given processing year.

    The update and reset schedule for each HFDEOS gridfield in this file
    is shown below:

                                          --------Periodicities------
    Measure                 Units         Updated       Reset To Zero
    ---------------------------------------------------------------------
    Gpp_Daily_500m          (kg/m^2 units)  daily        every 8-days
    Gpp_Rm_500m             (kg/m^2 units)  daily        annually
    AnnMax_LeafMass_500m    (kg/m^2 units)  daily        annually
    AnnSum_Mr_500m          unitless        daily        annually
    PsnNetSum_8day_500m     (kg/m^2 units)  daily        annually
    LAI_QC_Ann              Days            daily        annually
    Growing_Days_Ann        Days            daily        annually

    NOTES
    -----

    --The data type of the AnnSum_Mr_500m has been changed from uint16 to
      int32 to avoid overflows (v.4.1.0,v4.2.0 and higher...)
    --Units have been changed to reflect their true scaling as kg/m^2/day
      values.
    --The scale factor for the AnnSum_Mr_500m gridfield has been changed to
      0.01.
    --The old N_Yd_Committed [1200x1200] 2D int16 gridfield is now obsolete
      and has been deprecated. Its function is taken over by the
      ndays_completed[366] global file attribute.

    --The ORBITNUMBER and EQUATORCROSSINGTIME,DATE metadata fields have been
      deprecated.

    --MOD_PR17A2 (PGE 37) is the MODIS Terra Level-4 1KM 8-day ARCHIVED
    Photosyntheis data product. The PGE 36 MOD17A1 daily algorithm reads
    the cumulative (intermediate) tiled products, adding the current data
    day's PSN measure to each pixel in each given tile.  At the conclusion
    of each 8-day period (indicated via a PGE 37 production rule),
    the MOD17A2 PGE 37 application takes the PSN values accumulated over
    the 8-day period. Starting from V6.0.14, The 8-day A2 process will just
    read not write A1 HDF.

    NOTE that the same temporal accumulation scheme is used to produce the
    annual Net Primary Productivity (NPP) product, where the annual NPP
    product is generated based on cumulative values of the current year's
    daily intermediate terms (Gpp_Rm_1KM, AnnMax_LeafMass_1KM, and
    AnnSum_Mr_1KM) terms.  The annual NPP product is calculated by
    PGE 38, producing ESDT MOD17A3, which is MODIS parameter 2703.

    NOTE that gap-filled C6 MOD17 added the "GF" to each output HDFs, and the
    ESDT names are now MOD17A1HGF, MOD17A2HGF, and MOD17A3HGF to distinguish
    from the non-gap-filled MOD17A1H, MOD17A2H, and MOD17A3H.

Versioning:

   We currently version-stamp our source code, ancillary files and product files
   with an identical version and release-timedate stamp, called UM_VERSION.
   Users may extract this version stamp from any product or ancillary file
   using a command like this:

               ncdump -h MOD17_ANC_RI15.hdf | grep UM_VERSION.

   The latest certified codeset carries this version stamp as a global file
   attribute in the product files, ancillary files, and within the executable:
     UM_VERSION =
      "UM_VERSION: U.MONTANA MODIS PGE36 Vers 5.5.0 Rev 15 Release 05.30.2013 09:58"

Point of Contact:
   Petr Votava (software development)

Principal Investigator(s):
   Steven W. Running
   NTSG Lab, School of Forestry
   University of Montana
   Missoula,MT 59812
   WWW  : http://www.ntsg.umt.edu

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

===========================================================================
A note on MOD_PR17A1 and MOD_PR17 (PSN/NPP) 500m Level-4, Version 6.0.17 HDFEOS
  ALGORITHM, ESDT, and FILE designations:

PROCESS IDs   Status       Description                       PGE    ESDT
-----------------------------------------------------------------------------
MOD_PR17A0   temporary    500m annual initialization          PGE 36 MOD17A1HGF
MOD_PR17A1   temporary    500m intermediate terms GPP-RM etc  PGE 36 MOD17A1HGF
MOD_PR17A2   archived     8-day composite Gpp at 500m         PGE 37 MOD17A2HGF
MOD_PR17A2   archived     8-day composite PsnNet at 500m      PGE 37 MOD17A2HGF
MOD_PR17A3   archived     Annual NPP at 500m                  PGE 38 MOD17A3HGF
MOD_PR17A3   archived     Annual NPP QC at 500m               PGE 38 MOD17A3HGF

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

============================================================================
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   "MOD17A1HGF"
        VERSIONID                         INTEGER    1   6
    END_GROUP = CollectionDescriptionClass

    GROUP = ECSDataGranule
        SIZEMBECSDATAGRANULE              DOUBLE     1   Variable
        REPROCESSINGPLANNED               STRING     1   "further update is anticipated"
        REPROCESSINGACTUAL                STRING     1   "reprocessed"
        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.17"
    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_PR17A1"

        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   "MOD_PR17A1"
    ALGORITHMPACKAGEVERSION               STRING     1   "6"
    INSTRUMENTNAME			  STRING     1	 "MODIS"
    PROCESSINGDATETIME                    STRING     1   Variable
    GEOANYABNORMAL                        STRING     1   Variable
    GEOESTMAXRMSERROR                     DOUBLE     1   Variable
    LONGNAME                              STRING     1
           "MODIS/Terra Net Photosynthesis Gap-Filled Daily Intermediate L4 Global 500m SIN Grid"

    PROCESSINGCENTER                      STRING     1   "MODAPS"
    PROCESSINGENVIRONMENT                 STRING     1   "set by uname"
    DESCRREVISION                         STRING     1   Variable
    LOCALINPUTGRANULEID                   STRING   FR(A) Variable
    NUMBEROFGRANULES                      INTEGER    1   Variable
    GRANULEDAYNIGHTFLAG                   STRING   FR(A) 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
    SPSOPARAMETERS			  STRING     2   "3716"

ENDGROUP = ARCHIVEDMETADATA

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

Global (SCF internal) File Attributes

    char UM_VERSION
    int32 ndays_completed[366]

Grid Structure: MOD_Grid_MOD17A1

    Data Fields:

     Gpp_daily_500m,
     Gpp_Rm_500m,
     AnnMax_LeafMass_500m,
     AnnSum_Mr_500m,
     PsnNetSum8day_500m

    Dimensions:

	Dimension       Dimension Name              Value

	Dimension_0     YDim:MOD_Grid_MOD17A1H       "DataRows"
	Dimension_1     XDim:MOD_Grid_MOD17A1H       "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: Gpp_Daily_500m

	Description: Daily cumulative gross primary productivity,
        (e.g.Photosynthesis), in kg C/m^2, at 500m resolution

    Type: HDF-int16

	Dimensions:

		Dimension Name		Value

		YDim			DataRows
		XDim			DataColumns

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

        long_name        STRING      14      "GPP_DAILY_500M"
        units            STRING      8       "kg_C_m^2"
        valid_range      INT16       2       0  30000
        _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):
        Gpp_daily_500m     = scale_factor * (Digital_form - add_offset)
        Digital_Form = (Gpp_500m / scale_factor) + add_offset

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

	Data Field Name: Gpp_Rm_500m

	Description: Daily Photosynthesis (GPP) Minus Maintenance
	             Respiration (RM), in kg C/m^2 at 500m resolution.

    Type: HDF-int16

	Dimensions:

		Dimension Name		Value

		YDim			DataRows
		XDim			DataColumns

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

        long_name        STRING      14      "GPP_RM_500M"
        units            STRING      8       "kg_C_m^2"
        valid_range      INT16       2       0  30000
        _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):
          Gpp_Rm_500m     = scale_factor * (Digital_form - add_offset)
          Digital_Form = (Gpp_Rm_500m / scale_factor) + add_offset

Data Field_3
------------

	Data Field Name: AnnMax_LeafMass_500m

	Description: Leaf mass accumulated over an annual period,
	             at 500m resolution, in kg C/m^2 units.

    Type: HDF-int16

	Dimensions:

		Dimension Name		Value

		YDim			DataRows
		XDim			DataColumns

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

        long_name        STRING      14      "ANNMAX_LEAFMASS_500M"
        units            STRING      8       "kg_C_m^2"
        valid_range      INT16       2       0  2000
        _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):
          AnnMax_LeafMass_500m = scale_factor * (Digital_form - add_offset)
          Digital_Form = (AnnMax_LeafMass_500m / scale_factor) + add_offset

Data Field_4
------------

	Data Field Name: AnnSum_Mr_500m

	Description: Sum of maintenance respiration term, accumulated over an
	             annual period, at 500m resolution, in kg/m^2 units.

    Type: HDF-int32

	Dimensions:

		Dimension Name		Value

		YDim			DataRows
		XDim			DataColumns

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

        long_name        STRING      14      "ANNSUM_MR_500M"
        units            STRING      8       "kg m^2"
        valid_range      INT32       2       0,200001
        _FillValue       INT16       1       200000
        scale_factor     FLOAT64     1       0.01
        add_offset       FLOAT64     1       0.0
        scale_factor_err FLOAT64     1       0.0
        add_offset_err   FLOAT64     1       0.0
        calibrated_nt    INT32       1       24

Data (HDF NCSA style) conversions (to and from digital to analytical):

          AnnMax_Sum_Mr_500m = scale_factor * (Digital_form - add_offset)
          Digital_Form = (AnnMax_Sum_Mr_500m / scale_factor) + add_offset

Data Field_5
-------------
	Data Field Name: PsnNetSum8day_500m

	Description: 8-day accumulation of Daily Photosynthesis (GPP) Minus Maintenance
	             Respiration (RM), in kg C/m^2 at 500m resolution.

    Type: HDF-int16

	Dimensions:

		Dimension Name		Value

		YDim			DataRows
		XDim			DataColumns

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

        long_name        STRING      14      "PSN_NET_SUM_8DAY_500M"
        units            STRING      8       "kg_C_m^2"
        valid_range      INT16       2       0  32760
        _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):
          PsnNetSum8day_500m     = scale_factor * (Digital_form - add_offset)
          Digital_Form = (PsnNetSum8day_500m / scale_factor) + add_offset

Data Field_6
-------------
	Data Field Name: LAI_QC_Ann

	Description: aggregated days with filled LAI during all growing days.

    Type: HDF-uint16

	Dimensions:

		Dimension Name		Value

		YDim			DataRows
		XDim			DataColumns

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

        long_name        STRING      14      "aggregated days with filled LAI during all growing days"
        units            STRING      8       "days"
        valid_range      INT16       2       0  366
        _FillValue       INT16       1       65535
        scale_factor     FLOAT64     1       1.0
        add_offset       FLOAT64     1       0.0
        scale_factor_err FLOAT64     1       0.0
        add_offset_err   FLOAT64     1       0.0
        calibrated_nt    INT32       1       23

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

Data Field_7
-------------
        Data Field Name: Growing_Days_Ann

        Description: total growing days in the year.

    Type: HDF-uint16

        Dimensions:

                Dimension Name          Value

                YDim                    DataRows
                XDim                    DataColumns

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

        long_name        STRING      14      "total growing days in the year"
        units            STRING      8       "days"
        valid_range      INT16       2       0  366
        _FillValue       INT16       1       65535
        scale_factor     FLOAT64     1       1.0
        add_offset       FLOAT64     1       0.0
        scale_factor_err FLOAT64     1       0.0
        add_offset_err   FLOAT64     1       0.0
        calibrated_nt    INT32       1       23

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

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