Changeset 1157 for trunk/src/get_field.m


Ignore:
Timestamp:
Jul 11, 2024, 4:13:03 PM (3 months ago)
Author:
sommeria
Message:

filter_time added

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/get_field.m

    r1127 r1157  
    509509VarIndex=find(strcmp(VarName,Field.Display.ListVarName),1);
    510510DimCell=Field.Display.VarDimName{VarIndex};
    511 % y_index=get(handles.Coord_y,'Value');
    512 % y_menu=get(handles.Coord_y,'String');
    513 % if isempty(y_menu)
    514 %     return
    515 % else
    516 % YName=y_menu{y_index};
    517 % end
     511
    518512
    519513%% set list of possible coordinates
    520 % test_component=zeros(size(Field.Display.VarDimName));%=1 when variable #ilist is eligible as unstructured coordinate
     514
    521515test_coord=zeros(size(Field.Display.VarDimName)); %=1 when variable #ilist is eligible as structured coordiante
    522 % ListCoord={''};
    523 % dim_var=Field.Display.VarDimName{y_index};%list of dimensions of the selected variable
    524516
    525517for ilist=1:numel(Field.Display.VarDimName)
    526     dimnames=Field.Display.VarDimName{ilist}; %list of dimensions for variable #ilist
    527     if isequal(dimnames,DimCell)||isequal(dimnames(1:end-1),DimCell)||isequal(dimnames(2:end),DimCell)
    528         test_coord(ilist)=1;
    529     end
    530 end
    531 ListCoord=Field.Display.ListVarName(find(test_coord));
     518    %dimnames=Field.Display.VarDimName{ilist}; %list of dimensions for variable #ilist
     519    % if isequal(dimnames,DimCell)||isequal(dimnames(1:end-1),DimCell)||isequal(dimnames(2:end),DimCell)
     520    % if numel(dimnames)==1 ||
     521    %     test_coord(ilist)=1;
     522    % end
     523end
     524ListCoord=Field.Display.ListVarName;%(find(test_coord));
    532525set(handles.Coord_y,'String',ListCoord)
    533526val_y=1;
     
    984977%-----------------------------------------------------------------------
    985978Field=get(handles.get_field,'UserData');
    986 index=name2index(VarName,Field.ListVarName);
     979index=name2index(VarName,Field.ListVarName); %index of the selectd variable
    987980if ~isempty(index)
    988     set(handles.variables,'Value',index+1)
     981    set(handles.variables,'Value',index+1) %indicate which variable is selected in the list (+1 because of the '*' display)
    989982    variables_Callback(handles.variables, VarName, handles)
    990983end
Note: See TracChangeset for help on using the changeset viewer.