Finite-difference modeling with variable grid-size and adaptive time-step in porous media