Confusing as hell.
You have one set of values as a pair of vectors, (xfine_i,Tfine_i). As well, you have the same thing at a coarse set of points, so (xcoarse_j,Tcoarse_j).
Now, you want to find the closest point for each coarse point xcoarse_j, in the fine set? A double set of loops is wild overkill to do that. If x_i is sorted, then just use discretize. It will identify which pair of values xfine_i and xfine_(i+1) that point lies between, and it is VECTORIZED!!!!!
Once you have this correspondence, just pick the closer of the two. If the distance is too large, only you know what you intend to do, but since xfine_i is supposed to be sampled 3 times as finely as the coarse set, why will that be a problem?
The point is, all of this can be done in maybe 2 or 3 lines of code, depending on what you want to do. There is no need to use doubly nested loops and a tolerance.