Hi,
I am using "ENVI_QUAC_DOIT" IDL Code obtained from ENVI help but it gave an error - Please help me to run this code.
Regards,
Bilal (Hong Kong PolyU)
Error:
% Restored file: ENVI_SPC.
% Procedure was compiled while active: ENVI_QUAC. Returning.
% Compiled module: ENVI_QUAC.
% Can't continue from this point.
% Execution halted at: $MAIN$
QUAC_CODE:
PRO ENVI_QUAC
COMPILE_OPT idl2
;
print, 'Starting batch process.'
print, systime()
input_location = 'F:\input\'
output_location = 'F:output\'
MOD02_rad= File_Search(input_location + '*.img',COUNT=count_in)
;FOR k=0, 0 DO BEGIN
FOR k=0, count_in-1 DO BEGIN
Print, 'Processing File =', k +1
Print, 'Total Files=', Count_in
; Open the input file
;
envi_open_file, MOD02_rad[k], r_fid=fid_MOD02
if (fid_MOD02 eq -1) then return
;
; Set the keywords. Perform the
; QUick Atmospheric Correction on all
; pixels and all bands in the file.
;
ENVI_FILE_QUERY, fid_MOD02, dims=dims, nb=nb
pos = lindgen(nb)
File_name = STRJOIN(STRSPLIT(STRMID(FILE_BASENAME(MOD02_rad[k], '.hdf'), 0, 26), '.', /EXTRACT), '_')
Print, 'out_name=', File_name
;
; Run the DOIT
;
envi_doit, 'envi_quac_doit', $
fid=fid_MOD02, pos=pos, dims=dims, $
quac_sensor='MODIS', $
out_name=output_location + File_name + '_QUAC.img', r_fid=r_fid
ENDFOR
print, 'Finished batch process.'
print, systime()
Print, '~ Job Completed ~'
END
|