down as the hot tubing string is extracted through the wellhead 14 it is exposed to the flow of cooling gas in the spool stack the extraction rate of the tubing as well as other variables can be adjusted so that the tubing string comes out of the bop 20 at a temperature that can be safely handled by the personnel on the snubbing unit in a preferred embodiment the removal of production tubing results in intermittent movement of the tubing string as the various lengths are removed preferably the cooling occurs quickly enough that the tubing string is cooled as it is pulled up through spools 12 this is particularly important if used with coiled tubing string as it is pulled continuously in the depicted embodiment the cooling chamber is open to the annulus of the well in a preferred embodiment a gas such as nitrogen gas may be pumped into the cooling chamber at the bottom port 22 and extracted at the top port the nitrogen gas is pumped in at a pressure that is slightly higher than the wellbore pressure and is allowed to escape through the top port 22 this creates a nitrogen gas buffer at the top of the wellbore while there will generally be some gas that escapes downhole because of the higher pressure and the mixing of fluids the rate of flow in and out of the cooling chamber may be monitored to ensure that this is minimized to an acceptable level if it is found that an unacceptable gas is being diverted downhole the pressure may be adjusted to reduce this other gases may be used such as carbon dioxide although nitrogen is preferred for economic reasons for safety reasons the gas should be an inert.