To get the best flavour, you can buy them whole and grate them or crush in a pestle and mortar as you need them. Once they have been ground they lose their distinct flavour and aromatic notes, so buy in small quantities and freeze in an airtight container.