writeRaster.waterLSEB: writeRaster method for waterLSEB objects

writeRaster.waterLSEBR Documentation

writeRaster method for waterLSEB objects

Description

Writes the energy balance layers (x$EB) of a METRIC.EB() result to a file.

Usage

## S4 method for signature 'waterLSEB,character'
writeRaster(x, filename, ...)

Arguments

x

waterLSEB object, from METRIC.EB().

filename

output file name, e.g. "EB.tif"

...

additional arguments passed to terra::writeRaster(), e.g. overwrite

Value

The SpatRaster written to the file (x$EB), invisibly, as returned by terra::writeRaster().

Author(s)

María Victoria Munafó

See Also

Other LSEB objects related functions: plot.waterLSEB(), plotAnchors(), print.waterLSEB(), summary.waterLSEB()

Examples

MTL <- system.file("extdata", "L7.MTL.txt", package = "water")
WeatherStation <- read.WSdata(WSdata = system.file("extdata", "apples.csv", package = "water"),
  date.format = "%d/%m/%Y", lat = -35.42222, long = -71.38639, elev = 201, height = 2.2,
  cf = c(1, 0.2777778, 1), tz = "America/Santiago", MTL = MTL)
image.DN <- terra::rast(L7_Talca)[1:60, 1:80, drop = FALSE]
Energy.Balance <- METRIC.EB(image.DN = image.DN, WeatherStation = WeatherStation, MTL = MTL,
                            sat = "L7", thermalband = image.DN$Thermal1, plain = TRUE)
# writes the layers of the energy balance as a GeoTIFF file
writeRaster(Energy.Balance, tempfile(fileext = ".tif"))

water documentation built on Nov. 25, 2026, 5:08 p.m.