An Efficient Numerical Algorithm for Wave Refraction/Shoaling Problems