Hello,
I am currently using Triscatteredinterp to transform a regular grid (659 x 3600 x 1682) to this grid (659 x 3127 x 254). However, my values change considerably. Does anyone know why this happens or whether someone knows a method is better / doesn't involve interpolation?
I exclude high latitude regions in the new grid (+-66) but when I exclude the same high latitudes on the original regular grid, the values are much higher. For example:
Global mean fldmean (time axis left after averaging)
3600x1682 ~ 5cm 3127x254 ~ -2cm
could it be something to do with averaging? I currently use nanmean3d...
Here is my code:
for t = 1:659;
t
tic
a=squeeze(ssh_10d(t,224:1459,:));
a=a(:);
bad1=find(isnan(a)==0);
a1 = a(bad1);
lon=lon(:);
lon1 = lon(bad1);
lat=lat(:);
lat1 = lat(bad1);
F1=TriScatteredInterp(lon1,lat1,a1,'natural');
clear a a1
a_m=F1(REF_lon,REF_lat);
if isempty(a_m) == 0;
AM(t,:,:)=a_m;
end
toc
end
This method is also very slow so if anyone knows how to speed this up, it would be great!
thanks, Michael