When I studied Thermodynamics the definition of temperature I've learned (based on the Gibbs' postulates) was:
$$T = \dfrac{\partial U}{\partial S}.$$
This quantity has all the properties of the intuitive temperature. The only point is: it is the same for the whole system.
On the other hand we have the idea of a "pointwise" temperature. Indeed, many physicists when trying to give examples of scalar fields say: "temperature is a scalar, so we could consider a function associating to each point in a room the temperature at the point, and this would be a scalar field $T(x,y,z)$".
More than that we have the heat equation:
$$\dfrac{\partial u}{\partial t}=\alpha \nabla^2 u$$
with $u(x,y,z,t)$ being the temperature at $(x,y,z)$ and at time $t$.
In this case we have a sort of "pointwise" temperature: the temperature defined for each point of space or each point of a certain body (like a metal plate, for example).
Intuitively this makes sense, because there are really situations, like when heating a metal plate, where some regions have a different temperature than others.
Anyway, I'm having trouble in bringing the two definitions together. We have two things:
Thermodynamic temperature: defined as the derivative of the internal energy of a system with respect to the entropy. In that sense it is a function of the entropy of a macroscopic system and of the extensive parameters $X_1,\dots,X_n$ describing the macroscopic system.
Pointwise temperature: defined as the temperature at a particular point in space. It is a function of the spatial location. Here we have no mention whatsoever to a macroscopic system.
In that case, what is the connection between these two "temperatures"? The thermodynamic temperature applies to the description of equilibrium states of macroscopic bodies, the "pointwise" temperature, does not even mention macroscopic bodies.
How to bridge the gap between these two?