update_metadata

s100py.s111.v1_2.utils.update_metadata(data_file, grid_properties, update_meta)

Updates an S111File object based on dynamic metadata.

Parameters:
  • data_file – S111File object

  • grid_properties (dict) –

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

    • ”minx”: West bound longitude

    • ”maxx”: East bound longitude

    • ”miny”: South bound latitude

    • ”maxy”: North bound latitude

    • ”cellsize_x”: Only for DCF2, grid spacing longitude

    • ”cellsize_y”: Only for DCF2, grid spacing latitude

    • ”nx”: Only for DCF2, number of points longitudinal

    • ”ny”: Only for DCF2, number of points latitudinal

    • ”latitude”: Only for DCF3, latitude of nodes

    • ”longitude”: Only for DCF3, longitudes of nodes

    • ”nodes”: Only for DCF3, number of nodes

  • update_meta (dict) –

    a dictionary of dynamic metadata, metadata can have the following key/value pairs:

    • ”dateTimeOfLastRecord”: Valid ISO 8601 time of latest value

    • ”numberOfGroups”: Number of forecasts

    • ”numberOfTimes”: Number of valid times

    • ”timeRecordInterval”: Time between forecasts in seconds

    • ”num_instances”: Number of surface current feature instances

Returns:

An S111File object updated by this function.

Return type:

data_file