Changeset 1082
- Timestamp:
- Jun 16, 2020, 5:38:56 PM (4 years ago)
- Location:
- trunk/src
- Files:
-
- 1 added
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/get_field.m
r1081 r1082 200 200 set(handles.scalar,'Value',1)% fill the menu of y vector components 201 201 set(handles.scalar,'String',Field.Display.ListVarName)% fill the menu for scalar 202 set(handles.ordinate,'Value',1)% fill the menu of y vector components203 set(handles.ordinate,'String',Field.Display.ListVarName)% fill the menu of y coordinate for 1D plots202 %set(handles.ordinate,'Value',1)% fill the menu of y vector components 203 %set(handles.ordinate,'String',Field.Display.ListVarName)% fill the menu of y coordinate for 1D plots 204 204 checkseries=0; 205 205 if isfield(ParamIn,'SeriesInput') && ParamIn.SeriesInput% case of call by series … … 405 405 case '1D plot' 406 406 set(handles.Coordinates,'Visible','on') 407 set(handles.PanelOrdinate,'Visible','on')408 pos=get(handles.PanelOrdinate,'Position');409 pos(1)=2;410 pos_coord=get(handles.Coordinates,'Position');411 pos(2)=pos_coord(2)-pos(4)-2;412 set(handles.PanelOrdinate,'Position',pos)407 %set(handles.PanelOrdinate,'Visible','on') 408 %pos=get(handles.PanelOrdinate,'Position'); 409 % pos(1)=2; 410 % pos_coord=get(handles.Coordinates,'Position'); 411 % pos(2)=pos_coord(2)-pos(4)-2; 412 %set(handles.PanelOrdinate,'Position',pos) 413 413 set(handles.PanelScalar,'Visible','off') 414 414 set(handles.PanelVectors,'Visible','off') … … 420 420 case {'scalar'} 421 421 set(handles.Coordinates,'Visible','on') 422 set(handles.PanelOrdinate,'Visible','off')422 %set(handles.PanelOrdinate,'Visible','off') 423 423 set(handles.PanelScalar,'Visible','on') 424 424 set(handles.PanelVectors,'Visible','off') … … 456 456 set(handles.PanelVectors,'Visible','on') 457 457 set(handles.Coordinates,'Visible','on') 458 set(handles.PanelOrdinate,'Visible','off')458 %set(handles.PanelOrdinate,'Visible','off') 459 459 set(handles.PanelScalar,'Visible','off') 460 460 pos=get(handles.PanelVectors,'Position'); … … 496 496 vector_Callback(handles) 497 497 case 'civdata...' 498 set(handles.PanelOrdinate,'Visible','off')498 %set(handles.PanelOrdinate,'Visible','off') 499 499 set(handles.PanelScalar,'Visible','off') 500 500 set(handles.PanelVectors,'Visible','off') … … 502 502 end 503 503 504 % ------------------------------------------------------------------------504 %NOT USED : TO DELETE------------------------------------------------------------------------ 505 505 function ordinate_Callback(hObject, DimCell, handles) 506 506 %------------------------------------------------------------------------ … … 629 629 630 630 %% set default selection for grid coordinates 631 if ~isempty(var_coord)632 coord_val(1)=var_coord(end);633 coord_val(2)=var_coord(end-1);634 if numel(var_coord)>=3635 coord_val(3)=var_coord(end-2);636 end631 if numel(var_coord)>=2 632 coord_val(1)=var_coord(end); 633 coord_val(2)=var_coord(end-1); 634 if numel(var_coord)>=3 635 coord_val(3)=var_coord(end-2); 636 end 637 637 end 638 638 % if numel(find(test_coord))>3 -
trunk/src/nc2struct.m
r1071 r1082 62 62 hhh=which('netcdf.open');% look for built-in matlab NetCDF library 63 63 64 if ~ise qual(hhh,'')64 if ~isempty(hhh) 65 65 %% default output 66 66 Data=[];%default … … 113 113 CheckTimeVar=1; 114 114 TimeIndex=varargin{3}; 115 input_index=4;% list of vari bles to read is at fourth argument115 input_index=4;% list of variables to read is at fourth argument 116 116 elseif isequal(varargin{1},'TimeDimName') 117 117 TimeDimName=varargin{2}; -
trunk/src/read_GUI.m
r1081 r1082 71 71 end 72 72 case {'listbox','popupmenu'} 73 listinput=get(hchild(ichild),'String') 74 value=get(hchild(ichild),'Value') 73 listinput=get(hchild(ichild),'String'); 74 value=get(hchild(ichild),'Value'); 75 75 if ~isempty(listinput) 76 76 if numel(value)==1% single selection -
trunk/src/series/merge_proj_polar_multifile.m
r1071 r1082 270 270 for index=1:NbField 271 271 disp(['index=' num2str(index)]) 272 disp(['ellapsed time ' num2str(toc(tstart)/60,4) ' minutes'])272 %disp(['ellapsed time ' num2str(toc(tstart)/60,4) ' minutes']) 273 273 update_waitbar(WaitbarHandle,index/NbField) 274 274 if ~isempty(RUNHandle) && ~strcmp(get(RUNHandle,'BusyAction'),'queue') … … 374 374 ProjData{iview}.VarDimName={'radius','azimuth'}; 375 375 ProjData{iview}.VarAttribute=[{'coord_x'} {'coord_y'} VarAttribute]; 376 for ivar=1:numel(ListVarName)377 ProjData{iview}.VarDimName{ivar+2}={'radius','azimuth'};378 VarName=ListVarName{ivar};379 if ~isempty(thresh2)380 DataOut.(VarName)(Dist>thresh2)=NaN;% put to NaN interpolated positions further than RangeInterp from initial data381 end382 ProjData{iview}.(VarName)=(DataOut.(VarName))';383 end376 % for ivar=1:numel(ListVarName) 377 % ProjData{iview}.VarDimName{ivar+2}={'radius','azimuth'}; 378 % VarName=ListVarName{ivar}; 379 % if ~isempty(thresh2) 380 % DataOut.(VarName)(Dist>thresh2)=NaN;% put to NaN interpolated positions further than RangeInterp from initial data 381 % end 382 % ProjData{iview}.(VarName)=(DataOut.(VarName))'; 383 % end 384 384 385 385 end -
trunk/src/series/turb_stat.m
r1077 r1082 63 63 ParamOut.AllowInputSort='off';% allow alphabetic sorting of the list of input file SubDir (options 'off'/'on', 'off' by default) 64 64 ParamOut.WholeIndexRange='off';% prescribes the file index ranges from min to max (options 'off'/'on', 'off' by default) 65 ParamOut.NbSlice= 1; %nbre of slices ('off' by default)65 ParamOut.NbSlice='on'; %nbre of slices ('on' if needed as input, fixed value e.g. 1, 'off' by default) 66 66 ParamOut.VelType='one';% menu for selecting the velocity type (options 'off'/'one'/'two', 'off' by default) 67 67 ParamOut.FieldName='off';% menu for selecting the field (s) in the input file(options 'off'/'one'/'two', 'off' by default) … … 179 179 DataOut.ListGlobalAttribute= {'Conventions'}; 180 180 DataOut.Conventions= 'uvmat'; 181 DataOut.ListVarName={'coord_y', 'coord_x' ,'UMean' , 'VMean','u2Mean','v2Mean','u2Mean_1','v2Mean_1','uvMean','CurlMean','DivMean','Curl2Mean','Div2Mean','Counter'}; 182 DataOut.VarDimName={'coord_y','coord_x',{'coord_y','coord_x'},{'coord_y','coord_x'},{'coord_y','coord_x'},{'coord_y','coord_x'},{'coord_y','coord_x'},{'coord_y','coord_x'},... 183 {'coord_y','coord_x'},{'coord_y','coord_x'},{'coord_y','coord_x'},{'coord_y','coord_x'},{'coord_y','coord_x'},{'coord_y','coord_x'}}; 181 DataOut.ListVarName={}; 182 DataOut.VarDimName={}; 184 183 DataOut.UMean=0; 185 184 DataOut.VMean=0; … … 213 212 %%%%%%%%%%%% MAIN RUNNING OPERATIONS %%%%%%%%%%%% 214 213 if index==1 %initiate the output data structure in the first field 215 216 DataOut.coord_y=Field.coord_y; 217 DataOut.coord_x=Field.coord_x; 214 [CellInfo,NbDim,errormsg]=find_field_cells(Field); 215 YName='coord_y';%default 216 XName='coord_x';%default 217 for icell=1:numel(NbDim) 218 if NbDim(icell)==2 && strcmp(CellInfo{icell}.CoordType,'grid') 219 YName=CellInfo{icell}.YName; 220 XName=CellInfo{icell}.XName; 221 break 222 end 223 end 224 DataOut.ListVarName={YName, XName ,'UMean' , 'VMean','u2Mean','v2Mean','u2Mean_1','v2Mean_1','uvMean','CurlMean','DivMean','Curl2Mean','Div2Mean','Counter'}; 225 DataOut.VarDimName={YName,XName,{YName,XName},{YName,XName},{YName,XName},{YName,XName},{YName,XName},{YName,XName},... 226 {YName,XName},{YName,XName},{YName,XName},{YName,XName},{YName,XName},{YName,XName}}; 227 DataOut.(YName)=Field.(YName); 228 DataOut.(XName)=Field.(XName); 218 229 Uprev=Field.U;% store the current field for next iteration 219 230 Vprev=Field.V; … … 276 287 % VarName=DataOut.ListVarName{ivar};% name of the variable 277 288 % DataOut.ListVarName=[DataOut.ListVarName {[VarName 'Profile']}];%append the name of the profile variable 278 % DataOut.VarDimName=[DataOut.VarDimName {' coord_y'}];289 % DataOut.VarDimName=[DataOut.VarDimName {'(YName)'}]; 279 290 % DataOut.([VarName 'Profile'])=mean(DataOut.(VarName)(:,band),2); %take the mean profile of U, excluding the edges 280 291 % end … … 283 294 OutputFile=fullfile_uvmat(RootPath{1},OutputDir,RootFile{1},FileExtOut,NomTypeOut,first_i,last_i,first_j,last_j); 284 295 %case of netcdf input file , determine global attributes 285 286 296 errormsg=struct2nc(OutputFile,DataOut); %save result file 297 if isempty(errormsg) 287 298 disp([OutputFile ' written']); 288 299 else 289 300 disp(['error in writting result file: ' errormsg]) 290 301 end 291 302 292 303 -
trunk/src/uvmat.m
r1080 r1082 4687 4687 FieldList={AName}; 4688 4688 case '1D plot' 4689 YName=GetFieldData. PanelOrdinate.ordinate;4689 YName=GetFieldData.Coordinates.Coord_y; 4690 4690 FieldList={''}; 4691 4691 set(handles.uvmat,'ToolBar','figure')
Note: See TracChangeset
for help on using the changeset viewer.