{"action":"opened","issue":{"url":"https://api.github.com/repos/spencerahill/aospy/issues/14","labels_url":"https://api.github.com/repos/spencerahill/aospy/issues/14/labels{/name}","comments_url":"https://api.github.com/repos/spencerahill/aospy/issues/14/comments","events_url":"https://api.github.com/repos/spencerahill/aospy/issues/14/events","html_url":"https://github.com/spencerahill/aospy/issues/14","id":111504517,"number":14,"title":"Use coordinates directly from xray.DataArrays, not from parent Model","user":{"login":"spencerahill","id":6200806,"avatar_url":"https://avatars.githubusercontent.com/u/6200806?v=3","gravatar_id":"","url":"https://api.github.com/users/spencerahill","html_url":"https://github.com/spencerahill","followers_url":"https://api.github.com/users/spencerahill/followers","following_url":"https://api.github.com/users/spencerahill/following{/other_user}","gists_url":"https://api.github.com/users/spencerahill/gists{/gist_id}","starred_url":"https://api.github.com/users/spencerahill/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/spencerahill/subscriptions","organizations_url":"https://api.github.com/users/spencerahill/orgs","repos_url":"https://api.github.com/users/spencerahill/repos","events_url":"https://api.github.com/users/spencerahill/events{/privacy}","received_events_url":"https://api.github.com/users/spencerahill/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-10-14T22:11:02Z","updated_at":"2015-10-14T22:11:02Z","closed_at":null,"body":"Currently, each `Model` object is instantiated with paths to various netCDF files which are used to supply basic information about its grid: latitude, longitude, etc.  Some physical calculations require this grid information in addition to physical variables themselves.  However, the values of these grid properties are not necessarily unique to a `Model`: simulations run in the same model may be output to different grids (horizontal or vertical), or changes in software may make, e.g. the latitude values off on the 5th digit, causing xray to throw an error (the last example comes from @spencerkclark ).\r\n\r\nThe netCDF files from which data is loaded all contain the coordinate data locally already, and so do the xray.Dataset and/or DataArray objects derived from those files.  So there is no reason to always pull from the Model's grid attributes -- they should be pulled from the local variable itself.\r\n\r\nAs a starting point, `Calc` should just grab the needed coordinate/grid values from the 1st variable that it loads in that has those values.  Pressure values and vertical pressure thicknesses will likely need to be handled as their own unique case, which is what's done already anyways."}}