compass.landice.mesh.get_dist_to_edge_and_GL

compass.landice.mesh.get_dist_to_edge_and_GL(self, thk, topg, x, y, window_size=100000.0)[source]

Calculate distance from each point to ice edge and grounding line, to be used in mesh density functions in compass.landice.mesh.set_cell_width(). In future development, this should be updated to use a faster package such as scikit-fmm.

Parameters
  • thk (numpy.ndarray) – Ice thickness field from gridded dataset, usually after trimming to flood fill mask

  • topg (numpy.ndarray) – Bed topography field from gridded dataset

  • x (numpy.ndarray) – x coordinates from gridded dataset

  • y (numpy.ndarray) – y coordinates from gridded dataset

  • window_size (int or float) – Size (in meters) of a search ‘box’ (one-directional) to use to calculate the distance from each cell to the ice margin. Bigger number makes search slower, but if too small, the transition zone could get truncated.

Returns

  • dist_to_edge (numpy.ndarray) – Distance from each cell to the ice edge

  • dist_to_grounding_line (numpy.ndarray) – Distance from each cell to the grounding line