getdpthi.m
changeset 22 624b1ed6e9c9
parent 0 0a450563f904
equal deleted inserted replaced
21:bce791a17f4e 22:624b1ed6e9c9
     1 %======================================================================
     1 %======================================================================
     2 %                    G E T D P T H I . M 
     2 %                    G E T D P T H I . M 
     3 %                    doc: Wed Jan  7 16:25:26 2009
     3 %                    doc: Wed Jan  7 16:25:26 2009
     4 %                    dlm: Fri Mar  5 15:51:15 2010
     4 %                    dlm: Fri Aug 30 12:40:38 2019
     5 %                    (c) 2009 A.M. Thurnherr
     5 %                    (c) 2009 A.M. Thurnherr
     6 %                    uE-Info: 459 33 NIL 0 0 72 0 2 4 NIL ofnI
     6 %                    uE-Info: 12 0 NIL 0 0 72 0 2 4 NIL ofnI
     7 %======================================================================
     7 %======================================================================
     8 
     8 
     9 % CHANGES BY ANT:
     9 % CHANGES BY ANT:
    10 %   Jan  7, 2009: - tightened use of exist()
    10 %   Jan  7, 2009: - tightened use of exist()
       
    11 %	Aug 30, 2019: - BUG: missing pressure values cause problem in output
    11 
    12 
    12 function [d,p]=getdpthi(d,p)
    13 function [d,p]=getdpthi(d,p)
    13 % function [d,p]=getdpthi(d,p)
    14 % function [d,p]=getdpthi(d,p)
    14 % LADCP-2 processing software v 7.0
    15 % LADCP-2 processing software v 7.0
    15 %
    16 %
   219    disp(' use LADCP depth from constrained integrated W ')
   220    disp(' use LADCP depth from constrained integrated W ')
   220   else
   221   else
   221    d.z_ladcp=-zz;
   222    d.z_ladcp=-zz;
   222    dz=d.z_ladcp-d.z;
   223    dz=d.z_ladcp-d.z;
   223    ii=find(isfinite(dz));
   224    ii=find(isfinite(dz));
   224    p.ladcpr_CTD_depth_std=[mean(dz), std(dz)];
   225    p.ladcpr_CTD_depth_std=[mean(dz(ii)), std(dz(ii))];
   225    disp(' use CTD time series depth, will not do depth inversion ')
   226    disp(' use CTD time series depth, will not do depth inversion ')
   226    disp([' LADCP minus CTD depth mean: ',num2str(p.ladcpr_CTD_depth_std(1)),...
   227    disp([' LADCP minus CTD depth mean: ',num2str(p.ladcpr_CTD_depth_std(1)),...
   227           '  std: ',num2str(p.ladcpr_CTD_depth_std(2))]);
   228           '  std: ',num2str(p.ladcpr_CTD_depth_std(2))]);
   228    p.ladcpdepth=0;
   229    p.ladcpdepth=0;
   229   end
   230   end