Changeset 1119 for trunk/src/series.m
- Timestamp:
- Aug 16, 2022, 2:02:02 PM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/series.m
r1114 r1119 2522 2522 FieldList_1=get(handles.FieldName_1,'String'); % previous list as default 2523 2523 if ~iscell(FieldList_1),FieldList_1={FieldList_1};end 2524 Check List_1=1; % indicate whether FieldName_1 has been updated2524 CheckPivData_1=0; % indicate whether FieldName_1 has been updated with civ data, 0 by default 2525 2525 handles_coord=[handles.Coord_x handles.Coord_y handles.Coord_z handles.Coord_x_title handles.Coord_y_title handles.Coord_z_title]; 2526 2526 if VelTypeRequest && numel(iview_civ)>=1 … … 2541 2541 set(handles.VelType_title_1,'Visible','on') 2542 2542 FieldList_1=[set_field_list('U','V');{'C'};{'add_field...'}]; % standard menu for civx data 2543 Check List_1=1;2543 CheckPivData_1=1; 2544 2544 set(handles.FieldName_1,'Value',1); % velocity vector choice by default 2545 2545 else … … 2567 2567 end 2568 2568 end 2569 if ~isempty(FieldList) 2569 if ~isempty(FieldList)iview_netcdf 2570 2570 if isempty(find(strcmp(get(handles.Coord_x,'String'),ListVarName)))||... 2571 2571 isempty(find(strcmp(get(handles.Coord_y,'String'),ListVarName))) … … 2584 2584 set(handles.Field_text,'Visible','off') 2585 2585 end 2586 2587 2586 set(handles_coord,'Visible','on') 2588 2587 if isempty(find(strcmp('add_field...',FieldList))) … … 2591 2590 if FieldNameRequest_1 && numel(iview_netcdf)>=2 2592 2591 set(handles.FieldName_1,'Visible','on') 2593 if CheckList_1==0 % not civ input made 2592 set(handles.Field_text_1,'Visible','on') 2593 if CheckPivData_1==0 % not civ input made 2594 FieldList_1={'add_field...'} 2594 2595 ListVarName=SeriesData.FileInfo{iview_netcdf(2)}.ListVarName; 2595 2596 ind_var=get(handles.FieldName,'Value'); % indices of previously selected variables 2596 2597 for ilist=1:numel(ind_var) 2597 2598 if isempty(find(strcmp(FieldList{ind_var(ilist)},ListVarName))) 2598 FieldList_1={}; % previous choice not consistent with new input field2599 %FieldList_1={}; % previous choice not consistent with new input field 2599 2600 set(handles.FieldName_1,'Value',1) 2600 2601 break … … 2607 2608 end 2608 2609 if ~isempty(Coord_z) && isempty(find(strcmp(Coord_z,ListVarName))) 2609 FieldList_1={ };2610 FieldList_1={'add_field...'}; 2610 2611 warn_coord=1; 2611 2612 end … … 3027 3028 field_index=get(handles.FieldName_1,'Value'); 3028 3029 field=field_str{field_index(1)}; 3029 if isequal(field,'add_field...') 3030 if strcmp(field,'add_field...') 3031 %iview=find(ismember(SeriesData.FileType,{'netcdf','civx','civdata'})); % all nc files, icluding civ 3030 3032 hget_field=findobj(allchild(0),'name','get_field'); 3031 3033 if ~isempty(hget_field) … … 3033 3035 end 3034 3036 Param=read_GUI(handles.series); 3035 Param.InputTable=Param.InputTable(1,:);3037 InputTable=Param.InputTable(2,:); 3036 3038 % check the existence of the first file in the series 3037 3039 first_j=[]; … … 3041 3043 if isfield(Param.IndexRange,'PairString'); PairString=Param.IndexRange.PairString; end 3042 3044 [i1,i2,j1,j2] = get_file_index(Param.IndexRange.first_i,first_j,PairString); 3043 FirstFileName=fullfile_uvmat(Param.InputTable{ 1,1},Param.InputTable{1,2},Param.InputTable{1,3},...3044 Param.InputTable{ 1,5},Param.InputTable{1,4},i1,i2,j1,j2);3045 FirstFileName=fullfile_uvmat(Param.InputTable{2,1},Param.InputTable{2,2},Param.InputTable{2,3},... 3046 Param.InputTable{2,5},Param.InputTable{2,4},i1,i2,j1,j2); 3045 3047 if exist(FirstFileName,'file') 3046 3048 ParamIn.SeriesInput=1; … … 3065 3067 set(handles.FieldName,'Value',2) % set menu to 'velocity 3066 3068 end 3067 if ~strcmp(GetFieldData.FieldOption,'civdata...')3068 TimeNameStr=GetFieldData.Time.SwitchVarIndexTime;3069 switch TimeNameStr3070 case 'file index'3071 set(handles.TimeName,'String','');3072 case 'attribute'3073 set(handles.TimeName,'String',['att:' GetFieldData.Time.TimeName]);3074 case 'variable'3075 set(handles.TimeName,'String',['var:' GetFieldData.Time.TimeName])3076 set(handles.NomType,'String','*')3077 set(handles.RootFile,'String',[get(handles.RootFile,'String') get(handles.FileIndex,'String')])% A VERIFIER !!!!!!3078 set(handles.FileIndex,'String','')3079 ParamIn.TimeVarName=GetFieldData.Time.TimeName;3080 case 'matrix_index'3081 set(handles.TimeName,'String',['dim:' GetFieldData.Time.TimeName]);3082 set(handles.NomType,'String','*')3083 set(handles.RootFile,'String',[get(handles.RootFile,'String') get(handles.FileIndex,'String')])3084 set(handles.FileIndex,'String','')3085 ParamIn.TimeDimName=GetFieldData.Time.TimeName;3086 end3087 end3069 % if ~strcmp(GetFieldData.FieldOption,'civdata...') 3070 % TimeNameStr=GetFieldData.Time.SwitchVarIndexTime; 3071 % switch TimeNameStr 3072 % case 'file index' 3073 % set(handles.TimeName,'String',''); 3074 % case 'attribute' 3075 % set(handles.TimeName,'String',['att:' GetFieldData.Time.TimeName]); 3076 % case 'variable' 3077 % set(handles.TimeName,'String',['var:' GetFieldData.Time.TimeName]) 3078 % set(handles.NomType,'String','*') 3079 % set(handles.RootFile,'String',[get(handles.RootFile,'String') get(handles.FileIndex,'String')])% A VERIFIER !!!!!! 3080 % set(handles.FileIndex,'String','') 3081 % ParamIn.TimeVarName=GetFieldData.Time.TimeName; 3082 % case 'matrix_index' 3083 % set(handles.TimeName,'String',['dim:' GetFieldData.Time.TimeName]); 3084 % set(handles.NomType,'String','*') 3085 % set(handles.RootFile,'String',[get(handles.RootFile,'String') get(handles.FileIndex,'String')]) 3086 % set(handles.FileIndex,'String','') 3087 % ParamIn.TimeDimName=GetFieldData.Time.TimeName; 3088 % end 3089 % end 3088 3090 set(handles.FieldName_1,'Value',1) 3089 3091 set(handles.FieldName_1,'String',[FieldList; {'add_field...'}]);
Note: See TracChangeset
for help on using the changeset viewer.