lon_lat_fine {rainfarmr}R Documentation

Linear interpolation of longitude and latitude vectors to higher resolution

Description

Longitude and latitude vectors are interpolated higher resolution increasing dimensions by a factor nf. The grid spacings of the first two and of the last two elements are used to extrapolate at the boundaries.

Usage

lon_lat_fine(lon, lat, nf)

Arguments

lon

vector of longitudes.

lat

vector of latitudes.

nf

factor by which to increase resolution.

Value

List with elements lon and lat with resolution increased by factor nf.

Author(s)

Jost von Hardenberg, j.vonhardenberg@isac.cnr.it

Examples

lon <- 5:9
lat <- 43:47
nf <- 4
grid <- lon_lat_fine(lon, lat, nf)
grid$lon
# [1] 4.625 4.875 5.125 5.375 5.625 5.875 6.125 6.375 6.625 6.875 7.125 7.375
# [13] 7.625 7.875 8.125 8.375 8.625 8.875 9.125 9.375
grid$lat
# [1] 42.625 42.875 43.125 43.375 43.625 43.875 44.125 44.375 44.625 44.875
# [11] 45.125 45.375 45.625 45.875 46.125 46.375 46.625 46.875 47.125 47.375

[Package rainfarmr version 0.1 Index]