--- title: "Surface Energy Balance using **METRIC** model and **water** package: 1. *simple procedure*" author: "Guillermo Federico Olmedo and Daniel de la Fuente-Saiz" date: "`r Sys.Date()`" output: rmarkdown::html_vignette vignette: > %\VignetteIndexEntry{METRIC simple} %\VignetteEngine{knitr::rmarkdown} %\VignetteEncoding{UTF-8} --- This vignette presents the procedure to estimate the Land Surface Energy Balance (LSEB) using Landsat imagery and the **water** package. There are two versions of this vignette: a simple and an advanced one. In the first one the procedure is simpler and most of the parameters are selected automatically by the package. In the second approach the procedure is longer, because the user has more control over all input parameters and coefficients. Both vignettes follow the METRIC model methodology (Allen et al., 2007) to estimate the LSEB from Landsat images. The examples use Landsat 7 data; for Landsat 8 and 9 see the vignette "Landsat 8 and 9". Also, in the simple procedure we assume flat terrain, while in the advanced procedure we use a digital elevation model (DEM). However, it is possible to use a DEM in the simple procedure by setting the argument `plain` to `FALSE` and providing a `DEM`. ## Introduction One of the most cited models to estimate land surface evapotranspiration from satellite-based energy balance is the *Mapping EvapoTranspiration at high Resolution with Internalized Calibration* (**METRIC**). This model was developed by Allen et al. (2007) based on the well-known SEBAL model (Bastiaanssen et al., 1998). It has been widely applied in many countries around the world to estimate crop evapotranspiration (ET) at field scale and over large areas using satellite images. The model has been applied to different vegetation and crop types, such as wheat, corn, soybean and alfalfa, with good results (3-20% error), and in recent years also over sparse woody canopies such as vineyards and olive orchards, in both flat and mountainous terrain. Thus, ET is estimated as a residual of the surface energy equation: \begin{equation} \label{eq:EB} LE = R_n - G - H \end{equation} where $LE$ is the latent energy consumed by ET; $R_n$ is the net radiation; $G$ is the soil heat flux (sensible heat conducted into the ground); and $H$ is the sensible heat flux convected to the air (all in $W \cdot m^{-2}$). We estimate $R_n$, $G$ and $H$ for each pixel of a *Landsat scene*, supported by one weather station. Then we estimate $LE$ with the previous equation and, after that, the instantaneous evapotranspiration as: \begin{equation} ET_{inst} = 3600 \cdot \frac{LE}{\lambda \rho_w} \end{equation} where $ET_{inst}$ is the instantaneous ET at the satellite overpass ($mm \cdot h^{-1}$); 3600 is the conversion factor from seconds to hours; $\rho_w$ is the density of water = 1000 $kg\cdot m^{-3}$; and $\lambda$ is the latent heat of vaporization of water ($J\cdot kg^{-1}$). Finally, the daily ET is computed pixel by pixel (30 x 30 m) as: \begin{equation} ET_{24} = \frac{ET_{inst}}{ET_r} ET_{r\_24} \label{eq:et24} \end{equation} where $ET_r$ is the hourly reference ET at the time of the satellite overpass and $ET_{r\_24}$ is the daily reference ET. To begin, load the **water** package: ```{r, message=FALSE} library(water) ``` ## Base data preparation To estimate crop evapotranspiration with METRIC, the **water** package and the simple procedure, we use three inputs: - A raw (Level-1) Landsat 7, 8 or 9 image (original .TIF files from USGS EarthExplorer or GloVis). - Weather station data (a .csv file). With a full scene, crop an area of interest when loading the image, `loadImage(path, aoi = createAoi(...))` (see `?createAoi`); the example image used here is already cropped. First, we load the weather station data with `read.WSdata()`, which converts our .csv file into a `waterWeatherStation` object. If we provide a Landsat metadata (MTL) file, it also computes the weather conditions at the time of the satellite overpass. Always set `tz`, the time zone of the weather station clock, because the overpass time in the MTL file is UTC. ```{r} csvfile <- system.file("extdata", "apples.csv", package="water") MTLfile <- system.file("extdata", "L7.MTL.txt", package="water") # the wind speed in apples.csv is in km/h: cf converts it to m/s WeatherStation <- read.WSdata(WSdata = csvfile, date.format = "%d/%m/%Y", lat=-35.42222, long= -71.38639, elev=201, height= 2.2, columns=c("date" = 1, "time" = 2, "radiation" = 3, "wind" = 4, "RH" = 6, "temp" = 7, "rain" = 8), cf = c(1, 0.2777778, 1), MTL = MTLfile, tz = "America/Santiago") ``` We can visualize our weather station data with: ```{r, fig.width = 5} print(WeatherStation) plot(WeatherStation, hourly=TRUE) ``` After that, we load the Landsat image. Usually we use `loadImage()` to load a Landsat image from the `.TIF` files downloaded from USGS EarthExplorer. In this vignette we use the Landsat 7 example data included in **water**, stored as a packed terra object, so we unpack it with `rast()`: ```{r, fig.width = 5} image.DN <- rast(L7_Talca) plot(image.DN) ``` ## Surface Energy Balance estimation We use the function `METRIC.EB()` to estimate the land surface energy balance. This function has many parameters to choose among the different METRIC model equations. For example, you can change: - coefficients used to estimate broadband albedo. - Model to estimate Leaf Area Index (LAI) from satellite data. - Model to estimate momentum roughness length (Zom) - Automatic method to select anchor pixels - ETr coefficient and momentum roughness length for the weather station When we run `METRIC.EB()`, the energy balance and the surface temperature (Ts) are stored in the `Energy.Balance` object (class `waterLSEB`). The function prints a one-line summary of the calibration (anchor pixels, dT, wind speed used) and warns about problems with the inputs. The hot and cold anchor pixels are selected from percentiles of NDVI, albedo and surface temperature (`anchors.method = "percentile"`, see `?calcAnchors`). With `plots = TRUE` it also plots the anchors and the aerodynamic resistance during the iterative process; the argument `verbose` controls how much information is printed. ```{r, fig.width = 5, warning=FALSE} Energy.Balance <- METRIC.EB(image.DN = image.DN, plain=TRUE, WeatherStation = WeatherStation, MTL=MTLfile, sat="L7", thermalband=image.DN$Thermal1) summary(Energy.Balance) ``` `summary()` lists the calibration so that you can check it: the temperature at the anchor pixels, dT, the ETrF at the anchors and the share of pixels with ETrF above 1.1. In this Landsat 7 example about 5% of the pixels have ETrF above 1.1 (0.7% in the Landsat 8 vignette). Values slightly above 1.1 are common over well-watered crops; a large share would point to a poor cold anchor. Now we can plot the results using: ```{r, fig.width = 5} plot(Energy.Balance$EB) ``` ## Daily Crop Evapotranspiration (ET_24) estimation To estimate the daily crop evapotranspiration from the *Landsat scene* we need the daily reference ET (ETr) at the weather station. `ET24h()` calculates it for the day of the image (with `dailyET()`, ASCE-EWRI 2005) and estimates the daily crop ET pixel by pixel. It returns the layers `ETinst`, `ETrF`, `ET24` and `HgtRnG`: ```{r, fig.width = 5, warning=FALSE} ET.24 <- ET24h(Energy.Balance) plot(ET.24$ET24) ``` ## References Allen, R. G., Tasumi, M., & Trezza, R. (2007). Satellite-based energy balance for mapping evapotranspiration with internalized calibration (METRIC)-Model. Journal of Irrigation and Drainage Engineering, 133(4), 380-394. https://doi.org/10.1061/(ASCE)0733-9437(2007)133:4(380) Bastiaanssen, W. G. M., Menenti, M., Feddes, R. A., & Holtslag, A. A. M. (1998). A remote sensing surface energy balance algorithm for land (SEBAL). 1. Formulation. Journal of Hydrology, 212-213, 198–212. https://doi.org/10.1016/S0022-1694(98)00253-4