The key to the explanation of the variety of processes associated with the activity of comets lies in a more profound understanding of the events that occur in the near-surface layer of the cometary nucleus and in the inner part of the cometary atmosphere, which is formed under the action of solar radiation. A complete description of the mass-and energy-transfer processes inside and outside the cometary nucleus, which can be presented as a body with a complex morphology and high porosity and which is composed of mineral, organic, and volatile components, is an extremely complicated problem of space physics. The nucleus and the inner part of the coma are closely related to each other as physical subsystems, and physical processes in these regions are in close symbiosis because of the permanent exchange of both energy and mass. The thermophysical model of the circumnuclear coma cannot be confined only to the consideration of the processes in the nucleus-the entire system should be simulated as a whole. A consistent model of the inner part of a cometary atmosphere of this kind has been developed in this paper within the framework of the gas-kinetic approach. Based on direct statistical simulation with weights, we simulated the two-dimensional gas flow from the cometary nucleus. The nucleus was assumed to be spherical. We considered different models of the nucleus morphology that determined the effective gas production: the homogeneous nucleus, the "spotty" nucleus with its active area in the vicinity of the subsolar point, and the "spotty" nucleus with its active area in the form of a spherical segment. For the first time, the boundary conditions at the inner boundary of the simulation domain required for the kinetic modeling of the inner coma were found from a self-consistent model of the heat and mass transfer in a porous cometary nucleus. The model was earlier developed by the authors. The basic new features of the model included taking into account the volumetric character of the radiation absorption in a porous medium, the kinetic simulation of the transport of sublimation products in the pores, and the consideration of the backward fluxes from the coma due to the intermolecular collisions. The kinetic simulation was performed using the SMILE program package. The parallel computer implementation of the model made it possible to calculate the spatial fields of the basic macrocharacteristics of the gas flow. It was demonstrated that the structure of the inner coma is essentially dependent on variations in the effective gas production. In all the cases considered, the main part of the coma is far from thermodynamic equilibrium. This means that the entire structure of the inner cometary atmosphere can be accurately studied only within the framework of the kinetic approach. In a general case, it can result from the interaction of gas flows generated by different active subregions on the nucleus surface. Thus, fine structures are formed and local efficient gas recondensation from the coma occurs in the model for some...