interpolateAirP: Function: Air pressure interpolation

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

Description

A function to interpolate reanalysed air pressure data using the barometric height formula.

Usage

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

Arguments

airP

An object of class 'RasterStack'. Distributed air pressure (Pa) to be interpolated. For every time step.

airT

An object of class 'RasterStack'. Distributed air temperature (Kelvin or degree Celsius) with the same spatial resolution as 'demDiff'. 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 airP).

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 = "interpolatedAirP").

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 pressure in high elevations is therefore overestimated and in the valleys underestimated. This function uses the barometric height formula with the height difference between a resampled reanalysis DEM and a high-resolution DEM as input to apply a vertical correction to the reanalysed air pressure distribution. For more details please refer to the given examples or the original publication (Groos et al., submitted).

Value

An object of class 'RasterLayer' returning the interpolated air pressure distribution (Pa).

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, interpolateAirT

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(airPressure_10km_daily, airTemperature_30m_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 air pressure obtained from a reanalysis data
# set using a lapse rate and the altitude difference of the
# resampled DEM and high resolution DEM (e.g. SRTM1)
output <- interpolateAirP(airP = stack(airPressure_10km_daily),
    airT = stack(airTemperature_30m_daily), lapseRate = 0.007,
    demDiff = DEM_Diff)

# Plot output
plot(airPressure_10km_daily, main = "air pressure (10km)",
    legend.args=list(text='Pressure (Pa)', side=3, line=1.5))
plot(output, main = "interpolated air pressure (30m)",
    legend.args=list(text='Pressure (Pa)', side=3, line=1.5))

Example output

Loading required package: raster
Loading required package: sp
Loading required package: udunits2
udunits system database read
sh: 1: awk: Permission denied
sh: 1: awk: Permission denied
sh: 1: awk: Permission denied
sh: 1: awk: Permission denied
sh: 1: awk: Permission denied
sh: 1: awk: Permission denied
sh: 1: awk: Permission denied
sh: 1: awk: Permission denied
sh: 1: awk: Permission denied
sh: 1: awk: Permission denied
sh: 1: awk: Permission denied
sh: 1: awk: Permission denied
sh: 1: awk: Permission denied
sh: 1: awk: Permission denied
sh: 1: awk: Permission denied

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