{"action":"created","issue":{"url":"https://api.github.com/repos/NOAA-PMEL/Ferret/issues/1287","repository_url":"https://api.github.com/repos/NOAA-PMEL/Ferret","labels_url":"https://api.github.com/repos/NOAA-PMEL/Ferret/issues/1287/labels{/name}","comments_url":"https://api.github.com/repos/NOAA-PMEL/Ferret/issues/1287/comments","events_url":"https://api.github.com/repos/NOAA-PMEL/Ferret/issues/1287/events","html_url":"https://github.com/NOAA-PMEL/Ferret/issues/1287","id":276353855,"number":1287,"title":"versions of ZAXREPLACE() for other axes","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":323826823,"url":"https://api.github.com/repos/NOAA-PMEL/Ferret/labels/enhancement","name":"enhancement","color":"84b6eb","default":true},{"id":758374189,"url":"https://api.github.com/repos/NOAA-PMEL/Ferret/labels/GFDL:%20medium","name":"GFDL: medium","color":"fbca04","default":false},{"id":757390773,"url":"https://api.github.com/repos/NOAA-PMEL/Ferret/labels/P:%20normal","name":"P: normal","color":"fef2c0","default":false},{"id":758304202,"url":"https://api.github.com/repos/NOAA-PMEL/Ferret/labels/S:%20normal","name":"S: normal","color":"fbca04","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":6,"created_at":"2017-11-23T12:13:40Z","updated_at":"2017-11-23T12:14:53Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"**Reported by andrew wittenberg on 20 Dec 2012 22:56 UTC**\nIt would be very helpful to have analogues of ZAXREPLACE() for the other axes: XAXREPLACE(), YAXREPLACE() etc.  I often use ZAXREPLACE to find the value of a field along a contour, which is not necessarily vertically oriented.  (One common use-case is computing a quantile function for a field that may have different numbers of missing values at different locations.)\r\n\r\nA workaround is to use TRANSPOSE_XZ and TRANSPOSE_ZX before and after ZAXREPLACE, but this is awkward and inefficient.\r\n\r\nNote that I am not asking for all many variants of ZAXREPLACE_*, just the vanilla ZAXREPLACE that does linear interpolation.\r\n\r\n\n\nMigrated-From: http://dunkel.pmel.noaa.gov/trac/ferret/ticket/2015"},"comment":{"url":"https://api.github.com/repos/NOAA-PMEL/Ferret/issues/comments/346603100","html_url":"https://github.com/NOAA-PMEL/Ferret/issues/1287#issuecomment-346603100","issue_url":"https://api.github.com/repos/NOAA-PMEL/Ferret/issues/1287","id":346603100,"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-23T12:14:53Z","updated_at":"2017-11-23T12:14:53Z","author_association":"CONTRIBUTOR","body":"**Comment by andrew.wittenberg on 18 Oct 2016 20:39 UTC**\nYes indeed, sorry for the oversight!\r\n\r\nOne minor issue: why do the following give slightly different vertical axes in the plot?\r\n\r\n```\r\n \tNOAA/PMEL TMAP\r\n \tFERRET v7.02 (beta/optim)\r\n \tLinux 2.6.32-642.1.1.el6.x86_64 64-bit - 10/13/16\r\n \t18-Oct-16 16:12     \r\n\r\nyes? use levitus_climatology\r\nyes? let zval = z[let a = zval[gz(temp)=0:30:1](gz=temp]+0*temp\r\nyes?)\r\nyes? let b = zaxreplace(zval,temp,z[can view; set view ul; shade/j=90 zval[gz(temp)=0:30:1](gz=0:30:1])\r\nyes?)\r\nyes? set view ur; shade/j=90 a\r\nyes? set view ll; shade/j=90 zaxreplace(zval,temp,z[set view lr; shade/j=90 b\r\n```\r\n\r\nI'm attaching the resulting plot.\r\n\r\nWhen shading the explicit expression (top left), the vertical axis is a half-cell narrower at the bottom and top, than when using a user-defined variable A (top right).  SHOW GRID/Z shows exactly the same info for both z[gz(temp)=0:30:1](gz=0:30:1])\r\nyes?) and A, and if we use /VLIMITS=0:30 then the plots look identical.  But for some reason the default vertical axis limits differ between them.  Is this a bug?\r\n\r\nI'm thinking that the top-right plot is the correct one.  For ZAXREPLACE, using either an expression or a user variable gives the same plot as the top right.  And it makes sense that the resulting z-centers are at the requested target points.\r\n\r\nDoes the top-left plot not know how to expand the vertical range slightly, to accommodate the inferred cell bounds?"}}
{"actor":{"display_login":"karlmsmith"}}