X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 18 Sep 2015 07:00 AM by  anon
IDL call function 's error tips
 4 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:6
New Member


--
18 Sep 2015 07:00 AM
    I have one problem about IDL call function. convert_modis_data is a MODIS projective transformation provided by NASA. modis_conversion_toolkit.sav is placed at E:\ENVI\ENVI50\classic\save_add. The problem is that some MODIS data is unvaild(like MOD02HKM.A2015126.0340.006.2015126133248),Procedural error cant be jumped over by ‘catch’way,The program can not be carried out next cycle . This affect work efficiency. so does anyone can know how to solve this peoblem?thanks PRO BATCH_MOD02_Reproject_Li_hkm,ROOT_DIR,output_location COMPILE_OPT IDL2 ENVI, /RESTORE_BASE_SAVE_FILES ENVI_BATCH_INIT, LOG_FILE='BATCH.LOG' PRINT, 'START : ',SYSTIME() ROOT_DIR ='E:\test\MOD02HKM\' output_location ='E:\test\MOD02HKM\' FNS = FILE_SEARCH(ROOT_DIR,'*.hdf',COUNT = COUNT) PRINT, 'There ara totally', COUNT,' images.' ;calib_method: 0-radiance,1-relfectance,2-radiance/?? calib_method = 1 ;Output method schema is: ;0 = Standard, 1 = Projected, 2 = Standard and Projected out_method = 1 ;Use bow tie correction during the projection process output_projection = envi_proj_create(/geographic) FOR i = 0, COUNT-1 DO BEGIN modis_l1b_file = FNS[i] start= STRPOS(modis_l1b_file,'\',/reverse_search) ends=STRPOS(modis_l1b_file,'.',/reverse_search) output_rootname = strmid(modis_l1b_file,start,ends-start)+'reproject' convert_modis_data, in_file=modis_l1b_file, out_path=output_location, $ out_root=output_rootname, /l1b, out_method=out_method, $ num_x_pts=50, num_y_pts=50, out_proj=output_projection, calib_method=calib_method,/bowtie, $ sd_pos=[1],/no_msg, background=0.0;sd_pos???????????????,??MCTK users guide?? ENDFOR

    Zachary Norman



    Basic Member


    Posts:173
    Basic Member


    --
    18 Sep 2015 09:56 AM
    Hi Wenkai, Is there a specific error message that you are getting? It may be best to go to NASA for your question about modis_conversion_toolkit because it is not officially supported by Exelis VIS due to the fact that it is third party code. My first guess would be because the .sav file could be made in a different version of IDL and the .sav file uses structures. In that case you would need to use restore with the RELAXED_STRUCTURE_ASSIGNMENT keyword (http://www.exelisvis.com/...R_822202989_900571). You may have to manually restore the file in addition to ENVI, /RESTORE_BASE_SAVE_FILES

    Deleted User



    New Member


    Posts:6
    New Member


    --
    18 Sep 2015 08:03 PM
    Zach,Thanks for your help! . i am sorry that i did not tell the specific error message. the specific error message is that TRIANGULATE:not enough valid unique points specified. i don't think the reason is version,because it can run with most .hdf data. thanks again

    Zachary Norman



    Basic Member


    Posts:173
    Basic Member


    --
    22 Sep 2015 11:25 AM
    Hi Wenkai, That error can mean that triangulate cannot run because there really aren't enough points for TRIANGULATE to run. When you get the error, which line of your code are you on? From the code you provided, it doesn't look like TRIANGULATE or TRIGRID are being called from anywhere so I'm guessing that this might be internal to the .sav file for conver_modis_data. When I have seen this error it has been because there are a lot of points that are exactly the same or I am passing an array of zeros. I would double check that your call to convert_modis_data has valid arguments that are being passed in. Apart from that, it may be worth reaching out to the creator of convert_modis_data and askign them for assistance. This is because it is not a routine that is native to IDL and so it is not directly supported by Exelis VIS.

    Deleted User



    New Member


    Posts:6
    New Member


    --
    01 Oct 2015 03:34 AM
    hi,Zach: thanks your help.i sended email to prof. he told me the tile size in envi preference need to be increased to at least 10MB through envi classic.and the next release of MCTK no longer has this issue.
    You are not authorized to post a reply.