\n');
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,' the quality control plots of data that we have recently recieved from these STORDAT units:');
fprintf(fid,'
');
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
fprintf(fid,'
\n');
fprintf(fid,'
\n');
fprintf(fid,'
\n');
fprintf(fid,'
\n');
fprintf(fid,' \n');
fprintf(fid,'\n');
fclose(fid);