I’m pretty sure this book takes place in England and is about a girl who has magical abilities. She lives in a town with magical residents. The mayor is able to control the weather. She is being pursued by dark forces and the entire town might also be compromised by this danger. She is learning magic from an older wizard. There’s a scene in an underground library. They may have the ability to time travel, but definitely the ability to transport themselves with magic. There’s a scene at an abandoned boardwalk (in Brighton I believe) and a carousel is there as well. I think it was storming at this scene. In the town, the magic is used to whitewash the fences and keep things sparkly white and beautiful. Each house has a footbridge due to a stream running through town and a garden with a whitewashed fence. The girl knows the mayor. She might be an orphan.
Though some of the details differ from your description, I wonder if this might be Peter Dickinson’s ‘The Weathermonger’?
It’s actually “The Witch Trade” series by Michael Molloy. Amazingly, someone was able to identify it for me and I bought and re-read all three!