add_metadata

s100py.s104.v1_0.utils.add_metadata(metadata, data_file)

Updates an S104File object based on input metadata.

Parameters:
  • data_file – S104File object

  • metadata (dict) –

    a dictionary of metadata describing the data passed in, metadata should have the following key/value pairs:

    • ”productSpecification”: The product specification used to create

    this dataset. - “horizontalCRS”: Horizontal Datum EPSG code. - “metadata”: File name for the associated discovery metadata (xml) - “geographicIdentifier”: Location of the data, ex: “Tampa Bay”.

    An empty string (“”) is the default.

    • ”waterLevelHeightUncertainty”: In (meters) arises from the

    hydrodynamic model, and the spatial interpolation method. The default, denoting a missing value, is -1.0. - “verticalUncertainty”: Accuracy of vertical datum

    The default, denoting a missing value, is -1.0.

    • ”horizontalPositionUncertainty”: Accuracy of geolocation

    techniques, model grid accuracy. The default, denoting a missing value, is -1.0. - “timeUncertainty”: Sensor accuracy, data time tagging accuracy

    The default, denoting a missing value, is -1.0.

    • ”waterLevelTrendThreshold”: Critical value used to determine

    steady water level trend. Units are meters/hour (m/hr). - “verticalCS”: Vertical datum EPSG Code. - “verticalCoordinateBase”:

    • ’Sea surface’: 1

    • ’Vertical datum’: 2

    • ’Sea Bottom’: 3

    • ”verticalDatumReference”: For verticalCoordinateBase(2) only
      • ’S-100 vertical datum’: 1

      • ’EPSG’: 2

    • ”verticalDatum”:
      • ’meanLowWaterSprings’: 1

      • ’meanLowerLowWaterSprings’: 2

      • ’meanSeaLevel’: 3

      • ’lowestLowWater’: 4

      • ’meanLowWater’: 5

      • ’lowestLowWaterSprings’: 6

      • ’approximateMeanLowWaterSprings’: 7

      • ’indianSpringLowWater’: 8

      • ’lowWaterSprings’: 9

      • ’approximateLowestAstronomicalTide’: 10

      • ’nearlyLowestLowWater’: 11

      • ’meanLowerLowWater’: 12

      • ’lowWater’: 13

      • ’approximateMeanLowWater’: 14

      • ’approximateMeanLowerLowWater’: 15

      • ’meanHighWater’: 16

      • ’meanHighWaterSprings’: 17

      • ’highWater’: 18

      • ’approximateMeanSeaLevel’: 19

      • ’highWaterSprings’: 20

      • ’meanHigherHighWater’: 21

      • ’equinoctialSpringLowWater’: 22

      • ’lowestAstronomicalTide’: 23

      • ’localDatum’: 24

      • ’internationalGreatLakesDatum1985’: 25

      • ’meanWaterLevel’: 26

      • ’lowerLowWaterLargeTide’: 27

      • ’higherHighWaterLargeTide’: 28

      • ’nearlyHighestHighWater’: 29

      • ’highestAstronomicalTide’: 30

    • ”verticalDatumReference”:
      • ’S-100 Vertical datum’: 1

      • ’EPSG code’: 2

    • ”commonPointRule”:
      • ’average’: 1

      • ’low’: 2

      • ’high’: 3

      • ’all’: 4

    • ”interpolationType”: Interpolation method recommended for

    evaluation of the S100_GridCoverage.
    • ’nearestneighbor’: 1

    • ’linear’: 2

    • ’quadratic’: 3

    • ’cubic’: 4

    • ’bilinear’: 5

    • ’biquadratic’: 6

    • ’bicubic’: 7

    • ’lostarea’: 8

    • ’barycentric’: 9

    • ’discrete’: 10

    • ”typeOfWaterLevelData:
      • Observation: 1

      • Astronomical prediction: 2

      • Analysis or hybrid method: 3

      • Hydrodynamic model hindcast: 4

      • Hydrodynamic model forecast: 5

      • Observed minus predicted: 6

      • Observed minus analysis: 7

      • Observed minus hindcast: 8

      • Observed minus forecast: 9

      • Forecast minus predicted: 10

    • ”methodWaterLevelProduct”: Brief description of tide gauge type,

    forecast method or model, etc. - “dateTimeOfFirstRecord”: Valid time of earliest value, ‘YYYYMMDDTHHMMSSZ’

Returns:

An S104File object updated by this function.

Return type:

data_file