How to interpolate ARGO data

1 vue (au cours des 30 derniers jours)
Farshid Daryabor
Farshid Daryabor le 23 Avr 2020
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 commentaires
KSSV
KSSV le 23 Avr 2020
What are depth values? You have not specified the depth values.
Farshid Daryabor
Farshid Daryabor le 23 Avr 2020
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.

Connectez-vous pour commenter.

Réponses (0)

Catégories

En savoir plus sur Particle & Nuclear Physics dans Help Center et File Exchange

Community Treasure Hunt

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

Start Hunting!

Translated by