% HARPRO - ARPRO START PAGE
%
% Last modification to ARPRO in March '98
%
global float number timer temp pres lat lon u v wwww
global ltemp lpres llat llon lu lv lwwww
global dataread lowpassdone handles moviemapmade
global FLOATSREAD head start finish deltau deltav
global DATAPATH COASTPATH BATHYPATH SOFTPATH
global initharpro mapset minlat maxlat minlon maxlon
global flstep tjump R1 R2 lag T11 T22 Tu Tv X Y Umean Vmean
%
if tjump == []
   tjump = 1;
end
if initharpro == 1,
   eval(['cd ' DATAPATH(1:length(DATAPATH)-1)]) ;
 else
   initharpro = 1;
end
if dataread == [],
    dataread = 'off';
end
if lowpassdone == [],
    lowpassdone = 'off';
end
if moviemapmade == [],
    moviemapmade = 'off';
end
harpro = figure('name','A R P R O 3.2b',...
                'numbertitle','off',...
                'menubar','none',...
                'color',[1 1 1]) ;
log1 = text(0.5,0.8,'ARPRO');
log2 = text(0.5,0.5,'Float Data Processing Software');
log3 = text(0.5,0.2,'AINCO - Interocean');
set(log1,'Fontsize',75,...
         'Fontname','Times',...
         'FontWeight','bold',...
         'Color',[0 0 1],...
         'HorizontalA','center');
set(log2,'Fontsize',28,...
         'Fontname','Times',...
         'Color',[0 0 0],...
         'HorizontalA','center');
set(log3,'Fontsize',40,...
         'Fontname','Times',...
         'Color',[0 0 1],...
         'HorizontalA','center');
axis('off') ;
HARPRO = harpro;
%  -----Build the FILE menu ----------------------------------
hmenu(1) = uimenu(harpro,'label','  &FILE');
     hf(2) = uimenu(hmenu(1),'label','&Open',...
                             'callback',['rfcread1,',...
                             'lowpassdone = ''off''']);
     hf(3) = uimenu(hmenu(1),'label','&Quit',...
                             'callback','aquit');
     hf(4) = uimenu(hmenu(1),'label','&About...',...
                             'callback','sthelp');

%  -----Build the PROCESS menu -------------------------------
hmenu(2) = uimenu(harpro,'label','&PROCESS',...
                         'enable',dataread);
     hf(5) = uimenu(hmenu(2),'label','&Lowpass');
         hff(1) = uimenu(hf(5),'label','&Boxcar');
            hfff(1) = uimenu(hff(1),'label','&3-point',...
                 'callback','[ltemp,lpres,llat,llon,lu,lv,lwwww] = datalow(''boxcar'',3)');
            hfff(2) = uimenu(hff(1),'label','&5-point',...
                 'callback','[ltemp,lpres,llat,llon,lu,lv,lwwww] = datalow(''boxcar'',5);');
            hfff(3) = uimenu(hff(1),'label','&7-point',...
                 'callback','[ltemp,lpres,llat,llon,lu,lv,lwwww] = datalow(''boxcar'',7);');
%
         hff(2) = uimenu(hf(5),'label','&Triangle');
            hfff(4) = uimenu(hff(2),'label','&3-point',...
                 'callback','[ltemp,lpres,llat,llon,lu,lv,lwwww] = datalow(''triang'',3);');
            hfff(5) = uimenu(hff(2),'label','&5-point',...
                 'callback','[ltemp,lpres,llat,llon,lu,lv,lwwww] = datalow(''triang'',5);');
            hfff(6) = uimenu(hff(2),'label','&7-point',...
                 'callback','[ltemp,lpres,llat,llon,lu,lv,lwwww] = datalow(''triang'',7);');
%
         hff(3) = uimenu(hf(5),'label','&Hanning');
            hfff(7) = uimenu(hff(3),'label','&3-point',...
                 'callback',['global window,',...
                             '[ltemp,lpres,llat,llon,lu,lv,lwwww] = datalow(''hanning'',3);']);
            hfff(8) = uimenu(hff(3),'label','&5-point',...
                 'callback',['global window,',...
                             '[ltemp,lpres,llat,llon,lu,lv,lwwww] = datalow(''hanning'',5);']);
            hfff(9) = uimenu(hff(3),'label','&7-point',...
                 'callback',['global window,',...
                             '[ltemp,lpres,llat,llon,lu,lv,lwwww] = datalow(''hanning'',7);']);
     hf(6) = uimenu(hmenu(2),'label','&T+P (raw) of float',...
                             'callback','tp(temp,pres,''big'')');
     hf(7) = uimenu(hmenu(2),'label','&T+P (low) of float',...
                             'enable',lowpassdone,...
                             'callback','tp(ltemp,lpres,''big'')');
     hf(8) = uimenu(hmenu(2),'label','&Rossby1 (raw)',...
                             'callback','Rossby1(timer,lat,u,v)');
     hf(9) = uimenu(hmenu(2),'label','&Rossby1 (low)',...
                             'enable',lowpassdone,...
                             'callback','Rossby1(timer,llat,lu,lv)');
     hf(10) = uimenu(hmenu(2),'label','&Rossby2 (raw)',...
                             'callback','Rossby2(timer,lat,u,v)');
     hf(11) = uimenu(hmenu(2),'label','&Rossby2 (low)',...
                             'enable',lowpassdone,...
                             'callback','Rossby2(timer,llat,lu,lv)');
     hf(12) = uimenu(hmenu(2),'label','&About...',...
                             'callback','prhelp');

%  -----Show header ---------------------------------------------
hmenu(3) = uimenu(harpro,'label','&HEADER',...
                             'enable',dataread,...
                             'callback','givehead');
%  -----Build the STATISTICS menu -------------------------------
hmenu(4) = uimenu(harpro,'label','&STATISTICS',...
                         'enable','on');
     hf(12) = uimenu(hmenu(4),'label','&Surface Statistics',...
                             'enable','on',...
                             'callback','statint');
     hf(14) = uimenu(hmenu(4),'label','&K. E. Spectra',...
                             'enable','on',...
                             'callback','specintr');
     hf(15) = uimenu(hmenu(4),'label','&About...',...
                             'callback','stathelp');

%
%  -----Build the MOVIE menu ------------------------------------
hmenu(5) = uimenu(harpro,'label','&MOVIE');
     hf(15) = uimenu(hmenu(5),'label','&color map');
        hhf(1) = uimenu(hf(15),'label','&with bathymetry',...
                               'enable','on',...
                               'Callback','movinter(''yes'',''yes'')');
        hhf(2) = uimenu(hf(15),'label','&without bathymetry',...
                               'enable','on',...
                               'Callback','movinter(''yes'',''no '')');
     hf(16) = uimenu(hmenu(5),'label','&black and white map');
        hhf(3) = uimenu(hf(16),'label','&with bathymetry',...
                               'enable','on',...
                               'Callback','movinter(''no '',''yes'')');
        hhf(4) = uimenu(hf(16),'label','&without bathymetry',...
                               'enable','on',...
                               'Callback','movinter(''no '',''no '')');
     hf(17) = uimenu(hmenu(5),'label','&overlay floats',...
                              'enable','on',...
                              'Callback','movie02');
     hf(18) = uimenu(hmenu(5),'label','&About...',...
                             'callback','movhelp');
%
%
%  -----Build the MAP PLOTTING menu -------------------------------
hmenu(6) = uimenu(harpro,'label','&PLOT MAP');
     hf(18) = uimenu(hmenu(6),'label','&color map');
        hhf(5) = uimenu(hf(18),'label','&with bathymetry',...
                               'enable','on',...
                               'Callback','basema2(''yes'',''yes'',''big'')');
        hhf(6) = uimenu(hf(18),'label','&without bathymetry',...
                               'enable','on',...
                               'Callback','basema2(''yes'',''no '',''big'')');
     hf(19) = uimenu(hmenu(6),'label','&black and white map'); 
        hhf(7) = uimenu(hf(19),'label','&with bathymetry',...
                               'enable','on',...
                               'Callback','basema2(''no '',''yes'',''big'')');
        hhf(8) = uimenu(hf(19),'label','&without bathymetry',...
                               'enable','on',...
                               'Callback','basema2(''no '',''no '',''big'')');
     hf(20) = uimenu(hmenu(6),'label','&overlay current float (raw)',...
                              'enable',dataread,...
                              'Callback','floverl(lon,lat)');
     hf(21) = uimenu(hmenu(6),'label','&overlay current float (low)',...
                              'enable',lowpassdone,...
                              'Callback','floverl(llon,llat)');
     hf(22) = uimenu(hmenu(6),'label','&overlay Rossby vectors',...
                              'enable','on',...
                              'Callback','mapross');
     hf(23) = uimenu(hmenu(6),'label','&About...',...
                             'callback','pmhelp');
%  -----Build the Summary menu---------------------------------
hmenu(7) = uimenu(harpro,'label','&SUMMARY',...
                          'enable',dataread);
     hf(23) = uimenu(hmenu(7),'label','&with bathymetry',...
                               'enable','on',...
                               'Callback','basema2(''no '',''yes'',''wee'')');
     hf(24) = uimenu(hmenu(7),'label','&without bathymetry',...
                               'enable','on',...
                               'Callback','basema2(''no '',''no '',''wee'')');
     hf(25) = uimenu(hmenu(7),'label','&About...',...
                             'callback','flhelp');
%  -----Build the SETTINGS menu ----------------------------------
hmenu(8) = uimenu(harpro,'label','&SETTINGS');
     hf(26) = uimenu(hmenu(8),'label','&Paths',...
                             'Callback',['setpaths']);
     hf(27) = uimenu(hmenu(8),'label','&Set float data freq.',... 
                             'callback','set2');
     hf(28) = uimenu(hmenu(8),'label','&About...',...
                             'callback','sethelp');
%  -----Build the HELP menu -----------------------------------
hmenu(9) = uimenu(harpro,'label','&HELP');
     hf(29) = uimenu(hmenu(9),'label','&Version',...
                             'callback','logo01');
     hf(30) = uimenu(hmenu(9),'label','&About...',...
                             'callback','help02');
handles = [harpro hmenu(1:3)] ;
