docs: def get_closest_points(self, mesh):
          """
          For each point in ``mesh`` find the closest surface element, and return
          the corresponding closest point.
  
          See :meth:`superclass method
          <.base.BaseSurface.get_closest_points>`
          for spec of input and result values.
          """
          # first, for each point in mesh compute minimum distance to each
          # surface. The distance matrix is flattend, because mesh can be of
          # an arbitrary shape. By flattening we obtain a ``distances`` matrix
          # for which the first dimension represents the different surfaces
          # and the second dimension the mesh points.
          dists = numpy.array(
              [surf.get_min_distance(mesh).flatten() for surf in self.surfaces]
          )
  
          # find for each point in mesh the index of closest surface
          idx = dists == numpy.min(dists, axis=0)
  
          # loop again over surfaces. For each surface compute the closest
          # points, and associate them to the mesh points for which the surface
          # is the closest. Note that if a surface is not the closest to any of
          # the mesh points then the calculation is skipped
          lons = numpy.empty_like(mesh.lons.flatten())
          lats = numpy.empty_like(mesh.lats.flatten())
          depths = None if mesh.depths is None else \
              numpy.empty_like(mesh.depths.flatten())
          for i, surf in enumerate(self.surfaces):
              if not idx[i, :].any():
                  continue
              cps = surf.get_closest_points(mesh)
              lons[idx[i, :]] = cps.lons.flatten()[idx[i, :]]
              lats[idx[i, :]] = cps.lats.flatten()[idx[i, :]]
              if depths is not None:
                  depths[idx[i, :]] = cps.depths.flatten()[idx[i, :]]
          lons = lons.reshape(mesh.lons.shape)
          lats = lats.reshape(mesh.lats.shape)
          if depths is not None:
              depths = depths.reshape(mesh.depths.shape)
  
          return Mesh(lons, lats, depths)