time interpolation of a 3d matrix containing wind speed data
3 次查看（过去 30 天）
I am not an expert user and I would like to ask some information regarding time interpolation. I am running simulations to generate wind waves and as you know, the crucial point is to have wind data with good quality. For my simulations I used ERA5 wind data ( reanalysis) but I was told to compare the wind field with wind data coming from altimeters, for example IFREMER. The objective of the comparison is to correct some possible biases in the wind field.
Now, the problem is that ERA5 collects data every hour while IFREMER provides data every 6 hours. Since I am now focusing on the year 2011, for example, in the first case I have 8760 values while in the second case I have 1460 values.
Basically I have two 3D matrices: u10_ERA5 (81x109x8760) and u10_IFREMER (81x109x1460). The first two dimensions represent wind intensity for defined sets of longitude and latitudes ( the same for both matrices). Since the wind data coming from IFREMER is more accurate, I would like to modify the ERA5 matrix in order to increase the quality of the wind.
Here I attached two drawings I made ( just to give an idea of what I am thinking to do)
Could you provide a code that can help me in this?
Thank you a lot
Star Strider 2023-6-3
The retime or synchronize would likely be more apporpriate here, however the resample function could work (and interp1 is an option as well). I would downsample the hourly data to the every-six-hour data rather than upsample the every-six-hour data. The reason is that upsampling creates data where none previously existed. You cannot determine what the IFREMER data actually were at the hourly times, so any comparisons of interpolated hourly data to the ERA5 data would likely not be valid.
So I would use retime or synchronize to downsample the ERA5 data to the same times as the IFREMER data and go from there.