a mandatory citywide blackout had been instituted after a japanese submarine had fired seventeen shells the day before at an oil refinery and a pier a few hours north near santa barbara , luckily doing little damage .