A IJN Destroyer (Warship) vs a Shogunate Castle... Who'll win?
You have peaked my interest!
Really what it comes down to is if Shigure's guns can reach. So lets do some math. Toyama castle isn't that far from Toyama bay. It's a 5.2 mile drive from the castle to the tip of a small peninsula near Toyama port, where Shigure could park. 5.2 miles = 9152 yards.
We now have the rough range Shiggy needs to be able to reach in order to hit the castle.
Shigure has five 12.7 cm/50 Type 3 naval guns in Model C mounts. They have a maximum firing range of 20,100 yards and a maximum elevation of 55 degrees. That puts the castle well within Shigure's range.
That castle is dust. Sans magical shenanigans anyway.
But just for fun, lets say this isn't happening in a vacuum. What about the rest of the city? Unfortunately, Toyama castle is not near any skyscrapers, and though it is near the prefectural office and some mid-sized office buildings, Shigure can get a pretty decent ballistic arc. If she fires from the port, or over the nearby town of Kusajima, there's not much in the way. That I can see anyway, Google maps 3d mode isn't working.
But then, this is just a silly exercise. I had fun.