Scottish oil town hopes to be Europe’s green energy capital with transition to renewables