Ignore:
Timestamp:
Feb 19, 2013, 7:19:07 PM (11 years ago)
Author:
sommeria
Message:

many corrections; introduction of browse_data to scan the whole set of data, used also to replicate data in calibration mode

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/find_field_cells.m

    r546 r569  
    232232    if CoordSize(ilist)==2% case of uniform grid coordinate defined by lower and upper bounds only
    233233        ListDimName{ilist}=ListCoordName{ilist};% replace the dimension name by the coordinate variable name
    234 %         if check_var
    235 %             check_index= strcmp(ListCoordName{ilist},Data.ListDimName);
    236 %             CoordSize(ilist)=Data.DimValue(check_index);
    237 %         else
    238 %             CoordSize(ilist)=numel(Data.(ListCoordName{ilist}));
    239 % %         end
    240 %     else
    241 %         CoordSize(ilist)=DimValue;
    242234    end
    243235end
     
    288280NbDim=[NbDim NewNbDim];
    289281CellInfo=[CellInfo NewCellInfo];
    290 
    291 %% suppress empty cells
    292 check_empty=cellfun(@isempty,CellInfo);
    293 %check_empty=cellfun(@isempty,CellVarIndex);
    294 CellInfo(check_empty)=[];
    295 
    296 % CellVarIndex(check_empty)=[];
    297 NbDim(check_empty)=[];
    298 % CoordType(check_empty)=[];
    299 % VarRole(check_empty)=[];
     282%
     283% %% suppress empty cells
     284% check_empty=cellfun(@isempty,CellInfo);
     285% CellInfo(check_empty)=[];
     286% NbDim(check_empty)=[];
     287
     288%% suppress empty cells or cells with a single coordinate variable
     289check_remove=false(size(CellInfo));
     290for icell=1:numel(check_remove)
     291    if isempty(CellInfo{icell})||(numel(CellInfo{icell}.VarIndex)==1 && check_coord(icell))
     292        check_remove(icell)=1;
     293    end
     294end
     295CellInfo(check_remove)=[];
     296NbDim(check_remove)=[];
    300297
    301298%% document roles of non-coordinate variables
Note: See TracChangeset for help on using the changeset viewer.