A Method for Computing Shallow Ice-Core Depths