Given two 1D grids, z_input
and z_output
, for each z_output
index k
we find an index m
so that
z_input[m] < z_output[k] <= z_input[m+1]
In other words, we look for two consecutive points in the input grid that bracket a point in the output grid.
This function sets result[k] = m
. This information is then used to interpolate from the grid defined by z_input
to the one defined by z_output
.
We use constant extrapolation outside the range defined by z_input
.
Definition at line 180 of file ColumnInterpolation.cc.
References k.
Referenced by pism::ColumnInterpolation::init_interpolation().