Optimization of equilibrated headspace technique for compositional and isotopic analysis of dissolved gases