Working with time-series data in climate analysis

I have weather data .txt input files (about 700 files, 2 years) and each file presents a specific day info every minute. I should find the missing timesteps and corresponding data by interpolation. To be used in the desired software (EnergyPlus, TRNSYS), the data should avoid discontinuity and 1 minute timestep should be kept. To give you more clear overview you can find one week data sample in the attachment. I appreciate if you could help me.Thank you in advance.

1 comentario

David Barry
David Barry el 14 de Dic. de 2016
What is the desired output format? The same as the input but re-sampled on to fixed timestep?

Iniciar sesión para comentar.

 Respuesta aceptada

Peter Perkins
Peter Perkins el 19 de Dic. de 2016
Editada: Peter Perkins el 19 de Dic. de 2016
If you have access to R2016b, this is easy with a timetable:
>> tt = timetable(datetime(2016,12,19,12,[1;3;5],0),[10;20;25])
tt =
Time Var1
____________________ ____
19-Dec-2016 12:01:00 10
19-Dec-2016 12:03:00 20
19-Dec-2016 12:05:00 25
>> tt = retime(tt,'minutely','spline')
tt =
Time Var1
____________________ ______
19-Dec-2016 12:01:00 10
19-Dec-2016 12:02:00 15.625
19-Dec-2016 12:03:00 20
19-Dec-2016 12:04:00 23.125
19-Dec-2016 12:05:00 25
Prior to R2016b, you can use interp1 with a datetime vector as the grid points and query points.

1 comentario

Thank you Peter, fortunately I could have access to R2016b and I could solve it as you have demonstrated.

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre Climate Science and Analysis en Centro de ayuda y File Exchange.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by