Something like this should work.
// Time of day 24 hour
var time = 12;
// Base temperature for the day
var tempBase = 10;
// Fluctuations, multiplied with base temperature, indices correspond to hour of the day
var fluc = [0, 1, 1, 2, 1, 1, 2.5, 3.5, 1, 1, 1, 1,
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
// Work out the temperature of the given day for the given hour 24 format
temp = tempBase * fluc[time]
Of course the base temperatures need to be collected/calculated and also the average fluctuations for that day/timespan.
Fluctuations could be given for per day, per month, per week basis or any basis dependent on the accuracy required.
For example, to handle seasonal change one could do;
// Fluctuations for each season
summerFluc = [...];
winterFluc = [...];
autumnFluc = [...];
springFluc = [...];
// Fluctuations for months/days etc
fluc = []
// The formula pseudo code would be something like
temp = tempBase * fluc[time] * getSeasonFluc()
Hope it helps.