add diff1_inner, diff2_inner, and move some funcs to util
rename thermal_wind2 thermal_wind_inner