Hi all,

I have a dataset of mean daily temperatures from a weather station. However, I am running a model that needs data at a temporal scale of 1 hour. My question is: How can I convert these mean daily data into hourly values that conserves the mean daily value of the temperature?

I have tried this with a cosine function where T = temperature, T(mean) = mean daily temperature, t = time, A = amplitude), P = amount of hours in 1 day, so 24:

T(t) = T(mean) - A*cos*((2*pi*t / P))

However, the temperature cycli do not connect well between two different days (see attachment). Does anyone know how to solve this? I have tried this with a moving average but then the mean daily value was not conserved. Is there an alternative method?

Thanks in advance!

Similar questions and discussions