The federal government will spend $500 million to replace and upgrade weather systems across the country.

Environment Canada will purchase and install 20 new radars over the next seven years -- with the option of buying up to 33.

The upgraded detectors will be more accurate, giving a better read on what is in the clouds and what type of precipitation is falling, be it hail, freezing rain, or snow.

The federal agency is also acquiring a new supercomputer system for us in analyzing the data from the weather radars.

Environment Minister Catherine McKenna said the end result will be better weather information across the country.

"With extreme weather events, and we're going to see more extreme weather events as a result of climate change, we need to be in the best position to respond so whether it's a drought, it's a forest fire, it's a blizzard, we need to make sure that we have the best tools available to protect Canadians," said McKenna.

Environment Canada says with better data, it will be able to issue better warnings, such as when hail is approaching a region.

As an example, she mentioned the forest fires that forced the evacuation of Fort McMurray last year.

"Where is the forest fire going? Because that's really important to the first responders so they can figure out how are they going to fight this fire, where do they need to move people, what neighbourhoods do they need to move people out of," said McKenna.

The first radar systems will be installed this fall, while work on the supercomputer began earlier this year.