

function [good] = run_process_run(prod_day, REstar, Bo)


prod_mon = 11;

midstr = 'shoal_RE'

prefixw = sprintf('/home/kghanson/basilisk/shoaling/runs/test_2022_11_%02d/%s%d_BO%d',prod_day,midstr,REstar,Bo);

prefixsd = sprintf('/home/kghanson/basilisk/shoaling/runs/test_2022_11_%02d/%s%d_BO%d/shoal_dump',prod_day,midstr,REstar,Bo);
                                  
% first do the energy extract                                  
syscmd = sprintf('cd %s; /home/ffeddersen/SurfRanch/Basilisk/basilisk_code/energy_extract',prefixw);
disp(syscmd)
 system(syscmd);

  % next is surface extract                                  
 syscmd = sprintf('cd %s; /home/ffeddersen/SurfRanch/Basilisk/basilisk_code/surface_extract',prefixsd);
 disp(syscmd)
 system(syscmd);

% wind extract                                  
% prefixwind = sprintf('/home/kghanson/basilisk/shoaling/runs/test_2022_%02d_%02d/%s%d_BO%d',prod_mon,prod_day(k),midstr,REstar(i),Bo(j));
  syscmd2 = sprintf('/home/ffeddersen/SurfRanch/Basilisk/basilisk_code/wind_along_profiles %s',prefixw);
  disp(syscmd2)
  system(syscmd2);

  % shoaling extract
         cdprefixw = sprintf('cd /home/kghanson/basilisk/shoaling/runs/test_2022_11_%02d/%s%d_BO%d',prod_day,midstr,REstar,Bo);
          disp(cdprefixw)
          eval(cdprefixw)
          DD = dir('shoal_binary');
          if (isempty(DD))
              system('mkdir shoal_binary')
          end;
          %% Arguments: output_matrix  dump_num_start dump_num_end  Lx  NX  ymin ymax NY  scalar\n");          
          system('~/SurfRanch/Basilisk/basilisk_code/output_matrix 360 590 8 1600 -0.2 1.8 460 p focus') % delta = 0.005
          system('~/SurfRanch/Basilisk/basilisk_code/output_matrix 360 590 8 1600 -0.2 1.8 460 f focus')
          system('~/SurfRanch/Basilisk/basilisk_code/output_matrix 360 590 8 1600 -0.2 1.8 460 z focus')       

          system('output_matrix 100 100 30 1200 -0.37109 4 175 a broad') % delta = 0.02, t=1006
          system('output_matrix 160 160 30 1200 -0.37109 4 175 a broad') % delta = 0.02, t=1009                    
          system('output_matrix 220 220 30 1200 -0.37109 4 175 a broad') % delta = 0.02, t=1012          
          system('output_matrix 280 280 40 1600 -0.37109 4 175 a broad') % delta = 0.02, t=1015
          system('output_matrix 360 360 40 1600 -0.37109 4 175 a broad') % delta = 0.02, t=1019          
          system('output_matrix 460 460 30 1200 -0.37109 4 175 a broad') % delta = 0.02, t=1020
          system('output_matrix 480 480 30 1200 -0.37109 4 175 a broad') % delta = 0.02, t=1020.2          
          system('output_matrix 500 500 30 1200 -0.37109 4 175 a broad') % delta = 0.02, t=1020.4
          system('output_matrix 520 520 30 1200 -0.37109 4 175 a broad') % delta = 0.02, t=1020.6
          system('output_matrix 540 540 30 1200 -0.37109 4 175 a broad') % delta = 0.02, t=1020.8                
          system('output_matrix 560 560 30 1200 -0.37109 4 175 a broad') % delta = 0.02, t=1021
          system('output_matrix 580 580 30 1200 -0.37109 4 175 a broad') % delta = 0.02, t=1021.2
          system ('output_matrix 600 600 30 1200 -0.37109 4 175 a broad') % delta = 0.02, t=1021.4                        
          good = 1;


