Skip to content

Match Simulation Points to Observations

Simulation Data (from HYCOM model) is provided on a 3D grid. The observation datapoints can be anywhere within this grid. Therefore, to compare observations and simulations, one must match observation datapoints to their "corresponding" simulation point.

Defining Closest Point Value

  1. Finding the Closest point on a the 2D grid:

    Since HYCOM output file are provided with a "Grid File", a file containing only latitude and longitude coordinates of all simulated points. Using this values, it is possible to find the closest simulated point to a given observed point (only considering latitude and longitude). This is done using scikit-learn's NearestNeighbor Algorithm with the following parameters:

  2. Loading all simulated point at this location for the given date

  3. Finding the right value in depth:

    Instead of finding the closest depth value within the avalaible levels, the simulated point values are interpolated from water profile.

Therefore, in the end, the "closest point" is the point which latitude and longitude are the closest to the observation (relative to the Haversine metric) and values have been interpolated to match the observation's depth.

Illustration

Closest points selected from a set of points (grey points on the figure), match with their corresponding 'observation'. Observations are triangles facing the right while simulations are triangles facing the left.

Same color observations and simulations are supposed to represent a simulation-observation pair. However, since the amount of color is finite for a better visual interpretation, some colors might be duplicated.

ClosestMap