Changeset 1082 for trunk/src/series


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

rodrigues added

Location:
trunk/src/series
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • 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
Note: See TracChangeset for help on using the changeset viewer.