UNESCO logo
 Bilko logo
Earth from space
Observing the Ocean from Envisat
Module content Module Images Data sources Credits Authors
Annual mean SST

6.1 Preparing AATSR images for a composite

Opening and masking the image     Resampling the SST image

LESSON 6
Eddies

back to bottom of page Next

Example image:
(Resizable pop-up)
Eddies in the Somali Current (87K)).

Downloads:
Images and tools
Lesson
(HTML pages)

References:
Links to more information

Useful information:
(Resizable pop-ups)

Western Indian Ocean currents

The Somali Current system

AATSR

AATSR Flags

MERIS L2 Flags

The first part of the lesson involves the preparation of individual level 2 SST images from AATSR. To save time, all but one of the final composite images have been processed for you. They are processed as follows:

  • Masking: the images are masked to ensure that only valid SST values are included. Any pixels that contain cloud or land are set to a null value.
  • Geocorrection: the raw images are resampled to a suitable grid, so they can be combined easily.

In this section you will carry out these steps on one of the images that is used for the composite.

Opening and masking the image

Envisat AATSR level 2 image files also contains flags indicating whether a pixel is cloud, land or sea. You can find more information about them in AATSR Flags. The flags are used with the temperature data to select pixels containing valid SST measurements.

  1. Open the AATSR image to be processed: ATS_NR__2COUPA20040220~.N1.bz2.
    A window will open which displays the N1 hierarchical file structure.

  2. On the left hand side of the file structure window, choose Bands. On the right hand side of the window, use [CTRL] to choose sst_nadir and flags, then right click and Open Connected (figure (25K)).

  3. When the Extract dialog opens, accept the default to open the full image.

  4. Next you will see the Redisplay dialog, which allows you to control how the image appears on screen (figure (20K)). Note the data range (min and max) of the image. The data is saved as integers corresponding to degrees Kelvin * 100. Click Apply to accept the default linear stretch.

  5. When the Redisplay dialog for the flags bitmask opens, choose a logarithmic stretch to get an impression of how the flags are distributed in the image.

  6. When the image opens use the scrollbar and cursor to move around the image. You can zoom in by double-clicking on the image, and out by holding down the control key and double-clicking. To see the whole image, right-click to open the Zoom dialog and select Preserve shape.

  7. Tab to the flags bitmap, and pull down the bar at the top of the image window to reveal the metadata associated with this data set (figure (70K)). Each pixel in the flags image contains a sum made up of these data values, depending on which flags are set.

The bitmask is applied using a Bilko formula document.

  1. Open the formula ats2sstnadir_cloud_land_mask.frm (Remember to set the file type to FORMULAS (*.frm) or you won't be able to see the file). As you can see the formula contains three main sections:

    • a section setting the output options (numerical format and null value)
    • the constant declarations (flags and image planes: @*), and
    • the conditional statement that selects the valid SST data based on the flag codings and the flags bitmask image.
  2. Look at the constant declarations for the flags, and compare these to the flag codings in the metadata pane of the flags image (figure (70K)). Make sure you understand which flags are included in the formula, and how they are applied using bitwise & with logical OR in the conditional statement.

  3. Make sure the images in the stack are in the correct order with regards to the formula (the 'Image planes' referred to in the formula);

    • sst_nadir should be @1, and
    • flags should be @2.

    If you opened the two files as connected images, the order should be correct. However, it is worth checking and changing the order if necessary. To change the order of images, choose the appropriate image in the selector, and on your keyboard, press the number corresponding to the desired position in the stack.

  4. The formula sets the output numerical format and null value, so you don't really need to check the formula Options! from the menu bar, but for formulas that do not have this section, you can set the output interactively. Take a look and see - the default is to output Nulls as the highest value - the formula overrides this.

  5. Copy the formula ([CTRL+C], but don't shade the formula text) and Paste it onto the image stack ([CTRL+V]). Make sure the cursor is on the image, not in the metadata pane when you apply the paste.)

The new image that appears will contain only the selected pixels; everything else has been set to 0 by the formula. If you pull down the metadatapane for the new image, you will see that it contains the processing history: the filename of the original data and the formula used to create the image.

To display the new image properly, you will need to adjust the stretch settings used in the display.

  1. Right-click on the image (not the metadata) and select Redisplay.

  2. In the Redisplay dialogue, set the Null value to 0.

  3. Leave all the other settings as suggested by the defaults and click OK.

  4. Finally bring the coordinates across from the original image. From the menu bar, selecet Edit > Coords and click with your mouse with the image to see that the status bar at the bottom right of the Bilko window displays the location in latitude and longitude.

The new stretch should reveal more detailed structure in the sea surface temperature than the original, which also included land and cloud. Note how the colour bar has changed as a result of the new stretch and the narrower data range in the masked image.

Before you continue, save the masked image as ATS_NR_20040220m.dat choosing Bilko.dat as the file type.

Resampling the SST image

The Resample dialogue allows you to select the boundaries (window) and spatial resolution (pixel size) for the new gridded image. By using the same settings for each image, you ensure that they are all resampled to the same grid and can be used to create a composite. In other words, you are co-registering the images based on the tie-point data included in the N1 file.

  1. Select the new, masked image

  2. From the menu bar select Image > Resample to open the Resample dialogue.

  3. You will see four tabs. After completing the information for each tab, remember to click Apply (if you don't you will loose the new settings). The tabs should be filled in as follows:

    • Window - Longitude (X): 47°E to: 59°E, Latitude (Y): 16°N to: 2°N (figure (8K)).
    • Pixel - Width: 30", Height: 30" (figure (8K)).
    • Image - Columns: 1441, Rows: 1681 (figure (8K)).
    • Interpolation - Based On: Self, Method: Nearest neighbour, Null Value: 0 (figure (4K)).
  4. Click OK to carry out the resampling.

The new image that is created is surrounded by rather a lot of black. To see the result right-click on the image, and Zoom to Preserve shape.

Before saving the image you should transfer the metadata from the original image to the new, resampled image.

  1. In the original image tab to the SST data.
  2. From the metadata pane select the text that contains the description, scaling factor, scaling offset and unit, copy it, and paste it to the metadata pane in the new image (figure (74K)).
  3. Save the resampled image as a Bilko.dat file, ATS_NR_20040220r.dat, where the r indicates that it has been resampled.

Before you continue to the next section, which shows you how to create the composite, it's a good idea to tidy up the workspace. With the resampled image active, go to Window > Close All Except to close everything else.
 

back to top of page Next

Next: 6.2 Creating an SST composite

  Envisat website

 

Link to NOC's website