Local modes in computation of differential equations with random media