%topts.RemoveSomeBands = +1;
%toptsRMV.iKCBand = ...
%   [2310 2311 2312 2320 2321 2322 2350 2351 2352 2355 2353 2354];
%toptsRMV.iISO = ...
%    [   1    2    3    1    2    3    1    2    3    4    1    1];
%toptsRMV.iL = ...
%    [   4    4    4    2    2    2    1    1    1    1    3    5];
%toptsRMV.iU = ...
%    [  24   24   24   16   16   16    9    9    9    9    23  25];



topts.RemoveSomeBands = +1;
toptsRMV.iKCBand = [2310 2311 2320 2321 2350 2351 2352 2353 2354 2355];
toptsRMV.iISO =    [   1    2    1    2    1    2    3    1    1    4];  
toptsRMV.iL =      [   4    4    2    2    1    1    1    3    5    1];
toptsRMV.iU =      [  24   24   16   16    9    9    9   23   25    9];

toptsRMV.iKCBand = [toptsRMV.iKCBand 2253 2254 2322];
toptsRMV.iISO    = [toptsRMV.iISO       2    2    3];
toptsRMV.iL      = [toptsRMV.iL         3    5    2];
toptsRMV.iU      = [toptsRMV.iU        23   25   16];

toptsRMV.iKCBand = [toptsRMV.iKCBand 2110 2120 ];
toptsRMV.iISO    = [toptsRMV.iISO       1    1 ];
toptsRMV.iL      = [toptsRMV.iL         2    3 ];
toptsRMV.iU      = [toptsRMV.iU        15   25 ];

toptsRMV.iKCBand = [toptsRMV.iKCBand 2140 2160 2170 2180]; 
toptsRMV.iISO    = [toptsRMV.iISO       1    1    1    1]; 
toptsRMV.iL      = [toptsRMV.iL         5    6    7    8]; 
toptsRMV.iU      = [toptsRMV.iU        23   36   37   38]; 

%manuel does not compute NLTE vibtemps for these two
%toptsRMV.iKCBand = [toptsRMV.iKCBand 2130 2150];
%toptsRMV.iISO    = [toptsRMV.iISO       1    1];
%toptsRMV.iL      = [toptsRMV.iL         4    3];
%toptsRMV.iU      = [toptsRMV.iU        22   22];

popo = unique(toptsRMV.iKCBand);
if length(popo) ~= length(toptsRMV.iKCBand)
  error('oops you have over-written some of the Band Identifiers!')
  end
if (sum(popo - sort(toptsRMV.iKCBand)) ~= 0)
  error('oops you have over-written some of the Band Identifiers!')
  end

topts.HITRAN = '/asl/data/hitran/h2k.oldiso/';

idgas = 2;
f1 = 2000;
f2 = 2600;
fnameout  = '/carrot/s1/sergio/AIRSCO2/CO2_BANDS_PARAM2/co2_allpqr';

fwriteout = '/carrot/s1/sergio/AIRSCO2/CO2_BANDS_PARAM2/co2_4um_allbands.txt';

fid2 = fopen(fwriteout,'w');
str = '!!! make sure these agree with the bands put together in the';
fprintf(fid2,'%s \n',str);
str = '!!! "NLTEBandMapper" subroutine';
fprintf(fid2,'%s \n',str);
str = '!!! Path to the bands specified by "caStrongLineParams" in nm_nonlte';
fprintf(fid2,'%s \n',str);
str = '!!! see ~/KCARTADATA/NLTE/USUALLAYERS_Sept2005/drivelineparameters.m';
fprintf(fid2,'%s \n',str);

for ii = 1 : length(toptsRMV.iU)
  iso = toptsRMV.iISO(ii);
  iL  = toptsRMV.iL(ii);
  iU  = toptsRMV.iU(ii);
  iBand = toptsRMV.iKCBand(ii);
  database = topts.HITRAN;
  [line] = lineparameters(idgas,database,f1,f2,iso,iL,iU,fnameout,iBand);
  str = '/carrot/s1/sergio/AIRSCO2/CO2_BANDS_PARAM2/co2_allpqr_';
  str = [str num2str(iBand) '.dat'];
  fprintf(fid2,'%s \n',str);
  pause(1);
  end
fclose(fid2);