Hi Peter, The curv_to_rect_map function computes the mapping function, which does store information using all four dimensions: the original X and Y dimensions represent the output longitude, latitude grid, and Z and T directions are used to save information about four neighbors (hence K=1:4) and the indices of the input longitude and latitude grids are saved using the T dimension. This is described a bit more near the end the documentation of the curv_to_rec_map function, where it says "The weights are based on the distance..." Your odd result is I think because the lon,lat curvilinear coordinate variables must be on the same 2D grid of index values as the variable you are regridding, but you have read them in as 1-dimensional variables. Lon and lat should have the same grid as prec[d=2], so that you could make a curvilinear plot using a command like fill prec[d=2], lon, lat and then you could regrid prec[d=2] to a rectilinear grid using the two functions curv_to_rect_map and curv_to_rect. Ansley Peter Szabo wrote:
|