Skip to content

downscaling grid data; alternative for interp()?

2 messages · Klaus Vormoor, Paul Hiemstra

#
Hi,

I am struggling with this quite a while already, and I haven't found a good
solution so far.
I want to disaggregate precipitation data. For this I have a grid with daily
precipitation in 1x1 km resolution, and additionally 24 grids with 10x10 km
resolution giving percentage charge of hourly precipitation for the same day
as factors (range 0 to 1). The first grid is in UTM coordinates and the
other 24 are in longlat coordinates. Now, I want to transfer the factors
from the 10x10 km grids to grids of the same size as the 1x1 km daily
precipitation grid. What I have done so far is: 

1. Generate SpatialPoints with the longlat coordinates for the 10x10 km grid
(comming as netCDF).
2. Convert longlat coordinates to UTM coordinates (spTransform), adding the
data values to a SpatialPointDataFrame
3. Interpolate data from the converted SpatialPpointDataFrame to a grid of
the same size and extention as my 1x1 km grid by using the function interp()
from the akima package.  

However, instead of interpolating I'd rather like to use a kind of nearest
neigbour classification because I want to avoid "smoothing" of my factors.
Furthermore, interp() is relatively time consuming. Since I have to repeat
this procedure for many days, it would be nice to have a quicker
alternative. Does anyone have an idea?

Any hint is much appreciated.

Klaus  



--
View this message in context: http://r-sig-geo.2731867.n2.nabble.com/downscaling-grid-data-alternative-for-interp-tp6819843p6819843.html
Sent from the R-sig-geo mailing list archive at Nabble.com.
#
Hi,

A trick to get Nearest Neighbor (NN) is to use idw() from the gstat
package with setting the nmax parameter to 1. This limits the amount of
points used for the inverse distance weighted average to one, leading to
NN. I'm not sure if this is much faster than interp, but you can take a
look.

regards,
Paul
On 09/22/2011 11:45 AM, Klaus Vormoor wrote: