exercise 7 – importing and applying quality control ... exercise 7 – importing and...

Click here to load reader

Post on 14-Mar-2020

1 views

Category:

Documents

0 download

Embed Size (px)

TRANSCRIPT

  • Exercise 7 – Importing and applying Quality Control information. In this exercise you will import MODIS Leaf Area Index (LAI) and corresponding Quality Control (QC) for Western Europe. The images will be imported in IDL-ENVI, scaled to physical LAI units and screened using the quality control data. 1.) Import and play around with MODIS data • Start ENVI using the ENVI 3.6 icon on the desktop or through the ‘Start Menu’. • Open the MODIS “LAI_1km” TIFF file of day 2002-225 in ENVI using: File–Open

    External File–Generic Formats–TIFF/GeoTIFF • The ‘Available Bands List’ window appears, select ‘Band 1’ and click the ‘Load

    Band’ button

    Figure 1. Overview of ENVI viewers and the list of available bands

    The lower left viewer window (Figure 1) shows the entire MODIS LAI image that we have created using MRT. The other two windows are white because they are zoomed in at the upper left corner of the image (see arrows) which contains no-data values.

  • • Improve the contrast by moving the red box in the lower left window to Northern-

    France (Figure 2) and selecting ‘Enhance–[Image] Equalization’. Additionally a color table can be applied using: ‘Tools–Color Mapping–ENVI Color Tables’ and by selecting a color table from the list (use BLUE/GREEN/RED/YELLOW). The main window will now show more contrast

    Figure 2. Improving image contrast using contrast manipulation functions

    • Look at the data values in the images (use: Tools–Cursor Location/Value). We know

    from looking at the MOD15 file in HDF explorer that the valid range is from 0 – 100. This means that any pixel above 100 is some sort of fill value and not needed for analysis. We can filter these out by performing a map query to find all pixels < =

  • 100, but this can be carried out better using the QC information that is delivered with the MODIS data.

    2.) Apply Quality Control • Open the MODIS “FparLai_QC” TIFF file of day 2002-225 in ENVI using: File–

    Open External File–Generic Formats–TIFF/GeoTIFF From the Documentation and the HDF file it can be derived that bits {5,6,7} of every pixel contain quality control information that is produced by the MODIS LAI/Fpar algorithm (see MOD15 product guide for the exact interpretation of all QC bits). • In order to extract the QC information we need to compile a small IDL function and

    use IDL band-math to apply that function to our data. Select ‘File–Compile IDL Module’ from the main menu and search for a file called ‘mod15_qc.pro’ which is on the CD-ROM.

    IDL will now load this module and compile it so we can use it in the band math functionality of ENVI. • Now select ‘Basic Tools–Band Math’ from the main menu and enter the following

    expression (Figure 3): mod15_qc(b1)

    • Assign the FparLai_QC data layer to the variable b1 (Figure 4). And choose an output file (e.g. ‘mod15_2002225_qc.img’). Press ‘OK’ to start computing.

    We now have a file with MOD15 quality control information that contains the following values: [0,1,2,3,4,7]. These values have the following meaning: Value Binary flags Explanation

    0 000 LAI derived using RT methods, best possible 1 001 LAI derived using RT methods, with saturation 2 010 LAI derived using empirical methods, RT failed (geometry) 3 011 LAI derived using empirical methods, RT failed (Other) 4 100 No retrieval (oceans, cities, etc) 7 111 Background

  • Figure 3. The ‘mod15_qc’ module can be called

    using Band Math

    Figure 4. Assign layer to variable ’b1’

    • Now we will use the MOD15 QC info to create a mask that contains all good quality

    pixels. Follow the following procedure:  Select ‘band 1’ of the previously created file in the ‘Available Bands List’ and

    load it into a window using the ‘Load Band’ button.  Now select ‘Basic Tools–Masking–Build Mask’ from the main ENVI menu‘s.  Select the display that contains the image of the file that you just loaded (probably

    Display #1).  Select the option ‘Import Band Data Range’ and use the values 0 and 1 for

    minimum and maximum (Figure 5). Specify an output file (e.g. ‘mod15_2002225_qc_mask.img’) and click ‘OK’. Note that the mask file is added to the ‘Available Bands List’ (Figure 6).

  • Figure 5. Use the ‘Import Band Data Range’ to

    define the mask

    Figure 6. The mask is added to the

    ‘Available Bands List’

    • We can now apply our newly created mask in order to derive only valid LAI pixels

    from the image. Use: ‘Basic Tools–Masking–Apply Mask’. Select the MOD15 2002 LAI_1km image as input file and select the mask band (Figure 7).

    • Now press ‘OK’, choose an output file and press ‘OK’ again.

  • Figure 7. Applying the QC mask to the MOD15 LAI product

    3.) Converting to physical LAI Units We know from using HDF Explorer that the conversion factor for converting DN values into physical LAI values is 0.1. Therefore we will apply ENVI’s Band Math function to apply this conversion factor. • Select ‘Basic Tools–Band Math’ from ENVI’s main menu’s and enter the expression:

    b1*0.1 • Now assign the masked LAI_1km 2002 to the variable ‘b1’ and set the output file to

    ‘mod15_2002_LAI_final.img’ and press ‘OK’. 4.) Repeat steps 1-3 for the MOD15 product of 2003-225 (Close all 2002 files first to avoid any confusion)

    End of Exercise 7

    Choose input first

    Then select Mask

  • Exercise 8. Visualizing and analyzing MODIS data.

    We will focus at trying to determine the effects of the 2003 drought in Europe on the distribution of LAI values over Europe by comparing the 2002 season (relatively wet) and the 2003 season (extremely dry and warm). In this exercise you will use some of the advanced visualization capabilities of ENVI. 1.) Computing LAI statistics over Europe In this step we will first compare the overall distribution of LAI values over Europe by generating and comparing the histograms of the LAI values in 2002 and 2003. Carry out the following steps: • Load the two files with the final LAI values (mod15_2002_LAI_final.img &

    mod15_2003_LAI_final.img) as well as the masks that we created for both datasets. We need these masks for statistics calculation in order to avoid that the no-data values influence the statistics.

    • Choose from the main ENVI menu: ‘Basic Tools–Statistics–Compute Statistics’. • Choose ‘mod15_2002_LAI_final.img’ as input and choose the appropriate mask band

    using the ‘Select Mask Band’ button. Now press ‘OK’. • Set the ‘Calculate Statistics Parameters’ as in the screenshot below and press ‘OK’.

    Figure 8. Setting options for statistics calculation.

  • • ENVI will now present you with a text window showing the basic statistics of the LAI in 2002 as well as a plot window with a histogram. Do not close these windows, we need them for comparison!

    • Now calculate the statistics for the LAI of 2003 in the same way. 2.) Compare and visualize the LAI statistics. • Look at the text window with the statistical parameters of the LAI in 2002 & 2003.

    What do you conclude from the mean LAI value? • Now look at the distributions, this can be done more easily by having the two

    distribution in the same plot window. Luckily, there is a neat trick in ENVI to combine the data in the two plot windows. To do this, activate the ‘Plot Key’ by selecting ‘Options–Plot Key’ (Figure 9).

    • Now select the plot key label with the left mouse button and simply drag & drop the label onto the other plot window (Figure 9). Now the two distributions are plotted in the same window and can be easily compared.

    Figure 9. Drag & drop the plot key from one window to the other

    • You can control various aspects of the plot (line color, line thickness, plot symbols) using ‘Edit-Data Parameters’.

    Question What do you conclude about the LAI in 2002 & 2003 from the main distribution on the left side of the plot window? What about the small peak on the right side? 3.) Regional inspection of drought influence on LAI By looking at the image statistics and the distribution of the LAI values we get a feel for the overall situation in Europe. However, it does not give spatial information in order to locate the areas have suffered badly from drought. Therefore, we have to take a look at the image data itself. • Open the final LAI datasets for 2002 and 2003 and load them into two separate

    windows.

  • • Link the two windows (Figure 10), so the both windows display the same area and scroll into the same direction when one of the displays is changed. Use ‘Tools–Link– Link Displays’ and press ‘OK’.

    • You can apply a contrast stretch or a color table like in exercise 4.1

    Figure 10. Synchronize scrolling behavior using ‘Link Displays’.

    • We can visualize the differences in ENVI by creating a 2D-scatterplot of the LAI in

    2002 and 2003. • Create a 2D-scatter plot (Figure 11) by selecting ‘Tools–2D Scatter Plots’. Set the

    LAI data from 2002 to Band X and the LAI data from 2003 to Band Y, press ‘OK’. • The scatter plot will now be calcul

View more