Changeset 127 for trunk/src/nc2struct.m


Ignore:
Timestamp:
Nov 19, 2010, 10:44:24 AM (13 years ago)
Author:
sommeria
Message:

merge_proj.m: cleaning
sub_field.m: ?
dataview.m: modifs not finished
name-generator: bug repair for new nom_type
nc2struct: cleaning
uvmat: cleaning
read_civxdata: transform all variables to double
civ: bug repair for new nom_type, not finished

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/nc2struct.m

    r100 r127  
    9898           if ischar(valuestr) && length(valuestr)<200
    9999                iatt_g=iatt_g+1;
    100                 indstr1=regexp(keystr,'\\');%detect '\\'
    101                 indstr2=regexp(keystr,'\.');%detect '\.'
     100                indstr1=regexp(keystr,'\\','once');%detect '\\'
     101                indstr2=regexp(keystr,'\.','once');%detect '\.'
    102102                if isempty(indstr1) && isempty(indstr2)
    103103                    eval(['Data.' keystr '=''' valuestr ''';'])
     
    228228    %select the used dimensions
    229229    if ~isempty(var_read)
    230 %         if isfield(Data,'ListDimName') %&& isfield(Data,'DimValue')
    231 %         Data=rmfield(Data,'ListDimName');
    232 %         %Data=rmfield(Data,'DimValue');
    233 %         end
    234 %     else
    235 %         list_dim=1:ndims;
    236230        dim_index=find(flag_used);
    237 %         list_dim=list_dim(dim_index);
    238231        old2new=cumsum(flag_used);
    239232        ListDimName=ListDimName(dim_index);
     
    241234    end
    242235    for ivar=1:length(var_read)
    243         %Data.VarDimIndex{ivar}=old2new(VarDimIndex{ivar});% ENLEVER Data.VarDimIndex ulterieurement
    244         %Data.VarDimName{ivar}=Data.ListDimName(Data.VarDimIndex{ivar});
    245236        Data.VarDimName{ivar}=ListDimName(old2new(VarDimIndex{ivar}));
    246237    end
     
    257248            end
    258249            eval(['Data.' VarName '=double(netcdf.getVar(nc,var_index(ivar)-1));'])%read the variable data
    259             %eval(['siz=size(Data.' VarName ');'])
    260            % if numel(siz)<=2
    261             %eval(['Data.' VarName '=Data.' VarName ''';'])%read the variable data
    262             %end
    263250        end
    264251    end
Note: See TracChangeset for help on using the changeset viewer.