add_metadata

s100py.s104.v1_1.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. - “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

      • ’balticSeaChartDatum2000’: 44

      • ’internationalGreatLakesDatum2020: 46

      • ’seaFloor’: 47

      • ’seaSurface’: 48

      • ’hydrographicZero: 49

    • ”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

      • ’astronomicalPrediction’: 2

      • ’analysisOrHybrid’: 3

      • ’hydrodynamicHindcast’: 4

      • ’hydrodynamicForecast’: 5

      • ’observedMinusPredicted’: 6

      • ’observedMinusAnalysis’: 7

      • ’observedMinusHindcast’: 8

      • ’observedMinusForecast’: 9

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

    forecast method or model, etc. - “datetimeOfFirstRecord”: Valid time of earliest value, ‘YYYYMMDDTHHMMSSZ’ - “datasetDeliveryInterval”: The expected time interval between availability of successive

    datasets for time-varying data. Must be formatted as ‘PnYnMnDTnHnMnS’ (ISO 8601 duration)

    • ”trendInterval”: The interval over which trend at a particular time is calculated.

      Unit: minutes.

Returns:

An S104File object updated by this function.

Return type:

data_file