How to interpolate data to finer resolution

I have a dataset like this:

DFgrid= data.frame(
  lon=c(59.25, 59.75, 60.25, 60.75, 61.25, 61.75, 57.25, 57.75, 58.25, 58.75, 59.25, 59.75, 60.25, 60.75, 61.25, 61.75, 62.25, 57.25, 57.75, 58.25, 58.75, 59.25, 59.75, 60.25, 60.75, 61.25, 61.75, 62.25, 62.75, 53.25),
  lat=c(25.25, 25.25, 25.25, 25.25, 25.25, 25.25, 25.75, 25.75, 25.75, 25.75, 25.75, 25.75, 25.75, 25.75, 25.75, 25.75, 25.75, 26.25, 26.25, 26.25, 26.25, 26.25, 26.25, 26.25, 26.25, 26.25, 26.25, 26.25, 26.25, 26.75),
  value= rnorm(30)
)

Each value has the corresponding geographical coordinate at the centroid. This is at 0.5 degree (1/4) spatial resolution, how to interpolate to 0.0625 degree (1/16) centroid values? And how to interpolate to 1 degree spatial resolution centroid values in R? There are many grid cells.
Thanks for your help.

How to interpolate the dataset in R? Thanks for your help.

I'm not quite sure I understand your context yet: Do you need specific values to appear in the grid, or do you just need a grid with a specific resolution?

I meant for each grid, there are corresponding values at the centroid. In my sample above, it represents average value at each grid cell. In fact at each grid cell, there is a vector of values. For example, the text file file_25.25_59.25.txt, there is a column with one year's daily data. I averaged to one value at each grid cell.

My point is that how to disaggregate the grid cell values. One grid cell will generate similar values for smaller grid cells. The corresponding coordinates are all combinations from longitude2 and latitude2.

> longitude2 = seq(53.29167,62.70833,1/12) #each grid cell is 1/12th
> latitude2= seq(26.70833,25.29167,-1/12)

Or how to aggregate values from the 1/12th to 1/4th grid cells taking the mean of the grid cell values? Thanks for your help.

Thanks, @Ellenz: I think it might help if you could provide a pair of very small 'before and after' tables; that is, one that represents the state before achieving what you want, and the other being exactly the result you'd like to end up with. That would make it easier for folks to help, especially if they (like me) are not familiar with the vocabulary you're using.

1 Like

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.