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

Home » Public Forums » archive » Question on MODIS Conversion Toolkit
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: Question on MODIS Conversion Toolkit [message #70687 is a reply to message #70651] Thu, 29 April 2010 03:35 Go to previous messageGo to previous message
devin.white is currently offline  devin.white
Messages: 50
Registered: March 2007
Member
I downloaded the same file you're using and ran it through a modified
version of the example grid conversion program that comes with the
MCTK user guide (below). All I changed was the file name, out path,
out root, and pixel sizes. It runs as expected. If you cannot get
this version to work for you and/or you require assistance with batch
processing a large number of files, I suggest contacting ITT VIS
Technical Support.


pro test_batch_modis_conversion_grid
compile_opt idl2

modis_grid_file = 'C:\MCTK
\MYD11A1.A2002189.h28v05.005.2007216150809.hdf'

;The specified output location MUST end in the appropriate path
;separator for your OS
output_location = 'C:\MCTK\'

output_rootname = 'MYD11A1_LST'

grid_name = 'MODIS_Grid_Daily_1km_LST'

sd_names = 'LST_Day_1km'

;Output method schema is:
;0 = Standard, 1 = Reprojected, 2 = Standard and reprojected
out_method = 1

output_projection = envi_proj_create(/geographic)

;Specify the output X and Y pixel sizes in double precision
floating
;point. Sizes must be in units relevant to selected output
projection
;(degrees in this example).
out_ps_x = 0.008365d
out_ps_y = 0.008365d

;The interp_method keyword uses the same numbering scheme as
;ENVI_REGISTER_DOIT's METHOD keyword
;Choosing Triangulation with Nearest Neighbor.
interpolation_method = 6

;Set reprojection background and any native fill values to -999
;Setting num_x_pts to 50 and num_y_pts to 50 results in 2500 GCPs.
;That should be more than enough....
convert_modis_data, in_file=modis_grid_file, $
out_path=output_location, out_root=output_rootname, $
/higher_product, /grid, gd_name=grid_name, sd_names=sd_names, $
out_method=out_method, out_proj=output_projection, $
out_ps_x=out_ps_x, out_ps_y=out_ps_y, num_x_pts=50, $
num_y_pts=50, interp_method=interpolation_method, $
background=-999, fill_replace_value=-999, $
r_fid_array=r_fid_array, r_fname_array=r_fname_array

end


On Apr 28, 9:29 pm, Harry Kim <kim4ecohy...@gmail.com> wrote:
> Devin,
>
> Sorry for the confusion. out_ps_y was already set to 0.008365. I made
> a mistake in re-typing my source code here.
>
> Based on your suggestion, I changed my code using /UTM projection.
>
> However, I got different error message this time saying that...
>
> "Unable to attach to specified grid. Check name against HDF file
> contents."
>
> I don't understand. The *.hdf file is in the location designated in
> the code.
>
> ---------------------------------
> PRO MCTK_MOD11
> compile_opt idl2
>
> modis_grid_file = 'D:\MYD11A1.A2002191.h28v05.005.2007216150810.hdf'
> output_location = 'D:\MODIS11\output'
> output_rootname = 'MYD11_TEST'
>
> grid_name = 'MOD_Grid_Daily_1km_LST'
> sd_names = ['LST_Day_1km']
>
> out_method = 1
>
> output_projection = envi_proj_create(/UTM) ;/geographic) ;, /
> datum=WGS-84)
>
> ;ps_x = 0.008365d
> ;ps_y = 0.008365d
>
> ps_x = 1000.0
> ps_y = 1000.0
>
> print, 'Now IDL is making an image!!!'
>
> interpolation_method = 6
>
>     convert_modis_data, in_file=modis_grid_file, $
>       out_path = output_location, out_root= output_rootname, $
>       /higher_product, /grid, gd_name=grid_name, sd_names=sd_names, $
>        out_method= out_method, out_proj=output_projection, $
>       ;out_ps_x = 0.008365d, out_ps_y = 0.008365d, num_x_pts=50,
> num_y_pts=50, interp_method=interpolation_method ;, $
>       out_ps_x=ps_x, out_ps_y=ps_y, num_x_pts=50, num_y_pts=50,
> interp_method=interpolation_method, $
>       background = -999
>
> print, 'It is done!'
>
> end
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Widget_windows, scrolling and refreshing
Next Topic: Information about scroll action - new position/offset information?

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

Current Time: Thu Oct 09 23:59:32 PDT 2025

Total time taken to generate the page: 1.04700 seconds