Nonequilibrium temperature in the multiscale dynamics and thermodynamics