Changeset 651 for trunk/src/proj_field.m


Ignore:
Timestamp:
Jun 25, 2013, 12:48:10 AM (11 years ago)
Author:
sommeria
Message:

various bugs corrected. Introduction of campaign lists in Open menu

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/proj_field.m

    r650 r651  
    10531053    switch CellInfo{icell}.CoordType
    10541054       
    1055         %% case of input fields with unstructured coordinates
    10561055        case 'scattered'
     1056        %% case of input fields with unstructured coordinates (applies for projMode ='projection' or 'interp_lin')
    10571057            if strcmp(ProjMode{icell},'interp_tps')
    10581058                continue %skip for next cell (needs tps field cell)
     
    10731073           
    10741074            % selection of the vectors in the projection range (3D case)
    1075             if check3D&&  width > 0
     1075            if check3D &&  width > 0
    10761076                %components of the unitiy vector normal to the projection plane
    10771077                fieldZ=norm_plane(1)*coord_x + norm_plane(2)*coord_y+ norm_plane(3)*coord_z;% distance to the plane
     
    10791079                for ivar=VarIndex
    10801080                    VarName=FieldData.ListVarName{ivar};
    1081                     eval(['FieldData.' VarName '=FieldData.' VarName '(indcut);'])
    1082                     % A VOIR : CAS DE VAR STRUCTUREE MAIS PAS GRILLE REGULIERE : INTERPOLER SUR GRILLE REGULIERE
     1081                    FieldData.(VarName)=FieldData.(VarName)(indcut);
    10831082                end
    10841083                coord_x=coord_x(indcut);
     
    11381137            end
    11391138           
    1140             % different cases of projection
     1139            % two cases of projection
    11411140            switch ProjMode{icell}
    11421141                case 'projection' 
     
    11741173                        end
    11751174                    end
    1176 %                     testFF=0;
    1177 %                     nbvar=numel(ProjData.ListVarName);                           
    1178 %                     if isfield(CellInfo{icell},'VarIndex_vector_x')&&isfield(CellInfo{icell},'VarIndex_vector_y')
    1179 %                         VarName_x=FieldData.ListVarName{CellInfo{icell}.VarIndex_vector_x};
    1180 %                         VarName_y=FieldData.ListVarName{CellInfo{icell}.VarIndex_vector_y};
    1181 %                         if isfield(CellInfo{icell},'VarIndex_errorflag')
    1182 %                             FieldData.(VarName_x)=FieldData.(VarName_x)(indsel);
    1183 %                             FieldData.(VarName_y)=FieldData.(VarName_y)(indsel);
    1184 %                         end
    1185 %                         %FieldVar=cat(2,FieldData.(VarName_x),FieldData.(VarName_y));
    1186 %                         if ~isfield(CellInfo{icell},'CheckSub') || ~CellInfo{icell}.CheckSub
    1187 %                             vector_x_proj=numel(ProjData.ListVarName)+1;
    1188 %                             vector_y_proj=numel(ProjData.ListVarName)+2;
    1189 %                         end
    1190 %                     end
    1191 %                     if isfield(CellInfo{icell},'VarIndex_scalar')
    1192 %                         VarName_scalar=FieldData.ListVarName{CellInfo{icell}.VarIndex_scalar};
    1193 %                         if isfield(CellInfo{icell},'errorflag') && ~isempty(CellInfo{icell}.errorflag)
    1194 %                             FieldData.(VarName_scalar)=FieldData.(VarName_scalar)(indsel);
    1195 %                         end
    1196 %                     end
    1197 %                     if isfield(CellInfo{icell},'VarIndex_ancillary')% do not project ancillary data with interp
    1198 %                         FieldData=rmfield(FieldData,FieldData.ListVarName{CellInfo{icell}.VarIndex_ancillary});
    1199 %                     end
    1200 %                     if isfield(CellInfo{icell},'VarIndex_warnflag')% do not project ancillary data with interp
    1201 %                         FieldData=rmfield(FieldData,FieldData.ListVarName{CellInfo{icell}.VarIndex_warnflag});
    1202 %                     end
    12031175                    % interpolate and calculate field on the grid
    12041176                    [VarVal,ListFieldProj,VarAttribute,errormsg]=calc_field_interp([coord_X coord_Y],FieldData,CellInfo{icell}.FieldName,XI,YI);
     
    12231195            end
    12241196
    1225             %% case of tps interpolation (applies only in interp_tps mode and for spatial derivatives)
    12261197        case 'tps'
     1198        %% case of tps data (applies only in interp_tps mode)
    12271199            if strcmp(ProjMode{icell},'interp_tps')
    12281200                Coord=FieldData.(FieldData.ListVarName{CellInfo{icell}.CoordIndex});
Note: See TracChangeset for help on using the changeset viewer.