dg_closest_res: Determine an appropriate grid resolution based on input data.
Description
This is a generic function that is used to determine an appropriate
resolution given an area, cell spacing, or correlated length scale.
It does so by extracting the appropriate length/area column and
searching it for a value close to the input.