This page is a user guide to obtaining MODIS data from the EDG, extracting the radiance values from the HFD files (in IDL) and ingesting the outwritten text file into terascan. Headings are blue, instructions (buttons) are red,email examples are green and typed instructions are orange, links are purple and underlined

Part one - Obtaining the data

MODIS data can be obtained very straightforwardly through the NASA data gateway (EDG). Once here you will first need to set up a user account - this is very straightforward, follow the links and input the required information. This will take < 5 mins. Once done enter the data gateway as a registered user. Once into the main page you will need to edit a few of the fields. This interface is very like other satellite data acquisition sites and none of the questions are that complicated. First, in the SENSOR field enter MODIS. Second, enter a lat/long range for the image you are interested in acquiring - try to make the range something like +/- 5 to 10 degrees. Third, enter a time range you are interested in, also make this one as narrow a range as you can - otherwise you will end up with hundreds of images....fourth, search.

The data will be returned as granules, you are interested in the level 1b calibrated radiance values. You will notice that there are three types of these data 1 km 500 m and 250 m. This refers to the spatial resolution of the image. If you order 1 km data you get the aggregated (250 and 500 m) data as well. The aggregation does come at some [academic] cost, the spectral resolution is compromised. Once you have selected the appropriate data type, view the granule (image) information by hitting list data granules. Select the image with the most appropriate lat/long values and time (remembering that they can be as large as 350 Mb!) and click add to cart.  This will take you to STEP.1. Here, use the order options button to select native granule ftp pull which initiates the ftp data ordering service. Next, goto STEP 2. and fill in the order form (you only have to do this once!). Then goto STEP 3. and review the order. Lastly, STEP 4., order the data. You will get a message that looks something like this...

our order has been submitted to the appropriate data centers, and a copy of the shipping receipt has been emailed to the account watson@mtu.edu.

                  Data Center: GSFC-ECS
                  Order Tracking Number: 0400003338
                  Status/Comments:
              Order Received / Successful query; Query results returned.

                   Contact name:
                                Leena Snoddy
                   Organization:
                                Goddard DAAC
                   Address:
                                NASA/GSFC Code 902
                                GREENBELT, MD 20771 USA
                   Phone:
                                301-286-7608

...shortly followed by a very similar looking e-mail from daacuso@eosdata.gsfc.nasa.gov. The important line is boldand lets you know if your query has worked ok. Within 24 hours (and typically in about 15 minutes) you'll get a second e-mail from CM_ALLMODE giving you instructions on how to go get your data. You need to ftp -i(to turn off interaction)g0acg01u.ecs.nasa.gov (the FTPHOSTNAME) and then cd 0400003185ACdHUB (enter your FTPDIR here - they are all different). The use bin to change the transfer type to binary and, then use mget * to pick up the hdf files you want and bye. Each file takes about 15 mins. REMEMBER TO SHELL SOMEWHERE SENSIBLE BEFORE DOING THIS AS COMPUTER SUPPORT WILL BE VERY UNHAPPY OTHERWISE.
 

Part two - Reading the data into IDL

Right, phew, you've got your data which looks like MODO21KM.A200125.0900.002.2000130012019.hdf. You now need to extract the data from the hdf (hierarchical data format) file. To do this open an xterm and type idl.Then cd,'/home/lars/watson/misc_idl_files' will take you to directory where the HDF extractor is kept. Simply type .run modis_emissivity_extract to compile and then modis_emissivity_extract to run the program and follow the instructions. Note, at the moment a little extra work is required first. Before changing directory type ENVIto run ENVI 3.2. You will have to use ENVI to extract the latitude and longitude data terascan needs to geolocate the data until the automated extraction code is completed. In ENVI, use the FILE - OPEN IMAGE FILE buttons to open the file you will get a box entitled HDF Dataset Selection. Click on latitude (you will notice that the lat/long arrays are much smaller than the data arrays - this is the problem you are about to solve) and LOAD BAND (don't worry what it looks like). Now use the UTILITIES - FILE UTILITIES - OUTPUT DATA TO EXTERNAL FILE - OUTPUT TO ASCII sequence to generate a text file of the lat/longs - call it volcanoname_lat.txt (IDL will look for file with *_lat* in them). Repeat this process for longitude. Now quickly check the files in a text editor to make sure that the process has worked 0 you will need to delete any header information from these files (ie things that are not numbers - normally the first four lines). You are now ready to proceed to the extraction stage so type cd,'/home/lars/watson/misc_idl_files' and start from there.
This should soon be fixed so the process is completely automatic.

Part three - Reading the data into Terascan.

Right, what a palaver! However, you are now nearing the end - you have a text file with columns that represent lat, lon, and then the brightness temperatures of the seven TIR channels, (27-33) in degrees Celcius .You now need to read the data into terascan. At an xterm type ts31 to start Terascan 31. In Terascan you will first need to generate a MASTER file by typing MASTER at the command prompt. Set the required parameters (Lambert_az is a favourable projection for high latitudes) and leave as default, by just hitting return what you don't know. Then use the command impasc (import ascii) to grab your idl text file. In the in/out prompt you need to type filename filename.tdf where filename is the name of your file. Set the variable names to latitude longitude b27 b28 b29 b30 b31b32 b33 the var_types to fl fl fl fl fl fl fl fl flto indicate floating point numbers, and leave  the other prompts as default. This will take a few minutes to generate the tdf file. Once completed type imgrid, set the master file to the MASTER you have just created and z_var to b27 b28 b29 b30 b31 b32 b33.Now, finally use xvu to observed the geo-corrected, calibrated MODIS data of brightness temperature. The whole process can be done in under an hour if things are working properly and you have done it a couple of times - any problems feel free to contact me.