comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » MODIS Conversion Toolkit problems in batch processing: please help me out!!
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
MODIS Conversion Toolkit problems in batch processing: please help me out!! [message #55307] Wed, 15 August 2007 17:20
kim20026 is currently offline  kim20026
Messages: 54
Registered: November 2006
Member
G'day, Everyone!

I would like to get Solar Zenith Angle with MODIS Conversion Toolkit
(MCTK) from MYD07, collection 5. I have to process over 600 hdf files
at once. This time, I am trying to process the first 5 files among
them.

To do this, I...
1) included the name of these hdf files into a txt file... batch_st07
2) made a procedure using MCTK.

After I ran my Procedure file, I got this message...

"attempt to subscript NUM_DIMS_ARRAY with VALID_SDS is out of range"

Please help me out! Thank you for your comments or suggestions in
advance.

Harry

This is what I have done so far...
-----------------------------------------------------------

PRO MCTK_MOD07_SOLZA

WorkDir07 = 'D:\MODIS_ALL\'
batch_st07 = strcompress(WorkDir07+'batch_MYD07_081307.txt',/
remove_all)
WorkDirSat = 'D:\MODIS07\MYD07\'

numDates = file_lines(batch_st07)
Dates = StrArr(numDates)

; Read input dates from batch file
OpenR, lun, batch_st07, /Get_lun
ReadF, lun, Dates
Free_Lun, lun, /force

output_location = 'D:\MODIS07\Processed\'
output_rootname = 'SOLZA'

swath_name = 'mod07'
sd_names = ['Solar Zenith']

out_method = 1
output_projection = envi_proj_create(/geographic)
interpolation_method = 6

for j = 0, 4 do begin ; numDates-1 do begin

s_time = systime(1)
modis_swath_file = WorkdirSat+Dates[j]

print, "Now processing MYD07 data using MCTK from date: ",
Dates[j], ' File ', j+1, ' out of ', numDates

convert_modis_data, in_file=modis_swath_file, $
out_path = output_location, out_root= output_rootname, $
/higher_product, /swath, swt_name=swath_name, sd_names=sd_names,
$
out_method= out_method, out_proj=output_projection, $
num_x_pts=50, num_y_pts=50, interp_method=interpolation_method,
$
/no_msg

endfor

e_time = systime(1)
print, 'Elapsed time for this procedure: ', e_time - s_time

print, "Look's OK!"
end

---------------
The contents of batch_st07.txt
MYD07_L2.A2006001.0355.005.2006126203815.hdf
MYD07_L2.A2006001.0530.005.2006126204759.hdf
MYD07_L2.A2006001.0535.005.2006126202918.hdf
MYD07_L2.A2006001.1735.005.2006126213235.hdf
MYD07_L2.A2006002.0435.005.2006126221739.hdf
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: IDL resources on my Web page
Next Topic: call_external segmentation fault

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 05:22:00 PDT 2025

Total time taken to generate the page: 0.13304 seconds