-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MCTK code batch file #23
Comments
You did not follow the directions about the output location. It should look like this: output_location = 'E:\SARA' You should also add this right before the end of the program so you can see informative error messages: print, msg Please read the user guide thoroughly, including the API documentation, before attempting to modify the sample code at the back. |
thank you sir |
You're encountering that error because you didn't modify the SD_POS array to work with the L1B product you're trying to process. If you look on Page 15 of the user guide, where SD_POS is described, you'll see that the array for MOD02HKM can only contain [0], [1], or [0,1]. There are only two datasets available to process. The example code you modified is for MOD021KM, whose array can have values up to 3 since there are four datasets available. |
Thank you sir, now i can run it. |
Dear dawhite
When i run idl code like this,
;Level 1B example
pro test_batch_modis_conversion_level_1b
compile_opt idl2
modis_l1b_file = 'D:\OmegaDrive\Thesis\SARA algorithm\011117\MOD02HKM.A2017305.0355.061.2017305175655.hdf'
;The specified output location MUST end in the appropriate path
;separator for your OS
output_location = 'E:\SARA'
output_rootname = 'TOA'
;Calibration method schema is:
;0 = Radiance / Emissivity, 1 = Reflectance / Emissivity, 2 = Radiance / Brightness Temp
calib_method = 2
;Output method schema is:
;0 = Standard, 1 = Projected, 2 = Standard and Projected
out_method = 1
output_projection = envi_proj_create(/geographic)
;do not put the bridge creation/destruction code inside a loop
bridges = mctk_create_bridges()
;Choosing linear interpolation
interpolation_method = 1
convert_modis_data, in_file=modis_l1b_file, out_path=output_location, $
out_root=output_rootname, out_method=out_method, $
interp_method=interpolation_method, $
out_proj=output_projection, calib_method=calib_method, $
sd_pos=[1,3], /no_msg, background=0.0, r_fid_array=r_fid_array, $
r_fname_array=r_fname_array, bridges=bridges, msg=msg
mctk_destroy_bridges, bridges
end
the result from this code does not appear, it provides data (.dat) like this photo. How to solve?
The text was updated successfully, but these errors were encountered: