{"action":"created","comment":{"url":"https://api.github.com/repos/Unidata/MetPy/pulls/comments/204888006","pull_request_review_id":140043940,"id":204888006,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNDg4ODAwNg==","diff_hunk":"@@ -4,13 +4,15 @@\n r\"\"\"This module contains a variety of meteorological calculations.\"\"\"","path":"metpy/calc/__init__.py","position":1,"original_position":1,"commit_id":"900459bce898c9dc19e62192ad979c4770bbbdf2","original_commit_id":"900459bce898c9dc19e62192ad979c4770bbbdf2","user":{"login":"dopplershift","id":221526,"node_id":"MDQ6VXNlcjIyMTUyNg==","avatar_url":"https://avatars2.githubusercontent.com/u/221526?v=4","gravatar_id":"","url":"https://api.github.com/users/dopplershift","html_url":"https://github.com/dopplershift","followers_url":"https://api.github.com/users/dopplershift/followers","following_url":"https://api.github.com/users/dopplershift/following{/other_user}","gists_url":"https://api.github.com/users/dopplershift/gists{/gist_id}","starred_url":"https://api.github.com/users/dopplershift/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dopplershift/subscriptions","organizations_url":"https://api.github.com/users/dopplershift/orgs","repos_url":"https://api.github.com/users/dopplershift/repos","events_url":"https://api.github.com/users/dopplershift/events{/privacy}","received_events_url":"https://api.github.com/users/dopplershift/received_events","type":"User","site_admin":false},"body":"Update copyright to include 2018.","created_at":"2018-07-24T19:47:51Z","updated_at":"2018-07-24T19:51:57Z","html_url":"https://github.com/Unidata/MetPy/pull/879#discussion_r204888006","pull_request_url":"https://api.github.com/repos/Unidata/MetPy/pulls/879","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/Unidata/MetPy/pulls/comments/204888006"},"html":{"href":"https://github.com/Unidata/MetPy/pull/879#discussion_r204888006"},"pull_request":{"href":"https://api.github.com/repos/Unidata/MetPy/pulls/879"}}},"pull_request":{"url":"https://api.github.com/repos/Unidata/MetPy/pulls/879","id":198801570,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk4ODAxNTcw","html_url":"https://github.com/Unidata/MetPy/pull/879","diff_url":"https://github.com/Unidata/MetPy/pull/879.diff","patch_url":"https://github.com/Unidata/MetPy/pull/879.patch","issue_url":"https://api.github.com/repos/Unidata/MetPy/issues/879","number":879,"state":"open","locked":false,"title":"Add cross section function and supporting calculations","user":{"login":"jthielen","id":3460034,"node_id":"MDQ6VXNlcjM0NjAwMzQ=","avatar_url":"https://avatars0.githubusercontent.com/u/3460034?v=4","gravatar_id":"","url":"https://api.github.com/users/jthielen","html_url":"https://github.com/jthielen","followers_url":"https://api.github.com/users/jthielen/followers","following_url":"https://api.github.com/users/jthielen/following{/other_user}","gists_url":"https://api.github.com/users/jthielen/gists{/gist_id}","starred_url":"https://api.github.com/users/jthielen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jthielen/subscriptions","organizations_url":"https://api.github.com/users/jthielen/orgs","repos_url":"https://api.github.com/users/jthielen/repos","events_url":"https://api.github.com/users/jthielen/events{/privacy}","received_events_url":"https://api.github.com/users/jthielen/received_events","type":"User","site_admin":false},"body":"This adds a `cross_section` function to `interpolate`. It allows interpolation to a cross-sectional slice through gridded data along a geodesic path between two lat/lon points. It takes data as either an `xarray.Dataset` or `xarray.DataArray`, and utlizes xarray's own `.interp()` method.\r\n\r\nAdditionally, this adds in a number of supporting calculations:\r\n\r\n- normal and tangential unit vectors along the cross section path\r\n- normal and tangential components of vector field (closes #652)\r\n- cross-sectional absolute/pseduoangular momentum (closes #654)\r\n\r\n~~This PR is currently a work-in-progress, since I wanted to get the code of the implementation itself out for initial review, and ask about tests. I currently have some examples in notebooks that I plan on using for the unit tests, but, I'm unsure of best way to test the correctness of an entire `Dataset` or `DataArray` in this case. Would a good approach be to save the correct output as netCDF files in `staticdata` after removing the non-serializable `crs` object coordinate, open them back up while adding back the `crs`, and then test for equality using the [`.identical()`](http://xarray.pydata.org/en/stable/combining.html#equals-and-identical) method? (tests implemented like @dopplershift's comment below)~~\r\n\r\n~~EDIT: I just discovered the capabilities of the xarray `.interp()` method added in v0.10.7, which not only makes this code significantly more concise, but also gave a 3 order-of-magnitude speed-up from 74 seconds to 64.9 milliseconds on a linear interpolation example I just ran. The limitations to this approach are it requires gridded data (what I was assuming anyway for this initial implementation) and only allows linear and nearest interpolation. Would it be okay to move to using xarray's interpolation?~~\r\n\r\n~~Also, calculations will be coming soon...~~","created_at":"2018-07-02T22:06:57Z","updated_at":"2018-07-24T19:51:57Z","closed_at":null,"merged_at":null,"merge_commit_sha":"637e1f1f122c359624ba62b06a6ea35b36240e0a","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":770431904,"node_id":"MDU6TGFiZWw3NzA0MzE5MDQ=","url":"https://api.github.com/repos/Unidata/MetPy/labels/Area:%20Cross-sections","name":"Area: Cross-sections","color":"b1dded","default":false},{"id":202032114,"node_id":"MDU6TGFiZWwyMDIwMzIxMTQ=","url":"https://api.github.com/repos/Unidata/MetPy/labels/Type:%20Feature","name":"Type: Feature","color":"fad8c7","default":false}],"milestone":{"url":"https://api.github.com/repos/Unidata/MetPy/milestones/17","html_url":"https://github.com/Unidata/MetPy/milestone/17","labels_url":"https://api.github.com/repos/Unidata/MetPy/milestones/17/labels","id":2980564,"node_id":"MDk6TWlsZXN0b25lMjk4MDU2NA==","number":17,"title":"0.9","description":"MetPy 0.9 - Summer 2018 Release Estimated","creator":{"login":"jrleeman","id":325269,"node_id":"MDQ6VXNlcjMyNTI2OQ==","avatar_url":"https://avatars3.githubusercontent.com/u/325269?v=4","gravatar_id":"","url":"https://api.github.com/users/jrleeman","html_url":"https://github.com/jrleeman","followers_url":"https://api.github.com/users/jrleeman/followers","following_url":"https://api.github.com/users/jrleeman/following{/other_user}","gists_url":"https://api.github.com/users/jrleeman/gists{/gist_id}","starred_url":"https://api.github.com/users/jrleeman/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jrleeman/subscriptions","organizations_url":"https://api.github.com/users/jrleeman/orgs","repos_url":"https://api.github.com/users/jrleeman/repos","events_url":"https://api.github.com/users/jrleeman/events{/privacy}","received_events_url":"https://api.github.com/users/jrleeman/received_events","type":"User","site_admin":false},"open_issues":25,"closed_issues":24,"state":"open","created_at":"2017-12-14T19:34:07Z","updated_at":"2018-07-24T19:09:24Z","due_on":"2018-08-15T07:00:00Z","closed_at":null},"commits_url":"https://api.github.com/repos/Unidata/MetPy/pulls/879/commits","review_comments_url":"https://api.github.com/repos/Unidata/MetPy/pulls/879/comments","review_comment_url":"https://api.github.com/repos/Unidata/MetPy/pulls/comments{/number}","comments_url":"https://api.github.com/repos/Unidata/MetPy/issues/879/comments","statuses_url":"https://api.github.com/repos/Unidata/MetPy/statuses/900459bce898c9dc19e62192ad979c4770bbbdf2","head":{"label":"jthielen:cross-section","ref":"cross-section","sha":"900459bce898c9dc19e62192ad979c4770bbbdf2","user":{"login":"jthielen","id":3460034,"node_id":"MDQ6VXNlcjM0NjAwMzQ=","avatar_url":"https://avatars0.githubusercontent.com/u/3460034?v=4","gravatar_id":"","url":"https://api.github.com/users/jthielen","html_url":"https://github.com/jthielen","followers_url":"https://api.github.com/users/jthielen/followers","following_url":"https://api.github.com/users/jthielen/following{/other_user}","gists_url":"https://api.github.com/users/jthielen/gists{/gist_id}","starred_url":"https://api.github.com/users/jthielen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jthielen/subscriptions","organizations_url":"https://api.github.com/users/jthielen/orgs","repos_url":"https://api.github.com/users/jthielen/repos","events_url":"https://api.github.com/users/jthielen/events{/privacy}","received_events_url":"https://api.github.com/users/jthielen/received_events","type":"User","site_admin":false},"repo":{"id":108058581,"node_id":"MDEwOlJlcG9zaXRvcnkxMDgwNTg1ODE=","name":"MetPy","full_name":"jthielen/MetPy","owner":{"login":"jthielen","id":3460034,"node_id":"MDQ6VXNlcjM0NjAwMzQ=","avatar_url":"https://avatars0.githubusercontent.com/u/3460034?v=4","gravatar_id":"","url":"https://api.github.com/users/jthielen","html_url":"https://github.com/jthielen","followers_url":"https://api.github.com/users/jthielen/followers","following_url":"https://api.github.com/users/jthielen/following{/other_user}","gists_url":"https://api.github.com/users/jthielen/gists{/gist_id}","starred_url":"https://api.github.com/users/jthielen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jthielen/subscriptions","organizations_url":"https://api.github.com/users/jthielen/orgs","repos_url":"https://api.github.com/users/jthielen/repos","events_url":"https://api.github.com/users/jthielen/events{/privacy}","received_events_url":"https://api.github.com/users/jthielen/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/jthielen/MetPy","description":"MetPy is a collection of tools in Python for reading, visualizing and performing calculations with weather data.","fork":true,"url":"https://api.github.com/repos/jthielen/MetPy","forks_url":"https://api.github.com/repos/jthielen/MetPy/forks","keys_url":"https://api.github.com/repos/jthielen/MetPy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/jthielen/MetPy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/jthielen/MetPy/teams","hooks_url":"https://api.github.com/repos/jthielen/MetPy/hooks","issue_events_url":"https://api.github.com/repos/jthielen/MetPy/issues/events{/number}","events_url":"https://api.github.com/repos/jthielen/MetPy/events","assignees_url":"https://api.github.com/repos/jthielen/MetPy/assignees{/user}","branches_url":"https://api.github.com/repos/jthielen/MetPy/branches{/branch}","tags_url":"https://api.github.com/repos/jthielen/MetPy/tags","blobs_url":"https://api.github.com/repos/jthielen/MetPy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/jthielen/MetPy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/jthielen/MetPy/git/refs{/sha}","trees_url":"https://api.github.com/repos/jthielen/MetPy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/jthielen/MetPy/statuses/{sha}","languages_url":"https://api.github.com/repos/jthielen/MetPy/languages","stargazers_url":"https://api.github.com/repos/jthielen/MetPy/stargazers","contributors_url":"https://api.github.com/repos/jthielen/MetPy/contributors","subscribers_url":"https://api.github.com/repos/jthielen/MetPy/subscribers","subscription_url":"https://api.github.com/repos/jthielen/MetPy/subscription","commits_url":"https://api.github.com/repos/jthielen/MetPy/commits{/sha}","git_commits_url":"https://api.github.com/repos/jthielen/MetPy/git/commits{/sha}","comments_url":"https://api.github.com/repos/jthielen/MetPy/comments{/number}","issue_comment_url":"https://api.github.com/repos/jthielen/MetPy/issues/comments{/number}","contents_url":"https://api.github.com/repos/jthielen/MetPy/contents/{+path}","compare_url":"https://api.github.com/repos/jthielen/MetPy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/jthielen/MetPy/merges","archive_url":"https://api.github.com/repos/jthielen/MetPy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/jthielen/MetPy/downloads","issues_url":"https://api.github.com/repos/jthielen/MetPy/issues{/number}","pulls_url":"https://api.github.com/repos/jthielen/MetPy/pulls{/number}","milestones_url":"https://api.github.com/repos/jthielen/MetPy/milestones{/number}","notifications_url":"https://api.github.com/repos/jthielen/MetPy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/jthielen/MetPy/labels{/name}","releases_url":"https://api.github.com/repos/jthielen/MetPy/releases{/id}","deployments_url":"https://api.github.com/repos/jthielen/MetPy/deployments","created_at":"2017-10-24T00:56:00Z","updated_at":"2018-07-17T16:46:50Z","pushed_at":"2018-07-24T19:19:15Z","git_url":"git://github.com/jthielen/MetPy.git","ssh_url":"git@github.com:jthielen/MetPy.git","clone_url":"https://github.com/jthielen/MetPy.git","svn_url":"https://github.com/jthielen/MetPy","homepage":"https://unidata.github.io/MetPy","size":207159,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"Unidata:master","ref":"master","sha":"b19c052a62cd550d93e3e512cfeafcad763631df","user":{"login":"Unidata","id":613345,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYxMzM0NQ==","avatar_url":"https://avatars3.githubusercontent.com/u/613345?v=4","gravatar_id":"","url":"https://api.github.com/users/Unidata","html_url":"https://github.com/Unidata","followers_url":"https://api.github.com/users/Unidata/followers","following_url":"https://api.github.com/users/Unidata/following{/other_user}","gists_url":"https://api.github.com/users/Unidata/gists{/gist_id}","starred_url":"https://api.github.com/users/Unidata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Unidata/subscriptions","organizations_url":"https://api.github.com/users/Unidata/orgs","repos_url":"https://api.github.com/users/Unidata/repos","events_url":"https://api.github.com/users/Unidata/events{/privacy}","received_events_url":"https://api.github.com/users/Unidata/received_events","type":"Organization","site_admin":false},"repo":{"id":1409621,"node_id":"MDEwOlJlcG9zaXRvcnkxNDA5NjIx","name":"MetPy","full_name":"Unidata/MetPy","owner":{"login":"Unidata","id":613345,"node_id":"MDEyOk9yZ2FuaXphdGlvbjYxMzM0NQ==","avatar_url":"https://avatars3.githubusercontent.com/u/613345?v=4","gravatar_id":"","url":"https://api.github.com/users/Unidata","html_url":"https://github.com/Unidata","followers_url":"https://api.github.com/users/Unidata/followers","following_url":"https://api.github.com/users/Unidata/following{/other_user}","gists_url":"https://api.github.com/users/Unidata/gists{/gist_id}","starred_url":"https://api.github.com/users/Unidata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Unidata/subscriptions","organizations_url":"https://api.github.com/users/Unidata/orgs","repos_url":"https://api.github.com/users/Unidata/repos","events_url":"https://api.github.com/users/Unidata/events{/privacy}","received_events_url":"https://api.github.com/users/Unidata/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/Unidata/MetPy","description":"MetPy is a collection of tools in Python for reading, visualizing and performing calculations with weather data.","fork":false,"url":"https://api.github.com/repos/Unidata/MetPy","forks_url":"https://api.github.com/repos/Unidata/MetPy/forks","keys_url":"https://api.github.com/repos/Unidata/MetPy/keys{/key_id}","collaborators_url":"https://api.github.com/repos/Unidata/MetPy/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/Unidata/MetPy/teams","hooks_url":"https://api.github.com/repos/Unidata/MetPy/hooks","issue_events_url":"https://api.github.com/repos/Unidata/MetPy/issues/events{/number}","events_url":"https://api.github.com/repos/Unidata/MetPy/events","assignees_url":"https://api.github.com/repos/Unidata/MetPy/assignees{/user}","branches_url":"https://api.github.com/repos/Unidata/MetPy/branches{/branch}","tags_url":"https://api.github.com/repos/Unidata/MetPy/tags","blobs_url":"https://api.github.com/repos/Unidata/MetPy/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/Unidata/MetPy/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/Unidata/MetPy/git/refs{/sha}","trees_url":"https://api.github.com/repos/Unidata/MetPy/git/trees{/sha}","statuses_url":"https://api.github.com/repos/Unidata/MetPy/statuses/{sha}","languages_url":"https://api.github.com/repos/Unidata/MetPy/languages","stargazers_url":"https://api.github.com/repos/Unidata/MetPy/stargazers","contributors_url":"https://api.github.com/repos/Unidata/MetPy/contributors","subscribers_url":"https://api.github.com/repos/Unidata/MetPy/subscribers","subscription_url":"https://api.github.com/repos/Unidata/MetPy/subscription","commits_url":"https://api.github.com/repos/Unidata/MetPy/commits{/sha}","git_commits_url":"https://api.github.com/repos/Unidata/MetPy/git/commits{/sha}","comments_url":"https://api.github.com/repos/Unidata/MetPy/comments{/number}","issue_comment_url":"https://api.github.com/repos/Unidata/MetPy/issues/comments{/number}","contents_url":"https://api.github.com/repos/Unidata/MetPy/contents/{+path}","compare_url":"https://api.github.com/repos/Unidata/MetPy/compare/{base}...{head}","merges_url":"https://api.github.com/repos/Unidata/MetPy/merges","archive_url":"https://api.github.com/repos/Unidata/MetPy/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/Unidata/MetPy/downloads","issues_url":"https://api.github.com/repos/Unidata/MetPy/issues{/number}","pulls_url":"https://api.github.com/repos/Unidata/MetPy/pulls{/number}","milestones_url":"https://api.github.com/repos/Unidata/MetPy/milestones{/number}","notifications_url":"https://api.github.com/repos/Unidata/MetPy/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/Unidata/MetPy/labels{/name}","releases_url":"https://api.github.com/repos/Unidata/MetPy/releases{/id}","deployments_url":"https://api.github.com/repos/Unidata/MetPy/deployments","created_at":"2011-02-25T04:20:25Z","updated_at":"2018-07-24T17:22:47Z","pushed_at":"2018-07-24T19:19:17Z","git_url":"git://github.com/Unidata/MetPy.git","ssh_url":"git@github.com:Unidata/MetPy.git","clone_url":"https://github.com/Unidata/MetPy.git","svn_url":"https://github.com/Unidata/MetPy","homepage":"https://unidata.github.io/MetPy","size":234653,"stargazers_count":297,"watchers_count":297,"language":"Python","has_issues":true,"has_projects":false,"has_downloads":true,"has_wiki":false,"has_pages":true,"forks_count":138,"mirror_url":null,"archived":false,"open_issues_count":164,"license":{"key":"bsd-3-clause","name":"BSD 3-Clause \"New\" or \"Revised\" License","spdx_id":"BSD-3-Clause","url":"https://api.github.com/licenses/bsd-3-clause","node_id":"MDc6TGljZW5zZTU="},"forks":138,"open_issues":164,"watchers":297,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/Unidata/MetPy/pulls/879"},"html":{"href":"https://github.com/Unidata/MetPy/pull/879"},"issue":{"href":"https://api.github.com/repos/Unidata/MetPy/issues/879"},"comments":{"href":"https://api.github.com/repos/Unidata/MetPy/issues/879/comments"},"review_comments":{"href":"https://api.github.com/repos/Unidata/MetPy/pulls/879/comments"},"review_comment":{"href":"https://api.github.com/repos/Unidata/MetPy/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/Unidata/MetPy/pulls/879/commits"},"statuses":{"href":"https://api.github.com/repos/Unidata/MetPy/statuses/900459bce898c9dc19e62192ad979c4770bbbdf2"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"dopplershift"}}