
clear 
clc

% HIM08_2019_272_22_MURI.sbatch
hhh_str=[0:10,19:23];
     
% doy Date of Year or julian day
% tod Time of Day = 1 first 8 hours (00-07) (16) files ; 
%     Time of Day = 2 2nd   8 hours (08-23) (16) fiels ;

satname='HIM08';
year_str='2019';

     
for doy= 271:271
    
    for tod=1:2
    
    fid=fopen(['sbatch_',satname,'_doy_',num2str(doy,'%03i'),'_tod_',num2str(tod,'%01i'),'.sh'],'w');
    %fprintf(fid,'#!/bin/sh');
    %fprintf(fid,'# Author: Min Oo');

         for k=1:8 
          
            if(tod==2)
                k1=k+8;
            else
                k1=k;
            end
             
             
         sbatch_name=([satname,'_',year_str,'_',num2str(doy,'%03i'),'_',num2str(hhh_str(k1),'%02i'),'_MURI.sbatch'])
	 
         fprintf(fid,'sbatch ');
         fprintf(fid,'%s',sbatch_name);
         fprintf(fid,'\n');

         end
	 
	 fclose(fid);

    end
end

    
    % fid=fopen(['IB',num2str(Band,'%01i'),'M',num2str(model,'%02i'),'WS',num2str(windspeed(ws),'%02i'),'A',num2str(aod,'%02i'),...
    %                   'RA',num2str(raz,'%02i'),'.txt'],'w');
