HDFLook/HDFLook MODIS Handbook

Louis Gonzalez - Christine Deroo

NAME

HDFLook /HDFLook-MODIS 
HDF data files visualization and graphic analysis
(Hierarchical Data File NCSA)

DESCRIPTION


HDFLook is a comprehensive application for viewing NCSA HDF v.4.x and HDF-EOS 2.x science datasets. HDFLook is designed to interface with a larger analysis environment called Msphinx . HDFLook is supported on several UNIX workstation platforms, and includes a well designed graphical user interface based on X11.

HDFLook-MODIS is a new multifunctional data processing and visualization tool created for HDF-EOS Land, Ocean and Atmosphere MODIS Products. It can be run in several modes: as separate stand alone software, as part of integrated shell called Msphinx or through command files. HDFLook-MODIS is a result of joint collaboration between LOA USTL, France, and GES DAAC and is based on the very popular HDFLook tool philosophy. Created as a flexible modular tool, is it easy to update, add new features, and is free to users obtaining it from the NASA GES DAAC and LOA URL's.

Main features of HDFLook-MODIS are:


Disclaimer
We have made every effort to provide user accurate functioning software. However it is preliminary in nature all aspects are not fully tested.
User's feedback is welcome to improve this software.








SYNOPSIS

HDFLook [options]

HDFLook [options] starts HDFLook in interactive mode.
HDFLook [options] filename starts HDFLook in interactive mode with a file on input.

OPTIONS


    -Zoom 75 allows to reduce or increase the size of the Motif widgets. In the example a reduction factor of 75% will be applied. Warning! It will be necessary to modify the default font size in the following line of the HDFLook.ad file:
    HDFLook*FontList: "-Adobe-Courier-Bold-r-Normal-*-12-*-*-....."

    in order to adjust the size of the character font to the size of the widgets.(page pageref)


    -Help prints this handbook on your terminal.
    -List list the SDS content of the HDF file and quit.

REMARKS

Main characteristics

with command lines

        On HDF-EOS MODIS format:

        Connected to Msphinx:

with the AERONET data base

In conjunction with the AERONET data base, HDFLook is able to provide a fast validation of the aerosol algorithm by downloading directly the AERONET Optical thickness value for the corresponding MODIS visualized granule.

Contents

1  BASIC FUNCTIONS
    1.1  Files Read
        1.1.1  Working Directories
        1.1.2  Description of selection Menu
    1.2  Graphic menus and windows
        1.2.1  HDF_plot_parameters
        1.2.2  HDF_plot_SDS_indexes
        1.2.3  Plot Window
    1.3  Image Visualization
    1.4  Look-Up Table Stretch
2  HDFLook_MODIS
    2.1  Enhance RGB image
        2.1.1  Enhance RGB image
        2.1.2  Set RGB mode to ...
    2.2  Reprojection
        2.2.1  Reprojection geometry
    2.3  No predefined scaling
    2.4  Automatic mask detection
    2.5  Set preview
    2.6  RGB defaults
    2.7  Show SDS as values
    2.8  Show SDS as a plot
    2.9  AERONET
    2.10  Send raw data
        2.10.1  Quick send to Msphinx
        2.10.2  Advance data send...
    2.11  Dump raw data
        2.11.1  Dump on file
        2.11.2  MODIS reprojected image
    2.12  Show SDS as an image
    2.13  Display a MODIS reprojected image
        2.13.1  Show (RGB) image
        2.13.2  Show (RGB) thermal anomalies
        2.13.3  Show (RGB) thermal
        2.13.4  Show one layer
    2.14  RGB User composite
        2.14.1  RGB IMAGE BUILDER
    2.15  CERES SSF Product
        2.15.1  Underlying Principles
        2.15.2  Interactive Mode
        2.15.3  Batch Execution
    2.16  AIRS Product
        2.16.1  Step by Step
        2.16.2  Batch Execution
3  HDFLook and Msphinx
        3.0.1  Quick send to Msphinx
        3.0.2  Advance data send
4  HOW TO - Fast examples
    4.1  Send raw data to MSPHINX
    4.2  Create a JPEG image on disk
5  BACKGROUND CAPABILITIES
    5.1  General Functions
        5.1.1  Options of the command file
        5.1.2  General Functions
        5.1.3  Adding anciliary data
        5.1.4  Generic extraction commands
        5.1.5  Setting Inputs/Output for all commands
        5.1.6  Projection
        5.1.7  Geotiff Implemented Projections
    5.2  Build RGB Image
        5.2.1  General Options
        5.2.2  Build RGB Images
    5.3  Build 8bit Image
        5.3.1  General Options
        5.3.2  Build a single plane Image
    5.4  Addings
    5.5  Export of SDS data
        5.5.1  General Options
        5.5.2  Export commands
    5.6  Postscript capabilities
    5.7  In conjunction with Msphinx
        5.7.1  Create RGB images into a MSPHINX project
        5.7.2  Send a SDS to a MSPHINX project
        5.7.3  Dump values from SDS or Vdata files
    5.8  FAST EXAMPLE
6  AERONET data base
    6.1  Main menu
        6.1.1  Extraction type menu
        6.1.2  Data type menu
        6.1.3  Toggle and button options
A  appendix
    A.1  Coarse Latitude Longitude interpolation
    A.2  Level 1B corrected reflectance
    A.3  Thermal composite
    A.4  Thermal anomalies
    A.5  Level 1B (500m) Mosaic
    A.6  MODIS-> AERONET
B  command file examples
    B.1  CERES Mosaic
    B.2  CERES zoom example
    B.3  CERES Orthographic
    B.4  AIRS Mosaic Day

**********************************************************

Chapter 1
BASIC FUNCTIONS

GENERAL RULES

When installing HDFLook on your computer, the HDFLook.ad file is placed in the system directory:
/usr/lib/X11/app-defaults

by the superuser. It must be readable by all users.

If you can't modify the file, you can implement it locally by using the command:
xrdb -merge HDFLook.ad

In the panels, use the left mouse button to select the options, to activate the push buttons or to point to a position on the request of the software.
Any character string in an editor can be selected using the same button and then pasted into another editor using the central button.

At the first use of HDFLook, the user has to define two environment variables with:
- the absolute path of the directory containing the coast, river maps data files.
- the absolute path of the directory used temporary files.
, for example: in csh:
        setenv HDFLOOKMAPS /usr/local/Maps
        setenv HDFLOOKTMP /usr/tmp
or , for example: in sh:
        HDFLOOKMAPS=/usr/local/Maps ; export HDFLOOKMAPS         HDFLOOKTMP=/usr/tmp ; export HDFLOOKTMP

==========================================================

1.1  Files Read

FILE->READ

1.1.1  Working Directories

The working directory is shown in the editor at the top of the window. You can directly type a new directory in the editor (and press return) or click on the desired directory in the Unix file structure displayed.

Selection
Moves to the editor directory and refreshes the file scrolled list.
..
Moves a directory upwards.
$home
Loads your home directory.
$cwd
Loads the directory from which HDFLook is being run.

To select a file you can type its name in the editor ``file'' or click on its name in the list of the files. The editor ``File name filter'' allows you to sort out files matching a specific string (Unix Notation). The sorted files appear at the top of the list followed by the remaining files.

ex:
Type: the head of the list will be:
*data all the files ending with ``data''.
data* all the files beginning by ``data''.
*data* all the files having ``data'' in their name.


When you select one of the HDF files in the ``Directory content'' list:

1.1.2  Description of selection Menu

The window ``SDS list'' shows the name of the various SDS and Vdata records contents in the HDF file

By choosing one of the records and selecting ``show attributes'', the resizable window ``HDF_attributes'' appears; it contains the information record associated to the SDS file. Important parameters include the type of data, the calibration, the mask values:

Data type 16-bit unsigned integer
long_name Land Reflectances Averaged on 10x10 Pixel Array
scale_factor 10000
add_offset 0
valid_range 0, 30000
_FillValue 90000

Options of the Menu:

If you have launch HDFLook from Msphinx , another menu is available:

This menu is detailed on page pageref.

==========================================================

1.2  Graphic menus and windows

1.2.1  HDF_plot_parameters

This menu is called by Curve->Settings or by Plot->Plot defaults.

1.2.2  HDF_plot_SDS_indexes

This menu is called by Show SDS as a plot.

1.2.3  Plot Window

In the plot window, a serie of menus allows the user to:

Files Menu

``Files->Print'' prints the plots
``Files->Extract'' extracts the values as an ASCII file named ``ExtractData'' ``ExtractData01'' etc...

Settings Menu

``Settings->Title'' modifies the axes titles and the main plot title (see figure 1.1)
``Settings->Plot setting'' modifies the curve's parameters
``Settings->Axis setting'' modifies the axis's values

Math Menu

``Math->Statistics'' calculates simple statistics on the plotted data. For example:
Points : X 1 108 Y 1 108
Minimum : 3.8856e+01 0.0000e+00
Maximum : 1.8100e+02 1.2900e+02
Sum : 1.0206e+04 6.5920e+03
Mean : 9.4498e+01 6.1037e+01
RMS : 1.1701e+02 7.3086e+01
Average Dev. : 6.7279e+01 3.5061e+01
Variance : 4.8062e+03 1.6312e+03
Standard Dev. : 6.9327e+01 4.0388e+01
Skewness : 4.4947e-01 2.3394e-01
Kurtosis : -1.8144e+00 -1.3607e+00
Integral : 0.0000e+00 4.3402e+03

See the figure 1.4

``Math->Smooth&fit'' performs smoothings and regressions
  • Polynomial regression
  • Smooth
  • Spline

To find the constant terms of an equation starting from initial conditions:

  • Levenberg Marquardt fit method

The user can define an interval of study, fill the editors ``X start'' ``X end''. After the fit, he can choose from the options:


    - ``Add to graph'': adds the fitted curves to the plot
    - ``Replace curves'': allows the user to replace the original values by the fitted values in the defined interval of study

See the figure 1.5

Misc Menu

``Misc->Clear Window'' erases all plots

Drawing_area Menu

``Drawing_area->Zoom'' enlarges a part of the plot
``Drawing_area->Rescale'' returns to the initial scales
``Drawing_area->Show values'' shows values selected with the mouse in the plot window. To stop the loop, press any of the mouse button.
``Drawing_area->Clear area'' erases the points of a mouse selected zone: select an area by dragging with the left mouse button.

Figure 1.1: Set axes titles and the main plot title

Figure 1.2: Set axes parameters

Figure 1.3: Set curves parameters

Figure 1.4: Curve statistics menu

Figure 1.5: smoothing and regression menu

==========================================================

1.3  Image Visualization

Main window of Image Visualization

File Menu

Window Menu

Color Menu

Plot Menu

Msphinx Menu

HDFLook , launched by Msphinx , allows you to exchange data. Two modes are avalaible:

More explanations in the chapter 2.16.2.

Help Menu

Shows the electronic version of this manual.

==========================================================

1.4  Look-Up Table Stretch

Color->HDF_set_stretch

Chapter 2
HDFLook_MODIS

Description

HDFlook is designed to recognize different MODIS HDF-EOS files. The action of clicking on the file name will open several MODIS additional menus and options.
Three types of images can be displayed:

The user is able to visualize with reprojection or not.

Level1B A RGB composite standard atmospheric corrected image.

A RGB composite ``thermal'' anomalies.

A RGB composite ``thermal''.

A single plane.

Mod09 A RGB composite standard atmospheric corrected image.

A single plane.

Other products A single plane (with latitude, longitude SDS records).
Other products A single plane (reprojected SDS records).

Level1B (1km):
The software tries to find latitude,longitude SDS records with the best accuracy in the corresponding Level1B (500m, 250m) or MOD03 HDF files. (if not, the software uses the coarse latitude,longitude SDS records to compute the 1km resolution. See appendix A.1 for accuracy evaluation.)
Level1B (250m):
To build a RGB image, the software needs the Level1B 1km or MOD03 HDF files and the Level1B 500m HDF files.
Important:
to help HDFlook to find the other Level1B or MOD03 files, the user must fill the ``Set associated directories'' textlist with the path of the different directories containing the HDF corresponding files.

==========================================================

MODIS Options

==========================================================

The ``file menu contents'' shows a map with the granule location. Several text labels give the latitude and longitude location, the HDFLook current selected projection, the internal HDF-EOS flags (day, night, mixed).
warning: HDFlook does not change the SDS original data structure: night data are flipped (north-bottom, south-top).

This menu works using several other options selected in the menus or with buttons. The explanations are below.

==========================================================

2.1  Enhance RGB image

==========================================================

This menu defines the color scale used in the RGB image mode:

2.1.1  Enhance RGB image

The user can enter his own low and high cut values for each band. The low value will be the intensity 0 of the color, the high value will be the intensity 255 of the color.

2.1.2  Set RGB mode to ...

==========================================================

2.2  Reprojection

==========================================================

2.2.1  Reprojection geometry

The most important menu. The user is able to select a projection and then to visualize a fast result by activating the option ``Show (Image area in the output projection geometry)'' but also to define the output geometry (latitude,longitude) and the output image size (line, colunm) for the export menus (DUMP...,SEND...)

Set associated directories

Allows the user to add his favorite directories to find easily the specific MODIS files as MOD03,MODOCL2 etc..

Set map addings

Adds to the displayed image several projected countours from implemented data files. ( MGBOUNDARIES_MAP, MGRIVERS_MAP_*, MGWORLD_MAP) At the first use of HDFLook, the user has to define an environment variable with the path of the directory containing those data files.
ex: in csh:
        setenv HDFLOOKMAPS /usr/local/Maps
or ex: in sh:
        HDFLOOKMAPS=/usr/local/Maps ; export HDFLOOKMAPS

Set grid addings

Adds to the displayed image the latitude and longitude grids.

==========================================================

2.3  No predefined scaling

==========================================================

This option allows the user to apply the scale factors set by attributes. (Scale_factor , add_offset) (These factors are not always implemented).

==========================================================

2.4  Automatic mask detection

==========================================================

This option allows the user to generate in primary colours the constant value area introduced as mask values into the images.

==========================================================

2.5  Set preview

==========================================================

If this option is activated, each HDF-EOS (Level1B,MOD09) file selection will display a small RGB image to show the granule.

==========================================================

2.6  RGB defaults

==========================================================

A set of three stretch values is provided for the RGB enhance image to make a fast test.

==========================================================

2.7  Show SDS as values

==========================================================

This option dumps the files in the same geometry shown in the main display window ``Show SDS as an image'' (for example an image 4x100x100 will be represented as a global image (2 raw images x 2 column images). The user can enlarge the window HDF_show_values to display more data.
The right and the bottom sliders allow the user to move into a 50 × 50 sub-matrix (See §1.1.2).

==========================================================

2.8  Show SDS as a plot

==========================================================

When this option is activated, a new menu appears: HDF_plot_SDS_indexes. This menu is detailed in §1.2.1.

==========================================================

2.9  AERONET

==========================================================

When this option is activated, a new menu appears: Msky_look.
This menu is detailed page pageref

==========================================================

2.10  Send raw data

==========================================================

This menu appears when HDFLook is sent by Msphinx . It allows the user to send one or several SDS to the Msphinx data structure. Two modes, raw data or reprojected data, are allowed. In this case, the maps can be added in the graphic overlay of Msphinx .

``Send raw data'' options are available for any HDF file. The user is able to send raw or calibrated data. No sampling is allowed.

2.10.1  Quick send to Msphinx

The SDS selected in the SDS list will be sent.

The user is able to select the Msphinx plane and geometry where the data will be dropped in the Msphinx memory. Two labels (width, height) show the size of the SDS to be sended. If the SDS doesn't fit the cell geometry defined in the editors (x,y,width,height), the option ``Fit file size to cell'' can be activated.
When a SDS is more than two dimensions and no value is done in the third dimension (for example: *,height,width) the user can create a single Msphinx plane with all the image slices (as the option ``Show SDS as an image'') or use several Mpshinx planes starting from the defined ``Plane nb'' activating the option ``Send by layers''.
Warning: if the data type (char,float) does not match the Msphinx data plane definition, the data will be transformed to the Msphinx data plane with, perhaps, a lost of accuracy.
See the §3.0.1 for more explanations.

2.10.2  Advance data send...

Advance data send will modify or create a complete Msphinx project with the data stored on disk space. See the §3.0.2 for more explanations.
In RAW mode, the cell width and height can be larger than the dimensions of the different SDS selection.

==========================================================

2.11  Dump raw data

==========================================================

This menu is related with the SDS selected in the ``SDS list'' of the HDF file content panel.
Dump raw data options are available for any HDF file.

2.11.1  Dump on file

The user is able to sample the data by selecting start lines,columns and step lines,columns. For the MODIS/EOS format, the units can be entered in degrees (latitude,longitude). Data can be dumped as geophysical parameters in a floating point file.

2.11.2  MODIS reprojected image

This menu works using several other options selected in the menus ``Set projection geometry'',``Enhance RGB image'',``RGB defaults''

==========================================================

2.12  Show SDS as an image

==========================================================

==========================================================

2.13  Display a MODIS reprojected image

==========================================================

2.13.1  Show (RGB) image

algorithm correction

This option builds for the level1B or Mod09 files a RGB composite image using band 1 (250m) ,band 4 (500m), band 3 (500m).
(See Standard atmospheric algorithm correction [1]& [2].)

2.13.2  Show (RGB) thermal anomalies

This option builds for the level1B or Mod09 files a RGB composite image.

The thermal anomaly RGB is using MODIS band 6 corrected reflectance in the green, band 7 corrected reflectance in the blue and the reflectance computed from band 20 (3.75mm) in the red. In band 20, the reflectance is computed following the method developed by Roger and Vermote for AVHRR [3]. This method is modified for MODIS by taking advantage of water vapor inversion using band 18 and 19 [4]and the derived reflectance validated by comparison to the full inversion of the reflectance. Qualitatively, the RGB thermal composite is a very useful and simple way to locate fire activity (see appendix A.4), where the thermal energy released by fires is interpreted as an extra reflectance contribution at 3.75mm (see [5]for details) and produces ``red'' spot on the image, the relative intensity of the red is directly proportional to the size and temperature of the fire.

2.13.3  Show (RGB) thermal

The thermal RGB is using MODIS band 31 in the Red 290K-275K, band 29 in the Green 280K-270K, band 20 in the blue 300K-285K. See the example in appendix A.3.

2.13.4  Show one layer

Show the selected SDS record.

==========================================================

2.14  RGB User composite

==========================================================

2.14.1   RGB IMAGE BUILDER

This menu allows to create a RGB image merging 3 SDS of any size and deep. Up to 10 windows can be created with different combinations (all the windows have the same size and projection style).

Step by Step example:

Start the ``Show (RGB) User defined'' option from the ``Display a MODIS reprojected Image'' menu

Click the ``Multi SDS selection'' button to link data to RGB planes

SDS selection menu:

Select a SDS and link the SDS to the Red or Green or Blue image planes:

The solar zenith angle will be the red plane The MODIS emissive chanel will be the green plane The height will be the blue plane

Close the menu and select the final options:

  1. The slice number from 1 to 15 of the SDS EV_1KM_Emissive (note: the notation 12,h,w is not necessary in this case). This notation is used to help the software to choice the image width and height indexes from complex data sets.
  2. Complement Green bank: 0 will be 255
  3. Select min max threshold for the Green and Blue banks

RESULT: The selected SDS have different pixel size and deep, the final image is in linear projection width coast map and boundaries.

Another example using 4 display windows

3 images are built with emissive bands and one (Upper left) with reflective Solar bands

==========================================================

2.15  CERES SSF Product

========================================================== Quick Tour to visualize CERES SSF product.

2.15.1   Underlying Principles

each CERES observation is projected over a 20x20 km2 regular grid (or 10x10 if TRMM) according to 'nearest neighbor' techniques. Only the position of the FOV center is taken into account and not the exact footprint shape. This simplification is satisfactory for number of applications. The grid values can be saved for external computations. Once the projection is done, all the powerful functions of the software are available.

2.15.2   Interactive Mode

2.15.3   Batch Execution

Using HDFLook with command files is also available. The execution is achieved with the command ``HDFLook command_fileX.com '' Herewith enclosed many examples: you have just to peek up and to adapt to your problem. (See the details in §B.1).

==========================================================

2.16  AIRS Product

========================================================== Quick Tour to visualize AIRS product.

2.16.1   Step by Step

2.16.2   Batch Execution

Using HDFLook with command files is also available. The execution is achieved with the command ``HDFLook command_fileX.com '' Herewith enclosed many examples: you have just to peek up and to adapt to your problem. (See the details in §B.4).

Chapter 3
HDFLook and Msphinx

Communications with Msphinx

Sending images, read by HDFLook , to Msphinx is possible if you have launched HDFLook  from Msphinx . If you have launched HDFLook alone, the menus will be drawn in half tone or hidden.

2 modes are available:

3.0.3  Quick send to Msphinx

This menu is called from ``Quick send to Msphinx'' in the SDS window or from Msphinx->Send to Msphinx in the main image window.

This menu presents the particularity to convert the data read by HDFLook in the type (char, short, int) of data of the selected Msphinx plane intended to receive data. (Warning in the truncation of data)


Warning: under certain circumstances, after sending data to the Msphinx data planes, the image visualisation into Msphinx does not appear. Start the Msphinx menu ``Display->Enhance display'' and activate ``Apply'' to rebuild the output image.

From standard HDF: From MODIS SDS:

3.0.4  Advance data send

Advance data send will modify or create a complete Msphinx project with data stored on disk space.

This method will be generalized for the comparison of satellite data from different experiments. We have to work on improving its efficiency. This menu is called from the selection menu (see the §1.1.2 or in §2.10 in the MODIS chapter).

Figure 3.1: The ``Advance data send'' menu (See also figure 3.2)

The menu, step by step:

  1. At the top left,the name of the current project is printed. You can activate ``Change Msphinx project name'' to modify it.

    Two options:

    ``Project selected from Msphinx base''

    The list of existing projects is shown. Select a project.Activate ``Apply'': the new geometry is displayed in the panel.

    ``User project define''

    You can fill the 2 editors ``Project directory path'' and ``Project name'' Then activate ``Apply''.

    If the directory of the project is not $home/.Msphinx, a symbolic link is automatically created in the directory $home/.Msphinx to point at the new project.

    The default geometry will be the geometry of the SDS image selected.

  2. you have to introduce the geometry of the image reception in the data planes of Msphinx :

    Activate ``Change Msphinx cell mapping''

    • directly fill the editors: X, Y, Width, Height
    • using the arrow, ``Select next cell'' will suggest you the places of possible arrangement taking into account the size of the image and the existing cells of the project.

  3. Fill the editor ``Start plane no'' with the number of the first data plane which you want to fill. A list allows you to see planes already containing images and their data type. Please note: in this working mode, there is no conversion of data if truncations are possible. The transfer will be made only if the plans of Msphinx data already filled can contain the new data without truncation. For example:

    SDS:16 bits ->Msphinx plane 32bit integer ->no problem
    SDS: 32 bits real ->Msphinx plane 16 bits ->impossible

    At the bottom, on the right, you will find the characteristics of the SDS to be transferred:

              Width:      Height:      Format:        Slices:
    

  4. A toggle ``Fit cell geometry'' allows images to be fit to the size of Msphinx's cell by sampling lines, columns.

  5. Activate:
    • ``Clear all & Do it'' will erase all existing data.
    • ``Add/Modify data planes'' will add images.

Attention! if your SDS has more than 2 indexes, the images will be loaded from the plan number filled in the editor ``Start plane no'' and then in the following ones.

Figure 3.2: The ``Advance data send'' menu from MODIS data

Chapter 4
HOW TO - Fast examples

4.1  Send raw data to MSPHINX

  1. Start HDFlook from Msphinx.
  2. Select a HDF-EOS File.
  3. Start ``advance data send'' ``... SEND RAW DATA ...''
    All the HDF/SDS content is listed.

  4. Select ``Change Msphinx project name''
    • Select ``User project define''
    • Type LOA in the editor ``Project name''
    • Start ``Apply''

  5. Select ``Change Msphinx cell mapping''
    • type 1000 in the editor width
    • type 1000 in the editor height
    • Start ``create cell''
    • Start ``Cancel''

  6. Type 1 in the editor ``Start plane nb''

  7. Select ``Fit cell geometry''

  8. Select some SDS's from the List.
    At each selection the software shows the type of data and the ``from and to'' planes of Msphinx .
    If a selection error is made, just click again on the erroneous SDS and this one is deleted from the selection.
  9. Apply ``Clear all & do it''

At the end, select in the Msphinx window ``Work on->Set view planes''. Msphinx will show the filled planes and their contents.

4.2  Create a JPEG image on disk

  1. start HDFLook
  2. select a modis LEVEL1B 1km file:

  3. set reprojection geometry
    • select ``linear''
    • fill width editor with 1000
    • clear height editor (it will keep the proportion w/h)
      Warning: in linear mode, if the image is over the pole, fill also the height editor with 1000
    • select ``show (Image area in the output projection geometry)'' (Just to see a map with the area)

  4. ``set RGB mode to log'' (``Enhance RGB'' image menu)
    • set (RGB Defaults menu) to ``Pole'' for an image over snow Please note: Select ``Standard'' for an image over land

  5. ``Show MODIS (RGB)'' (Display a MODIS reprojected image menu)

  6. start ``Create a JPEG(RGB) Image'' (``...... Dump raw data menu .....'' ``... MODIS REPROJECTED IMAGE ...'')
  7. ``Apply'' in the menu HDF_Export_Data

Exit HDFLook
xv the_image_file
cat the_image_file.met

==========================================================

Chapter 5
BACKGROUND CAPABILITIES


SYNOPSIS

HDFLook Commands_file_name

5.1  General Functions

5.1.1   Options of the command file

# This character comments a line of the file.
\ This character means that the next line is a continuation line.
| This character means choice of options.
[  ] These characters mean optional argument.

5.1.2   General Functions

Verbose set/unset verbose mode
send_system execute an unix shell. for example: send_system ``cc ../DEMO_DRAW/send_draw_com.c -o ../DEMO_DRAW/send_draw_com -lm; ../DEMO_DRAW/send_draw_com MYIMAGE''
send_exit stop the HDFLook program (Useful in the mode Msphinx command block Send_HDFLook)
MODIS_geometry_print /tmp/MOD09* ( print the area in longitude, latitude, and the global area between images)
anciliary_print print the SDS meta data

5.1.3   Adding anciliary data

To add or to clear an entry to the GLOBAL HDF or to the SDS anciliary record:

add_global_attr INFO= TYPE= VALUE=
add_sds_attr INFO= TYPE= VALUE=
clear_global_attr
clear_sds_attr

Examples:

add_global_attr info="LOA-USTL"  type=UCHAR  value="Lille 1km RGB image" 
add_global_attr	info="Latitude"  type=FLOAT  value=52.05 
add_global_attr	info="Longitude" type=FLOAT  value=.05 

5.1.4   Generic extraction commands

To create files from SDS/HDF (See MODIS function for details)

export_raw_SDS FILENAME= INDEX=1

LINESTART=2 LINESTEP=2

COLUMNSTART=2 COLUMNSTEP=2 SCALING=

export_raw_SDS_to_HDF FILENAME= OUTPUTSDSNAME= INDEX=

LINESTART=2 LINESTEP=2 SCALING=

COLUMNSTART=2 COLUMNSTEP=2 SPLITSDS=Yes

To Msphinx data planes

export_raw_SDS PLANE=1 X=0 Y=0

INDEX=1 LINESTART=2 LINESTEP=2

COLUMNSTART=2 COLUMNSTEP=2

5.1.5   Setting Inputs/Output for all commands

clear_data clear all options
set_home_directory /tmp
set_map_directory /tmp/Maps
set_tmp_directory /tmp
set_output_directory Output Directory Name
set_input_directory Input Directory Name

(note: Several input directories can be implemented: one by set_input_directory command)
set_input_HDF_file Input File Name
for example: set_input_HDF_file /home/louis/MODIS_IMAGES/MOD09CRS.hdf finds directly the image.
for example: set_input_HDF_file MOD09A1.A2001065.h16v07.003.2001189204039.hdf searches fisrt under the user's directory then under the several set_input_directories
Implemented for the MOSAIC commands:
for example: Filename=/home/louis/MOD09*.hdf finds directly all the MOD09... files under /home/louis/
for example: Filename=MOD09*.hdf finds directly all the MOD09.. under the user's directory (the research over all set_input_directories is not implemented to avoid dramatic input errors).

5.1.6   Projection

This functions sets the TO projection geometry.

set_projection_to_geometry WIDTHTO=1000
HEIGHTTO=50
PIXELSIZEXTO=1000in meters: replace the WidthTo
PIXELSIZEYTO=1000in meters: replace the HeightTo
PROJECTIONTO="LINEAR" TO projection name
LATITUDEMINTO=-90.0000 TO projection geometry
LATITUDEMAXTO=90.0000
LONGITUDEMINTO=-180.0000
LONGITUDEMAXTO=180.0000
[ EXTRA PARAMETERS=valeur]Projection style dependent


projection name [extra parameter nb]:

LINEAR,                 POLDER,                 GOODE,          MOLLWEIDEEA,
HAMMER[2],              AZIMUTHAL[1,2],         LAMBERT[1,2],   MILLER[2],
MOLLWEIDE[2],           ORTHOGRAPHIC[1,2],      ROBINSON[2],    SINUSOIDAL[2],
VANDERGRINTEN[2],       WAGNER7[2],             MODIS[2,7,8,9], NOPROJECTION

extra parameter list name:
1 CenterLatitudeTo center latitude
2 CenterLongitudeTo center longitude
3 FirstStandardParallelTo first standard parallel
4 SecondStandardParallelTo second standard parallel
5 XOffsetInMetersTo x offset in meters
6 YOffsetInMetersTo y offset in meters
7 SphereRadiusTo ex: 6371007.18100
8 RowsTo ex: 86400
9 RightJustifyTo 0 or 1

5.1.7   Geotiff Implemented Projections

Projection HDFLook name Geotiff name
Linear LINEAR CT_Equirectangular
Azimuthal Equidistant AZIMUTHAL CT_AzimuthalEquidistant
Lambert Azimuthal equal area LAMBERT CT_LambertAzimEqualArea
Miller Cylindrical MILLER CT_MillerCylindrical
Orthographic ORTHOGRAPHIC CT_Orthographic
Robinson ROBINSON CT_Robinson
Sinusoidal SINUSOIDAL CT_Sinusoidal
Van Der Grinten VANDERGRINTEN CT_VanDerGrinten

5.2  Build RGB Image

These commands allow you to buikd RGB images with several bands (Reflectance, Thermal, Thermal anomalies).

5.2.1   General Options

For the set_image_background option, only 4 backgrounds are available. For the images created from SDS with a lut: color= lut index (0 to 255).
The CloudsRGBEnhance option enhances the white cloud pixels in the RGB images. The DayNight option filters the day or night granules. The PixelSize option selects the pixels with a size <= n * central pixel size. The AutoAdjust option computes projection domain and shift longitude when image cross right of left boundary. The SwitchImage option is only used in create jpeg or geotiff images switch to RGB composite THERMAL if night.

set_image_background COLOR=White [Grey0|Grey1|Black]
set_image_background COLOR=128
set_image_RGB_composite Visible [Visible|ThermalAnomalies|Thermal] (Visible is the default).
set_image_RGB_composite USERRGB

SDSNAMER=ËV_1KM_RefSB" (or)

SDSNOR=1 INDEXR=1,height,width COMPLEMENTR=Yes

MINR= MAXR =

SDSNAMEG=ËV_1KM_RefSB" (or)

SDSNOG=1 INDEXG=2,height,width COMPLEMENTG=Yes

MING= MAXG =

SDSNAMEB=ËV_1KM_RefSB" (or)

SDSNOB=1 INDEXB=3,height,width COMPLEMENTB=Yes

MINB= MAXB =

set_misc_options CLOUDSRGBENHANCE=Yes|No
set_misc_options ONLYDAY=Yes|No ONLYNIGHT=Yes|No DAYNIGHT=Yes|No
set_misc_options PIXELSIZE=2
set_misc_options AUTOADJUST=Yes|No
set_misc_options SWITCHIMAGE=Yes|No
set_misc_options ADDGRANULEBORDER=Yes|No COLOR= Green LINEWIDTH=1

5.2.2   Build RGB Images

create_MODIS_JPEG_image FILENAME= WIDTH= HEIGHT=

ENHANCE= RGBMODE= QUALITY=

LATITUDEMIN= LATITUDEMAX=

LONGITUDEMIN= LONGITUDEMAX=

create_MODIS_GEOTIFF_image FILENAME= WIDTH= HEIGHT=

ENHANCE= RGBMODE=

LATITUDEMIN= LATITUDEMAX=

LONGITUDEMIN= LONGITUDEMAX=

create_MODIS_HDF_image FILENAME= WIDTH= HEIGHT= ENHANCE=

LATITUDEMIN= LATITUDEMAX=

LONGITUDEMIN= LONGITUDEMAX=

create_MODIS_RGB_image FILENAME= WIDTH= HEIGHT= ENHANCE=

LATITUDEMIN= LATITUDEMAX=

LONGITUDEMIN= LONGITUDEMAX=

create_MODIS_RGB_Mosaic FILENAME= ENHANCE= CLEARFILE=Yes|No

BOTTOMPIXELFILLER=2

CREATEJPEG=Yes|No CREATEGEOTIFF=Yes|No

create_MODIS_RGB_HDF_Mosaic FILENAME= OUTPUTSDSNAME=

ENHANCE= CLEARFILE=Yes|No

BOTTOMPIXELFILLER=2

CREATEJPEG=Yes|No CREATEGEOTIFF=Yes|No

The ``BottomPixelFiller'' value duplicates the pixel at the bottom of the image to fill holes.
The ``CreateJPEG'' value creates a jpeg image of the final mosaic.
Note: several methods to enhance the RGB image can be used:


    * RGBMode:
    • RGBMODE="Linear"
    • RGBMODE="LinearStandard"
      (level 1B)
      Standard Atmospheric corrections + scaling 0 to 2000
    • RGBMODE="LinearDesert"
    • RGBMODE="LinearPole"
    • RGBMODE="Log"
    • RGBMODE="LogStandard"
      (level 1B)
      Standard Atmospheric corrections + scaling 5.5 to 8.3
    • RGBMODE="LogDesert"
    • RGBMODE="LogPole"


    * ENHANCE= valeur
    value percent darker -10 or brighter 10 (10 % less or more)
    * MINR=value MAXR=value MING=value MAXG=value MINB=value MAXB=value
    pixel is stretched between min and max

For each function, the list of authorized addings:
create_MODIS_JPEG_image only the color scale can not be added.
create_MODIS_HDF_image
create_MODIS_GEOTIFF_image
create_MODIS_RGB_image add_earth_icon, add_maps, add_grids (in ``quick'' mode, when the function ``resize'' is not used)
create_MODIS_RGB_Mosaic
create_MODIS_RGB_HDF_Mosaic add_earth_icon (with the ``CreateJPEG=yes'' option, all the addings are authorized)

5.3  Build 8bit Image

5.3.1   General Options

select_SDS SDSNAME=ËV_1KM_RefSB" | SDSNB=1

INDEX=1

set_image_background COLOR=White [Grey0|Grey1|Black]
set_color_scale_name "GREY" (see below the Color Lut Names)
set_SDS_enhance MIN=1000 MAX=5000

stretch the data to match the lut (0->255 colors)

min->0 max->255

LOOK UP TABLE

Color Lut Name:      GREY, RAINBOW0, RAINBOW1, RAINBOW2, RAINBOW3, RAINBOW4,
                     GEODESIC, SEISMIC, TOPOGRAPHIC, ADDITIVE, CEE, X11,
                     GREY16, RAINBOW16, NONE

ARRAY INDEX

index : a value points to a SDS element, the character (*) performs a loop on the index value.

for example: 15 x 2030 x 1354
Data set name: 'EV_1KM_RefSB' [15 x 2030 x 1354]
index=2 points to the second slice (2034X1354)
for example: 10 x 11 x 360 x 180
index=5,3 points to the 5 X 3 slice (360X180)
for example: 10 x 11 x 360 x 180
index=5,* points to the 5 X (1 to 11) slice (360X180)
for example: 2030 x 1354 x 10
index=0,0,3 points to the third slices ( 2030X1354 )

warning: for the command export_MODIS_raw_SDS an option is added to index= (default matrix dimensions are ..,height,width..). The user is able to swap the matrix using: index=width,height,3 ( in the ex: 2030 x 1354 x 10 the array no 3 will be swapped)

5.3.2   Build a single plane Image

create_MODIS_SDS_JPEG_image FILENAME= WIDTH= HEIGHT= INDEX=1

SCALING= QUALITY=

LATITUDEMIN= LATITUDEMAX=

LONGITUDEMIN= LONGITUDEMAX=

create_MODIS_SDS_GEOTIFF_image FILENAME= WIDTH= HEIGHT= INDEX=1

SCALING=

LATITUDEMIN= LATITUDEMAX=

LONGITUDEMIN= LONGITUDEMAX=

create_MODIS_SDS_HDF_image FILENAME= WIDTH= HEIGHT= INDEX=1

SCALING= COMPRESSMODE=JPEG QUALITY=.75

LATITUDEMIN= LATITUDEMAX=

LONGITUDEMIN= LONGITUDEMAX=

For these two functions, all the additions can be used. The scaling can be used to compute the labels values in the add_scale_to_image function (below).

5.4  Addings

The function below adds a small earth icon in the jpeg image

The location units are in line,column when the icon is added on an image, the units are in cm when the icon is added on a paper page (the lat/long coordinates allow you to draw a rectangle on the icon other than the granule's)

add_earth_icon XTO= YTO= WIDTH= HEIGHT=

LATITUDEMIN= LATITUDEMAX= LONGITUDEMIN= LONGITUDEMAX=

The functions below add a earth map and lat/long grids with labels.

add_maps COASTLINES=Yes|No BOUNDARIES=Yes|No LINEWIDTH=
COASTLINECOLOR=Green BOUNDARYCOLOR=Magenta
RIVERS=Yes|No RIVERCOLOR=Blue means ALL rivers
[ RIVERSRANK1=Yes|No COLORRANK1= ]Permanent major rivers
[ RIVERSRANK2=Yes|No COLORRANK1= ]Additional major rivers
[ RIVERSRANK3=Yes|No COLORRANK1= ]Additional rivers
[ RIVERSRANK4=Yes|No COLORRANK1= ]Minor rivers
[ RIVERSRANK5=Yes|No COLORRANK1= ] Intermittent major rivers
[ RIVERSRANK6=Yes|No COLORRANK1= ] Intermittent minor rivers

add_grids COLOR=Red LINEWIDTH=
LATITUDEMIN= LATITUDEMAX= LATITUDESTEP=
LONGITUDEMIN= LONGITUDEMAX= LONGITUDESTEP=

add_latitude_labels FOREGROUNDCOLOR="RED"

BACKGROUNDCOLOR="TRANSPARENT"

BORDER=0 FONTNAME="Bell.ttf"

SIZEFACTOR=1.0 ROTATION=0.

FORMAT="%.2f" LABELSTEP=

LONGITUDE=

LATITUDEMIN= LATITUDEMAX= LATITUDESTEP=

add_longitude_labels FOREGROUNDCOLOR="RED"

BACKGROUNDCOLOR="TRANSPARENT"

BORDER=0 FONTNAME="Bell.ttf"

SIZEFACTOR=1.0 ROTATION=0.

FORMAT="%.2f" LABELSTEP=

LATITUDE=

LONGITUDEMIN= LONGITUDEMAX= LONGITUDESTEP=

The function below adds a text to a jpeg image.
If the ``X'' and ``Y'' values are integers, the units will be in lines and columns; if they are floating point, the units will be in percentage of the width/height of the image.

add_text X= Y= FOREGROUNDCOLOR="RED"

BACKGROUNDCOLOR="TRANSPARENT" BORDER=0

FONTNAME="Bell.ttf" SIZEFACTOR=1.0 ROTATION=0.

TEXT="THIS IS A SIMPLE TEST"

The function below adds a color scale only on a SDS jpeg oor geotiff image. The values ``X, Y, Width, Height'' are the location and the size of the scale. If these values are integers, the units will be in lines and columns; if they are floating point, the units will be in percentage of the width/height of the image.

The C language formulation is used for the TextFormat value.
The UpLeftSide value is the label position (the default is bottom or right).
The Labels list is a SDS value followed by text between quotes or an independant value written with the given format.
If the ``Labels'' string is empty, the values and the texts will be computed.

add_scale_to_image X= Y= WIDTH= HEIGHT=

TICKCOLOR=Red

FOREGROUNDCOLOR=White BACKGROUNDCOLOR=Red

TEXTFORMAT="%.2f" FONTNAME=Courb.ttf

SIZEFACTOR=2.0 UPLEFTSIDE=Yes|No

NOTICKS=Yes|No

LABELS=" 25 1.00 30 Clouds ... "

The label list contents the labels of the scale in the format: pixel value (0->255) annotation. (annotation is a value like ``23.12'' or text such as ``clouds'').
Tip: if the labelString is "computed" the label value will be computed. ex: the computed value will be the SDS value calibrated:
Labels=" 25 computed 130 computed 250 computed"

For these two functions, all the additions can be used.

Add a frame to the output jpeg image

add_image_frame SIZE= RED= GREEN= BLUE=

FRAMECOLOR="red" FONTNAME=""Bell.ttf"

TITLECOLOR="Red" TITLESIZEFACTOR=2.0

TOPTITLE="My file" BOTTOMTITLE="My file"

Adding validity

The following addings are implemented in all image jpeg,geotiff and PS files generation.


    * add_earth_icon
    * add_maps
    * add_text
    * add_grids
    * add_latitude_labels
    * add_longitude_labels
    * add_scale_to_image

The addings do not affect create_MODIS_SDS_Mosaic and create_MODIS_SDS_HDF_Mosaic data planes but are included in the outputs generated by the options CREATEJPEG=yes CREATEGEOTIFF=yes

the command create_MODIS_RGB_Image has only add_earth_icon implemented.

5.5  Export of SDS data

5.5.1   General Options

select_SDS SDSNAME=ËV_1KM_RefSB" | SDSNB=1

INDEX=1

ancillary_print Print the meta data of the SDS record and HDF file.

5.5.2   Export commands

if scaling is used, the result files will be in floating point.

LEVEL 1B REFLECTIVE SOLAR BAND SCALING="Reflectance"

SCALING="Radiance"

GENERAL SCALING=ÿ=a(x-b)"

SCALING=ÿ=ax+b"

for LEVEL1B: 250m and 500m data geolocation files in raw mode:
Export the latitude longitude SDS at 250m or 500m accuracy.

set_misc_options EXPANDGEOLOCATION=Yes|No

for LEVEL1B: 1km Emissive channels bands (20,21,22,23,24,25,27,28,29,30,31,32,33,34,35,36) Compute brightness temperature in Kelvin or Celsius

set_misc_options BRIGHTNESSTEMPERATUREKELVIN=Yes|No
set_misc_options BRIGHTNESSTEMPERATURECELSIUS=Yes|No

export_MODIS_raw_SDS FILENAME= OUTPUTSDSNAME="MySDS" SPLITSDS= INDEX=1 LINESTART=2 LINESTEP=2

SCALING= COLUMNSTART=2 COLUMNSTEP=2

export_MODIS_raw_SDS FILENAME= OUTPUTSDSNAME="MySDS" SPLITSDS= INDEX=1 LINESTART=2 LINESTEP=2

LATITUDEMIN= LATITUDEMAX=

LONGITUDEMIN= LONGITUDEMAX=
export_MODIS_projected_SDS FILENAME= OUTPUTSDSNAME="MySDS" INDEX=

LATITUDEMIN= LATITUDEMAX=

LONGITUDEMIN= LONGITUDEMAX=

create_MODIS_SDS_Mosaic FILENAME= INDEX=1 SCALING= CLEARFILE=Yes|No

BOTTOMPIXELFILLER=2

CREATEJPEG=Yes|No CREATEGEOTIFF

create_MODIS_SDS_HDF_Mosaic FILENAME= OUTPUTSDSNAME=

INDEX=1 SCALING= CLEARFILE=Yes|No

BOTTOMPIXELFILLER=2

CREATEJPEG=Yes|No CREATEGEOTIFF

The ``BottomPixelFiller'' value duplicates the pixel at the bottom of the image to fill holes.
The ``CreateJPEG'' value creates a jpeg image of the final mosaic.
Export to HDF file:

export_MODIS_raw_SDS_to_HDF FILENAME= INDEX= LINESTART=2 LINESTEP=2

COLUMNSTART=2 COLUMNSTEP=2 SPLITSDS=Yes|No

export_MODIS_raw_SDS_to_HDF FILENAME= INDEX= LINESTART=2 LINESTEP=2

LATITUDEMIN= LATITUDEMAX=

LONGITUDEMIN= LONGITUDEMAX=

export_MODIS_projected_SDS_to_HDF FILENAME= INDEX= SPLITSDS=Yes|No

LATITUDEMIN= LATITUDEMAX=

LONGITUDEMIN= LONGITUDEMAX=

Remarks:

  • If width or/and height are equal to zero, the other values will be computed keeping the lat/lon size ratio
  • For the Mosaic, the size and geometry of the projection space are done by the set_projection_to_geometry function
  • select_SDS must be made after set_input_hdf_file

5.6  Postscript capabilities

send_to_printer COMMAND="lp -d Myprinter"
TYPE=Color Color Black&White
PAPERFORMAT=A4 A4 A3 B5 USLetter USLegal
DPI=200 PS resolution dpi
COPIES=1
ORIENTATION=Portrait Portrait Landscape
PRINT=SDS SDS RGB(thermal or visible)
PAGETITLE="Title"
send_to_PS_File FILENAME="./print.ps"
TYPE=Black&White Color Black&White
PAPERFORMAT=A4 A4 A3 B5 USLetter USLegal
DPI=200 PS resolution dpi
COPIES=1
ORIENTATION=Portrait Portrait Landscape
PRINT=SDS SDS RGB
PAGETITLE="Title"

Under construction

  • set_MODIS_pixel_filter Cloudy
  • set_BorderLightning Yes|No BorderWidth=50

5.7  In conjunction with Msphinx

5.7.1  Create RGB images into a MSPHINX project

In Msphinx architecture, the maps are drawn in a specific view plane overlapping the image planes.

add_Msphinx_maps COASTLINES=Yes|No RIVERS=Yes|No BOUNDARIES=Yes|No

COASTLINECOLOR=Green RIVERCOLOR=Blue BOUNDARYCOLOR=Magenta

Create a RGB image for the Msphinx project in use (dataplanes on disk Msphinx option).
THE WORD Plane= REPLACES THE WORD Filename=
if Plane = -1 the image is sent to the R,G,B planes in use
if Plane = 2 Red will be the plane 2, Green plane 3, Blue plane 4

create_MODIS_RGB_image PLANE=-1 X=0 Y=0 WIDTH= HEIGHT= ENHANCE=

LATITUDEMIN= LATITUDEMAX=

LONGITUDEMIN= LONGITUDEMAX=

Create a RGB image for the Msphinx project in use (dataplanes on disk Msphinx option).
if Plane is not defined, the image is sent to the R,G,B planes in use.
if Plane = 2 Red will be plane 2, Green plane 3, Blue plane 4.

create_MODIS_RGB_Mosaic PLANE=1 X=0 Y=0 ENHANCE= CLEARFILE=Yes|No

5.7.2  Send a SDS to a MSPHINX project

create a SDS image into the Msphinx project in use (dataplanes on disk Msphinx option).
THE WORD Plane= REPLACES THE WORD Filename=

export_MODIS_raw_SDS PLANE=1 X=0 Y=0

INDEX=1 LINESTART=2 LINESTEP=2

COLUMNSTART=2 COLUMNSTEP=2

export_MODIS_projected_SDS PLANE=1 X=0 Y=0 WIDTH= HEIGHT= INDEX=

LATITUDEMIN= LATITUDEMAX=

LONGITUDEMIN= LONGITUDEMAX=

create_MODIS_SDS_Mosaic PLANE= X=0 Y=0 WIDTH= HEIGHT=

INDEX=1 CLEARFILE=Yes|No

5.7.3  Dump values from SDS or Vdata files

A set of commands allows you to dump values from SDS or Vdata files. To get the list of the SDS or Vdata available in the HDF file use:

HDFLook -List file.hdf

The first command ``Pixel_dump_set'' fixes the SDS or VData and how to print. The second command ``Pixel_dump'' fixes the pixels to print.

See below the description of command words :
linefeed print a linefeed in the output file
DataNb=yes add the number of values before printing the values
ColumNb=10 print a linefeed after ColumNb values
SDSName="" dump the SDS
VDName="" dump the VData record
SDSNo= dump the SDS number (according with the HDFLook SDS number, see: HDFlook -list)

This option is not available for Vdata records

Index= Select the index values to be printed in the selected SDS
IndexDescription= Description of the array indexes (codes: i=index w=width h=height and number to fix slices) ex: i,w,h or w,h,1,i
format="%.4f" Select a format (C notation)
scaling= Select type scaling mode

Scaling options :

scaling= "Reflectance" (if any)

scaling= "Radiance" (if any)

scaling= "None" Raw data

scaling= ÿ=ax+b"

scaling= ÿ=a(x-b)"

scaling= ÿ=ax"

scaling= "Y=10**(AX+B)"

if the scaling option is missing, HDFLook will do his best to scale the data

``Pixel_dump_set'' This command creates the print line from the various SDS.

Examples:

  • With SDS data sets
    Pixel_dump_set SDSNAME=ËV_250_Aggr1km_RefSB"

    INDEX=1 SCALING=Reflectance FORMAT="%.4f"

    SDSNO=6 INDEX=1,2 (i,w,h) SCALING=Reflectance
    LINEFEED
    SDSNO=3 INDEX=1 SCALING=Radiance
    SDSNO=6 INDEX=1,2 (i,w,h) SCALING=Radiance
    LINEFEED
    SDSNO=9 SCALING="NONE"
    SDSNO=10 FORMAT="%.6f"
    SDSNO=11
    SDSNO=13
    SDSNO=14

  • Width VData sets
    Pixel_dump_set VDNAME= "Data Capture End Date (YYYYMMDD)"

    FORMAT="%.0f"

    LINEFEED
    VDNAME="Date (YYYYMMDD)" DATANB=yes FORMAT="%.0f"
    LINEFEED
    VDNAME= "Time (HHMMSS)" DATANB=yes FORMAT="%.0f"
    LINEFEED
    VDNAME="Temperature/pressure profiles : Current Temperature (K)"

    FORMAT="%.4f"

    DATANB=yes COLUMNB=10

    LINEFEED
    VDNAME="Composite Ozone profiles : Ozone Concentration (cm-3)"

    DATANB=yes COLUMNB=10

    LINEFEED
    VDNAME="Chappuis Ozone profiles : Ozone Concentration (cm-3)"

    DATANB=yes COLUMNB=10

``Pixel_dump'' This command selects the pixels from one location or an area (Square or defined by 4 points)
With Vdata, no pixel selection is allowed just do: pixel_dump FileName= ÖUT2"

Examples:
Pixel_dump FileName=ÖUT2" LatitudeMin=26.7725 LatitudeMax=26.8000 LongitudeMin=72.4727 LongitudeMax=72.5000
Pixel_dump Annotation="Lille" LatitudeMin=26.7 LongitudeMin=72.4727
Pixel_dump Point=26.7,72.4 Point=26.8,72.4 Point=26.8,72.5 Point=26.7,72.5
Pixel_dump Point=26.7,72.4

Note: ``IndexDescription'' must be tested, functions not implemented for binned data and specific input projection. ``IndexDescription'' is tested on level 1b... and SAGE data sets

5.8  FAST EXAMPLE

Pick up an example into a simple file called aa.com, modify the HDF file name and do: HDFLook aa.com.

(LEVEL1B) BUILD A POSTSCRIPT QUICK LOOK

clear_data
set_input_hdf_file              MOD021KM.A2000265.1145.002.2000267053723.hdf
set_projection_to_geometry      ProjectionTo="linear"
set_image_RGB_composite  	VISIBLE
send_to_PS_File  FileName="./printlinear.ps" Type=Color PaperFormat=A4  dpi=200\
                 Copies=1 Orientation=Portrait print=RGB \
                 PageTitle="MOD021KM.A2000265.1145.002.2000267053723" RGBMode="LOG"


(LEVEL1B) BUILD A POSTSCRIPT QUICK LOOK WITH A SMALL ICON SHOWING THE GRANULE AREA OVER THE POLE

clear_data
set_input_hdf_file              MOD021KM.A2001114.1445.002.2001127221453.hdf
set_projection_to_geometry      ProjectionTo="noprojection"
add_earth_icon                  xto=3 yto=3 width=3 height=3
set_image_RGB_composite  	VISIBLE
send_to_PS_File  FileName="./printnoreppole.ps" Type=Color PaperFormat=A4  dpi=200 \
                 Copies=1 Orientation=Portrait print=RGB \
                 PageTitle="MOD021KM.A2001114.1445.002.2001127221453" RGBMode="LOG"\
                 minR= 8.3 maxR = 9.3 minG= 8.3 maxG = 9.3 minB= 8.3 maxB = 9.3

Chapter 6
AERONET data base


This software allows the user to download data from the Aeronet data base.

6.1  Main menu

Two indentical databases are implemented:

  • At LOA USTL France
  • At GSFC USA

Use the upper left menu to select the data base that you want to use (You can switch from one to the other at any time).

6.1.1  Extraction type menu

  • ``Photometer selection''
    The extraction is carried out for the specific photometer at the date (filling the ``Date: dd/mm/yyyy'' editor) and time selected by the user (if the field ``time'' is empty the extraction will be done for the day).

  • ``Area selection''
    The extraction is carried out for a specific area and date (filling the ``Date: dd/mm/yyyy'' editor) and time selected. The user is able to fill the latitude or longitude editors or can use the ``show map'' option and directly select a zone with the mouse (if you do not see the sites of the photometers on the map, push the button ``Show Photometers list'').

6.1.2  Data type menu

Select the data which you want to subset:

  • Optical thickness
  • Size distribution
  • Refraction index
  • Polarization
  • All data

remark: The plot option just works with ``All data'' or ``Optical thickness'' selection.

6.1.3  Toggle and button options

  • ``Show map''
    This option draws a world map with the selected day operational photometers (Yellow Non polarized, Magenta with polarization data).

  • ``Save on disk''
    This option dumps the display area into a disk file ``MskyResult''. If the file exists, it will be appended.

  • ``Mgraph plots''
    This option draws the results using 4 windows:

      * Angström coefficients
      * Optical thickness
      * Dubovik size distribution
      * Polarization ratio

  • ``Mgraph prints''

    This option creates a command file for a plot software called Mgraph . If Mgraph is implemented on your system, the job is automatically launched and a second file (a PostScript file) is created with the plot page results. You have to send the PS file to your printer or use ``Ghostview'' to see the print.

  • ``Show Photometers list''

    Display the operational photometers for the input date. (Enlarge the ``Photometers_list'' panel.) The following things are printed:
    The number and the name of the photometer, its location and the number of measurements available. If you click on a specific line, the photometer characteristics are replaced in the ``Msky_look'' panel.

  • ``Clear text''

    Clear the display area.

  • ``About Msky''

    Print the advertisement and help file.

  • ``Check DB''

    This is a very important option; after the first extraction, the software uses a memory cache to avoid multiple connections to the data base.
    If you change the data base type, you will retrieve the same data from the memory cache. The toggle ``Check DB'' forces download again from the data base and rebuilds the memory cache for this extraction.

See the §1.2.3 for the complete explanations of the use of plot window.

Appendix A
appendix

A.1  Coarse Latitude Longitude interpolation

A.2  Level 1B corrected reflectance








1km 500m 250m

A.3  Thermal composite

These are two thermal RGB images acquired during nightime 2002 141 (Brazil, Nile Delta) using these settings:band 31 Red 290K-275K, band 29 Green 280K-270K, band 20 B 300K-285K. You can clearly see the clouds which appear white (note the scale is reversed, the highest temperature is the lowest intensity and the lowest temperature is the highest intensity). The water appears very dark as the thermal inertia of water is so big that the warmest objects in the night data are the water bodies. The land surface night temperature is driven by the vegetation cover, the more vegetation the warmer the surface, the more barren the cooler, so vegetated surfaces appear darker in the images. The image over the Nile delta region makes apparent very bright yellow surfaces over the desert as emissivity in bands 20 and 29 drops sharply over those surfaces.


A.4  Thermal anomalies

Madagascar
Corrected reflectances:

Thermal anomalies

A.5  Level 1B (500m) Mosaic

Level 1B (500m) Mosaic
    30000 columns × 24000 lines
    Corrected reflectance

A.6  MODIS->AERONET

Appendix B
command file examples

B.1  CERES Mosaic


verbose
clear_data

set_output_directory        /users/louis/CERES_COM/OUTPUTS/
set_input_directory         /users/louis/CERES

set_projection_to_geometry   ProjectionTo="LINEAR"    WidthTo=1000 HeightTo=500 \
				        LatitudeMinTo=-90.0000 LatitudeMaxTo=90.0000 \
					LongitudeMinTo=-180.0000 LongitudeMaxTo=180.0000

#=============================== IMAGE SETTING ======================================
set_color_scale_name        RAINBOW3
set_image_background        color=White
add_maps Coastlines=Yes Boundaries=Yes  CoastlineColor=Green BoundaryColor=Magenta
add_scale_to_image X=950 y=50 width=30 Height=150 TickColor=Black ForegroundColor=Black \
		BackgroundColor=white TextFormat="%.0f" FontName=Courb.ttf SizeFactor=.8 UpLeftSide=yes \
		NoTicks=yes Labels=" 0 0.00   64 75.0   128 150.0   192 226.0   255 300.0"
add_grids       color=Black LatitudeMin=-90  LatitudeMax=90 LatitudeStep=30 \
                LongitudeMin=-180 LongitudeMax=180 LongitudeStep=30
#=============================== SELECT SDS     ======================================

select_SDS                 SDSName= "CERES LW TOA flux - upwards"
set_SDS_enhance min=0 max=300

#=============================== TITLES         ======================================
add_text x= 100 y = 15 ForegroundColor="Black" BackgroundColor="White" Border=0 FontName=Courb.ttf \
                     SizeFactor=1.5 Rotation=0. text="CER_SSF_TRMM-PFM-VIRS_Edition2B-TransOps_021018.1999030905"
add_text x= 300 y = 480 ForegroundColor="Black" BackgroundColor="white" Border=0 FontName=Courb.ttf \
                     SizeFactor=1.5 Rotation=0. text="CERES LW TOA flux - upwards"

set_input_hdf_file         /users/louis/CERES/CER_SSF_TRM*
create_MODIS_SDS_MOSAIC_image       FileName="CERES_MOSAIC" ClearFile=Yes  CreateJPEG=yes
    

B.2  CERES zoom example


verbose
clear_data

set_output_directory        /users/louis/CERES_COM/OUTPUTS/
set_input_directory         /users/louis/CERES

set_projection_to_geometry   ProjectionTo="LINEAR"    WidthTo=1000 HeightTo=1000 \
                                        LatitudeMinTo=-8.0000 LatitudeMaxTo=50.0000 \
                                        LongitudeMinTo=-30.0000 LongitudeMaxTo=28.0000

#=============================== IMAGE SETTING ======================================
set_color_scale_name        RAINBOW3
set_image_background        color=White
add_maps Coastlines=Yes Boundaries=Yes  CoastlineColor=GREEN BoundaryColor=Magenta
add_scale_to_image X=50 y=750 width=30 Height=150 TickColor=Black ForegroundColor=Black \
		BackgroundColor=white TextFormat="%.0f" FontName=Courb.ttf SizeFactor=.8 UpLeftSide=yes \
		NoTicks=yes Labels=" 0 0.00   64 75.0   128 150.0   192 226.0   255 300.0"
add_grids       color=Black LatitudeMin=-90  LatitudeMax=90 LatitudeStep=30 \
                LongitudeMin=-180 LongitudeMax=180 LongitudeStep=30
#=============================== SELECT SDS     ======================================

select_SDS                 SDSName= "CERES LW TOA flux - upwards"
set_SDS_enhance min=0 max=300

#=============================== TITLES         ======================================
add_text x= 100 y = 15 ForegroundColor="Black" BackgroundColor="White" Border=0 FontName=Courb.ttf \
                     SizeFactor=1.5 Rotation=0. text="CER_SSF_TRMM-PFM-VIRS_Edition2B-TransOps_021018.1999030905"
add_text x= 30 y = 950 ForegroundColor="Black" BackgroundColor="white" Border=0 FontName=Courb.ttf \
                     SizeFactor=1.5 Rotation=0. text="CERES LW TOA flux - upwards"

set_input_hdf_file         /users/louis/CERES/CER_SSF_TRM*
create_MODIS_SDS_MOSAIC_image       FileName="CERES_MOSAIC_Z" ClearFile=Yes  CreateJPEG=yes
    

B.3  CERES Orthographic


verbose
clear_data

set_output_directory        /users/louis/CERES_COM/OUTPUTS/
set_input_directory         /users/louis/CERES

set_projection_to_geometry   ProjectionTo="ORTHOGRAPHIC"    WidthTo=1000 HeightTo=1000 \
					CenterLatitudeTo=0 CenterLongitudeTo=0 \
				        LatitudeMinTo=-90.0000 LatitudeMaxTo=90.0000 \
					LongitudeMinTo=-180.0000 LongitudeMaxTo=180.0000

#=============================== IMAGE SETTING ======================================
set_color_scale_name        RAINBOW3
set_image_background        color=White
add_maps Coastlines=Yes Boundaries=Yes  CoastlineColor=Green BoundaryColor=Magenta
add_scale_to_image X=950 y=50 width=30 Height=150 TickColor=Black ForegroundColor=Black \
		BackgroundColor=white TextFormat="%.0f" FontName=Courb.ttf SizeFactor=.8 UpLeftSide=yes \
		NoTicks=yes Labels=" 0 0.00   64 75.0   128 150.0   192 226.0   255 300.0"
add_grids       color=Black LatitudeMin=-90  LatitudeMax=90 LatitudeStep=30 \
                LongitudeMin=-180 LongitudeMax=180 LongitudeStep=30
#=============================== SELECT SDS     ======================================

select_SDS                 SDSName= "CERES LW TOA flux - upwards"
set_SDS_enhance min=0 max=300

#=============================== TITLES         ======================================
add_text x= 100 y = 15 ForegroundColor="Black" BackgroundColor="White" Border=0 FontName=Courb.ttf \
                     SizeFactor=1.5 Rotation=0. text="CER_SSF_TRMM-PFM-VIRS_Edition2B-TransOps_021018.1999030905"
add_text x= 300 y = 480 ForegroundColor="Black" BackgroundColor="white" Border=0 FontName=Courb.ttf \
                     SizeFactor=1.5 Rotation=0. text="CERES LW TOA flux - upwards"

set_input_hdf_file         /users/louis/CERES/CER_SSF_TRM*
create_MODIS_SDS_MOSAIC_image       FileName="CERES_MOSAIC_ORTHO" ClearFile=Yes  CreateJPEG=yes
    

B.4  AIRS Mosaic Day



#           Create a reprojected MOSAIC file from a set of AIRS HDF files
#=========================================================================

verbose
clear_data
set_output_directory            /data2/home/louis/OUTPUTS
set_input_directory             /net/bratmos/data4/dayTime/

set_projection_to_geometry ProjectionTo="LINEAR"  WidthTo=3000 HeightTo= 1500\
                        LatitudeMinTo=-90.0 LatitudeMaxTo=90.0 \
                        LongitudeMinTo=-180.0 LongitudeMaxTo=180.0


#  ======================   jpeg control file settings === CreateJPEG=yes =================
add_maps        Coastlines=yes Rivers=No Boundaries=No CoastlineColor=Green 

add_grids    color=Black LatitudeMin=-90 LatitudeMax=90 LatitudeStep=10 \
		LongitudeMin=-180 LongitudeMax=180 LongitudeStep=10

add_text     x= 10 y=30 ForegroundColor="Black"  BackgroundColor="TRANSPARENT" \
		Border=0   FontName="Bell.ttf" SizeFactor=3.0 Rotation=0.0 \
		"AIRS (Day) TSurfStd (HDFlook_MODIS Mosaic)"


add_latitude_labels    ForegroundColor="Red" BackgroundColor="TRANSPARENT" Border=0 FontName="Bell.ttf" \
                        SizeFactor=1.5 Rotation=0. Format="%.1f" \
                        Longitude=-160 LatitudeMin=-90  LatitudeMax=90 LatitudeStep=20

add_longitude_labels   ForegroundColor="Red" BackgroundColor="TRANSPARENT" Border=0 FontName="Bell.ttf" \
                        SizeFactor=1.5 Rotation=0. Format="%.1f" \
                        Latitude=-80 LongitudeMin=-180 LongitudeMax=180 LongitudeStep=20

add_scale_to_image      x=2200 y=50 width=400 height=100 \
                        TickColor=white  ForegroundColor=Black backgroundColor=White \
                        TextFormat="%.1f" FontName=Courb.ttf SizeFactor=1.2 \
                        UpLeftSide=Yes NoTicks=No \
        		Labels="0  computed    63 computed   127 computed 191 computed 255 computed"

set_color_scale_name    RAINBOW0
set_image_background    color=white

set_SDS_enhance min=220 max=320

#  ========================================================================================
select_SDS                      SDSname="TSurfStd"
set_input_hdf_file              /net/bratmos/data4/dayTime/AIRS.2000*
create_MODIS_SDS_Mosaic     FileName="AIRSDayTSurfStd"   ClearFile=Yes BottomPixelFiller=2 CreateJPEG=yes
    

**********************************************************

Bibliography

[1]
Vermote E.F., Tanre D., Deuze J.L., Herman M., Morcrette J.J., 1997,

Second Simulation of the Satellite Signal in the Solar Spectrum: an overview,

IEEE Transactions on Geoscience and Remote Sensing, 35,3,675-686.

[2]
Vermote E.F. and Tanre, D., 1992,

Analytical Expressions for Radiative Properties of Planar Rayleigh

Scattering Media Including Polarization Contribution,

Journal of Quantitative Spectroscopy and Radiative Transfer, 47, (4): 305-314.

[3]
Roger J.C and Vermote E. F., 1998, A method to Retrieve the Reflectivity Signature at 3.75mm from AVHRR data, Remote Sensing of the Environment, 64:103-114.

[4]
Gao & Kaufman, 1998: The MODIS Near-IR Water Vapor Algorithm, Algorithm Theoritical Basis Document (ATBD), available from http://modis-atmos.gsfc.nasa.gov/MOD05_L2/atbd.html

[5]
Petitcolin F. and Vermote E. F. 2002, Land surface reflectance, emissivity and temperature from MODIS middle and thermal infrared data, Remote Sensing of Environment

**********************************************************

AUTHORS

Gonzalez, L.                 Deroo, C.
Laboratoire d'Optique Atmosphérique
Université des Sciences et Technologies de Lille
U.F.R. de Physique Fondamentale
59655 Villeneuve d'Ascq Cedex
France
Email : sphinx@loa.univ-lille1.fr

HDFLook (HDFLook MODIS) is available on:
http://www-loa.univ-lille1.fr/Hdf/





The authors would like to thank for their unconditional support:
Dr Vermote E. (1) ,
Dr Saleous N. (2) ,
Mr Wolfe R.E. (2) ,
Dr Ouzounov D. (3) ,
Dr Ahmad S. (3) ,








1- University of Maryland / MODLAND GSFC-923
2- Laboratory for Terrestrial Physics at NASA GSFC-922 and Raytheon ITSS
3- Distributed Active Archive Center / DAAC GSFC-902


File translated from TEX by TTH, version 2.72.
On 20 Nov 2003, 09:50.