loadrdi.m
changeset 15 3746197831db
parent 6 875d0c0f6ab2
child 16 54126cc9bb4a
equal deleted inserted replaced
14:f7f35d9629ab 15:3746197831db
    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: Mon Jun 24 10:17:29 2013
    16 %                    dlm: Fri Jan 23 16:07:24 2015
    17 %                    (c) 2004 ladcp@
    17 %                    (c) 2004 ladcp@
    18 %                    uE-Info: 48 72 NIL 0 0 72 2 2 8 NIL ofnI
    18 %                    uE-Info: 823 0 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
    44 %		 - apparently unused z-variable commented out
    44 %		 - apparently unused z-variable commented out
    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 
    50 
    50 % p=setdefv(p,'pg_save',[1 2 3 4]);
    51 % p=setdefv(p,'pg_save',[1 2 3 4]);
    51 % Default =3 for loadctd_whoi.
    52 % Default =3 for loadctd_whoi.
    52 p=setdefv(p,'drot',nan);
    53 p=setdefv(p,'drot',nan);
    53 % how many db should the last bin be below bin 1
    54 % how many db should the last bin be below bin 1
   794 dproblem(i) = dproblem(i) + 100;
   795 dproblem(i) = dproblem(i) + 100;
   795  
   796  
   796 % load upward looking ADCP
   797 % load upward looking ADCP
   797 up = nargin>1;
   798 up = nargin>1;
   798 
   799 
       
   800 if strcmp(fup,'') || strcmp(fup,' ')
       
   801   up = 0;
       
   802 end
       
   803 
   799 if up
   804 if up
   800   fid = fopen(fup,'r','l');
   805   fid = fopen(fup,'r','l');
   801   if fid == -1
   806   if fid == -1
   802     up = 0;
   807     error(sprintf('%s: no such file or directory',fup));
   803   end
   808   end
   804 end
       
   805 
       
   806 if up
       
   807 
   809 
   808   if length(bmax)<2, bmax(2)=bmax(1); end
   810   if length(bmax)<2, bmax(2)=bmax(1); end
   809   disp([' loading up-data ',fup])
   811   disp([' loading up-data ',fup])
   810   [fu,vu,velu,cmu,eau,pgu,btu] = rdread(fid);
   812   [fu,vu,velu,cmu,eau,pgu,btu] = rdread(fid);
   811 
   813