The ocean plays a critical role in reducing human impact on the global climate by absorbing and sequestering CO2 from the atmosphere. To quantify the ocean’s role in the global carbon budget, we need surface ocean pCO2 across space and time, but only sparse observations exist. The typical approach to reconstructing pCO2 is to train a machine learning approach on a subset of the pCO2 data and available physical and biogeochemical observations. Though the variables are all related to the pCO2, these approaches are often perceived as black boxes, as it is unclear how inputs are physically linked to pCO2 outputs. Here, we add physics by incorporating our knowledge of the direct effect of temperature on surface ocean pCO2. We use the machine learning algorithm XGBoost to develop a function between satellite and in-situ observations and the difference between observed pCO2 and the pCO2 that would exist if temperature variations were the only driver of variability. We show the resulting model is physically consistent, and performs at least as well as other data approaches. Uncertainty in the reconstructed pCO2 and its impact on the estimated CO2 fluxes are quantified. Uncertainty in piston velocity drives flux uncertainties. The historical reconstructed CO2 fluxes show larger interannual variability than the smoother neural network approaches, but a lesser trend since 2005. We estimate an air-sea flux of -2.3 +/- 0.5 PgC/yr for 1990-2018, agreeing with other data products and the Global Ocean Carbon Budget models of 2021 estimate of -2.3 +/- 0.4 PgC/yr.