Changeset 569 for trunk/src/find_field_cells.m
- Timestamp:
- Feb 19, 2013, 7:19:07 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/find_field_cells.m
r546 r569 232 232 if CoordSize(ilist)==2% case of uniform grid coordinate defined by lower and upper bounds only 233 233 ListDimName{ilist}=ListCoordName{ilist};% replace the dimension name by the coordinate variable name 234 % if check_var235 % check_index= strcmp(ListCoordName{ilist},Data.ListDimName);236 % CoordSize(ilist)=Data.DimValue(check_index);237 % else238 % CoordSize(ilist)=numel(Data.(ListCoordName{ilist}));239 % % end240 % else241 % CoordSize(ilist)=DimValue;242 234 end 243 235 end … … 288 280 NbDim=[NbDim NewNbDim]; 289 281 CellInfo=[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 289 check_remove=false(size(CellInfo)); 290 for 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 294 end 295 CellInfo(check_remove)=[]; 296 NbDim(check_remove)=[]; 300 297 301 298 %% document roles of non-coordinate variables
Note: See TracChangeset
for help on using the changeset viewer.