<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://wiki-pnb.eri.ucsb.edu/index.php?action=history&amp;feed=atom&amp;title=Hs6bt.m</id>
	<title>Hs6bt.m - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://wiki-pnb.eri.ucsb.edu/index.php?action=history&amp;feed=atom&amp;title=Hs6bt.m"/>
	<link rel="alternate" type="text/html" href="https://wiki-pnb.eri.ucsb.edu/index.php?title=Hs6bt.m&amp;action=history"/>
	<updated>2026-04-20T07:30:53Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.34.0</generator>
	<entry>
		<id>https://wiki-pnb.eri.ucsb.edu/index.php?title=Hs6bt.m&amp;diff=180&amp;oldid=prev</id>
		<title>128.111.101.185 at 23:53, 2 August 2010</title>
		<link rel="alternate" type="text/html" href="https://wiki-pnb.eri.ucsb.edu/index.php?title=Hs6bt.m&amp;diff=180&amp;oldid=prev"/>
		<updated>2010-08-02T23:53:29Z</updated>

		<summary type="html">&lt;p&gt;&lt;/p&gt;
&lt;table class=&quot;diff diff-contentalign-left&quot; data-mw=&quot;interface&quot;&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;col class=&quot;diff-marker&quot; /&gt;
				&lt;col class=&quot;diff-content&quot; /&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;2&quot; style=&quot;background-color: #fff; color: #222; text-align: center;&quot;&gt;Revision as of 23:53, 2 August 2010&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot; id=&quot;mw-diff-left-l152&quot; &gt;Line 152:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 152:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;not_hs6_files&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;not_hs6_files&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background-color: #f8f9fa; color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #eaecf0; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&amp;lt;/pre&amp;gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt; &lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;color: #222; font-size: 88%; border-style: solid; border-width: 1px 1px 1px 4px; border-radius: 0.33em; border-color: #a3d3ff; vertical-align: top; white-space: pre-wrap;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;big&amp;gt;[[hs6bt]]&amp;lt;big&amp;gt;&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</summary>
		<author><name>128.111.101.185</name></author>
		
	</entry>
	<entry>
		<id>https://wiki-pnb.eri.ucsb.edu/index.php?title=Hs6bt.m&amp;diff=179&amp;oldid=prev</id>
		<title>128.111.101.185: Created page with '&lt;pre&gt; % AC9BT % FEB 98,FEB 99 % Stephen Wolfe % Input:	none % Look for:	list_hs6 % Output: 	z*.lcd.?, z*.lcd.strip % Assumptions:	fixed for either single casts or yo-yo's. Have t…'</title>
		<link rel="alternate" type="text/html" href="https://wiki-pnb.eri.ucsb.edu/index.php?title=Hs6bt.m&amp;diff=179&amp;oldid=prev"/>
		<updated>2010-08-02T23:52:21Z</updated>

		<summary type="html">&lt;p&gt;Created page with &amp;#039;&amp;lt;pre&amp;gt; % AC9BT % FEB 98,FEB 99 % Stephen Wolfe % Input:	none % Look for:	list_hs6 % Output: 	z*.lcd.?, z*.lcd.strip % Assumptions:	fixed for either single casts or yo-yo&amp;#039;s. Have t…&amp;#039;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
% AC9BT&lt;br /&gt;
% FEB 98,FEB 99&lt;br /&gt;
% Stephen Wolfe&lt;br /&gt;
% Input:	none&lt;br /&gt;
% Look for:	list_hs6&lt;br /&gt;
% Output: 	z*.lcd.?, z*.lcd.strip&lt;br /&gt;
% Assumptions:	fixed for either single casts or yo-yo's. Have to&lt;br /&gt;
%               pick something for at least 1 profile of each yo-yo&lt;br /&gt;
%               for the profile numbers to work correctly. Can't tell&lt;br /&gt;
%               if you skip a down-up pair.&lt;br /&gt;
%		&lt;br /&gt;
% Purpose:	pick tops and bottoms &lt;br /&gt;
%		&lt;br /&gt;
% Calls:	bt_ac9&lt;br /&gt;
% Maintain: 	{filename, columnarraylist, disp_text}&lt;br /&gt;
% Uses:     	perfect for hs6 processing, ref: hs6.ins&lt;br /&gt;
% Example:  	hs6bt&lt;br /&gt;
% Notes:        This will run on NT if the call to bbopstrip is&lt;br /&gt;
%               commented out and the files are already stripped&lt;br /&gt;
%               Should label direction in castid table as well as&lt;br /&gt;
%               profile number. Work from left to right. If you&lt;br /&gt;
%               choose not to save points for a profile, you can&lt;br /&gt;
%               repick them and choose save and then go on.&lt;br /&gt;
% TO DO:        The archive scheme does not work due to changes in&lt;br /&gt;
%               naming convention. Doesn't create the log directory&lt;br /&gt;
%               if it's not there either.&lt;br /&gt;
&lt;br /&gt;
%cd('pb218')&lt;br /&gt;
pb=1;&lt;br /&gt;
clf;&lt;br /&gt;
list_hs6=[];&lt;br /&gt;
hs6_files=[];&lt;br /&gt;
not_hs6_files=[];&lt;br /&gt;
tmpfile=fullfile(pwd,'gohs6bt_tmp');&lt;br /&gt;
                                                % check for list_hs6 in pwd&lt;br /&gt;
[s,m]=unix('ls list_hs6');&lt;br /&gt;
if isempty(m)&lt;br /&gt;
 msg=sprintf('Check your list_hs6.');&lt;br /&gt;
 disp(msg)&lt;br /&gt;
 return&lt;br /&gt;
end&lt;br /&gt;
clear s m&lt;br /&gt;
						% load list_hs6&lt;br /&gt;
fid=fopen('list_hs6','r');&lt;br /&gt;
while fid,&lt;br /&gt;
  check=fgetl(fid);&lt;br /&gt;
  if check == -1, break, end&lt;br /&gt;
  list_hs6=[list_hs6; check];&lt;br /&gt;
end&lt;br /&gt;
list_hs6&lt;br /&gt;
clear fid check&lt;br /&gt;
						% check presence of hs6 files&lt;br /&gt;
badfilectr=0;&lt;br /&gt;
for i=1:size(list_hs6,1)&lt;br /&gt;
 [s,m]=unix(['ls ',list_hs6(i,:)]);&lt;br /&gt;
 if s&lt;br /&gt;
  badfilectr=badfilectr+1;&lt;br /&gt;
 end&lt;br /&gt;
end&lt;br /&gt;
clear i&lt;br /&gt;
if badfilectr&lt;br /&gt;
 if badfilectr==1&lt;br /&gt;
  msg=sprintf('%i missing hs6 file.',badfilectr);&lt;br /&gt;
  disp(msg)&lt;br /&gt;
  error('Your hs6list includes a file not in pwd.')&lt;br /&gt;
 else&lt;br /&gt;
  msg=sprintf('%i missing hs6 files.',badfilectr);&lt;br /&gt;
  disp(msg)&lt;br /&gt;
  error('Your hs6list includes files not in pwd.')&lt;br /&gt;
 end&lt;br /&gt;
end&lt;br /&gt;
clear s m badfilectr msg&lt;br /&gt;
						% loop through &lt;br /&gt;
for i=1:size(list_hs6,1)&lt;br /&gt;
  hs6_lcd=list_hs6(i,:)&lt;br /&gt;
						% strip em&lt;br /&gt;
  hs6_strip=[hs6_lcd '.strip']&lt;br /&gt;
 % eval(['!sbtprr_mob ',hs6_lcd])&lt;br /&gt;
 % eval(['!bbopstrip -sz  hydro_time depth ' hs6_lcd ' 'hs6_strip]);&lt;br /&gt;
  E_BBstrip(pb,hs6_lcd,'hydro_time','depth')&lt;br /&gt;
 &lt;br /&gt;
 [fileA,headA]=read_strip(hs6_strip);&lt;br /&gt;
  %eval(['!rm ''hs6_strip']);&lt;br /&gt;
  %cd ..&lt;br /&gt;
  [bt_pts]=bt_ac9(fileA);&lt;br /&gt;
  &lt;br /&gt;
  if ~isempty(bt_pts),&lt;br /&gt;
    %create header, castid matrix&lt;br /&gt;
    %castid  index   hydro_time       1depth&lt;br /&gt;
    %zub11008adt1     7.5000000e+01   2.1710000e+04   2.0443990e+02&lt;br /&gt;
    %zub11008adb1     1.2810000e+03   3.7655000e+05   1.3007170e+00 &lt;br /&gt;
    %castdir={ 'dt','db','ub','ut' };&lt;br /&gt;
    %castdir=[castdir castdir castdir castdir]; %  good for 4 yoyo's&lt;br /&gt;
    %if size(bt_pts,1)&amp;gt;size(castdir,2),&lt;br /&gt;
    %  error('hs6bt: increase size of castdir.');&lt;br /&gt;
    %end&lt;br /&gt;
    dd=[];&lt;br /&gt;
    idir=[];&lt;br /&gt;
    dd=diff(bt_pts(:,3));&lt;br /&gt;
    dd=[dd; 0];&lt;br /&gt;
    id=1;&lt;br /&gt;
    fid=fopen( 'bt.pts', 'w' );&lt;br /&gt;
    fprintf(fid,'castid	index	hydro_time	depth\n');&lt;br /&gt;
    for i=1:2:size(bt_pts,1),&lt;br /&gt;
      if dd(i)&amp;gt;0,&lt;br /&gt;
	if idir==1,&lt;br /&gt;
	  id=id+1;&lt;br /&gt;
	end&lt;br /&gt;
	idir=1;&lt;br /&gt;
	castdir1(i:i+1,:)=['dt'; 'db'];&lt;br /&gt;
      else,&lt;br /&gt;
	idir=2;&lt;br /&gt;
	castdir1(i:i+1,:)=['ub'; 'ut'];&lt;br /&gt;
      end&lt;br /&gt;
      bt_castname=[ hs6_lcd(1:9),castdir1(i,:),num2str(id) ];&lt;br /&gt;
      fprintf(fid,'%s %1.7e %1.7e %1.7e \n',bt_castname,bt_pts(i,:));&lt;br /&gt;
      bt_castname=[ hs6_lcd(1:9),castdir1(i+1,:),num2str(id) ];&lt;br /&gt;
      fprintf(fid,'%s %1.7e %1.7e %1.7e \n',bt_castname,bt_pts(i+1,:));&lt;br /&gt;
      if idir==2,&lt;br /&gt;
	id=id+1;&lt;br /&gt;
      end&lt;br /&gt;
    end&lt;br /&gt;
    fclose(fid);&lt;br /&gt;
    &lt;br /&gt;
    %do this by calling a script that takes care of the awk and archive&lt;br /&gt;
    eval([ '!awk &amp;lt; ' hs6_lcd ' &amp;gt; ' tmpfile...&lt;br /&gt;
	  ' ''$1==&amp;quot;&amp;lt;sampled_parameters&amp;gt;&amp;quot;{system(&amp;quot;cat bt.pts&amp;quot;)}{print $0}'''])&lt;br /&gt;
    eval([ '!mv ' tmpfile ' ' hs6_lcd ]);&lt;br /&gt;
    &lt;br /&gt;
    %archive&lt;br /&gt;
    %cruisename=eval(['echo ' hs6_lcd ' | cut -b 3-6'])&lt;br /&gt;
    cruisename=hs6_lcd(3:6);&lt;br /&gt;
    %archive=[ pwd '/ARCHIVE/' ];&lt;br /&gt;
    archive=[ '/home/data92/bbop/ARCHIVE/' ];&lt;br /&gt;
    %cp $lcd_file /home/data92/bbop/ARCHIVE/$cruisename/hs6&lt;br /&gt;
    eval(['!cp ' hs6_lcd ' ' archive cruisename '/hs6']);&lt;br /&gt;
    %echo $lcd_file has been archived to /home/data92/bbop/ARCHIVE/$cruisename/hs6&lt;br /&gt;
    eval(['!echo ' hs6_lcd ' has been archived to ',archive, cruisename '/hs6']);&lt;br /&gt;
&lt;br /&gt;
    hs6_files=[hs6_files; hs6_lcd];&lt;br /&gt;
  else&lt;br /&gt;
    not_hs6_files=[not_hs6_files; hs6_lcd];&lt;br /&gt;
  end&lt;br /&gt;
      &lt;br /&gt;
  %cleanup&lt;br /&gt;
  %clear hs6_lcd bt_pts fileA headA hs6_strip;&lt;br /&gt;
  %eval('!rm bt.pts');&lt;br /&gt;
end&lt;br /&gt;
%cd ..&lt;br /&gt;
hs6_files&lt;br /&gt;
not_hs6_files&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;/div&gt;</summary>
		<author><name>128.111.101.185</name></author>
		
	</entry>
</feed>