Changeset 754 for trunk/src


Ignore:
Timestamp:
Apr 27, 2014, 11:18:06 PM (11 years ago)
Author:
sommeria
Message:
 
Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/get_field.m

    r752 r754  
    988988Field=get(handles.get_field,'UserData');
    989989index=get(handles.SwitchVarIndexTime,'Value');
     990MenuIndex=get(handles.TimeName,'Value');
     991string=get(handles.TimeName,'String');
     992TimeName=string{MenuIndex};
    990993switch index
    991994    case 1
     
    994997    case 2
    995998        set(handles.num_TimeDimension,'String','')
    996         attr_index=strcmpi(TimeUnit,Field.ListGlobalAttribute);
     999        attr_index=find(strcmpi([TimeName 'Unit'],Field.ListGlobalAttribute));% look for time unit
    9971000        if ~isempty(attr_index)
    9981001            AttrName=Field.ListGlobalAttribute{attr_index};
     
    10001003        end
    10011004    case {3 ,4}
    1002         MenuIndex=get(handles.TimeName,'Value');
    1003         string=get(handles.TimeName,'String');
    10041005        if index==3  % TimeName is used to chose a variable
    1005             VarName=string{MenuIndex};
    1006             VarIndex=name2index(VarName,Field.ListVarName);
     1006            VarIndex=name2index(TimeName,Field.ListVarName);
    10071007            DimName=Field.VarDimName{VarIndex};
    10081008            DimIndex=name2index(DimName,Field.ListDimName);
     
    10141014            end
    10151015            set(handles.TimeUnit,'String',unit)
    1016             update_field(handles,VarName)
     1016            update_field(handles,TimeName)
    10171017        elseif index==4% TimeName is used to chose a dimension
    10181018            DimName=string{MenuIndex};
     
    10211021            set(handles.num_TimeDimension,'String',num2str(DimValue))
    10221022            set(handles.TimeUnit,'String','index')
    1023            
    10241023        end
    10251024end
  • trunk/src/get_file_series.m

    r643 r754  
    2323%ref_j=[];
    2424first_j=[];last_j=[];incr_j=1;%default
    25 if isfield(Param.IndexRange,'first_j')
     25if isfield(Param.IndexRange,'first_j')&& isfield(Param.IndexRange,'last_j')
    2626    first_j=Param.IndexRange.first_j;
     27    last_j=Param.IndexRange.last_j;
     28end
     29if isfield(Param.IndexRange,'incr_j')
    2730    incr_j=Param.IndexRange.incr_j;
    28     last_j=Param.IndexRange.last_j;
    2931end
    3032
Note: See TracChangeset for help on using the changeset viewer.