{"action":"created","comment":{"url":"https://api.github.com/repos/boutproject/BOUT-dev/pulls/comments/183324178","pull_request_review_id":114299367,"id":183324178,"diff_hunk":"@@ -571,49 +597,100 @@ def keys(self):\n     def dimensions(self, varname):\n         \"\"\"Array of dimension names\"\"\"\n         var = self.handle[varname]\n-        vartype = str(var.attrs['type'],encoding='utf-8')\n+        vartype = str(var.attrs['type'], encoding='utf-8')\n         if vartype == 'Field3D_t':\n-            return ('t','x','y','z')\n+            return ('t', 'x', 'y', 'z')\n         elif vartype == 'Field2D_t':\n-            return ('t','x','y')\n+            return ('t', 'x', 'y')\n         elif vartype == 'scalar_t':\n             return ('t')\n         elif vartype == 'Field3D':\n-            return ('x','y','z')\n+            return ('x', 'y', 'z')\n         elif vartype == 'Field2D':\n-            return ('x','y')\n+            return ('x', 'y')\n         elif vartype == 'scalar':\n             return ()\n         else:\n             raise ValueError(\"Variable type not recognized\")\n \n+    def vartype_from_array(self, data):\n+        try:\n+            ndim = len(data.shape)\n+        except AttributeError:\n+            ndim = 0\n+        if ndim == 4:\n+            return 'Field3D_t'\n+        elif ndim == 3:\n+            # not ideal, 3d field might be time-evolving 2d field,\n+            # 'Field2D_t', but can't think of a good way to distinguish","path":"tools/pylib/boututils/datafile.py","position":427,"original_position":427,"commit_id":"8978b41ebb20ac98859cab8071e592a894415714","original_commit_id":"8978b41ebb20ac98859cab8071e592a894415714","user":{"login":"bendudson","id":219233,"avatar_url":"https://avatars1.githubusercontent.com/u/219233?v=4","gravatar_id":"","url":"https://api.github.com/users/bendudson","html_url":"https://github.com/bendudson","followers_url":"https://api.github.com/users/bendudson/followers","following_url":"https://api.github.com/users/bendudson/following{/other_user}","gists_url":"https://api.github.com/users/bendudson/gists{/gist_id}","starred_url":"https://api.github.com/users/bendudson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bendudson/subscriptions","organizations_url":"https://api.github.com/users/bendudson/orgs","repos_url":"https://api.github.com/users/bendudson/repos","events_url":"https://api.github.com/users/bendudson/events{/privacy}","received_events_url":"https://api.github.com/users/bendudson/received_events","type":"User","site_admin":false},"body":"I think a longer-term solution should be to make more use of metadata in the dmp files: whether a variable is time-evolving, units etc.","created_at":"2018-04-23T09:13:10Z","updated_at":"2018-04-23T09:13:10Z","html_url":"https://github.com/boutproject/BOUT-dev/pull/996#discussion_r183324178","pull_request_url":"https://api.github.com/repos/boutproject/BOUT-dev/pulls/996","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/boutproject/BOUT-dev/pulls/comments/183324178"},"html":{"href":"https://github.com/boutproject/BOUT-dev/pull/996#discussion_r183324178"},"pull_request":{"href":"https://api.github.com/repos/boutproject/BOUT-dev/pulls/996"}},"in_reply_to_id":183321277},"pull_request":{"url":"https://api.github.com/repos/boutproject/BOUT-dev/pulls/996","id":181673016,"html_url":"https://github.com/boutproject/BOUT-dev/pull/996","diff_url":"https://github.com/boutproject/BOUT-dev/pull/996.diff","patch_url":"https://github.com/boutproject/BOUT-dev/pull/996.patch","issue_url":"https://api.github.com/repos/boutproject/BOUT-dev/issues/996","number":996,"state":"open","locked":false,"title":"Redistribute dmp files","user":{"login":"johnomotani","id":3958036,"avatar_url":"https://avatars0.githubusercontent.com/u/3958036?v=4","gravatar_id":"","url":"https://api.github.com/users/johnomotani","html_url":"https://github.com/johnomotani","followers_url":"https://api.github.com/users/johnomotani/followers","following_url":"https://api.github.com/users/johnomotani/following{/other_user}","gists_url":"https://api.github.com/users/johnomotani/gists{/gist_id}","starred_url":"https://api.github.com/users/johnomotani/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/johnomotani/subscriptions","organizations_url":"https://api.github.com/users/johnomotani/orgs","repos_url":"https://api.github.com/users/johnomotani/repos","events_url":"https://api.github.com/users/johnomotani/events{/privacy}","received_events_url":"https://api.github.com/users/johnomotani/received_events","type":"User","site_admin":false},"body":"This PR adds a method redistribute() to BoutOutputs to redistribute dump files, similar to restart.redistribute(). This allows appending to the data files when changing the number of processors.\r\n\r\nTo allow this, needed to enable writing of netCDF and HDF5 files with unlimited time dimensions.\r\n\r\nAlso:\r\n* adds a few fixes for DataFile_HDF5.\r\n* enables more file suffixes in collect()","created_at":"2018-04-14T23:57:36Z","updated_at":"2018-04-23T09:13:10Z","closed_at":null,"merged_at":null,"merge_commit_sha":"b701d6a541d30047fe79e61e14899ba25c5a9bda","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/boutproject/BOUT-dev/pulls/996/commits","review_comments_url":"https://api.github.com/repos/boutproject/BOUT-dev/pulls/996/comments","review_comment_url":"https://api.github.com/repos/boutproject/BOUT-dev/pulls/comments{/number}","comments_url":"https://api.github.com/repos/boutproject/BOUT-dev/issues/996/comments","statuses_url":"https://api.github.com/repos/boutproject/BOUT-dev/statuses/8978b41ebb20ac98859cab8071e592a894415714","head":{"label":"boutproject:redistribute_dmp_files","ref":"redistribute_dmp_files","sha":"8978b41ebb20ac98859cab8071e592a894415714","user":{"login":"boutproject","id":5280238,"avatar_url":"https://avatars2.githubusercontent.com/u/5280238?v=4","gravatar_id":"","url":"https://api.github.com/users/boutproject","html_url":"https://github.com/boutproject","followers_url":"https://api.github.com/users/boutproject/followers","following_url":"https://api.github.com/users/boutproject/following{/other_user}","gists_url":"https://api.github.com/users/boutproject/gists{/gist_id}","starred_url":"https://api.github.com/users/boutproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boutproject/subscriptions","organizations_url":"https://api.github.com/users/boutproject/orgs","repos_url":"https://api.github.com/users/boutproject/repos","events_url":"https://api.github.com/users/boutproject/events{/privacy}","received_events_url":"https://api.github.com/users/boutproject/received_events","type":"Organization","site_admin":false},"repo":{"id":12783634,"name":"BOUT-dev","full_name":"boutproject/BOUT-dev","owner":{"login":"boutproject","id":5280238,"avatar_url":"https://avatars2.githubusercontent.com/u/5280238?v=4","gravatar_id":"","url":"https://api.github.com/users/boutproject","html_url":"https://github.com/boutproject","followers_url":"https://api.github.com/users/boutproject/followers","following_url":"https://api.github.com/users/boutproject/following{/other_user}","gists_url":"https://api.github.com/users/boutproject/gists{/gist_id}","starred_url":"https://api.github.com/users/boutproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boutproject/subscriptions","organizations_url":"https://api.github.com/users/boutproject/orgs","repos_url":"https://api.github.com/users/boutproject/repos","events_url":"https://api.github.com/users/boutproject/events{/privacy}","received_events_url":"https://api.github.com/users/boutproject/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/boutproject/BOUT-dev","description":"BOUT++: Plasma fluid finite-difference simulation code in curvilinear coordinate systems","fork":false,"url":"https://api.github.com/repos/boutproject/BOUT-dev","forks_url":"https://api.github.com/repos/boutproject/BOUT-dev/forks","keys_url":"https://api.github.com/repos/boutproject/BOUT-dev/keys{/key_id}","collaborators_url":"https://api.github.com/repos/boutproject/BOUT-dev/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/boutproject/BOUT-dev/teams","hooks_url":"https://api.github.com/repos/boutproject/BOUT-dev/hooks","issue_events_url":"https://api.github.com/repos/boutproject/BOUT-dev/issues/events{/number}","events_url":"https://api.github.com/repos/boutproject/BOUT-dev/events","assignees_url":"https://api.github.com/repos/boutproject/BOUT-dev/assignees{/user}","branches_url":"https://api.github.com/repos/boutproject/BOUT-dev/branches{/branch}","tags_url":"https://api.github.com/repos/boutproject/BOUT-dev/tags","blobs_url":"https://api.github.com/repos/boutproject/BOUT-dev/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/boutproject/BOUT-dev/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/boutproject/BOUT-dev/git/refs{/sha}","trees_url":"https://api.github.com/repos/boutproject/BOUT-dev/git/trees{/sha}","statuses_url":"https://api.github.com/repos/boutproject/BOUT-dev/statuses/{sha}","languages_url":"https://api.github.com/repos/boutproject/BOUT-dev/languages","stargazers_url":"https://api.github.com/repos/boutproject/BOUT-dev/stargazers","contributors_url":"https://api.github.com/repos/boutproject/BOUT-dev/contributors","subscribers_url":"https://api.github.com/repos/boutproject/BOUT-dev/subscribers","subscription_url":"https://api.github.com/repos/boutproject/BOUT-dev/subscription","commits_url":"https://api.github.com/repos/boutproject/BOUT-dev/commits{/sha}","git_commits_url":"https://api.github.com/repos/boutproject/BOUT-dev/git/commits{/sha}","comments_url":"https://api.github.com/repos/boutproject/BOUT-dev/comments{/number}","issue_comment_url":"https://api.github.com/repos/boutproject/BOUT-dev/issues/comments{/number}","contents_url":"https://api.github.com/repos/boutproject/BOUT-dev/contents/{+path}","compare_url":"https://api.github.com/repos/boutproject/BOUT-dev/compare/{base}...{head}","merges_url":"https://api.github.com/repos/boutproject/BOUT-dev/merges","archive_url":"https://api.github.com/repos/boutproject/BOUT-dev/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/boutproject/BOUT-dev/downloads","issues_url":"https://api.github.com/repos/boutproject/BOUT-dev/issues{/number}","pulls_url":"https://api.github.com/repos/boutproject/BOUT-dev/pulls{/number}","milestones_url":"https://api.github.com/repos/boutproject/BOUT-dev/milestones{/number}","notifications_url":"https://api.github.com/repos/boutproject/BOUT-dev/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/boutproject/BOUT-dev/labels{/name}","releases_url":"https://api.github.com/repos/boutproject/BOUT-dev/releases{/id}","deployments_url":"https://api.github.com/repos/boutproject/BOUT-dev/deployments","created_at":"2013-09-12T12:57:55Z","updated_at":"2018-03-23T12:54:44Z","pushed_at":"2018-04-23T08:35:49Z","git_url":"git://github.com/boutproject/BOUT-dev.git","ssh_url":"git@github.com:boutproject/BOUT-dev.git","clone_url":"https://github.com/boutproject/BOUT-dev.git","svn_url":"https://github.com/boutproject/BOUT-dev","homepage":"http://boutproject.github.io/","size":34339,"stargazers_count":24,"watchers_count":24,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":31,"mirror_url":null,"archived":false,"open_issues_count":137,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":31,"open_issues":137,"watchers":24,"default_branch":"master"}},"base":{"label":"boutproject:next","ref":"next","sha":"12a33b568c3248fd403447fb45aa32cdec6895f5","user":{"login":"boutproject","id":5280238,"avatar_url":"https://avatars2.githubusercontent.com/u/5280238?v=4","gravatar_id":"","url":"https://api.github.com/users/boutproject","html_url":"https://github.com/boutproject","followers_url":"https://api.github.com/users/boutproject/followers","following_url":"https://api.github.com/users/boutproject/following{/other_user}","gists_url":"https://api.github.com/users/boutproject/gists{/gist_id}","starred_url":"https://api.github.com/users/boutproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boutproject/subscriptions","organizations_url":"https://api.github.com/users/boutproject/orgs","repos_url":"https://api.github.com/users/boutproject/repos","events_url":"https://api.github.com/users/boutproject/events{/privacy}","received_events_url":"https://api.github.com/users/boutproject/received_events","type":"Organization","site_admin":false},"repo":{"id":12783634,"name":"BOUT-dev","full_name":"boutproject/BOUT-dev","owner":{"login":"boutproject","id":5280238,"avatar_url":"https://avatars2.githubusercontent.com/u/5280238?v=4","gravatar_id":"","url":"https://api.github.com/users/boutproject","html_url":"https://github.com/boutproject","followers_url":"https://api.github.com/users/boutproject/followers","following_url":"https://api.github.com/users/boutproject/following{/other_user}","gists_url":"https://api.github.com/users/boutproject/gists{/gist_id}","starred_url":"https://api.github.com/users/boutproject/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/boutproject/subscriptions","organizations_url":"https://api.github.com/users/boutproject/orgs","repos_url":"https://api.github.com/users/boutproject/repos","events_url":"https://api.github.com/users/boutproject/events{/privacy}","received_events_url":"https://api.github.com/users/boutproject/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/boutproject/BOUT-dev","description":"BOUT++: Plasma fluid finite-difference simulation code in curvilinear coordinate systems","fork":false,"url":"https://api.github.com/repos/boutproject/BOUT-dev","forks_url":"https://api.github.com/repos/boutproject/BOUT-dev/forks","keys_url":"https://api.github.com/repos/boutproject/BOUT-dev/keys{/key_id}","collaborators_url":"https://api.github.com/repos/boutproject/BOUT-dev/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/boutproject/BOUT-dev/teams","hooks_url":"https://api.github.com/repos/boutproject/BOUT-dev/hooks","issue_events_url":"https://api.github.com/repos/boutproject/BOUT-dev/issues/events{/number}","events_url":"https://api.github.com/repos/boutproject/BOUT-dev/events","assignees_url":"https://api.github.com/repos/boutproject/BOUT-dev/assignees{/user}","branches_url":"https://api.github.com/repos/boutproject/BOUT-dev/branches{/branch}","tags_url":"https://api.github.com/repos/boutproject/BOUT-dev/tags","blobs_url":"https://api.github.com/repos/boutproject/BOUT-dev/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/boutproject/BOUT-dev/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/boutproject/BOUT-dev/git/refs{/sha}","trees_url":"https://api.github.com/repos/boutproject/BOUT-dev/git/trees{/sha}","statuses_url":"https://api.github.com/repos/boutproject/BOUT-dev/statuses/{sha}","languages_url":"https://api.github.com/repos/boutproject/BOUT-dev/languages","stargazers_url":"https://api.github.com/repos/boutproject/BOUT-dev/stargazers","contributors_url":"https://api.github.com/repos/boutproject/BOUT-dev/contributors","subscribers_url":"https://api.github.com/repos/boutproject/BOUT-dev/subscribers","subscription_url":"https://api.github.com/repos/boutproject/BOUT-dev/subscription","commits_url":"https://api.github.com/repos/boutproject/BOUT-dev/commits{/sha}","git_commits_url":"https://api.github.com/repos/boutproject/BOUT-dev/git/commits{/sha}","comments_url":"https://api.github.com/repos/boutproject/BOUT-dev/comments{/number}","issue_comment_url":"https://api.github.com/repos/boutproject/BOUT-dev/issues/comments{/number}","contents_url":"https://api.github.com/repos/boutproject/BOUT-dev/contents/{+path}","compare_url":"https://api.github.com/repos/boutproject/BOUT-dev/compare/{base}...{head}","merges_url":"https://api.github.com/repos/boutproject/BOUT-dev/merges","archive_url":"https://api.github.com/repos/boutproject/BOUT-dev/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/boutproject/BOUT-dev/downloads","issues_url":"https://api.github.com/repos/boutproject/BOUT-dev/issues{/number}","pulls_url":"https://api.github.com/repos/boutproject/BOUT-dev/pulls{/number}","milestones_url":"https://api.github.com/repos/boutproject/BOUT-dev/milestones{/number}","notifications_url":"https://api.github.com/repos/boutproject/BOUT-dev/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/boutproject/BOUT-dev/labels{/name}","releases_url":"https://api.github.com/repos/boutproject/BOUT-dev/releases{/id}","deployments_url":"https://api.github.com/repos/boutproject/BOUT-dev/deployments","created_at":"2013-09-12T12:57:55Z","updated_at":"2018-03-23T12:54:44Z","pushed_at":"2018-04-23T08:35:49Z","git_url":"git://github.com/boutproject/BOUT-dev.git","ssh_url":"git@github.com:boutproject/BOUT-dev.git","clone_url":"https://github.com/boutproject/BOUT-dev.git","svn_url":"https://github.com/boutproject/BOUT-dev","homepage":"http://boutproject.github.io/","size":34339,"stargazers_count":24,"watchers_count":24,"language":"C++","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":31,"mirror_url":null,"archived":false,"open_issues_count":137,"license":{"key":"other","name":"Other","spdx_id":null,"url":null},"forks":31,"open_issues":137,"watchers":24,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/boutproject/BOUT-dev/pulls/996"},"html":{"href":"https://github.com/boutproject/BOUT-dev/pull/996"},"issue":{"href":"https://api.github.com/repos/boutproject/BOUT-dev/issues/996"},"comments":{"href":"https://api.github.com/repos/boutproject/BOUT-dev/issues/996/comments"},"review_comments":{"href":"https://api.github.com/repos/boutproject/BOUT-dev/pulls/996/comments"},"review_comment":{"href":"https://api.github.com/repos/boutproject/BOUT-dev/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/boutproject/BOUT-dev/pulls/996/commits"},"statuses":{"href":"https://api.github.com/repos/boutproject/BOUT-dev/statuses/8978b41ebb20ac98859cab8071e592a894415714"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"bendudson"}}