Changeset 1082


Ignore:
Timestamp:
Jun 16, 2020, 5:38:56 PM (4 years ago)
Author:
sommeria
Message:

rodrigues added

Location:
trunk/src
Files:
1 added
7 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/get_field.m

    r1081 r1082  
    200200set(handles.scalar,'Value',1)% fill the menu of y vector components
    201201set(handles.scalar,'String',Field.Display.ListVarName)% fill the menu for scalar
    202 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
     202%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
    204204checkseries=0;
    205205if isfield(ParamIn,'SeriesInput') && ParamIn.SeriesInput% case of call by series
     
    405405    case '1D plot'
    406406        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)
    413413        set(handles.PanelScalar,'Visible','off')
    414414        set(handles.PanelVectors,'Visible','off')
     
    420420    case {'scalar'}
    421421        set(handles.Coordinates,'Visible','on')
    422         set(handles.PanelOrdinate,'Visible','off')
     422        %set(handles.PanelOrdinate,'Visible','off')
    423423        set(handles.PanelScalar,'Visible','on')
    424424        set(handles.PanelVectors,'Visible','off')
     
    456456        set(handles.PanelVectors,'Visible','on')
    457457        set(handles.Coordinates,'Visible','on')
    458         set(handles.PanelOrdinate,'Visible','off')
     458        %set(handles.PanelOrdinate,'Visible','off')
    459459        set(handles.PanelScalar,'Visible','off')
    460460        pos=get(handles.PanelVectors,'Position');
     
    496496        vector_Callback(handles)     
    497497    case 'civdata...'
    498         set(handles.PanelOrdinate,'Visible','off')
     498        %set(handles.PanelOrdinate,'Visible','off')
    499499        set(handles.PanelScalar,'Visible','off')
    500500        set(handles.PanelVectors,'Visible','off')
     
    502502end
    503503
    504 %------------------------------------------------------------------------
     504%NOT USED : TO DELETE------------------------------------------------------------------------
    505505function ordinate_Callback(hObject, DimCell, handles)
    506506%------------------------------------------------------------------------
     
    629629
    630630%% 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)>=3
    635     coord_val(3)=var_coord(end-2);
    636 end
     631if 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
    637637end
    638638% if numel(find(test_coord))>3
  • trunk/src/nc2struct.m

    r1071 r1082  
    6262hhh=which('netcdf.open');% look for built-in matlab NetCDF library
    6363
    64 if ~isequal(hhh,'')
     64if ~isempty(hhh)
    6565    %% default output
    6666    Data=[];%default
     
    113113        CheckTimeVar=1;
    114114        TimeIndex=varargin{3};
    115         input_index=4;% list of varibles to read is at fourth argument
     115        input_index=4;% list of variables to read is at fourth argument
    116116    elseif isequal(varargin{1},'TimeDimName')
    117117        TimeDimName=varargin{2};
  • trunk/src/read_GUI.m

    r1081 r1082  
    7171                        end                       
    7272                    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');
    7575                        if ~isempty(listinput)
    7676                            if numel(value)==1% single selection
  • trunk/src/series/merge_proj_polar_multifile.m

    r1071 r1082  
    270270for index=1:NbField
    271271    disp(['index=' num2str(index)])
    272     disp(['ellapsed time ' num2str(toc(tstart)/60,4) ' minutes'])
     272    %disp(['ellapsed time ' num2str(toc(tstart)/60,4) ' minutes'])
    273273    update_waitbar(WaitbarHandle,index/NbField)
    274274    if ~isempty(RUNHandle) && ~strcmp(get(RUNHandle,'BusyAction'),'queue')
     
    374374        ProjData{iview}.VarDimName={'radius','azimuth'};
    375375        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 data
    381             end
    382             ProjData{iview}.(VarName)=(DataOut.(VarName))';
    383         end
     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 data
     381%             end
     382%             ProjData{iview}.(VarName)=(DataOut.(VarName))';
     383%         end
    384384       
    385385    end
  • trunk/src/series/turb_stat.m

    r1077 r1082  
    6363    ParamOut.AllowInputSort='off';% allow alphabetic sorting of the list of input file SubDir (options 'off'/'on', 'off' by default)
    6464    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)
    6666    ParamOut.VelType='one';% menu for selecting the velocity type (options 'off'/'one'/'two',  'off' by default)
    6767    ParamOut.FieldName='off';% menu for selecting the field (s) in the input file(options 'off'/'one'/'two', 'off' by default)
     
    179179DataOut.ListGlobalAttribute= {'Conventions'};
    180180DataOut.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'}};
     181DataOut.ListVarName={};
     182DataOut.VarDimName={};
    184183DataOut.UMean=0;
    185184DataOut.VMean=0;
     
    213212    %%%%%%%%%%%% MAIN RUNNING OPERATIONS  %%%%%%%%%%%%
    214213    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);
    218229        Uprev=Field.U;% store the current field for next iteration
    219230        Vprev=Field.V;
     
    276287%     VarName=DataOut.ListVarName{ivar};% name of the variable
    277288%     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)'}];
    279290%    DataOut.([VarName 'Profile'])=mean(DataOut.(VarName)(:,band),2); %take the mean profile of U, excluding the edges
    280291% end
     
    283294OutputFile=fullfile_uvmat(RootPath{1},OutputDir,RootFile{1},FileExtOut,NomTypeOut,first_i,last_i,first_j,last_j);
    284295 %case of netcdf input file , determine global attributes
    285  errormsg=struct2nc(OutputFile,DataOut); %save result file
    286  if isempty(errormsg)
     296errormsg=struct2nc(OutputFile,DataOut); %save result file
     297if isempty(errormsg)
    287298     disp([OutputFile ' written']);
    288  else
     299else
    289300     disp(['error in writting result file: ' errormsg])
    290  end
     301end
    291302
    292303
  • trunk/src/uvmat.m

    r1080 r1082  
    46874687                FieldList={AName};
    46884688            case '1D plot'
    4689                 YName=GetFieldData.PanelOrdinate.ordinate;
     4689                YName=GetFieldData.Coordinates.Coord_y;
    46904690                FieldList={''}; 
    46914691                set(handles.uvmat,'ToolBar','figure')
Note: See TracChangeset for help on using the changeset viewer.