The original post is here, but it has been closed.
If the gridded DFgrid dataset is like this:
longitude latitude elevation precip temp
1 44.00 -64.00 0.00 1.1 12
2 44.25 -64.00 0.25 1.5 12
3 44.50 -64.00 0.50 1 13
4 44.75 -64.00 0.75 1.2 14
5 45.00 -64.00 1.00 0.1 12
6 44.00 -63.75 0.25 0.1 12
7 44.25 -63.75 0.50 1.3 12
8 44.50 -63.75 0.75 1.4 8
9 44.75 -63.75 1.00 1.4 9
10 45.00 -63.75 1.25 1 12
11 44.00 -63.50 0.50 1.8 9
12 44.25 -63.50 0.75 1 8
13 44.50 -63.50 1.00 0.5 10
14 44.75 -63.50 1.25 0.6 11
15 45.00 -63.50 1.50 0.7 11
16 44.00 -63.25 0.75 1 10
17 44.25 -63.25 1.00 1 10
18 44.50 -63.25 1.25 1 6
19 44.75 -63.25 1.50 1.1 7
20 45.00 -63.25 1.75 1.2 0
21 44.00 -63.00 1.00 1 1
22 44.25 -63.00 1.25 1 0
23 44.50 -63.00 1.50 1.6 1
24 44.75 -63.00 1.75 1.6 1
25 45.00 -63.00 2.00 1 2
And if I know elevations at new_points (which change more abruptly than DFgrid), how to predict precip and temp at new_points?
For example, the elevations in DFgrid represent the average elevation of each grid cell. In new_points, the elevations at each station point may be higher or lower than the average elevation at that grid cell.
If new_points looks like this, how to predict precipitation and temperature from DFgrid to new_points, and consider the elevation effects (specifically, lapse rate for temperature and orographic effect for precipitation? Thanks for your help.
new_points <- tibble(
longitude = c(44.1, 44.9),
latitude = c(-63.9, -63.1),
elevation = c(-5, 10)
)
Another question is that what is the difference between dataframe and tibble? Thanks very much.