People do not say that a barometer ``knows'' when it is going to rain; but I doubt if there is any essential difference in this respect between the barometer and the meteorologist who observes it.
Actually, laboratory scientists say things like this all the time; and this way of speaking has become much more common with the spread of computers. Whether it is anything more than metaphorical is, however, a vexed question.

Surely one difference between the barometer and the meteorologist is that the meteorologist has a representation of rain at a future time, which the barometer (so far as I can see) does not? [CRS]