1. fixed one bug in loading interpolation weights. 2. implemented a function to write interpolation weights.