Description
Currently, when generating point output on the SMC grid, the underlying (coarser resolution) regular grid is used to determine the interpolation weights, as per the regular grid behaviour. This is probably not what the user is expecting when requested an output location.
Furthermore, the SMC grid cell that is actually used within a particular regular grid cell is likely to be the largest SMC cell and possibly not adjacent to the requested location.
Example:
Key:
- Green grid is the underlying regular grid (25km)
- Blue grid is the SMC cells.
- Red point is the requested output location (ignore the fact that it is very close to the shore for now!)
- Green dots are the locations found in the underlying regular grid for interpolation (two are on land and are ignored)
- Blue triangles are the SMC grid cells associated with the green regular grid cells.
The wave spectra for interpolation are taken from the cells with the blue triangle; note how they are not where you might expect them to be with respect to the original point requested.
Describe the solution you'd like
A better solution for the SMC grid would be a simple nearest neighbour grid cell selection - i.e. for a requested point the enclosing SMC grid cell is used, rather than bilinear interpolation from the surrounding 4 cells.
The following existing subroutine in w3smcpmd.F90
may be useful in implementing this:
! W3SMCGMP Subr. Public Map lat-lon points to SMC grid cells.
SUBROUTINE W3SMCGMP( IMOD, NC, XLon, YLat, IDCl )