interpolateAirT: Function: Air temperature interpolation

Description Usage Arguments Details Value Note Author(s) References See Also Examples

Description

A function to interpolate reanalysed air temperature data using (empirical) lapse rates and a high-resolution Digital Elevation Model.

Usage

1
2
3
4
interpolateAirT(airT, lapseRate, demDiff, decimalPlaces = 4,
    outType = "mean", writeOutput = FALSE,
    outputName = "interpolatedAirT", tmpCreate = TRUE,
    tmpDir = "", outDir = "" )

Arguments

airT

An object of class 'RasterStack'. Distributed air temperature (Kelvin or degree Celsius). For every time step.

lapseRate

An object of class numeric. Temperature lapse rates (K m-1 or C m-1). For every time step.

demDiff

An object of class RasterLayer. Height difference (m) between a high-resolution DEM and a resampled DEM (of the same reanalysis dataset as airT).

decimalPlaces

An object of class 'numeric'. Number of decimal places (default = 4).

outType

An object of class 'character'. Type of output to be returned by the function: "mean" (default) sub-debris ice melt or "sum".

writeOutput

An object of class 'logical'. Determines whether the ouput shall be exported as 'RasterLayer' (TRUE) or not (FALSE, default).

outputName

An object of class 'character'. File name for the output 'RasterLayer(s)' (default = "interpolatedAirT").

tmpCreate

An object of class 'logical'. Determines whether a temporary directory should be used (TRUE) or not (FALSE, default). Recommendend if large datasets are processed.

tmpDir

An object of class 'character'. Directory where processing files can be temporarily stored if 'tmpCreate' = TRUE.

outDir

An object of class 'character'. Directory for the output files if 'writeOutput' = TRUE.

Details

Reanalysis data from general circulation models are often the only comprehensive and consistent source of meteorlogical data in remote mountain environments. However, they mostly do not resolve the complex topography and the impacts on air temperature and pressure distribution. Air temperatures in the accumulation areas are therefore generally too warm and those in the valleys too cold. This function uses (empirical) lapse rates and the height difference between a resampled reanalysis DEM and a high-resolution DEM to apply a vertical correction to the reanalysed air temperature distribution. For more details please refer to the given examples or the original publication (Groos et al., submitted, Equation 8).

Value

An object of class 'RasterLayer' returning the interpolated air temperature distribution (in Kelvin or degree Celsius, depending on the input).

Note

File format of written ouput: GeoTIFF.

Author(s)

Alexander R. Groos (alexander.groos@giub.unibe.ch)

References

Groos, A.R., Mayer, C., Smiraglia, C., Diolaiuti, G., and Lambrecht A. (submitted). A first attempt to model region-wide glacier surface mass balances in the Karakoram: findings and future challenges. Geografia Fisica e Dinamica Quaternaria.

See Also

resampleStack, interpolateAirP

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# Load the provided RasterLayer objects as exemplary
# input for the function
data(airTemperature_10km_daily, dem_30m, srtm_dem_30m,
    package = "glacierSMBM")
# Individual RasterLayer objects should be loaded or
# created using the function raster()

# Calculate difference between SRTM1 DEM and resampled
# reanalysis DEM
DEM_Diff <- dem_30m - srtm_dem_30m

# Interpolate the temperature obtained from a reanalysis data set
# using a lapse rate and the altitude difference of the resampled
# reanalysis DEM and a high resolution DEM (e.g. SRTM1)
output <- interpolateAirT(airT = stack(airTemperature_10km_daily),
    lapseRate = 0.007, demDiff = DEM_Diff)

# Plot output
plot(airTemperature_10km_daily, main = "initial air
    temperature (10km)", legend.args=list(text='Temperature (K)',
    side=3, line=1.5))
plot(output, main = "interpolated air temperature (30m)",
    legend.args=list(text='Temperature (K)', side=3, line=1.5))

glacierSMBM documentation built on May 2, 2019, 3:42 a.m.