{"action":"created","issue":{"url":"https://api.github.com/repos/NOAA-PMEL/Ferret/issues/896","repository_url":"https://api.github.com/repos/NOAA-PMEL/Ferret","labels_url":"https://api.github.com/repos/NOAA-PMEL/Ferret/issues/896/labels{/name}","comments_url":"https://api.github.com/repos/NOAA-PMEL/Ferret/issues/896/comments","events_url":"https://api.github.com/repos/NOAA-PMEL/Ferret/issues/896/events","html_url":"https://github.com/NOAA-PMEL/Ferret/issues/896","id":276269638,"number":896,"title":"SAMPLEXYT function (incorrectly) samples beyond end of data","user":{"login":"karlmsmith","id":16406727,"avatar_url":"https://avatars0.githubusercontent.com/u/16406727?v=4","gravatar_id":"","url":"https://api.github.com/users/karlmsmith","html_url":"https://github.com/karlmsmith","followers_url":"https://api.github.com/users/karlmsmith/followers","following_url":"https://api.github.com/users/karlmsmith/following{/other_user}","gists_url":"https://api.github.com/users/karlmsmith/gists{/gist_id}","starred_url":"https://api.github.com/users/karlmsmith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karlmsmith/subscriptions","organizations_url":"https://api.github.com/users/karlmsmith/orgs","repos_url":"https://api.github.com/users/karlmsmith/repos","events_url":"https://api.github.com/users/karlmsmith/events{/privacy}","received_events_url":"https://api.github.com/users/karlmsmith/received_events","type":"User","site_admin":false},"labels":[{"id":323826821,"url":"https://api.github.com/repos/NOAA-PMEL/Ferret/labels/bug","name":"bug","color":"fc2929","default":true},{"id":757390769,"url":"https://api.github.com/repos/NOAA-PMEL/Ferret/labels/P:%20high","name":"P: high","color":"f9d0c4","default":false},{"id":758304177,"url":"https://api.github.com/repos/NOAA-PMEL/Ferret/labels/S:%20blocker","name":"S: blocker","color":"880000","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2017-11-23T05:31:48Z","updated_at":"2017-11-23T05:31:49Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"**Reported by steven c hankin on 22 Jan 2009 22:14 UTC**\n\n```\n! err_samplexyt.jnl\n! 1/2009\n\n! the SAMPLEXYT function giver erroneous results for T sample points that lie\n! beyond the end of the T axis of the grid being sampled\n\ndefine axis/x=0:360:180/units=longitude/edges/modulo x1\ndefine axis/y=-90:90:45/units=latitude/edges y1\ndefine axis/t0=1-jan-1990/t=1-jan-1991:31-dec-1991:1/units=days/edges t1\ndefine grid/x=x1/y=y1/t=t1 g1\n\nlet my_data = 0*x[AXIS/T0=1-JAN-1990/T=1-JAN-1990:31-DEC-1992:40/UNITS=DAYS/EDGES TSAMPLES\nLET TPTS = XSEQUENCE(T[GT=TSAMPLES](g=g1]+y[g=g1]+t[g=g1]\n\nDEFINE))\nLET YPTS = XSEQUENCE((RANDU(TPTS)-0.5)*90)\nLET XPTS = 180 + 0*YPTS\nLET errpts =  SAMPLEXYT(my_data,xpts,ypts,tpts)\n\n \n!  NOTE THAT THE SAMPLEXYT CORRECTLY FLAGS POINTS BEFORE THE START OF THE TIME INTERVAL\n!  AS MISSING VALUES.  BUT WHAT IS IT DOING FOR THE POINTS THAT LIE ABOVE THE END OF THE\n!  TIME INTERVAL?\n\n! HERE WE SHOW THE PROBLEM WITH A LISTING\nlist ypts, tpts, errpts\n\n! AND HERE WE SHOW IT GRAPHICALLY\ncancel mode calendar\nset view upper\nshade/hlim=20:1100 my_data[view lower\nplot/vs/xlim=20:1100/ylim=0:1000 tpts, 0*MISSING(errpts,0) + 500\nplot/vs/color=red/over tpts, errpts\n\n```\n\nThe upper end of the time axis of my_data is at 728\n\n```\n! HERE WE SHOW THE PROBLEM WITH A LISTING\nlist ypts, tpts, errpts\n             X: 0.5 to 28.5\n Column  1: YPTS is XSEQUENCE((RANDU(TPTS)-0.5)*90)\n Column  2: TPTS is XSEQUENCE(T[GT=TSAMPLES](x=180]\n\nset))\n Column  3: ERRPTS is SAMPLEXYT(MY_DATA,XPTS,YPTS,TPTS)\n            YPTS   TPTS  ERRPTS\n1    /  1:  20.54    20.   ....\n2    /  2: -29.07    60.   ....\n3    /  3:  26.64   100.   ....\n4    /  4: -28.97   140.   ....\n5    /  5: -17.10   180.   ....\n6    /  6:  -8.79   220.   ....\n7    /  7: -26.49   260.   ....\n8    /  8:  -9.00   300.   ....\n9    /  9: -19.19   340.   ....\n10   / 10: -19.84   380.  360.2\n11   / 11: -44.11   420.  375.9\n12   / 12:  34.07   460.  494.1\n13   / 13:  34.63   500.  534.6\n14   / 14:  -6.60   540.  533.4\n15   / 15: -39.01   580.  541.0\n16   / 16: -25.63   620.  594.4\n17   / 17: -22.97   660.  637.0\n18   / 18: -30.91   700.  669.1\n19   / 19: -22.52   740.  711.7\n20   / 20: -20.65   780.  733.5\n21   / 21: -41.66   820.  732.4\n22   / 22:  39.14   860.  833.2\n23   / 23:  22.88   900.  836.8\n24   / 24: -41.03   940.  792.9\n25   / 25:  33.35   980.  887.2\n26   / 26:  22.54  1020.  896.3\n27   / 27:  13.98  1060.  907.7\n28   / 28:  21.99  1100.  935.6\n```\n\nSo what are the values that the function appears to be sampling above 728?\n\n\nMigrated-From: http://dunkel.pmel.noaa.gov/trac/ferret/ticket/1624"},"comment":{"url":"https://api.github.com/repos/NOAA-PMEL/Ferret/issues/comments/346534770","html_url":"https://github.com/NOAA-PMEL/Ferret/issues/896#issuecomment-346534770","issue_url":"https://api.github.com/repos/NOAA-PMEL/Ferret/issues/896","id":346534770,"user":{"login":"karlmsmith","id":16406727,"avatar_url":"https://avatars0.githubusercontent.com/u/16406727?v=4","gravatar_id":"","url":"https://api.github.com/users/karlmsmith","html_url":"https://github.com/karlmsmith","followers_url":"https://api.github.com/users/karlmsmith/followers","following_url":"https://api.github.com/users/karlmsmith/following{/other_user}","gists_url":"https://api.github.com/users/karlmsmith/gists{/gist_id}","starred_url":"https://api.github.com/users/karlmsmith/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/karlmsmith/subscriptions","organizations_url":"https://api.github.com/users/karlmsmith/orgs","repos_url":"https://api.github.com/users/karlmsmith/repos","events_url":"https://api.github.com/users/karlmsmith/events{/privacy}","received_events_url":"https://api.github.com/users/karlmsmith/received_events","type":"User","site_admin":false},"created_at":"2017-11-23T05:31:49Z","updated_at":"2017-11-23T05:31:49Z","author_association":"CONTRIBUTOR","body":"**Comment by ansley.b.manke on 23 Jan 2009 21:12 UTC**\nThis is fixed in the external function SAMPLEXYT and the shared object file installed on porter and stout.\n\nFor future releases, I have included this function in the statically-linked function.\n\nA benchmark test is added to the test suite.\n\n"}}
{"actor":{"display_login":"karlmsmith"}}