How to interpolate ARGO data

1 次查看(过去 30 天)
Farshid Daryabor
Farshid Daryabor 2020-4-23
I want to interpolate ARGO profiles at different depth corresponding to the refrence depth, I wrote a function below but give me an error, I really appreciate any help,
for k = 1 : size(P_new1,2)
[newDepth(:,k),newT(:,k)] = profile_interp(P_new1(:,k),T_new1(:,k));
end
Error using griddedInterpolant
The coordinates of the input points must be finite values; Inf and NaN are not permitted.
Error in interp1 (line 144)
F = griddedInterpolant(X,V(:,1),method);
Error in profile_interp (line 4)
newvar = interp1 (depth, var, newDepth, 'pchip' );
  3 个评论
KSSV
KSSV 2020-4-23
What are depth values? You have not specified the depth values.
Farshid Daryabor
Farshid Daryabor 2020-4-23
Dear, thanks for your comment. For ARGO, Pressure values are corresponding to the depth. If you open 'P_new1' the each columns are corresponding to a depth of a profile (T_new1) ,(number of profiles = size(P_new1,2)). The columns of 'P_new1' as you can see included different depth values, For instance, some started (first array) from 5m and the other column 24m and so on. I am trying to use a method to arrange the order of values of the all columns (value = 24 for first column from row1 shift to down according to the number of row that the row of corresponding value in other columns is, and accordingly temperature (T_new1). The reason for this work is plotting of hovemoller diagram that should be the all profile with depth ordered.

请先登录,再进行评论。

回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Particle & Nuclear Physics 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by