Hi
I`m using MODIS conversion toolkit code to georeference Cloud Mask L2-1km(mod35).
As I have 10 years products I`ve added for loop to the current code, but whould you help me to run.
I have problem with swath,sd & .. . _names ?!!! my code is :
pro batch_modE_mctk_for_level2
compile_opt idl2
Cmask_path='C:\Users\maryam\TEST\'
Cmask_files=file_search(Cmask_path+'*.hdf',Count=img_count)
;modis_swath_file = 'I:\Maryam\'
;The specified output location MUST end in the appropriate path
;separator for your OS
out_path = 'C:\Users\maryam\TEST\out\'
swath_name = 'mod35'
sd_names = ['CloudMask']
;Output method schema is:
;0 = Standard, 1 = Projected, 2 = Standard and Projected
out_method = 1
out_proj = envi_proj_create(/geographic)
;The interp_method keyword uses the same numbering scheme as
;ENVI_REGISTER_DOIT's METHOD keyword
;Choosing Triangulation with Nearest Neighbor. This keyword is ignored
;if /bowtie is set
interp_method = 6
;Setting num_x_pts to 50 and num_y_pts to 50 results in 2500 GCPs.
;That should be more than enough....
;These keywords are ignored if /bowtie is set
for i=0,img_count-1 do begin
in_file=Cmask_files[i]
out_root = 'G'+file_basename(Cmask_files[i])
;swt_name = 'mod35'
;sd_names = ['Cloud_Mask']
convert_modis_data, in_file=Cmask_files[i], $
out_path=out_PATH, out_root=out_root, $
/higher_product, swt_name=swt_name,sd_names=sd_names,$
out_method=out_method, out_proj=out_proj, num_x_pts=50, num_y_pts=50,$
interp_method=interp_method, /no_msg
; print,out_root
endfor
end
thx
Maryam
|