Context. Since its rendezvous with comet 67P/Churyumov-Gerasimenko (67P), the Rosetta spacecraft has provided invaluable information contributing to our understanding of the cometary environment. On board, the VIRTIS and ROSINA instruments can both measure gas parameters in the rarefied cometary atmosphere, the so-called coma, and provide complementary results with remote sensing and in situ measurement techniques, respectively. The data from both ROSINA and VIRTIS instruments suggest that the source regions of H 2 O and CO 2 are not uniformly distributed over the surface of the nucleus even after accounting for the changing solar illumination of the irregularly shaped rotating nucleus. The source regions of H 2 O and CO 2 are also relatively different from one another. Aims. The use of a combination of a formal numerical data inversion method with a fully kinetic coma model is a way to correlate and interpret the information provided by these two instruments to fully understand the volatile environment and activity of comet 67P. Methods. In this work, the nonuniformity of the outgassing activity at the surface of the nucleus is described by spherical harmonics and constrained by ROSINA-DFMS data. This activity distribution is coupled with the local illumination to describe the inner boundary conditions of a 3D direct simulation Monte-Carlo (DSMC) approach using the Adaptive Mesh Particle Simulator (AMPS) code applied to the H 2 O and CO 2 coma of comet 67P. Results. We obtain activity distribution of H 2 O and CO 2 showing a dominant source of H 2 O in the Hapi region, while more CO 2 is produced in the southern hemisphere. The resulting model outputs are analyzed and compared with VIRTIS-M/-H and ROSINA-DFMS measurements, showing much better agreement between model and data than a simpler model assuming a uniform surface activity. The evolution of the H 2 O and CO 2 production rates with heliocentric distance are derived accurately from the coma model showing agreement between the observations from the different instruments and ground-based observations. Conclusions. We derive the activity distributions for H 2 O and CO 2 at the surface of the nucleus described in spherical harmonics, which we couple to the local solar illumination to constitute the boundary conditions of our coma model. The model presented reproduces the coma observations made by the ROSINA and VIRTIS instruments on board the Rosetta spacecraft showing our understanding of the physics of 67P's coma. This model can be used for further data analyses, such as dust modeling, in a future work.