>  Docs Center  >  Libraries  >  Motley  >  MGH_INTERPOLATE

MGH_INTERPOLATE

MGH_INTERPOLATE

Name


  MGH_INTERPOLATE

Purpose


  This function is a wrapper for the standard IDL INTERPOLATE
  function. It corrects for the anomalous way INTERPOLATE
  handles locations near the upper end of the input array, described
  by the IDL documentation as follows:
    Note - INTERPOLATE considers location points with values between
    zero and n, where n is the number of values in the input array
    P, to be valid. Location points outside this range are
    considered missing data. Location points x in the range
    n-1 <= x < n return the last data value in the array P.
  Note the final sentence. It is much more logical to treat points
  in the range n-1 < x < n as missing, and this is what
  MGH_INTERPOLATE does. Note also that the anomalous behaviour
  described in the paragraph above is actually done only in the case
  of linear interpolation, whereas bilinear interpolation acts in
  the way I consider logical.

Calling Sequence


  result = MGH_INTERPOLATE(p, x)
  result = MGH_INTERPOLATE(p, x, y)
  result = MGH_INTERPOLATE(p, x, y, z)

Parameters


  See documentation for INTERPOLATE.

Return Value


  The function returns a single or double precision floating point array
  with size & shape determined by the x, y & z parameters and the GRID keyword.
###########################################################################
  This software is provided subject to the following conditions:
  1. NIWA makes no representations or warranties regarding the
    accuracy of the software, the use to which the software may
    be put or the results to be obtained from the use of the
    software. Accordingly NIWA accepts no liability for any loss
    or damage (whether direct of indirect) incurred by any person
    through the use of or reliance on the software.
  2. NIWA is to be acknowledged as the original author of the
    software where the software is used or presented in any form.
###########################################################################

Modification History


    Mark Hadfield, 2002-06:
      Written.



© 2020 Harris Geospatial Solutions, Inc. |  Legal
My Account    |    Store    |    Contact Us