Ignore:
Timestamp:
Aug 10, 2020, 3:20:45 PM (4 years ago)
Author:
sommeria
Message:

various updates

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/proj_field.m

    r1080 r1084  
    16231623                    [X,Y]=meshgrid(Coord{2},Coord{1});%initial coordinates
    16241624                    %name of error flag variable
    1625                     FFName='FF';%default name (if not already used)
    1626                     if isfield(ProjData,'FF')
    1627                         ind=1;
    1628                         while isfield(ProjData,['FF_' num2str(ind)])
    1629                             ind=ind+1;
    1630                         end
    1631                         FFName=['FF_' num2str(ind)];% append an index to the name of error flag, FF_1,FF_2...
    1632                     end
     1625%                     FFName='FF';%default name (if not already used)
     1626%                     if isfield(ProjData,'FF')
     1627%                         ind=1;
     1628%                         while isfield(ProjData,['FF_' num2str(ind)])
     1629%                             ind=ind+1;
     1630%                         end
     1631%                         FFName=['FF_' num2str(ind)];% append an index to the name of error flag, FF_1,FF_2...
     1632%                     end
    16331633                    % project all variables in the cell
    16341634                    for ivar=VarIndex
     
    16531653                            VarAttribute{length(ListVarName)+nbcoord}=FieldData.VarAttribute{ivar};
    16541654                        end
    1655                         ProjData.(FFName)=isnan(ProjData.(VarName));%detact NaN (points outside the interpolation range)
    1656                         ProjData.(VarName)(ProjData.(FFName))=0; %set to 0 the NaN data
     1655%                         ProjData.(FFName)=isnan(ProjData.(VarName));%detact NaN (points outside the interpolation range)
     1656%                         ProjData.(VarName)(ProjData.(FFName))=0; %set to 0 the NaN data
    16571657                    end
    16581658                    %update list of variables with error flag
    1659                     ListVarName=[ListVarName FFName];
    1660                     VarDimName=[VarDimName {DimCell}];
    1661                     VarAttribute{numel(ListVarName)}.Role='errorflag';
     1659%                     ListVarName=[ListVarName FFName];
     1660%                     VarDimName=[VarDimName {DimCell}];
     1661%                     VarAttribute{numel(ListVarName)}.Role='errorflag';
    16621662                elseif ~testangle % 3Dcase without change of angle
    16631663                    % unstructured z coordinate
Note: See TracChangeset for help on using the changeset viewer.