[508] | 1 | function DataOut=calc_tps(DataIn) |
---|
| 2 | DataOut=DataIn;%default |
---|
| 3 | SubDomain=1000; %default, estimated nbre of vectors in a subdomain used for tps |
---|
| 4 | if isfield(DataIn,'SubDomain') |
---|
| 5 | SubDomain=DataIn.SubDomain;% |
---|
| 6 | end |
---|
| 7 | [DataOut.SubRange,DataOut.NbSites,DataOut.Coord_tps,DataOut.U_tps,DataOut.V_tps] =... |
---|
| 8 | filter_tps([DataIn.X(DataIn.FF==0) DataIn.Y(DataIn.FF==0)],DataIn.U(DataIn.FF==0),DataIn.V(DataIn.FF==0),[],SubDomain,0); |
---|
| 9 | nbvar=numel(DataIn.ListVarName); |
---|
| 10 | DataOut.ListVarName=[DataIn.ListVarName {'SubRange','NbSites','Coord_tps','U_tps','V_tps'}]; |
---|
| 11 | DataOut.VarDimName=[DataIn.VarDimName {{'nb_coord','nb_bounds','nb_subdomain'},{'nb_subdomain'},... |
---|
| 12 | {'nb_tps','nb_coord','nb_subdomain'},{'nb_tps','nb_subdomain'},{'nb_tps','nb_subdomain'}}]; |
---|
| 13 | DataOut.VarAttribute{nbvar+3}.Role='coord_tps'; |
---|
| 14 | DataOut.VarAttribute{nbvar+4}.Role='vector_x'; |
---|
| 15 | DataOut.VarAttribute{nbvar+5}.Role='vector_y'; |
---|
| 16 | if isfield(DataOut,'ListDimName')%cleaning |
---|
| 17 | DataOut=rmfield(DataOut,'ListDimName'); |
---|
| 18 | end |
---|
| 19 | if isfield(DataOut,'DimValue')%cleaning |
---|
| 20 | DataOut=rmfield(DataOut,'DimValue'); |
---|
| 21 | end |
---|