Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Anchor
surrounding_points_indexes
surrounding_points_indexes
number vector or list surrounding_points_indexes ( fieldset,list )
number vector or list surrounding_points_indexes ( fieldset,number,number )

Returns the indexes of the four gridpoints surrounding the given location, ordered by increasing distance from the target point. If a list is given, it must contain two numbers - latitude and longitude. If two numbers are given, the first is the latitude, the second the longitude. The field must be a gridded field. If the fieldset has only one field, a number single vector of indexes is returned; otherwise a list of vectors is returned. In the case where the field is a reduced Gaussian grid and the input location is at the North or South pole, beyond the most extreme row of points, there will be a 'circle' of surrounding points, and all of these indexes are returned.Where it is not possible to generate a sensible value due to lack of valid data in the fieldset, nil is returned

By default, if any of the surrounding points are missing, the function will return nil. To prevent this, and to return all the points regardless, add the option 'all' as the last parameter of the function call.


Anchor
tanlat
tanlat
fieldset tanlat ( fieldset )

...