function at_stordat_html3 % AT_STORDAT_HTML3 - Creates the main html page used by at_stordat % Brian Schlining % 30 Aug 1999 outPath = 'D:\www\bog\'; fid = fopen([outPath 'at_stordat_main.html'],'wt'); fprintf(fid,'
'); fprintf(fid,' '); fprintf(fid,' '); fprintf(fid,' '); fprintf(fid,'| ');
fprintf(fid,' | ');
fprintf(fid,' ');
fprintf(fid,'In addition to the equatorial Pacific moorings, ep1 and ep2, MBARI measures');
fprintf(fid,' spectral characteristics using STORDATs at several other sites. The following links are');
fprintf(fid,' plots of the complete time series we have recieved from STORDAT units located at each station');
fprintf(fid,' '); f = getfname('\\tsunami.shore.mbari.org\oasis\eqpac\stordat\'); for i = 1:length(f) end for i = 1:length(s) % Process the Position lat(i) = strmatch('Latitude',s(i).fields); long(i) = strmatch('Longitude',s(i).fields); try mlat(i) = round(nanmedian(s(i).data(:,lat(i)))); catch mlat(i) = NaN; end if mlat(i) >= 0 elat(i) = 'N'; elseif mlat(i) < 0 elat(i) = 'S'; else elat(i) = ' '; end try mlon(i) = round(nanmedian(s(i).data(:,long(i)))); catch mlon(i) = NaN; end end alat = abs(mlat); alon = abs(mlon); ulat = unique(mlat); ulon = unique(mlon); % Write out links for known positions for ilat = 1:length(ulat) for ilon = 1:length(ulon) good = find(mlat == ulat(ilat) & mlon == ulon(ilon)); if ~isempty(good) fprintf(fid,'%02i%1s %03iW \n',alat(min(good)),elat(min(good)),alon(min(good))); for n = 1:length(good) [pth nm ext] = fileparts(s(good(n)).filename); d = strmatch('Date',s(good(n)).fields,'exact'); fprintf(fid,' '); at_stordat_html2(s(good(n)),nm,min(s(good(n)).data(:,d))); fprintf(fid,'',nm); fprintf(fid,'File:%s, Deployed: %s \n', nm, datestr(min(s(good(n)).data(:,d)))); end fprintf(fid,' '); end end end % Write out links for unknown positions good = find(isnan(mlat) | isnan(mlon)); if ~isempty(good) fprintf(fid,'Position Unknown \n'); for n = 1:length(good) [pth nm ext] = fileparts(s(good(n)).filename); d = strmatch('Date',s(good(n)).fields,'exact'); fprintf(fid,' '); at_stordat_html2(s(good(n)),nm,min(s(good(n)).data(:,d))); fprintf(fid,'',nm); fprintf(fid,'File:%s, Deployed: %s \n', nm, datestr(min(s(good(n)).data(:,d)))); end fprintf(fid,' '); end % Group links by Positions, order by date fprintf(fid,' | ');
fprintf(fid,'