That's a cool idea.
Roughly, I'd go find the bit of the code that handles weather abilities. Add some extra code that's roughly this psuedocode:
Code:
if not hasWeatherAbility:
for move in moves:
if move == SunnyDay:
# copy the code that Drought uses to set up the sun.
move.pp -= 1
break
elif move == RainDance:
# copy the code that Drizzle uses to set up the rain.
move.pp -= 1
...