Changeset 575 for trunk/src/find_field_cells.m
- Timestamp:
- Feb 27, 2013, 6:39:32 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/find_field_cells.m
r569 r575 1 %'find_fi le_indices': test field structure for input in proj_field and plot_field1 %'find_field_cells': test field structure for input in proj_field and plot_field 2 2 % group the variables into 'fields' with common dimensions 3 3 %------------------------------------------------------------------------ … … 27 27 % INPUT: 28 28 % Data: structure representing fields, output of check_field_structure 29 % .ListGlobalAttributes 29 30 % .ListVarName: cell array listing the names (cahr strings) of the variables 30 31 % .VarDimName: cell array of cells containing the set of dimension names for each variable of .ListVarName … … 32 33 % .VarAttribute{ilist}.key=value, where ilist is the variable 33 34 % index, key is the name of the attribute, value its value (char string or number) 34 % 35 % .Attr1, .Attr2.... 36 % case of actual data: 37 % .Var1, .Var2... 38 % case of data structure, without the data themselves 39 % .LisDimName: list of dimension names 40 % .DimValue: list of corresponding dimension values 35 41 % HELP: 36 42 % to get the dimensions of arrays common to the field #icell … … 104 110 ivar_coord_x=find(strcmp('coord_x',Role)); 105 111 % VarDimCell=cell(numel(ivar_coord_x)); 106 check_select=zeros(1,nbvar); 112 check_select=false(1,nbvar); 113 check_coord=false(1,nbvar); 107 114 CellInfo=cell(1,numel(ivar_coord_x)); 108 115 NbDim=zeros(1,numel(ivar_coord_x)); … … 197 204 ListVarName=Data.ListVarName(~check_select);%list of remaining variables 198 205 VarDimName=Data.VarDimName(~check_select);%dimensions of remaining variables 199 check_coord= cellfun(@numel,VarDimName)==1|cellfun(@ischar,VarDimName)==1;% find remaining variables with a single dimension 206 check_coord_select= cellfun(@numel,VarDimName)==1|cellfun(@ischar,VarDimName)==1;% find remaining variables with a single dimension 207 check_coord(~check_select)=check_coord_select; 200 208 ListCoordIndex=ivar_remain(check_coord);% indices of remaining variables with a single dimension 201 209 ListCoordName=Data.ListVarName(ListCoordIndex);% corresponding names of remaining variables with a single dimension
Note: See TracChangeset
for help on using the changeset viewer.