X
PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 03 Mar 2007 10:05 AM by  anon
How to get Solar zenith angle and view angle details
 2 Replies
Sort:
You are not authorized to post a reply.
Author Messages

anon



New Member


Posts:
New Member


--
03 Mar 2007 10:05 AM
    I am currently using MODIS MOD09A1 data and i want to extract the Solar Zenith angle and View zenith angle details. Whether there is any program or command available in IDlto view these both.

    Deleted User



    New Member


    Posts:
    New Member


    --
    03 Mar 2007 10:05 AM
    The solar zenith, viewing zenith, and relative azimuth values for each pixel are stored in individual arrays within the MOD09A1 HDF file. There is no pre-packaged program or command available in IDL to retrieve these arrays. You have to open the HDF using EOS_GD_OPEN, attach to the specific grid stored inside the HDF using EOS_GD_ATTACH, then retrieve each angle array by calling EOS_GD_READFIELD and pointing it to each specific datafield. Once you have the arrays, you should convert them from their efficiently-packed integer forms to actual angles by recasting each array in floating point and then multiplying it by 0.01. Below is some example code for how to do this with your data. ;Specify input file input_file = dialog_pickfile(title='Select MOD09A1 File', filter='MOD09A1*.hdf') ;Open the file file_id = eos_gd_open(input_file) ;Attach to the grid stored in the file grid_id = eos_gd_attach(file_id, 'MOD_Grid_500m_Surface_Reflectance') ;Retrieve the solar zenith, viewing zenith, and relative azimuth arrays ;Returned arrays are 2400x2400 and contain integerized angle values solar_read = eos_gd_readfield(grid_id, 'sur_refl_szen', solar_zenith) view_read = eos_gd_readfield(grid_id, 'sur_refl_vzen', viewing_zenith) azimuth_read = eos_gd_readfield(grid_id, 'sur_refl_raz', relative_azimuth) ;Convert integerized angles to floating point solar_zenith = float(solar_zenith)*0.01 viewing_zenith = float(viewing_zenith)*0.01 relative_azimuth = float(relative_azimuth)*0.01

    Deleted User



    New Member


    Posts:
    New Member


    --
    03 Mar 2007 10:05 AM
    thank you sir for your reply now i am able to view the solar zenith angles of each pixels.
    You are not authorized to post a reply.