A potential solution for addressing climate change is to securely store carbon dioxide underground in reservoirs from which oil was previously extracted, an approach known as carbon sequestration. This is expensive, but the costs can be reduced by extracting any remaining oil from these reservoirs at the same time as introducing the carbon dioxide. However, it has been difficult to determine the most appropriate sites in terms of retaining the carbon dioxide for a long time as well as maximizing the recovery of oil.