Nobody has EVER suggested we should colonize Mars to save ourselves from global warming expect people against colonizing Mars.
We can survive global warming for sure. If we can build habitats on Mars we can do it on Earth. However there are many conditions far worse than global warming which we cannot protect ourselves from: All out nuclear war. Asteroid hitting earth etc.
It is stupid to put all eggs in one basket. Colonizing other planets in the solar system safeguards our future.
You got to start early because it is a very time consuming effort. You cannot suddenly begin colonizing Mars once you discover an asteroid on collision course. It will be too late.
It is an effort that will likely take far more than 100 years to complete.
Humanity also risk regression. Global warming while not killing us could cause such regression in our technological ability and science that we simply loose the ability to send things into space. We have been in dark ages many times before in history. It can happen again.
Earth after most disasters short of getting hit by a full-on planetoid that liquefies the entire crust is still much easier to live on than Mars, and hardened Earth-based bunkers are a lot cheaper and easier to make than a Martian colony.
Really, for most planet-wide disasters the thing they do is force us to live a little bit like we'd have to on non-disaster-stricken Mars.
[EDIT] for the record I'm not against Martian exploration or even a Martian colony—I'm susceptible both to the "because it was there" and the "we'll come up with some cool tech in the process" arguments—I'm just very unconvinced Martian colonization is a good path to better survivability for the human species.