[Thread Prev][Thread Next][Index]

Re: malfunction of samplexy



Hello Torsten,
The SAMPLEXY function returns all missing values for your
example in the upcoming release of version 5.4 of Ferret, which
I believe is the correct behavior.  I see the inconsistency you are
pointing out when running Ferret version 5.22

The SAMPLEXY function finds the gridpoints immediately surrounding
the requested (x,y) pair and uses those four points to interpolate in
two dimentsions to that location.  If any of the data at those surrounding
grid locations is missing, the result returned is missing.  This is regardless
of whether the requested points are beyond the end of a modulo axis.

As always, if you would like to write a function with different behavior,
you are welcome to modify the code from the existing function.  It is
available on the External Functions webpage, at
http://ferret.pmel.noaa.gov/Ferret/External_Functions/internal_EF_code_contents.html
and any such function would be welcome as a contributed function.

Ansley Manke

Torsten Seifert wrote:

Dear Ferreteers

by applying samplexy to a regional snapshot of model output I got some strange results for sample points outside of the axis limits of the sample field. Please try the attached journal file.

It seems that only good points are filled with interpolated values. Initialisation of the full output buffer with blanks before interpolation should be sufficient. Then one will get blanks for outlying co-ordinates.
It would be nice if the author (Ansley Manke) could manage to correct samplexy.F soon.

Best regards

Torsten Seifert

-- 
Dr. Torsten Seifert
Institut fuer Ostseeforschung Warnemuende (IOW) an der Universitaet Rostock
D-18119 Rostock, Seestrasse 15, Germany
Phone +49-381-5197-118 Fax +49-381-5197-4812
 

!! this example shows the malfunction of samplexy occuring for (xpts,ypts)  !! lying outside of the axis limits of the array to sample from  !! direct listing with x+360 gives correct data (applying the modulo x) !! I would expect samplexy to return missings for unvalid (xpts,ypts) !! this could be achieved by initialising the return buffer with missings !! in samplexy.F (interpolation runs obviously only for good (xpts,ypts) there) !! torsten.seifert@io-warnemuende.de SET DATA coads_climatology SHOW DATA coads_climatology let xv={30, 390} let yv={60, 60} let sst_xy=samplexy(sst,xv,yv) list sst_xy list sst[x=30,y=60], sst[x=390,y=60]

--
Ansley Manke  Pacific Marine Environmental Laboratory  Seattle WA  (206)526-6246
 


[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement