I've got a large netcdf (a small portion of the data is here) with the data in an even grid associated with an Albers Equal Area Conic projection. I've got the corresponding latitudes and longitudes here and here.
I want to take the information in this netcdf, and get interpolated values along a regular lat/lon grid, from 18.2W to 53E and 32.8S to 20N. For output, I'd like a 3-dimensional array with the x, y, and z axes being lon, lat, and time. Or a set of rasters that I can coerce to a 3d array in R.
How can this be done?
I know that I could write an R script where for each point in my regular lat/lon grid I identify the four nearest surrounding Albers points and take their inverse-euclidian-distance-weighted average. But this will be painfully slow to compute and difficult to program.
Are there any programs or tools that can help me to batch-interpolate a netcdf with a deep time dimension?
I'll have >100 of these to do, and each grid is 1152x1152.
I seek solutions in R, or anything that can be run in some sort of batch mode.
This was a case where I simply didn't know the names of the tools to use. Apparently, the "projectRaster" function in the
raster package (which relies on gdal) does what I need once I coerce my netcdf slices into raster objects. I had to do a bit of digging in metadata and obscure documentation to figure out proj4 syntax, but that was the extent of the difficulties.