Hi, I just find a trick to get an ascii out and also display (with GUI) the band from appended file. The trick is to load the final file as HDF. In this case you may have seen this appended band. On the other hand if you want to have an ascii output from this new file you only need to load your file as hdf. My scripts are below. For GUI; first I load a normal hdf file and then without closing the window, just writing the name of the file with full path in this window and press load you may seen all the hdf bands..
[img][/img]
##############Script for appending new band to the original file. You may have different flags.###############################
load, 'S2003289044020.L2_MLAC_OC.x2.hdf', prod_name=['chlor_a','l2_flags'] & $
display, band_no=1, fbuf=1 & $
load_graph, 2, fbuf=1, ftype='BAND', bit=[1,2,4,5,6,9,10], color=[7] & $
mband_cmd, navband=1, cmd_array=['result=b1', 'ix=WHERE(GR1 EQ 7, icnt)', 'if (icnt GT 0) then result(ix)=-999'] & $
out, 'S2003289044020.L2_MLAC_OC.x2.hdf', /data, band=3, ftype='HDF', /geo, /interlace, append=1
##############Output script. In this case ascii out is used.####################
; PRO matchups
; this is an example that extracts matchups from L2
product='new band'
; pt1 and pt2 must be in *lon/lat* order
; using a very small region will result in a one pixel extraction
pt1=[110.056, 11.85] ; bottom right corner
pt2=[109.965, 11.95] ; top left corner
; vars=[3,4,5,6,2] corresponds to lat, lon, pixel, line, geo
vars=[3,4,5,6,2]
format='(F10.3,F10.3,I,I,F10.4)'
filenames=findfile('S2003289044020.L2_MLAC_OC.x2.hdf')
for i=0,n_elements(filenames)-1 do begin & $
filename=filenames(i) & $
print,'filename = ', filename & $
base=strmid(filename,0,14) & $
matchup_file=base+'_matchup.txt' & $
load,filename, ftype='hdf', prod_name=product & $
out_ascii, matchup_file, band_no=1, region=[pt1,pt2], vars=vars, format=format, titles=0, /ll_flag & $
clear_up & $
endfor