Compartments function

Create a list of compartments