compass.landice.mesh.get_dist_to_edge_and_gl

compass.landice.mesh.get_dist_to_edge_and_gl(self, thk, topg, x, y, section_name, window_size=None)[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

  • section_name (str) – Section of the config file from which to read parameters. The following options to be set in the given config section: levels, x_min, x_max, y_min, y_max, min_spac, max_spac, high_log_speed, low_log_speed, high_dist, low_dist, high_dist_bed, low_dist_bed, high_bed, low_bed, cull_distance, use_speed, use_dist_to_edge, use_dist_to_grounding_line, and use_bed. See the Land-Ice Framework section of the Users or Developers guide for more information about these options and their uses.

  • 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. We usually want this calculated as the maximum of high_dist and high_dist_bed, but there may be cases in which it is useful to set it manually. However, it should never be smaller than either high_dist or high_dist_bed.

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