Changeset 1142 for trunk/src/series


Ignore:
Timestamp:
May 5, 2024, 12:29:30 PM (8 months ago)
Author:
sommeria
Message:

filter parameter improved in filter_tps

File:
1 edited

Legend:

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

    r1141 r1142  
    3333%              .FieldName: name(s) of the field
    3434%              .VelType: velocity type
    35 %              .FieldName_1: name of the second field in case of two input series
    36 %              .VelType_1: velocity type of the second field in case of two input series
    37 %              .Coord_y: name of y coordinate variable
    38 %              .Coord_x: name of x coordinate variable
    3935
    4036%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
     
    110106            case {4,5}
    111107                CivStage='civ2';
    112                 MaxDiff=1.5; SubDomainSize=500; FieldSmooth=2; %default
     108                MaxDiff=1.5; SubDomainSize=250; FieldSmooth=5; %default
    113109            case 6
    114110                CivStage='civ2';
     
    211207
    212208%% Prepare the structure of output netcdf file
    213 DataOut.ListGlobalAttribute={'CivStage'};
     209DataOut.ListGlobalAttribute={'CivStage','SubDomainSize','MaxDiff','CoordUnit'};
    214210DataOut.CivStage=Param.InputFields.VelType;
    215 DataOut.ListVarName=[{'FieldSmooth','Diff_rms','NbExclude','FF','X','Y'} Ustr Vstr] ;
    216 DataOut.VarDimName=[{'FieldSmooth','FieldSmooth','FieldSmooth','NbVec','NbVec','NbVec'} Dimstr Dimstr];
     211DataOut.SubDomainSize=SubDomainSize;
     212DataOut.MaxDiff=MaxDiff;
     213DataOut.CoordUnit='pixel';
     214DataOut.ListVarName=[{'FieldSmooth','Diff_rms','NbExclude','X','Y'} Ustr Vstr] ;
     215DataOut.VarDimName=[{'FieldSmooth','FieldSmooth','FieldSmooth','NbVec','NbVec'} Dimstr Dimstr];
    217216DataOut.VarAttribute{4}.Role='falseflag';
    218217DataOut.FieldSmooth=FieldSmooth;
     
    249248        DataOut.Diff_rms(irho)=sqrt(mean(U_Diff.*U_Diff+V_Diff.*V_Diff)/2);
    250249        DataOut.NbExclude(irho)=(NbGood-numel(ind_good))/NbGood;
     250        U_smooth(ind_false)=NaN;
     251        V_smooth(ind_false)=NaN;
    251252        DataOut.(['U_' str_i{irho}])=U_smooth;
    252253        DataOut.(['V_' str_i{irho}])=V_smooth;
    253         DataOut.FF(ind_false)=FieldSmooth(irho);
     254        % DataOut.FF(ind_false)=FieldSmooth(irho);
    254255    end
    255256    time=toc
Note: See TracChangeset for help on using the changeset viewer.