X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 22 Oct 2012 04:09 AM by  anon
Cloud Mask Georef-modis conversion toolkit
 5 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
22 Oct 2012 04:09 AM
    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

    Deleted User



    New Member


    Posts:
    New Member


    --
    23 Oct 2012 11:13 AM
    Can you clarify what the problem is with the swath, sd etc. names? If you can provide a specific example of what you want to do it would be helpful.

    Deleted User



    New Member


    Posts:
    New Member


    --
    23 Oct 2012 04:01 PM
    I want to georeference a bunch of cloud mask(mod35)-L2 MODIS images (10 years). an example of the image name is " MOD35_L2.A2010002.1135.005.2010259122449.pscs_000500701375" I don know what should I consider as Swath name and sd_name in current code for this kinda product ?! when I run the code, there is no error and no result too , can u help me where in this code I did mistake ? thx alot Maryam

    Deleted User



    New Member


    Posts:
    New Member


    --
    24 Oct 2012 12:51 PM
    In the MCTK Users Guide you can find an example in the code section that shows a sample swath_name and sd_name; ;Level 2 swath example pro test_batch_modis_conversion_l2_swath

    Deleted User



    New Member


    Posts:
    New Member


    --
    25 Oct 2012 03:47 AM
    Hi the code that I am using is exactly what u suggest. I put the following names for my using product according to the guide but I am not sure about them: swath_name = 'mod35' sd_names = ['CloudMask'] But still the code doesn`t have any result. thx

    Deleted User



    New Member


    Posts:
    New Member


    --
    25 Oct 2012 04:12 PM
    If you look at the descriptions for sd_names in the Guide you will see that it says the words have to be exact. For instance you have CloudMask but it should be Cloud_Mask_QA; that is what figure 5 shows. Maybe that will help. What you should do first is run one of your files through the interface and process it. This would provide a check to make sure the results from the batch program are correct. The next step is to use the example program with one of your files and not use a FOR loop. Basically substitute your file for the file in the example. When that works set up your for loop and chose the same file. When that works try with 2 files. All these steps may take time but it makes it easier to trace problems.
    You are not authorized to post a reply.