loadrdi.m
changeset 16 54126cc9bb4a
parent 15 3746197831db
child 17 f5a63c03d9c8
equal deleted inserted replaced
15:3746197831db 16:54126cc9bb4a
    11 %
    11 %
    12 
    12 
    13 %======================================================================
    13 %======================================================================
    14 %                    L O A D R D I . M 
    14 %                    L O A D R D I . M 
    15 %                    doc: Fri Jun 18 18:21:56 2004
    15 %                    doc: Fri Jun 18 18:21:56 2004
    16 %                    dlm: Fri Jan 23 16:07:24 2015
    16 %                    dlm: Wed Apr 15 09:53:54 2015
    17 %                    (c) 2004 ladcp@
    17 %                    (c) 2004 ladcp@
    18 %                    uE-Info: 823 0 NIL 0 0 72 2 2 8 NIL ofnI
    18 %                    uE-Info: 260 45 NIL 0 0 72 2 2 8 NIL ofnI
    19 %======================================================================
    19 %======================================================================
    20 
    20 
    21 % CHANGES BY ANT
    21 % CHANGES BY ANT
    22 %  Jun 18, 2004: - added p.mask_dn_bins, p.mask_up_bins (later moved)
    22 %  Jun 18, 2004: - added p.mask_dn_bins, p.mask_up_bins (later moved)
    23 %  Jun 21, 2004: - clarified large-velocity warning message
    23 %  Jun 21, 2004: - clarified large-velocity warning message
    45 %  Jun 30, 2011: - buggy bin-remapping disabled
    45 %  Jun 30, 2011: - buggy bin-remapping disabled
    46 %  Aug 18, 2011: - added comment to coord-transformation code (gimbal pitch)
    46 %  Aug 18, 2011: - added comment to coord-transformation code (gimbal pitch)
    47 %  Jun 24, 2013: - blen re-added but separately for DL/UL
    47 %  Jun 24, 2013: - blen re-added but separately for DL/UL
    48 %		 - added separate nbin, blnk, dist for DL/UL to p struct
    48 %		 - added separate nbin, blnk, dist for DL/UL to p struct
    49 %  Jan 23, 2015: - made updown() bomb when UL file is not found
    49 %  Jan 23, 2015: - made updown() bomb when UL file is not found
       
    50 %  Apr 15, 2015: - modified ambiguity-velocity warning as suggested by Diana Cardoso
    50 
    51 
    51 % p=setdefv(p,'pg_save',[1 2 3 4]);
    52 % p=setdefv(p,'pg_save',[1 2 3 4]);
    52 % Default =3 for loadctd_whoi.
    53 % Default =3 for loadctd_whoi.
    53 p=setdefv(p,'drot',nan);
    54 p=setdefv(p,'drot',nan);
    54 % how many db should the last bin be below bin 1
    55 % how many db should the last bin be below bin 1
   254 skipnens = 1200 / enstime;
   255 skipnens = 1200 / enstime;
   255 [j1,j2] = find(vel > p.vlim);
   256 [j1,j2] = find(vel > p.vlim);
   256 jj = find(j2>skipnens & j2<size(l.u,2)-skipnens);
   257 jj = find(j2>skipnens & j2<size(l.u,2)-skipnens);
   257 
   258 
   258 if length(jj)>10
   259 if length(jj)>10
   259  warn=['**  found  ',int2str(length(jj)),'  horizontal velocities > ' int2str(p.vlim) 'm/s in middle hour of cast'];
   260  warn = sprintf('** found %d (%.1f%% of total) relative horizontal velocities > %g m/s',...
       
   261 		length(jj),length(jj)/length(vel)*100,p.vlim);
   260  disp(warn);
   262  disp(warn);
   261  if length(jj)>100
   263  if length(jj)>100
   262   p.warn(size(p.warn,1)+1,1:length(warn))=warn;
   264   p.warn(size(p.warn,1)+1,1:length(warn))=warn;
   263  end
   265  end
   264  disp('** WARNING  check maximum velocity setting on CMD-file   ** ')
   266  disp('** WARNING  check ambiguity velocity setting in CMD-file   ** ')
   265 end
   267 end
   266 if p.orig
   268 if p.orig
   267  d.l.problem(j) = d.l.problem(j)+1;
   269  d.l.problem(j) = d.l.problem(j)+1;
   268 end
   270 end
   269 
   271