It shouldn't be accepted. English doesn't use the indefinite article with "weather" like that.
I had always taken the expression "what a" to be an idiom in itself, with its own meaning, different from the literal meaning of each individual word (just like, e.g. "get up", "find out", etc.), regardless of what comes after it in the sentence.
After looking it up, now I stand corrected.
You are right, except that you can't say "what a" with an uncountable noun like weather, water, sugar, sand, etc.