Ignore:
Timestamp:
Jul 9, 2019, 10:10:18 AM (5 years ago)
Author:
sommeria
Message:

replicate updated

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/series/merge_proj_polar.m

    r1061 r1068  
    6363    ParamOut.AllowInputSort='on';% 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='on'; %nbre of slices ('off' by default)
     65    ParamOut.NbSlice='off'; %nbre of slices ('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)
     
    268268    CheckOverwrite=Param.CheckOverwrite;
    269269end
    270 
     270NbField
    271271for index=1:NbField
    272     disp(['index=' num2str(index)])
    273     disp(['ellapsed time ' num2str(toc(tstart)/60,4) ' minutes'])
    274272    update_waitbar(WaitbarHandle,index/NbField)
    275273    if ~isempty(RUNHandle) && ~strcmp(get(RUNHandle,'BusyAction'),'queue')
     
    352350        %% calculate tps coefficients
    353351        Data{iview}=tps_coeff_field(Data{iview},1);
    354        
     352        'tps_coeff done'
    355353        %% projection on the polar grid
    356354        [DataOut,VarAttribute,errormsg]=calc_field_tps(Data{iview}.Coord_tps,Data{iview}.NbCentre,Data{iview}.SubRange,...
    357355            cat(3,Data{iview}.U_tps,Data{iview}.V_tps),FieldNames,cat(3,XI,YI));
     356        if ~isempty(errormsg)
     357            disp(errormsg)
     358        end
     359       
    358360        % set to NaN interpolation points which are too far from any initial data (more than 2 CoordMesh)
    359361        Coord=permute(Data{iview}.Coord_tps,[1 3 2]);
     
    366368            G=TriScatteredInterp(Coord,Coord(:,2),'nearest');
    367369        end
     370        'Interp done'
    368371        Distx=F(XI,YI)-XI;% diff of x coordinates with the nearest measurement point
    369372        Disty=G(XI,YI)-YI;% diff of y coordinates with the nearest measurement point
     
    390393   
    391394    %% merge the NbView fields
     395    ProjData
    392396    [MergeData,errormsg]=merge_field(ProjData);
    393397    if ~isempty(errormsg)
     
    446450       TimeData.div=MergeData.div;
    447451
    448             [error,ncid]=struct2nc(OutputFile,TimeData);%save result file
     452            error=struct2nc(OutputFile,TimeData);%save result file
    449453        if isempty(error)
    450454            disp(['output file ' OutputFile ' written'])
     
    453457        end
    454458            ellapsed_time=toc(tstart);
    455     disp(['total ellapsed time ' num2str(ellapsed_time/60,2) ' minutes'])
    456 end
    457 
    458 ellapsed_time=toc(tstart);
    459 disp(['total ellapsed time ' num2str(ellapsed_time/60,2) ' minutes'])
     459    disp(['ellapsed time since start ' num2str(ellapsed_time/60,2) ' minutes'])
     460end
     461
    460462disp([ num2str(ellapsed_time/(60*NbField),3) ' minutes per iteration'])
    461463
Note: See TracChangeset for help on using the changeset viewer.