in calculating pipe stress within one line number, we usually assume it as uniform temperature and pressure. conservative? yes, but rather than you have to analyze the temperature decreasing in that single line number , which not make any significant result to the stress in pipe, you'd better compute it as a uniform temperature and pressure
or... you can fill out series of reducing temperature in every node, if you really really need it



regards