Carbon dioxide dissolution in structural and stratigraphic traps