water : Tools and Functions to Estimate Actual Evapotranspiration Using Land Surface Energy Balance Models in R by

The crop water requirement is a key factor in the agricultural process. It is usually estimated throughout actual evapotranspiration (ETa). This parameter is the key to develop irrigation strategies, to improve water use efficiency and to understand hydrological, climatic, and ecosystem processes. Currently, it is calculated with classical methods, which are difficult to extrapolate, or with land surface energy balance models (LSEB), such as METRIC and SEBAL, which are based on remote sensing data. This paper describes water, an open implementation of LSEB. The package provides several functions to estimate the parameters of the LSEB equation from satellite data and proposes a new object class to handle weather station data. One of the critical steps in METRIC is the selection of “cold” and “hot” pixels, which water solves with an automatic method. The water package can process a batch of satellite images and integrates most of the already published sub-models for METRIC. Although water implements METRIC, it will be expandable to SEBAL and others in the near future. Finally, two different procedures are demonstrated using data that is included in water package. Introduction and motivation The crop water requirement is a key factor in the agricultural process. It is usually estimated throughout actual evapotranspiration (ETa). An accurate quantification of ETa helps to develop irrigation strategies, improve the efficiency of water use and increase the irrigated area and the production (Millar, 1993; Baruch and Fisher, 1991; Ferreyra et al., 1985). Traditional methods to estimate ETa are based on (a) direct measurements by sophisticated instruments, such as lysimeters (Payero and Irmak, 2008; López-Urrea et al., 2009), Eddy covariance systems (Paço et al., 2006; Parent and Anctil, 2012; Poblete-Echeverría and Ortega-Farias, 2013) or Bowen ratios (Cragoa and Brutsaert, 1996; Ortega-Farías et al., 1995; Twine et al., 2000), or on (b) empirical methods, such as the FAO-56 approach (Allen et al., 1998). This method uses a reference evapotranspiration (ETr) from an automatic weather station multiplied by crop coefficients (Kc) from literature (Allen et al., 2005). Although all these methods can be accurate enough, they are restrictive to be extrapolated to a farm or a regional level since they do not take into account the effect that the spatial and temporal variation of the soil, the climate and the crop have over the ETa (Allen et al., 2011). However, new physical methods to estimate ETa have been developed using remote sensing data, considering the land spatial and temporal patterns. A major restriction for the estimation of ETa using remote sensing is the need of an absolute surface temperature for calibration. One of the first methods to be developed and applied worldwide was the Surface Energy Balance Algorithms for Land (SEBAL) model (Bastiaanssen et al., 1998a,b). This model calculates ETa from satellite-based land surface energy balance (LSEB) equation and uses a near-surface temperature gradient (dT) for calibration. dT is computed by taking two pixels with extreme water condition (anchor pixels) selected in the scene to generate a linear relationship between surface temperature and the difference between surface and air temperatures. Based on this, Allen et al. (2007b) developed the Mapping EvapoTranspiration at High Resolution with Internalized Calibration (METRIC) model. The main difference between SEBAL and METRIC is that the latter uses the ETr from a weather station, incorporating climatic conditions, while SEBAL uses the potential evaporation from a water body in the scene considering that sensible heat and soil heat fluxes are zero. METRIC has been widely applied to estimate ETa at field and regional scale over different crops such as wheat, corn, soybean and alfalfa, with errors ranging between 3 and 20% (Allen et al., 2007a; Choi et al., 2009; Mkhwanazi and Chávez, 2012). In recent years METRIC has been used to compute ETa over sparse woody canopies such as vineyards and olive orchards (Carrasco-Benavides et al., 2012, 2014; Santos et al., 2012; Pôças et al., 2014) in both flat and mountainous terrains (Allen et al., 2013b). The current implementations of SEBAL and METRIC imply the need to use more than one software to run the model (Allen et al., 2010) and they involve multiple steps. There are many different submodels published for the estimation of some parameters (e.g. leaf area index, momentum roughness length, land surface temperature) that are not integrated into the current implementation of METRIC. Allen et al. (2013a) proposed a methodology for an automation procedure by using statistical conditions The R Journal Vol. 8/2, December 2016 ISSN 2073-4859 CONTRIBUTED RESEARCH ARTICLES 353 and expert knowledge. This technique reduced the effect of human criteria helping to increase the model robustness. However, a software tool for the automatic selection of anchor pixels has not been published yet. About land surface energy balance models and crop evapotranspiration As mentioned above, METRIC estimates ETa as the residual from the surface energy balance equation considering information from satellite images and weather stations located near to the study site. Bellow, the key equations are detailed, beginning with the estimation of ETa as the residual from the surface energy balance equation:


Introduction and motivation
The crop water requirement is a key factor in the agricultural process.It is usually estimated throughout actual evapotranspiration (ET a ).An accurate quantification of ET a helps to develop irrigation strategies, improve the efficiency of water use and increase the irrigated area and the production (Millar, 1993;Baruch and Fisher, 1991;Ferreyra et al., 1985).
Traditional methods to estimate ET a are based on (a) direct measurements by sophisticated instruments, such as lysimeters (Payero and Irmak, 2008;López-Urrea et al., 2009), Eddy covariance systems (Paço et al., 2006;Parent and Anctil, 2012;Poblete-Echeverría and Ortega-Farias, 2013) or Bowen ratios (Cragoa and Brutsaert, 1996;Ortega-Farías et al., 1995;Twine et al., 2000), or on (b) empirical methods, such as the FAO-56 approach (Allen et al., 1998).This method uses a reference evapotranspiration (ET r ) from an automatic weather station multiplied by crop coefficients (K c ) from literature (Allen et al., 2005).Although all these methods can be accurate enough, they are restrictive to be extrapolated to a farm or a regional level since they do not take into account the effect that the spatial and temporal variation of the soil, the climate and the crop have over the ET a (Allen et al., 2011).
However, new physical methods to estimate ET a have been developed using remote sensing data, considering the land spatial and temporal patterns.A major restriction for the estimation of ET a using remote sensing is the need of an absolute surface temperature for calibration.One of the first methods to be developed and applied worldwide was the Surface Energy Balance Algorithms for Land (SEBAL) model (Bastiaanssen et al., 1998a,b).This model calculates ET a from satellite-based land surface energy balance (LSEB) equation and uses a near-surface temperature gradient (dT) for calibration.dT is computed by taking two pixels with extreme water condition (anchor pixels) selected in the scene to generate a linear relationship between surface temperature and the difference between surface and air temperatures.Based on this, Allen et al. (2007b) developed the Mapping EvapoTranspiration at High Resolution with Internalized Calibration (METRIC) model.The main difference between SEBAL and METRIC is that the latter uses the ET r from a weather station, incorporating climatic conditions, while SEBAL uses the potential evaporation from a water body in the scene considering that sensible heat and soil heat fluxes are zero.
METRIC has been widely applied to estimate ET a at field and regional scale over different crops such as wheat, corn, soybean and alfalfa, with errors ranging between 3 and 20% (Allen et al., 2007a;Choi et al., 2009;Mkhwanazi and Chávez, 2012).In recent years METRIC has been used to compute ET a over sparse woody canopies such as vineyards and olive orchards (Carrasco-Benavides et al., 2012, 2014;Santos et al., 2012;Pôças et al., 2014) in both flat and mountainous terrains (Allen et al., 2013b).
The current implementations of SEBAL and METRIC imply the need to use more than one software to run the model (Allen et al., 2010) and they involve multiple steps.There are many different submodels published for the estimation of some parameters (e.g.leaf area index, momentum roughness length, land surface temperature) that are not integrated into the current implementation of METRIC.Allen et al. (2013a) proposed a methodology for an automation procedure by using statistical conditions The R Journal Vol.8/2, December 2016 ISSN 2073-4859 and expert knowledge.This technique reduced the effect of human criteria helping to increase the model robustness.However, a software tool for the automatic selection of anchor pixels has not been published yet.

About land surface energy balance models and crop evapotranspiration
As mentioned above, METRIC estimates ET a as the residual from the surface energy balance equation considering information from satellite images and weather stations located near to the study site.Bellow, the key equations are detailed, beginning with the estimation of ET a as the residual from the surface energy balance equation: where R n is calculated considering information obtained at the time of satellite overpass.Some correction processes are necessary, such as radiometric and atmospheric corrections.G is estimated using an empirical equation that considers mainly R n , surface temperature, normalized difference vegetation index (NDVI), soil-adjusted vegetation index (SAVI) and albedo.More detailed information concerning the equations and models used in METRIC can be found in Allen et al. (2007b).
H is the general equation of heat transport and is estimated using an approach called "calibration using inverse modeling at extreme conditions" (CIMEC) (Allen et al., 2013a).This method involves the selection of pixels with near extreme conditions (hot and cold anchor pixels) from which the ET a can be estimated and assigned.H is computed as follows: where dT is the difference between land surface and near-surface air temperatures, r ah is the aerodynamic resistance to heat transport (s • m −1 ), ρ is the air density (kg • m −3 ) and c p is the specific heat of air (1004 . dT is solved by using a linear relationship between air temperature and the estimated surface temperature of the the anchor pixels (Bastiaanssen et al., 1998a).To calculate r ah , wind speed is extrapolated to a height at which forces of buoyancy and mechanical mix are equal (about 200 meters), using an iterative correction process based on the Monin-Obhukov equations (Allen, 1996;Bastiaanssen et al., 1998a).
After LE from Equation 1, it is possible to compute the instantaneous evapotranspiration values: where ET inst is the instantaneous ET a at the satellite overpass (mm • h −1 ); 3600 is the conversion factor from seconds to hours; ρ w is the density of water (1000kg • m −3 ); and λ is the water latent heat of vaporization (J • kg −1 ).
Finally, the daily ET is computed pixel by pixel as: where ET inst in the instantaneous ET a estimated on equation 3; ET r is the standardized 0.5 m tall alfalfa reference evapotranspiration at the image time and ET r_24 is the cumulative 24 h ET r for the image day.The relationship between ET inst and ET r is the reference ET fraction and is the same as the alfalfa based coefficient, K c , and is used to extrapolate ET a from the image time to periods of 24 hours or longer (Allen et al., 2007b).

Sensible heat flux
As Allen et al. (2007b) mentioned, the computation of latent heat flux (LE) is only as accurate as the summed estimates for R n , G, and H.One of the weaknesses of METRIC model reported in the literature is the selection of the anchor pixels.Long and Singh (2013) and Morton (2013) indicated that the selection of anchor pixels is subjective and depends on the ability of the operator to search and isolate the most appropriates hot and cold pixels.This process produces important biases in the estimation of H. Also, Choragudi (2011); Wang et al. (2009) mentioned that METRIC was very sensitive to the selection of the hot pixel.A group of possible candidates could have minimal differences in some attributes, but these can generate a big bias in the estimations.It means that the estimation of H in METRIC is very sensitive to the selection of anchor pixels.
The objective of this article is to propose an open implementation of a land surface energy balance model (LSEB) as an R package that integrates most of the METRIC sub-models and allows automatic selection of the anchor pixels.In this version of the package, specific functions for METRIC model (Allen et al., 2007b) are provided.Apart from the previous features, this package: i) is written in R, one of the most used scientific programming languages; ii) can be automated for batch processing of many satellite images; iii) provides functions for loading and processing satellite images; iv) provides functions and a new class object to manage weather station data; and v) is a free and open software.

Package organization
The water package is developed in R to estimate actual evapotranspiration (ET a ) from Landsat satellite scenes using Land Surface Energy Balance (LSEB) models, such as METRIC (Allen et al., 2007b).
Functions in water package are arranged in three groups: i) general functions to estimate subcomponents of LSEB (e.g.leaf area index, albedo, land surface temperature, momentum roughness length); ii) specific functions to estimate the components of LSEB; iii) internal functions and methods to handle data from a weather station using a new proposed S3 class and functions to control global options such as saving results to disk, overwrite files, etc.
The first group of functions consist of models and equations to estimate the sub-components, which generally are controlled by the argument method.Most of the models available here are presented in the Appendix.In the second group, there are three functions: i) METRIC.Rn(); ii) METRIC.G() and iii) METRIC.EB().The first one estimates net radiation using METRIC model.The second one estimates soil heat flux, and the third one estimate all the components of energy balance: R n , G, H and LE according to METRIC model.Three example datasets are provided with the water package: i) a subset of a Landsat 7 scene path 223, row 85 from 15th February 2013, bands 1 to 7; ii) data from a weather station from the same Landsat subset in CSV file format (comma separated values); iii) a subset of NASA SRTM digital elevation model, with the same spatial extent as the example image.These datasets are used in examples in Sections Simple procedure and Advanced procedure, and also in the vignettes included with the package.
The water package is available on The Comprehensive R Archive Network at https://CRAN.R-project.org/package=water.This software is made freely available under the terms and conditions of the GNU General Public License.

Key functions in the water package
The key functions included in the package are: The METRIC.EB() This is the main function of water package.It runs each of the sub-models needed to get all the components of the LSEB (equation 1), from satellite and weather station data.The input arguments are: a satellite scene and a "waterWeatherStation" object.The arguments alb.coeff,LAI.method, Zom.method and anchors.methodallow choosing between the different sub-models or coefficients used.More information about the sub-models available in water is presented in the Appendix.An optional logical argument is plain, which allows to use a digital elevation model or to consider that the surface is flat.When using a digital elevation model, the net radiation estimation and the land surface temperature are corrected using the elevation, slope and aspect of the surface.The output of this function is a raster layer object (from raster package) with 4 different layers: net radition, soil heat flux, sensible heat flux and surface temperature.
ET24h() This function estimates the ET r for a 24-hour period.The input arguments are the compo- nents of the LSEB (R n , G, H) and a "waterWeatherStation" object.The argument ET allows to select between two ET r methods.ET="ETo", is the method for short crops, similar to clipped, cool-season grass and ET="ETr", is the method for tall crops, similar to 0.5 m tall full-cover alfalfa.By default, it will use ET="ETr", but the user should choose according to the conditions of the weather station.The output of this function is a raster layer object (from raster package) with the 24-hour ET a in mm • day −1 .
METRIC.EB() uses many different steps to estimate the parameters needed to calculate the compo- nents of the LSEB.These steps are available as individual functions like: albedo() This function is used to calculate the broadband albedo from narrowband satellite data.
This process involves applying a weighting function with empirical coefficients.water includes models and coefficients described by Tasumi et al. (2008) and Liang (2001), as well as new coefficients for Landsat 8 estimated by The Simple Model of the Atmospheric Radiative Transfer of Sunshine (SMARTS2) version 2.9.5 (Gueymard, 1995).coeff="Olmedo" computes clear sky spectral irradiances for the spectral range of each Landsat 8 OLI band (see Appendix, Section Included models for albedo).The output of this function is a raster layer object (from raster package) with the albedo.
LAI() This function estimates the leaf area index (LAI) from Landsat data.water includes many different models to estimate LAI (see Appendix, Section Included models for Leaf Area Index).
In the Examples Section of this article, the METRIC 2010 method (Allen et al., 2010) will be used.This method estimates LAI from SAVI (Huete, 1988), as follows: where ρ is the reflectance at the top-of-atmosphere from R, the red band, and from N IR, the near infrared band; L is a soil correction factor.By default water uses L=0.5, although Allen et al. (2007b) suggested a value of L=0.1 in METRIC applications for western USA.This value varies by the amount or coverage of green vegetation: in very high coverage vegetation regions, L=0 and SAVI = NDVI; in areas with no green vegetation, L=1.Then SAVI is used to estimate LAI as follows: The output of this function is a raster layer object (from raster package) with the estimated LAI.
As it was mentioned before, the critical part in the estimation of the LSEB is the sensible heat flux estimation.The key functions used to estimate this are: momentumRoughnessLength(); calcAnchors() and calcH().

momentumRoughnessLength()
And if mountainous=TRUE, this value of Z om is corrected as: The output of this function is a raster layer object with the estimated Z om calcAnchors() This function automatically select anchor pixels that represent the dry and wet ends of the ET spectrum within the satellite scene using information of land surface characteristics (LAI, albedo, Z om , T s ).When the anchor pixels are found, it assigns the ET a estimates.The criteria to select "hot" and "cold" pixels were adapted from Allen et al. (2011), Tasumi (2003) and shown in Table 2.The methodology searches for image-specific pixels with the lowest and highest temperature values that match with these criteria.The output of this function is a data frame with the coordinates of the selected anchor pixels.
calcH() This function applies the CIMEC self-calibration method in order to generate an iterative process for the "hot" and "cold" pixels and absorb all biases in the computation of H.A near surface temperature difference (dT) is used in place of a surface air temperature difference to drive the determination of sensible heat flux, in an iterative correction process.The convergence of the function is reached when the change in the estimated aerodynamic resistance is less than 1% for the cold and hot condition.There is an argument called verbose to control how much information about the iterative process is shown in the output.The output of this function is a raster layer object with the estimated soil heat flux.

Input data requirements
METRIC uses two sources to estimate the LSEB: a satellite image and a weather station with hourly data.
METRIC can be run using different satellite sensors.Currently, the coefficients needed for Landsat 7 and 5 are available in Allen et al. (2007b).Those coefficients can also be applied to Landsat 8 data.In the Appendix Section Included models for albedo, we propose specific coefficients for the estimation of albedo using this satellite sensor.Other coefficients to run METRIC using MODIS images are available in Allen et al. (2007b), and will be included in future versions of water package.
The weather station data should include near-surface air temperature, wind speed, relative humidity and solar radiation.The water package uses the function read.WSdata() to convert the weather station data from a comma-separate values table to a special R object.The input data should be on an hourly or shorter time basis.The expected units are • C for temperature; m • s −1 for wind speed; % for relative humidity and W • m −2 for solar radiation.However, this function uses a parameter cf when conversion factors are needed to convert the variables from different units (e.g. if wind speed is in km • h −1 the conversion factor for this variable should be 0.278).To estimate ET r from the weather station data using Allen et al. (2005) equation, more information is needed: position in latitude and longitude, and the wind sensor height in meters.When the weather station data is being imported, a satellite metadata file can be included as a function argument.This allows interpolating the weather conditions at the exact moment of the satellite overpass.
The water package only uses one weather station to estimate ET r for an entire Landsat scene of 180 × 180 km.The model uses ET r to derive the ET reference fraction (ET r F) at image time (using equation 4).This assumes that ET a in the entire area changes in proportion to the change in ET r at the weather station (Allen et al., 2007b).This means that ET r is only used as an index of the relative The R Journal Vol.8/2, December 2016 ISSN 2073-4859 change and this is retained through the ET r F. Any biases caused by variation in weather conditions should be canceled by using the same ET r F for both instantaneous and 24 h period.Nevertheless, it is recommended to use a spatial mask when the weather conditions are heterogeneous, for example in irrigated areas surrounded by deserts.

Performance and memory use
The water package uses large temporal memory in order to obtain the results and sub products.Most of the results are "RasterLayer" or "RasterStack" objects from raster package (Hijmans, 2015).
Processing an entire Landsat scene could need more than 2 gigabytes of memory to store the temporal data.One approach to solve this is to write products and sub-products to the disk.There is an option writeResults=TRUE in function waterOptions() to force water to store the results on the disk, instead of on temporal memory.
If water runs out of memory while processing data, it will usually stop working without a warning message.We suggest processing only a portion of a Landsat scene using an area-of-interest (aoi) polygon or storing results to disk.

Example code and datasets
Two different approaches to estimate land surface energy balance demonstrate the features and procedures in water.The first example in Section Simple procedure is a simple procedure, and the second one in Section Advanced procedure refers to an advanced procedure.Finally, the estimation of ET a from the output of any of the previous procedures is demonstrated in Section Daily crop evapotranspiration estimation.
In Section Estimating ETa using METRIC model and water package functions createAoi() and read.WSdata() are summarized.Then, in Section Simple procedure function METRIC.EB() is shown.In Section Advanced procedure the LSEB is estimated step by step.And later, in Section Daily crop evapotranspiration estimation daily ET r is estimated using functions dailyET() and ET24h().

Base data preparation
To calculate METRIC Actual Evapotranspiration using water package, three sources are needed: 1.A raw Landsat 7-8 satellite image.

A Weather Station data (.csv file).
3. A polygon with our Area-of-interest (AOI) Spatial-Polygon object, to run the model using only a portion of the satellite scene.
First, AOI is created as a polygon using bottomright and topleft coordinates:  Then, the weather station data is loaded using the function read.WSdata().This function converts the CSV file into a "waterWeatherStation" object.Then, if a Landsat metadata file (MTL file) is provided, the time-specific weather conditions at the time of satellite overpass will be calculated.This is shown on Figure 1 as a gray bar.Files 'apples.csv' and 'L7.MTL.txt' are included in the package as raw data.In R, system.file() is used to call this files.csvfile <-system.file("extdata","apples.csv",package = "water") MTLfile <-system.file("extdata","L7.MTL.txt",package = "water") WeatherStation <-read.WSdata(WSdata=csvfile, date.format= "%d/%m/%Y", lat = -35.42222,long = -71.38639,elev = 201, height = 2.2, MTL = MTLfile) Next, the Landsat satellite image is loaded.water provides a function to load a Landsat image (loadImage()) from TIFF files.Landsat images can be downloaded directly from USGS archives in Earth Explorer (http://earthexplorer.usgs.gov/).In this article, an example dataset will be used which comes with water package as demonstration data.

image.DN <-L7_Talca
Finally, Digital Elevation Model (DEM) will be created for the area being processed.water provides two functions to do this: checkSRTMgrids() will search for the downloadable grid files in http://earthexplorer.usgs.gov/.However, this function will only print the links to the files.The downloading process has to be done manually.After this, prepareSRTMdata() can be used to mosaic and clip those files using the same extent of the image.In this article, the example data, provided with water package, will be loaded.

Simple procedure
The simple procedure is summarized on Figure 2. The function METRIC.EB() will be used to estimate the land surface energy balance.This function has many parameters to choose from the different METRIC model equations.e.g.changes can be made in: • Coefficients used to estimate broadband albedo from narrowband data.
• Model to estimate Leaf Area Index (LAI) from satellite data.
The R Journal Vol.8/2, December 2016 ISSN 2073-4859 The results of the energy balance estimated using this function are shown in Figure 3.The console output with information related to the anchor pixels goes like this: pixel X Y Ts LAI type 1 139253 282420 -3922830 323.1587 0.13 hot 2 121566 274710 -3921780 310.0151 4.40 cold

Advanced procedure
The advanced procedure involves running many different functions one-by-one, this is summarized in figures 4 and 5.These functions were run inside the code of METRIC.EB() in the previous example.Running water with this procedure allows to have more control in the different arguments used.

Net Radiation estimation
In order to calculate the R n for the loaded Landsat satellite data, a surface model (slope + aspect) from the DEM is calculated, then the solar angles (latitude, declination, hour angle and solar incidence angle) are calculated.Then incSWradiation() is used to calculate incoming solar radiation.When the function calcH() is runnig, and verbose=TRUE, the output shows the intermediate values of the CIMEC process parameters.Also, the value for the aerodynamic resistance and its change for every iteration is plotted iteratively by this function.This plot is shown on Figure 6.In this example, the change in the value of the aerodynamic resistance goes down after iteration #9, and in iteration #14 is less than 1%.

Daily crop evapotranspiration estimation
To estimate the daily actual evapotranspiration from the Landsat scene, the daily reference ET (ET r ) is needed.The daily ET r can be calculated with dailyET().This function calculates the cumulative 24h standardized reference evapotranspiration for the day of the image using the ASCE standardized Penman-Monteith method (Allen et al., 2005).Finally, 24h crop ET can be estimated for every pixel of the Landsat scene using the function ET24h() (Figure 7

Conclusions
The water package offers a fast and reliable platform for estimating actual evapotranspiration using the land surface energy balance.It includes different methods for many sub-models.The simple procedure showed in this article allows to estimate the ET a in a simple and fast way.The advanced procedure allows to have more control in the different available methods.Further versions of this package will implement other LSEB models such as SEBAL.Also, other satellite sensors such as MODIS will be included.Because water is written in R, a language very popular in the scientific community and published as free software, further developments could come from a wide community of users.
2. method="custom" (Allen et al., 2007b) Z om = exp((a * NDVI/albedo) + b) where a and b are the regression coefficients derived by adjusting a lineal model between log Z om ∼ NDVI/albedo for points inside the Landsat scene representing specific vegetation types.

Figure 1 :
Figure 1: Plot of the hourly weather station data.The conditions at the time of the sattelite overpass are marked by a gray bar.This is the default plot for waterWeatherStation objects.

Figure 2 :
Figure 2: Schematic diagram with the functions, data inputs and outputs used in the simple procedure when running the METRIC model with water package.The green rounded boxes represent data, the blue boxes represent the functions and the yellow box is the final result.

Figure 4 :
Figure 4: Schematic diagram with the functions, data inputs and outputs used in the advanced procedure when estimating Net Radiation and Soil Heat Flux running the METRIC model with water package.The green rounded boxes represent data and the blue boxes represent the functions.The functions marked with "*" have multiple methods available.

Figure 5 :
Figure 5: Schematic diagram with the functions, data inputs and outputs used in the advanced procedure when estimating the sensible heat flux running the METRIC model with water package.The green rounded boxes represent data, the blue boxes represent the functions and the yellow box is the final result.The functions marked with * have multiple methods available.

Figure 6 :
Figure 6: Leaf area index m 2 m −2 and the position of the hot pixel (red cross), cold pixel (blue X) and the weather station (circle with a X) (left).Change on aerodynamic resistance convergence in the iterative process for hot (red) and cold (blue) conditions (right).

Figure 7 :
Figure 7: Crop evapotranspiration in mm/day, estimated using METRIC and water package

Table 1 :
Table1shows some errors reported by METRIC models for different crops.It can be seen that net radiation (R n ) and soil heat flux (G) present the lowest Root mean square error (RMSE) of energy balance components estimated using METRIC for different crops estimation errors, while sensible heat flux (H), is the hardest component of the surface energy balance to estimate.
This function allows to import weather station data from a table in comma-separate values (CSV) format.The result is a new object of class "waterWeatherStation".The main input arguments are the CSV file and a vector with the order of the needed variables (radiation, temperature, wind speed and relative humidity) called columns.An optional argument is a Landsat metadata file (MTL).When this function is used with the CSV and the MTL files, it will interpolate the weather conditions to the moment of the satellite overpass.

Table 2 :
This function estimates the Momentum Roughness Length (Z Ranges of variables used for selection of anchor (cold and hot) pixels in calcAnchors(method="CITRA-MCB") (Allen et al., 2007b) vegetation height around the weather station.waterincludesseveralmethods to estimate Z om from Landsat data (see Appendix, Section Included models for Momentum Roughness Length).For example, when method="short-crops"(Allen et al., 2007b)Z om is estimated as:The R Journal Vol.8/2, December 2016 ISSN 2073-4859 5, or a < −2 * f LAI when f LAI < 0.5.And f LAI is the proportion of LAI lying above h/2.