
      if wt==1;
        ef=exist([fn,'.revd']);
        if ef==0;
          fn=input('renter filename w/out extension: ','s')
        end;
        fid=fopen([fn,'.revd']);
        fread(fid,6144);
        count1=fread(fid,262144);
        counts=reshape(count1,512,512);
        disp(' ');
        disp('Hardcoded to read ".revd" files.');
      elseif wt==2;
        ef=exist([fn,'.rmp']);
        if ef==0;
          fn=input('renter filename w/out extension: ','s')
        end;
        fid=fopen([fn,'.rmp']);
        fseek(fid,368,'bof');
        counts=fscanf(fid,'%f',[512,512]);
      elseif wt==3;
        ef=exist([fn,'.nav']);
        if ef==0;
          fn=input('renter filename w/out extension: ','s')
        end;
        fid=fopen([fn,'.nav']);
% problem stement:        fseek(fid,337,'bof');
        for kk=1:13;
          fgetl(fid);
        end;
        counts=fscanf(fid,'%f',[512,512]);
      elseif wt==4;
        ef=exist([fn,'.pvu']);
        if ef==0;
          fn=input('renter filename w/pathname & w/out extension: ','s')
        end;
        fid=fopen([fn,'.pvu']);

% find lat & lon corners starting with top left
         for kk=1:45;
           ii=fscanf(fid,'%s',1);
         end;
         mnlo=str2num(ii(2:length(ii)-1));
         ii=fscanf(fid,'%s',1);
         mxla=str2num(ii(1:length(ii)-1));

% find lat & lon corners in lower right
         for kk=1:7;
           ii=fscanf(fid,'%s',1);
         end;
         mxlo=str2num(ii(2:length(ii)-1))
         ii=fscanf(fid,'%s',1);
         mnla=str2num(ii(1:length(ii)-1))

% skip by last line of header
         for kk=1:9;
          fscanf(fid,'%s',1);
         end;

%        fseek(fid,371,'bof');
%        fscanf(fid,'%s',3);
%        fscanf(fid,'%s',1);
        counts=fscanf(fid,'%f',[512,512]);

      elseif wt==5;
        ef=exist([fn,'.byt']);
        if ef==0;
          fn=input('renter filename w/out extension: ','s')
        end;
        fid=fopen([fn,'.byt']);
        count1=fread(fid);
        counts=reshape(count1,684,791);

      elseif wt==6;
        ef=exist([fn,'.merg']);
        if ef==0;
          fn=input('renter filename w/out extension: ','s')
        end;
        fid=fopen([fn,'.merg']);
        fread(fid,1536);
        count1=fread(fid,262144);
        counts=reshape(count1,512,512);
        disp(' ');
        disp('Hardcoded to read ".merg" files.');

      elseif wt==7;
        don=menu('which time of day?','day','night');
%       determine whether its day or night from last two digits of "fn"
%        if str2num(fn(length(fn)-1:length(fn)))<8|str2num(fn(length(fn)-1:length(fn)))>18;
%         don=2;else;don=1;end;

        if don==1;ext='.nd7';else;ext='.ns7';end;
        ef=exist([fn,ext]);
        if ef==0;
          fn=input('renter filename w/out extension: ','s')
        end;
        fid=fopen([fn,ext]);
        count1=fread(fid,262144);
        counts=reshape(count1,512,512);
        disp(' ');
        disp('Hardcoded to read ".ns7" files.');

      elseif wt==8;
%        don=menu('which time of day?','day','night');
        if str2num(fn(length(fn)-1:length(fn)))<8|str2num(fn(length(fn)-1:length(fn)))>21;
         don=2;else;don=1;end;
        if don==1;ext='.gd7';else;ext='.gs7';end;
        ef=exist([fn,ext]);
        if ef==0;
          fn=input('renter filename w/out extension: ','s')
        end;
        fid=fopen([fn,ext]);
        count1=fread(fid,262144);
        counts=reshape(count1,512,512);
        disp(' ');
        disp(['Hardcoded to read ',ext,' files.']);
      elseif wt==9;
        %ef=exist([fn,'.gbs']);
        ef=exist([fn]);
        if ef==0;
          fn=input('renter filename w/out extension: ','s')
        end;
        fid=fopen([fn]);
        % read the 3 headers of 512 bytes each
        fread(fid,1536);
        [counts,count]=fread(fid,[512 512]);
      elseif wt==10;
        ef=exist([fn]);
        if ef==0;
          fn=input('renter filename w/out extension: ','s')
        end;
        fid=fopen([fn]);
        % read the 3 headers 
        fgetl(fid);
        fgetl(fid);
        % plot points w/color changing at each "/Break"
        lin=1;
        ik=0;
        ikb=0;
        lin=fgetl(fid);
        while lin~=-1;
          if lin(1)~='/';
            ik=ik+1;
            lonf(ik)=str2num(lin(1:7));
            latf(ik)=str2num(lin(9:13));
          else;
            ikb=ikb+1;
          end;
          lin=fgetl(fid);
        end;
        disp(' ');
        disp([num2str(ikb),' frontal sections found']);
        disp([num2str(ik),' frontal lat/lons found']);
%        georbat;
        plot(lonf,latf,'.','markersize',10,'color','m');
        hold on;
      end;
