I have a netcdf file named "precip.mon.mean.nc" downloaded from https://www.esrl.noaa.gov/psd/data/gridded/data.cmap.html. It is a monthly mean precipitation dataset and the resolution is 2.5x2.5.
I wonder how I can regrid the precipitation data into 1x1 and 3x3 resolution respectively using interpolation method such as Kriging or inverse distance weighted (IDW). Thanks for the help.
require(ncdf4)
Precipitation = nc_open(filename = "precip.mon.mean.nc")
Pre=ncvar_get(Precipitation,varid = "precip")
Pre[Pre=-9.96920996838687e+36]=NA
lon=ncvar_get(Precipitation,varid = "lon")
aa=which(lon==181.25)
lon[aa:length(lon)]=lon[aa:length(lon)]-360
lat=ncvar_get(Precipitation,varid = "lat")
Date=ncvar_get(Precipitation,varid = "time")
nc_close(Precipitation)
Time=as.Date(Date/24,origin="1800-01-01")