How to interpolate ARGO data

조회 수: 1 (최근 30일)
Farshid Daryabor
Farshid Daryabor 2020년 4월 23일
댓글: 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