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

Home » Public Forums » archive » Re: MODIS Conversion Toolkit problems in batch processing: please help me out!!
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: MODIS Conversion Toolkit problems in batch processing: please help me out!! [message #55299] Thu, 16 August 2007 04:13
devin.white is currently offline  devin.white
Messages: 50
Registered: March 2007
Member
I think I see the problem. The SD name you're passing in may not
exactly match its counterpart stored in the HDF file. If they don't
exactly match, MCTK will throw an error like the one you encountered.
In the samples of MOD07 I have here, the solar zenith angle SD is
named "Solar_Zenith" with an underscore between the words instead of
"Solar Zenith". You're currently doing this in your code:

sd_names = ['Solar Zenith']

Try changing it to this:

sd_names = ['Solar_Zenith']

That should do the trick, but let me know if you continue to run into
problems.

On Aug 15, 8:20 pm, DirtyHarry <kim20...@gmail.com> wrote:
> 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
[Message index]
 
Read Message
Previous Topic: Re: waiting for IDL7.0
Next Topic: Re: Using FSC_COLOR with postscript devices

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

Current Time: Sat Oct 11 05:16:29 PDT 2025

Total time taken to generate the page: 0.00759 seconds