0% found this document useful (0 votes)
80 views16 pages

GIS Tool For Distribution Reference Evap

This document provides step-by-step instructions for preparing and processing Landsat 5 TM imagery data in GRASS GIS. It describes downloading imagery from the GLOVIS and Earth Explorer websites, installing and setting up the GRASS GIS environment, and processing the Landsat data to map evapotranspiration over time for a study area in Iran.

Uploaded by

Mu Bhi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
80 views16 pages

GIS Tool For Distribution Reference Evap

This document provides step-by-step instructions for preparing and processing Landsat 5 TM imagery data in GRASS GIS. It describes downloading imagery from the GLOVIS and Earth Explorer websites, installing and setting up the GRASS GIS environment, and processing the Landsat data to map evapotranspiration over time for a study area in Iran.

Uploaded by

Mu Bhi
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 16

FOSSGIS/ Training Manual

Open Source GIS and Remote Sensing Tutorials Version 1, December 2010

Evapotranspiration mapping with Landsat


5TM in GRASS GIS
Manual

Pakparvar M. (U. Ghent, Belgium) and GRASS Develop-


ment Team

Introduction

Figure 1: Study Area in p162r040 of Landsat 5TM

Downloading the image


Scenes from the Landsat archive are available at
This manual aims at explaining step-by-step no charge, processed to Standard Terrain Correc-
how to prepare and process Landsat 5 TM im- tion (Level 1T). While some scenes do not have the
agery data after downloading it from GLOVIS ground-control or elevation data necessary to per-
(http://glovis.usgs.gov) The location of study area is form L1T correction, the best level of correction is
a water harvesting (floodwater spreading) project is applied. More details at Landsat Product Informa-
being set up in South central Iran (Kowsar research tion.
station, Gareh Bygone, fars Province). Time series
of Et maps is needed for integration and calculation The USGS Global Visualization Viewer is a quick
the hydrologic balance. The WRS-2 path=164 and and easy online search and order tool for selected
row=040. The site is located south-central East bor- satellite and aerial data. When the USGS Global Vi-
der of the image. Fig. 1 sualization Viewer is open, the Global View is seen.

Contents of this volume:


Evapotranspiration mapping with Landsat
5TM in GRASS GIS . . . . . . . . . . . . . . . 1
GRASS-Tutorials Ver. 1, December 2010

There is option to add the known latitude and


longitude or select the desired region by cursor tool.

A new windows is appeared to search and re-


quest the imagery. This stage needs to install the last
version of Java program and needs to permit the pop
up to run by the windows firewall. In new window
go to Collection > Landsat Archive > to have access
to updated landsat images or Collection > Landsat
Legacy Collections for old images.

Figure 3: Search within Glovis

For submitting the request it is needed to register


to the USGS site. After a while a massage will be sent
After klicking on desired category of images it to the email of subscriber giving a link to give access
is possible to see the scenes on the screen. There for downloading the image.
are options in bottom left to determine the year and
month of interest or pushing on "nest scene" , "previ-
There is an easier way to request the images of
ous scene". In case of availability of desired scene for
successive time series. The USGS website has pre-
downloading, a red alarm is appeared top of screen
pared a new envaironment of searching tool for the
mentioning "Downloadable". Klick on Add button
image requaest is called earth explorer. The link
to add the image in request list.
NewEarthExplorer gives the access to the search
window that looks like the google earth. There are
4 label at the top to determine the the images. In
Search criteria, start and end date of the time series,
exact lat. Long. and/or name of the location can be
determined. In Data set it is possible to select the
In case of the image to be downloadable push the type of image. In Additional criteria there are op-
Download button otherwise the Submit button. tions to start and end path and row of the interest
and some other criteria. In Result label, all of the
scenes of interest will be shown, downloaded or re-
quested. Subscription to the Earth Explorer is also
needed for the request. There is a limitation of 100
scenes per subscriber.

Figure 2: Glovis Main Page Figure 4: Search Criteria within Glovis

2
GRASS-Tutorials Ver. 1, December 2010

In case of downloadable, a green downward ar-


row is appeared on the resulted sample image other- More details can be found at landsat.usgs.gov
wise the sign of add to shop (like the shopping cart)
is seen and has to be pushed changing it to green
color.
Implementation environment
GRASS GIS (Geographic resources Analysis Support
System) is an open source, Free GIS software that op-
erates on various platforms. Therefore binaries can
be downloaded and installed on Unix, Linux, MS-
Windows or MAC OS X workstation.

The currently last version GRASS 7.0 is down-


loadable at www.grass.osgeo.org. It has a windows
Figure 5: Shopping Cart Items
version in which the windows users can easily work
in its environment.
In case of submit and request a new menu is
shown and needs a name for this request and some
The new modules are all incorporated in the
other criteria such as start and end time for the re-
GRASS Image Processing Environment (GIPE)
quest. This timing is duration of the request and not
folder. The modules are accessible from the
the acquisition time of the images.
trac.osgeo.org website.

After downloading and installing the soft-


ware, an specific work area should be deter-
mined for first time of opening. All of the
files imported and newly generated in GRASS
are located in the determined path such as
"C:/GRASSDATA/Landsat5/PERMANENT".

Naming of the folders is optional except for the


Figure 6: Save as Standing Request "PERMANENT" that is GRASS default name for ad-
ministrator specific working environment that is
Afterward a message will be sent to the sub- called MAPSET. Every user has a username and
scriber email to give access to downloading the im- password and have access to their own folders which
ages. is determined by admin.

All of the images are in the Zip format and should Image container folder is not the same as work-
be collected in a unique folder. ing folder. GRASS generated files are in the binary
format and can not easily read by normal windows
While most Landsat scenes are processed as Level programs. Therefore, Copy and pasting as well as
1T (precision and terrain corrected), certain scenes the exporting of these files must perform inside the
do not have ground-control or elevation data nec- GRASS.
essary for precision or terrain correction. In these
cases the best level of correction is applied (Level Linux users have easier and simpler access to
1G-systematic or Level 1Gt-systematic terrain). Ad- script writing for automation of a repeatable task
ditionally, the majority of all archived Landsat 1-5 for faster and (man-made) error free results. But it
MSS scenes, as well as a select number of Landsat doesn’t mean the Windows users can not use it prop-
4-5 TM scenes are processed only as Level 1G (sys- erly.
tematic) due to processing constraints. However,
improvements to production capabilities are being Starting the GRASS in Windows is performed by
investigated, which will allow more scenes to be klicking on the exe file. In Linux it should be written
processed at a higher level with a shorter processing "grass70" (70 means version 7.0) in Terminal area and
time. The processing level of a downloaded scene is push the enter key.
found in the metadata (MTL.txt) or processing his-
tory (WO.txt) files which are delivered with the data After the first time opening of the GRASS, the
band files and other ancillary data. following menu is appeared to select the working

3
GRASS-Tutorials Ver. 1, December 2010

area. There are possibilities to make a new location


for the project and new name for mapset. Renam-
ing the older mapsets can only be done in this menu
and must not perform in the other programs (such as
windows explorer). Followings are some examples
of naming:

Main working folder for GRASS data: GRASS-


DATA;
Name of the specific project: L5;
Name of the mapset: PERMANENT.

Figure 9: Change Location and Mapset

Scripting in GRASS helps the user to do the tasks


fast. Scripts are in the format of C programing lan-
guage. For writing and executing a script, first the
location should be checked (where we are in hard
disk?). To do this:
Type pwd and press Enter

>pwd
>/home/GRASSDATA/L5
"pwd" means Path to Working Directory and will
show the path that you are in now.
For changing to desired path
Type cd and space Folder/Sub folder and Enter
Figure 7: GRASS GIS Welcome Interface
>cd home/RSDATA/Landsat5
Starting the GRASS shows three new windows: >/home/RSDATA/Landsaat5
GRASS Layer management: for main data analysis; Scripts now work in the correct directory.
GRASS Map Display for viewing the resulted layers;
CLI (Command Line Interface): for scripting.

Preparation and import in GRASS


GIS
GLOVIS is giving access to download a Landsat 5TM
dataset in the form of a tarball (.tar.gz), which is a
compressed format. This format compresses the files
much more than the normal zip format. Decom-
pressing the tarball for each available image in the
directory can be done by the common Windows un-
zipping softwares one by one.

In Linux it is possible to decompress the files by


using the script mentioned in 1-1.
Figure 8: GRASS GIS Manager and Map Display Once this is done, start GRASS GIS and create a new
location from the New Location wizard, name it as
After opening the GRASS It is also possible to the Path and Row of the images (i.e. p162r040), and
change the working directory. In GRASS Layer Man- use any of the landsat5.TIF images available as a ref-
agement go to Settings/GRASS working Environ- erence image to get the projection system and other
ment/Change Location and mapset. Then it is pos- information from.
sible change the working area. There is a need to import and rename the im-
ages inside the GRASS with the extensions in

4
GRASS-Tutorials Ver. 1, December 2010

number format because the preprocessing module


"i.landsat.toar" which imports DN and convert them
into either radiance or reflectance is using a base
name with numbered extensions. For instance:

Landsat 5 TM:
L5162040_04020090705_B10.TIF
=> L5162040_04020090705.1
The same for the other bands till band 7.0
L5162040_04020090705_B70.TIF
=> L5162040_04020090705.7

Landsat 7 ETM+:
L71161040_04020100607_B10.TIF
=> L7_161040_04020100607.1 Figure 11: Raster Import Module
The same for the other bands till band 7.0 except for
the bands 6.1 and 6.2
It is possible also to import and rename the im-
L71161040_04020100607_B61.TIF
ages by using the command line. Once inside the
=> L7_161040_04020100607.61
p162r040 location, access the Command Line Inter-
L72161040_04020100607_B62.TIF
face (CLI) and "cd" to the directory where all of your
=> L7_161040_04020100607.62
newly decompressed images are located. In that di-
rectory, launch the script mentioned in 1-2.
It is possible to do one by one in GRASS Import
menu. For every band that is selected from the im-
age container folder, an output file should be written Imported images are now in the working en-
as the new file naming system mentioned above. vironment of the GRASS (i.e. /home/GRASS-
DATA/L5/PERMANENT). So, it is impossible for
common programs to access to and open the im-
ported images except after the exporting.

Preprocessing

Determination of the region

In GRASS it is possible to set the region of interest as


a pre determined part of the image(s) whereby all of
the processes will be done based on the data of this
region. Unlike the other softwares, it doesn’t mean a
separate sub image file to be produced. This activity
reduces the time and increases the speed of process-
ing intensely.

In GRASS Layer Manager push on the "Add var-


ious raster" button and select Add RGB Mapp Layer.
In new window select desired band for every Red,
Green or Blue band and press OK.
Figure 10: Accessing Raster Import

5
GRASS-Tutorials Ver. 1, December 2010

band. QCALmax and QCALmin are the extreme


values of the DNs in each band and commonly is
between 0-255 or 1 -255. The radiance value for each
pixel is calculated by Gain and Bios data.

Gain = (Lmax - Lmin) / (QCALmax - QCALmin)


Bias = Lmin - gain * QCALmin
Radiance = gain * DN + bias

The top of atmosphere reflectance (toar) is calcu-


lated by dividing the actual radiance at sensor with
Figure 12: Raster RGB Display the potential radiance (sun incoming irradiance) at
the top of atmosphere, which is calculated by using
The selected composition (is called false color the sun elevation and astronomical equations.
composite) is shown In GRASS Map Display. Once Then, to calculate at-sensor reflectance the equations
in this window zoom to interested area by zoom are:
tool. To determine this region as the interested part
of images to be processed, push the icone "zoom op- sun_radiance = [Esun * sin(e)] / (PI * d^2)
tions" and select set the computational region from reflectance = radiance / sun_radiance
the map. It is possible also to save specifications of
the region from the map. Selected region in Map dis- where, d is the earth-sun distance in astronomical
play will be the only part of image that attends to the units, e is the solar elevation angle, and Esun is the
further processes. mean solar exo-atmospheric irradiance in W/(m2 *
Âţm).
Once the images are all imported in GRASS, go
to Imagery/satellite image tools/Landsat DN to
Georeferencing radiance-reflectance and run the i.landsat.toar mod-
According to the GLOVIS, as mentioned before, most ule.
Landsat scenes are processed as Level 1T (precision
and terrain corrected), certain scenes do not have
ground-control or elevation data necessary for pre-
cision or terrain correction. In these cases the best
level of correction is applied (Level 1G-systematic or
Level 1Gt-systematic terrain). So there is no need to
perform geometric correction for newly downloaded
landsat 5 TM or landsat 7 ETM images.

In case of need, it is possible to do georeferencing


in the GRASS that is called rectification. This mod-
ule rectifies an image by computing a coordinate
transformation for each pixel in the image based on
the control points. The procedure and steps is men-
tioned in detail in: "r.rectify" manual that is acces- Figure 13: i.landsat.toar Module
sible in Grass Layer Management/Imagery/Rectify
Image or Raster. Fill in the input file name and choose a new name
for output file reminding the TOAR conversion has
been applied to new file.
Change DN to radiance and reflectance at
top of atmosphere The name of input file must not be included of
the extension values. Assigning the main part of the
Radiance and reflectance are the major basic input image itself let the software.
layer in ET calculation. DN can be converted to ra-
diance by using the Lmax and Lmin of the spectral By default, all of the necessary input data is read
bands that is mentioned in the met or mtl files. from the "*.met" file that is present in the working
directory. If the "*.mtl" is present rather than "*.met",
Lmax and Lmin are the extreme values of actual it must be mentioned in Metadata section. Check the
radiance is sensed by the satellite sensor for each square for "Landsat TM5 has a .mtl instead of .met

6
GRASS-Tutorials Ver. 1, December 2010

file. the target reaches the satellite sensor, typically 80% at


0.45 Îijm and 50% at 0.45 Îijm, so that the target seems
less reflecting. The missing photons have been lost
through two processes: absorption and scattering.
Atmospheric correction minimizes the errors arise
from both two sources.
Through the atmospheric correction, radiance at top
of the atmosphere is converted to radiance at the
earth surface.
There are two main tools for Atmospheric correction
inside the GRASS.

Dark Object Subtraction (DOS)


Dark Object Subtraction is one of the simplified
Figure 14: i.landsat.toar Module, L5TM with MTL methods that is implemented in i.landsat.toar mod-
ule. It assumes a value called Path-radiance to sub-
The output file is the reflectance by default. In the
tract from all of the pixell’s radiance value.
case of need to make the output radiance, it should
mention in the Settings section. Check the square for
Path-radiance is computed by subtraction of the
"output at-sensor radiance for all bands".
Sun_ radiance from the dark object radiance. So, the
Default reflectance output is more favorite because
equations are:
it will speed up the atmospheric correction in next
step. But in some other steps there is a need for out-
put radiance. So it is better to produce both radiance Surface_radiance = \
and reflectance by twice application of i.landsat.toar (at-sensor_radiance - radiance_path)
with checking and unchecking the option of the ra-
diance output file. Radiance_path = \
(dark_radiance - percent* Sun_radiance)

Sun_radiance = \
TAUv * [Esun * sin(e) * TAUz + Esky] / (PI * d^2)

Where, percent is a value between 0.0 and 1.0


(usually 0.01), Esky is the diffuse sky irradiance,
TAUz is the atmospheric transmittance along the
path from the sun to the ground surface, and TAUv
is the atmospheric transmittance along the path from
the ground surface to the sensor. radiance_dark is
the at-sensor radiance calculated from the darkest
object, i.e. DN with a least ’dark_parameter’ (usu-
ally 1000) pixels for the entire image. There are four
methods of DOS inside the GRASS assuming differ-
Figure 15: i.landsat.toar Module, output in Radiance ent values:

Atmospheric correction
DOS1: TAUv = 1.0, TAUz = 1.0 and Esky = 0.0
Natural light emitted from the Sun is not polar-
ized. Before it enters the Earth’s atmosphere, its DOS2: TAUv = 1.0, Esky = 0.0, \
intensity remains mostly unchanged and unaffected and TAUz = sin(e) for all bands with \
maximum wave length less than 1. \
by the retardation of electric and magnetic compo-
(i.e. bands 4-6 MSS, 1-4 TM, and 1-4 ETM+) \
nents. However after interacting with atmospheric
other bands TAUz = 1.0
molecules and particles, the unpolarized light may
become partially polarized. The degree of polar- DOS2b:
ization depends on the type of scattering event. In
the actual case, the signal is perturbed by the atmo- DOS3: TAUv = exp[-t/cos(sat_zenith)], \
sphere. Only a fraction of the photons coming from TAUz = exp[-t/sin(e)], Esky = rayleigh

7
GRASS-Tutorials Ver. 1, December 2010

i.atcorr module.
DOS4: TAUv = exp[-t/cos(sat_zenith)], \ Parameterization of the i.atcorr is being done inside
TAUz = exp[-t/sin(e)], Esky = PI * radiance_dark a text file including the below information (called
parameter file).
In case of using DOS methods while in
i.landsat.toar go to Metadata section and select one 7 - geometrical conditions=Landsat 5 TM
of the desired DOS methods of atmospheric correc- 7 5 6.30 51.410 24.234 - month day hh.ddd longitude
tion and the kind of sensor (i.e TM5) and continue to latitude ("hh.ddd" is in decimal hours GMT)
convert DN to radiance and reflectance. 6 - atmospheric mode=us standard 62
1 - aerosols model=continental
In this case, the output file is reflectance or ra- 9 - visibility [km] (aerosol model concentration), not
diance that is atmospherically corrected (by DOS used as there is raster input
method) and must not be inserted to landsat atmo- -1.200 - mean target elevation above sea level [km]
spheric correction module "i.atcorr". (here 1200m asl), not used as there is raster input
-1000 - sensor height (here, sensor on board a satel-
lite)
30 - ’i’th band of TM Landsat 5

The figures at the left side are the parameters and


the texts in the right side are the defenitions. The
text file must be prepared before and browse inside
the i.atcorr. The needed information are mentioned
in the manual of i.atcorr. Some explanations are as
follow.

Line 1 is included of geometric conditions and


the correct number can be found in the section A of
i.atcorr manual. For landsat 5 tm the number is 7.
Figure 16: i.landsat.toar Module, DOS1 model en- Line 2 is mentioning the specifications of the image
abled that is mentioned in mtl file. Latitude and longitudes
are the geographic location of the center of region. If
The best method of atmospheric correction by the the position is not available in longitude-latitude
DOS concept can be verified by doing the compari- (WGS84), the m.proj conversion module can be used
son between the check points of final ET maps (based to reproject from a different projection. It also can be
on each DOS method) with the ground truth data. accessed in GRASS/Raster/Develop raster map/Re-
project raster map.
After reprojection the location of the center of the
The 6S atmospheric correction model region can be determined by g.region module.
In line 3 the atmospheric model must be entered.
The module i.atcorr applies the 6S method to correct The possible models are being mentioned in i.atcorr
the atmospheric errors which is supposed to be the manual section B. In case of access to the radio sound
most accurate but input demanding procedure. weather data of the region, it is possible to include
6S (Second Simulation of a Satellite Signal in the the user owned data. In this case it should be men-
Solar Spectrum) is an advanced radiative transfer tioned 7 (for user defined model) instead of 6 (us
system designed to simulate the reflection of solar standard 62). Then write the requested weather pa-
radiation by a coupled atmosphere-surface system rameters.
for a wide range of atmospheric, spectral and geo- In line 4 the aerosole model is requested. The desired
metrical conditions. model should be found in section C of the i.atcorr. It
At this point, if a "Dark Object Subtraction" at- is again possible to enter the user’s model.
mospheric correction has not been computed in Line 5 is the value of visibility. The estimation is
"i.landsat.toar", then an atmospheric correction must found in weather data. If you an estimate of aerosol
be applied to the TOAR radiance/reflectance val- optical depth is accessible, enter v=0 for the visibility
ues coming from "i.landsat.toar". This is done using and enter the aerosol optical depth at 550nm (iaer
"i.atcorr" module. This module is a port of 6S atmo- means ’i’ for input and ’aer’ for aerosol).
spheric correction model. Atmospheric correction In line 6 the the elevation of the target pixel is de-
in GRASS can be done in Imageray/Satellite im- scribed. It expresses the altitude of the target (e.g.,
age tools/Atmospheric correction that applies the mean elevation) in [km], given as negative value. If

8
GRASS-Tutorials Ver. 1, December 2010

there is a DEM file input the line 7 is not used. In The produced maps are reflectance at the surface
Line 7 the sensor height is described. The figure - for each band. The values range is between 0 and 1
1000 means that the sensor is on board a satellite. showing the ratio of outgoing radiance to the incom-
Line 8 is mentioning the sensor band. It is deter- ing radiance at Earth Skin Surface. In order to test the
mined in he section F of the i.atcorr manual. reality of the generated values look to the NDVI val-
ues that can be produced by the red and near infrared
Once inside the i.atcorr, type a name for the input band through map r.mapcalc module. The values re-
file. This file must be the reflectance at top of atmo- lated to green vegetation area must be the highest.
sphere file (generated in i.landsat.toar). Every band
needs its own parameter text file to be browsed or
directly enter the parameters values in the text box.

Basic products creation

Necessary images for energy balance calculation are


NDVI, Albedo, Emissivity. These initial products
have dedicated GRASS GIS modules.

NDVI production

Figure 17: i.atcorr Module


Vegetion index NDVI is a necessary basic product
for some other higher level outputs such as Soil heat
For selection the DEM and visibility bands as in- flux, Surface roughness (Z0m). It can be calculated
put, while inside the i.atcorr go to input label and using "i.vi". Go to Imagery/Evapotranspiration cal-
select the desired files. Visibility map has no more culation/vegetation indices, following the example
extra benefit when the value of visibility is written below:
in parameter file. But DEM file can help to get better
results of i.atcorr.
Unlike the i.landsat.toar, the i.atcorr must be applied
for every band individually for every given image.

Figure 19: i.vi Module

There are 13 vegetation indices (VI) possibility


Figure 18: i.atcorr Module Input Tab in i.vi module. After selecting the desired name of
red band, enter the name of VI (such as NDVI, EVI,
The script mentioned in 1-4 can be used for auto- DVI,...). Then go to Optional label and select the
mated approach of atmospheric correction for a set near infrared band for NDVI and the other bands is
of landsat images. needed in case of the other VIs.

9
GRASS-Tutorials Ver. 1, December 2010

ated by black body at the same temprature (is di-


mensionless).
The module i.emissivity calculates the emissivity in
the longwave radiation spectrum, according to the
semi-empirical equation related to NDVI by Caselles
et al. (1997), valid in the NDVI range of 0.16 to 0.74.
Estimation in the 8-14 micrometers range for sparse
canopy.

Figure 20: i.vi Module

Albedo production
Albedo is shortwave surface reflectance in range of
0.3 to 3.0 micro meters (figures are dimensionless).
Albedo is in fact an integration of the surface re-
flectance of all of the shortwave bands assuming a
fraction for every band. The fractions for the bands Figure 22: i.emissivity Module
are published by the landsat website and are as fol-
low. Energy balance terms
Albedo = (0.293 * channel1 + 0.274 * channel2 \
+ 0.233 * channel3 + 0.156 * channel4 + \ The energy-balance models use visible, infrared and
0.033 * channel5 + 0.011 * channel7) thermal remotely sensed data for solving the main
equation:
Albedo is calculated from the "i.albedo" module.
It computes broad band albedo from surface re-
flectance. This is an precursor to Soil heat flux, r.sun Rn-G-H-λET=0
and Energy-Balance processing.
Inside the GRASS windows, go to Imagery/Evapo-
Where the Rn is the net radiation, H is the sensible
transpiration calculation/Albedo, and select the the
heat flux, G is the soil heat flux, and λET is the latent
bands 1 to 5 and 7 of atmospherically corrected sur-
heat flux.
face reflectance.

Net Radiation
Net radiation at satellite overpass (instantaneous)
and integrated over the day are computed from a
generic GRASS GIS raster module "r.sun". The r.sun
program works in two modes. In the first mode it
calculates for the image acquisition local time a solar
incidence angle [degrees] and solar irradiance values
[W.m-2]. In the second mode daily sums of solar ra-
diation [Wh.m-2.day-1] are computed within a day.

In the other hand, in mode 1, instantaneous net


radiation, and in mode 2 the day integrated net radi-
Figure 21: i.albedo Module ation is computed. Both are necessary for the energy
balance computation. Mode 1 for sensible heat flux
Emissivity Production computation and mode 2 for the Day ET potential.

Surface emisivity is the ratio of the thermal energy The model computes all three components of to-
radiated by the surface to the thermal energy radi- tal radiation (beam, diffused and reflected) for the

10
GRASS-Tutorials Ver. 1, December 2010

clear sky conditions, i.e. not taking into considera-


tion the spatial and temporal variation of clouds.

Note that the following raster inputs are rec-


ommended: aspect, slope, albedo, latitude and
longitude. Slope and Aspect can be computed
with "r.slope.aspect" using the DEM raster file,
albedo with "i.albedo", latitude and longitude with
"i.latlong".

Run r.sun while inside the GRASS: go to Raster/-


Solar radiance and shadows/solar irradiance and
irradiation. Input the name of DEM raster file and
the Julian day of the year (image acquisition day).

Figure 24: r.sun Module, input options label

Table 1: Linke Turbidity Coefficient

Figure 23: r.sun Module Landscapes Mountains Rural City Industrial


January 1.5 2.1 3.1 4.1
February 1.6 2.2 3.2 4.3
March 1.8 2.5 3.5 4.7
April 1.9 2.9 4 5.3
May 2 3.2 4.2 5.5
To determine the other input file go to the in- June 2.3 3.4 4.3 5.7
put_options label and input the slop, aspect, albedo, July 2.3 3.5 4.4 5.8
longitude and latitude files. The Linke atmospheric August 2.3 3.3 4.3 5.7
turbidity should be found in reference literature for September 2.1 2.9 4 5.3
the study area. The default is 3.0. Average monthly October 1.8 2.6 3.6 4.9
values of the Linke turbidity coefficient for a mild November 1.6 2.3 3.3 4.5
climate in the northern hemisphere is presented in . December 1.5 2.2 3.1 4.2
Annual 1.9 2.75 3.75 5

11
GRASS-Tutorials Ver. 1, December 2010

Figure 27: r.sun Mode 2

Incident angle raster map is computed using


DEM, aspect, slope maps for the given julian day
and local time. The figures ranges between 0 and 90.
Global or total irradiance output file is a product of
the three basal outputs beam irradiance, diffuse irra-
diance and reflected irradiance.
Figure 25: r.sun Module, optional label The range of values of the products is dependent of
many factors but some guidelines can be given as
followings:
In Optional label, push to the "Incorporate the
shadowing effect of the terrain" and local (not GMT) The range of figures for Beam irradiance are normaly
time of image acquisition. between 500 to 1000, diffuse irradiance between 70
In Out_option label write the name of desired output to 150, and ground reflected irradiance between less
names. It is possible only to generate the output files than 1 to 100 all in (W/m2).
for one of the Modes 1 and 2 in the same time. So, The summation of those basal products figures
add the desired names for 1,2,4,5 and 6 rows. Global (global irradiance) for a given pixel must be less than
or total irradiance output file is a product of the three actual instantaneous radiation at the atmosphere
base outputs Beam irradiance, Diffuse irradiance and which ranged between 1361 to 1386 (W/M2).
reflected irradiance.
To generate the output files for Mode 2, the r.sun The net radiation (W/M2/day) value for each pixel
must be run again and put all of the input files. In can be computed by dividing the global irradiation
Output_options the output files related to mode 2 or mode 2 (Wh/M2/day) by the actual sunshine hours.
mod 1 and 2 must be filled (boxes 2 to 6) and the box It may be called Rnet.day product.
1 must be kept empty. In Optional label delete the Sunshine hours is a weather station parameter and
local time which was mentioned for Mode 1 outputs alternatively is possible to generate as a raster file by
in before. using the i.sunhours module.

The r.sun command line for mode 1 and mode 2 are


as followings and can be used for automated script-
ing.

Mode 1
r.sun elevin=dem90
aspin=_aspect slopein=_slop lin=3.2
albedo=L5162040_04020090518.1Albedo
latin=latitude longin=Longitude
incidout=_InAnM1 beam_rad=_BiIrM1
diff_rad=_DifIrM1 refl_rad=_GrRefIrM1
glob_rad=_GlIrrM1 day=138 time=10

Figure 26: r.sun Mode 1 Mode 2

12
GRASS-Tutorials Ver. 1, December 2010

r.sun elevin=dem90 frictional velocity (u*), a value of actual vapour pres-


aspin=_aspect slopein=_slop lin=3.2 sure (ea[KPa]) and the (x,y) pairs for wet and dry
albedo=L5162040_04020090518.1Albedo pixels.
latin=latitude longin=Longitude Surface roughness (Z0m) is an dependent variable
beam_rad=_BiIrM2 insol_time=_InsTiM2 of vegetation height. Generation of an accurate map
diff_rad=_DifIrM2 refl_rad=_GrRefIrM2 of the vegetation inside the study area in the date of
glob_rad=_GlIrrM2 day=138 image acquisition will lead to increase the accuracy
of H calculation.

soil heat flux


Z0m=hveg * 0.136
The generic module "i.eb.soilheatflux" calculates the
soil heat flux approximation (g0). It takes input of hveg is the height of vegetation (m).
Albedo, NDVI, Surface Skin temperature, Net Radi- Altitude corrected temperature map can be com-
ation (see r.sun), and time of satellite overpass. puted by using the toar thermal band and the DEM.
Surface temperature (LST) is directly relative to ther-
mal radiation recorded in thermal band . So the the
thermal band that has been converted to radiation T0DEM=LST-(0.00627*DEM)
(by i.landsat.toar) can be used as the input file for
surface temperature raster map. The factor 0.00627 is the gradient of decreasing the
Net radiation is the global radiation product of temprature in relation to the increase in height (6.27
mode1 of r.sun module. degree in each 1000 meter).
Time raster map can be created by map calculation
knowing the local time of satellite overpass. The U* (Called U star) is the friction velocity is
computed by:
Soil heat flux can be computed with "i.eb.g0".

U*= 0.41*um/(ln(hu/Z0m)

um is wind speed in the time of satellite overpass


(m/s), hu is the height of wind measurement which
is normally described as 5 (m). Z0m here is not the
same as that is used in U* calculation. The hveg in
this case is defined as the height of vegetation around
the weather station.

The value of actuale vapor pressure ea is calcu-


lated using the e0 for max and min tempreture.

e0=0.618*exp(17.27*T/(T+273.3))
Figure 28: i.eb.soilheatflux Module
e0 is the saturation vapor pressure at the air tempera-
The i.eb.soilheatflux command line is as follow- ture. It must be calculated for Max and Min absolute
ings and can be used for automated scripting. tempreture.
ea is calculated using:
i.eb.soilheatflux \
albedo="L5162040_04020090518.1Albedo" \
ndvi="L5162040_04020090518.1NDVI" \ ea=RH*(e0Max+e0Min)/2))/100
tempk="L5162040_04020090518.toar.6" \
rnet="_GlIrrM1" time="time" output="_G0" RH is the measured relative humidity at the time of
satellite overpass.
The location (row and column) of the wet (cold) and
Sensible Heat Flux dry (hot) pixel must be found by the user. For wet
The Sensible heat flux (H) is calculated by pixel a place inside a water body and for dry pixel
"i.eb.h_SEBAL01", given both maps of Net Radia- a place inside a bare and dry soil surface is recom-
tion and soil Heat flux (Rn, G) at instantaneous time, mended (SEBAL method is geographically depen-
the surface roughness (z0m), a map of the altitude dent on extrem energy balance points).
corrected temperature (t0dem), a point data of the

13
GRASS-Tutorials Ver. 1, December 2010

Figure 29: i.eb.h_SEBAL01 Module Figure 31: i.eb.eta Module

Note that additional images should be created


about surface roughness length (z0m), altitude cor-
rected temperature (t0dem), the height independent
wind speed (U*), along with coordinates of the "wet"
and "dry" pixels (SEBAL method is geographically
dependent on extrema energy balance points).

Evaporative Fraction

Evaporative fraction can be calculated by


"i.eb.evapfr":

Figure 30: i.eb.evapfr Module

Evapotranspiration

Evapotranspiration can be computed from "i.eb.eta":

14
GRASS-Tutorials Ver. 1, December 2010

Appendix A: GRASS SCRIPTS Atmospheric correction with i.atcorr

Unzipping the tarball compressed files Script for atmospheric correction by 6S method for
landsat 5 TM.
For Linux users in Terminal and for Windows users
in Dos prompt window should be written:

#!/bin/bash
for file in *.tar.gz
# Basic script for i.atcorr for L 5 TM
do
tar -xvzf \$file
#Geometrical conditions (L5TM)
done
geom=7
Control should be given to run the script in the #Sensor height (satellite is -1000)
same directory as the images are in. sens_height=-1000

#Here we suppose you have altitude (DEM) and \


Visibility (VIS) maps ready
Renaming and importing #---------------------------------------------
#Visibility dummy value (overwritten by VIS \
In GRASS Command Line Interface (CLI) write the raster input)
script: vis=9
echo "RUN from the MTL.txt directory and \ r.mapcalc expression="visibility=\$vis" \
within the GRASS environment" --overwrite

for file in L5*0.TIF #Altitude dummy value (in Km should be negative\


do in this param file)
out=\$(echo \$file | sed ’s/\\(.*\) #(overwritten by DEM raster input)
\_\\(.*\)\_B\\(.*\)0.TIF/\1\\_\2\.\3/g’) alt=-1.200
echo \$out
r.in.gdal input=\$file output=\$out #---------------------------
done # Please change as you need
#---------------------------
For more information about this script, refer to # L5 basename as stored in GRASS GIS and used \
"sed" program manual in Unix/Linux and to the by i.landsat.toar
"r.in.gdal" help in GRASS GIS. L5basename=L5162040\_04020090705

# Location of parameter file


Conversion of DN to radiance root=/home/icwater/
Conversion of DN to reflectance at top of atmosphere
#datetime of satellite overpass (month, day, \
(TOAR) is done with the script: GMT decimal hour)
echo "RUN from the MTL.txt directory and within \ mdh="7 5 6.30"
the GRASS environment"
# Central Lat/Long
path=162 Long=51.410
row=040 Lat=24.234

for L5_MTL_file in L5\$path\$row*_MTL.txt #Atmospheric mode


do atm\_mode=6 #us standard 62 (for lack of more\
L5_prefix=\$(echo \$L5_MTL_file \| \ precise model)
sed ’s/\\(.*\)_MTL.txt/\\1/’)
#Aerosol model
i.landsat.toar -t \ aerosol\_mode=1 #continental
input_prefix=\$L5_prefix\. \
output_prefix=\$L5_prefix.toar. \ #satellite band number (L5TM [25,26,27,28,29,30])
metfile=/home/user1/\$L5\_MTL\_file \ satbandno=25 #Band 1 of L5TM is first to undergo\
sensor=tm5 atmospheric correction
done
for bandno in 1 2 3 4 5 7
This script requires to change the path and row do # Generate the parameterization file
of the target images you are processing. echo "\$geom \
- geometrical conditions=Landsat 5 TM" \

15
GRASS-Tutorials Ver. 1, December 2010

> \$root/param\_L5.txt - sensor height (here, sensor on board a\


echo "\$mdh \$Long \$Lat \ satellite)" >> \$root/param\_L5.txt
- month day hh.ddd longitude latitude \ echo "\$satbandno \
("hh.ddd" is in decimal hours GMT)" >>\ - ’i’th band of TM Landsat 5" >>\
\$root/param\_L5.txt \$root/param\_L5.txt
echo "\$atm\_mode \ # Process band-wise atmospheric correction with 6s
- atmospheric mode=tropical" >> \ i.atcorr -r -o -f \
\$root/param\_L5.txt input=\$L5basename.toar.\$bandno\
echo "\$aerosol\_mode \ elevation=dem90 visibility=vis \
- aerosols model=continental" >>\ parameters=\$root/param\_L5.txt \
\$root/param\_L5.txt output=\$L5basename.surf.\$bandno \
echo "\$vis \ range=0,1 rescale=0,1 --overwrite
- visibility [km] (aerosol model \ # Increment satellite band number
concentration), not used as there is \ satbandno=\$((satbandno+1))
raster input" >> \$root/param\_L5.txt done
echo "\$alt \
- mean target elevation above sea level\
[km] (here 600m asl), not used as there \ GRASS Development Team
is raster input" >> \$root/param\_L5.txt http: // grass. osgeo. org
echo "\$sens\_height \ [email protected]

16

You might also like