The transient flow testing of ultra-deepwater gas wells is greatly impacted by the low temperatures of seawater encountered over extended distances. This leads to a redistribution of temperature within the wellbore, which in turn influences the flow behavior. To accurately predict such a temperature distribution, in this study a comprehensive model of the flowing temperature and pressure fields is developed. This model is based on principles of fluid mechanics, heat transfer, mass conservation, and energy conservation and relies on the Runge-Kutta method for accurate integration in time of the resulting equations. The analysis includes the examination of the influence of various factors, such as gas flow production rate, thermal diffusivity of the formation, and thermal diffusivity of seawater, on the temperature and pressure profiles of the wellbore. The key findings can be summarized as follows: 1. Higher production rates during testing lead to increased flowing temperatures and decreased pressures within the wellbore. However, in the presence of a seawater thermocline, a crossover in flowing temperature is observed. 2. An increase in wellbore pressure is associated with larger pipe diameters. 3. Greater thermal diffusivity of the formation results in more rapid heat transfer from the wellbore to the formation, which causes lower flowing temperatures within the wellbore. 4. In an isothermal layer, higher thermal diffusivity of seawater leads to increased wellbore flowing temperatures. Conversely, in thermocline and mixed layer segments, lower temperatures are noted. 5. Production test data from a representative deep-water gas well in the South China Sea, used to calculate the bottom-seafloor-wellhead temperature and pressure fields across three operating modes, indicate that the average error in temperature prediction is 2.18%, while the average error in pressure prediction is 5.26%, thereby confirming the reliability of the theoretical model.