Changeset 1028 for trunk/src/get_field.m


Ignore:
Timestamp:
Jan 8, 2018, 9:52:53 PM (6 years ago)
Author:
sommeria
Message:

option for reading fields in terms of matrix index

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/get_field.m

    r1027 r1028  
    149149    ListSwitchVarIndexTime=[ListSwitchVarIndexTime; {'attribute'}];% the time can be chosen as a global attribute
    150150end
     151
     152Check_index=0;
    151153if Field.MaxDim>=2
    152154    ListSwitchVarIndexTime=[ListSwitchVarIndexTime;{'variable'};{'matrix index'}];% the time can be chosen as a dim index
     155else
     156    for ilist=1:numel(Field.Display.VarDimName)
     157        NbComponent=numel(Field.Display.VarDimName{ilist});
     158        if NbComponent>=2% multicomponent matrices without coordinate variables (thus not considered in the fct find_field_cell)
     159            ListSwitchVarIndexTime=[ListSwitchVarIndexTime;{'matrix index'}];% the time can be chosen as a dim index
     160            Check_index=1;
     161            break
     162        end
     163    end
    153164end
    154165
     
    220231    if check_vec_input
    221232        set(handles.FieldOption,'Value',3)% set vector selection option
    222     else
    223        
     233    else     
    224234        set(handles.FieldOption,'Value',2)% set scalar selection option
    225235    end
Note: See TracChangeset for help on using the changeset viewer.