Ignore:
Timestamp:
Apr 22, 2014, 9:44:39 AM (10 years ago)
Author:
sommeria
Message:

adpatations to 3D fields

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/find_field_cells.m

    r690 r747  
    257257    DimIndices=[];
    258258    for idim=1:numel(DimCell)
    259         ind_dim=find(strcmp(DimCell{idim},ListDimName));%find the dim index in the list of coordinate variables
     259        ind_dim=find(strcmp(DimCell{idim},ListDimName));%find the dim index in the list of dimensions ListDimName
    260260        if ~isempty(ind_dim)
    261             DimIndices=[DimIndices ind_dim]; %update the list of coord dimensions included in DimCell
    262             if check_var && CoordSize(ind_dim)==2 % determine the size of the coordinate in case of coordiante variable limited to lower and upper bounds
     261            DimIndices=[DimIndices ind_dim]; %update the list of dim indices included in DimCell
     262            if check_var && CoordSize(ind_dim)==2 % determine the size of the coordinate in case of coordinate definition limited to lower and upper bounds
    263263                if isvector(Data.(ListVarName{ivardim}))
    264264                    if numel(Data.(ListVarName{ivardim}))>2
     
    287287        NewNbDim(nbcell)=numel(DimIndices);
    288288        NewCellInfo{nbcell}.CoordType='grid';
    289         NewCellInfo{nbcell}.CoordSize=CoordSize;
     289        NewCellInfo{nbcell}.CoordSize=CoordSize(DimIndices);
    290290        NewCellInfo{nbcell}.CoordIndex=ListCoordIndex(DimIndices);
    291291    end
Note: See TracChangeset for help on using the changeset viewer.