In countries that use the metric system the amount of precipitation is measured in millimetres (for small quantities) or centimetres (for larger quantities).
The depth of water contained in a vessel can also be measured in centimetres.
In English, a <object> is equivalent to one <object>. So "there is a centimeter of water" is equal to "there is one centimeter of water"
I have seen "il y a" written as "il ya " (without the space between "y" and "a"). Is it common (and correct) writing in French?
Saying "a centimeter of rain" changes the meaning. It could be water in a pool.
Rain, in French, is pluie (fem).
The question requested for water and so that is what you should translate. You therefore cannot interchange water and rain.