A method for prediction of volcanic eruptions