A submarine believed to be carrying around 3.5 tonnes of cocaine has been refloated off Spanish coast.