{"action":"created","comment":{"url":"https://api.github.com/repos/ESMValGroup/ESMValTool/pulls/comments/206220239","pull_request_review_id":141598146,"id":206220239,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIwNjIyMDIzOQ==","diff_hunk":"@@ -17,20 +19,109 @@\n logger = logging.getLogger(__name__)\n \n \n-def mask_landocean(cube, land_mask=None, ocean_mask=None):\n-    \"\"\"Mask land or ocean\"\"\"\n-    if land_mask or ocean_mask:\n-        raise NotImplementedError\n-\n+def _check_dims(cube, mask_cube):\n+    \"\"\"Check for same dims for mask and data\"\"\"\n+    x_dim = cube.coord('longitude').points.ndim\n+    y_dim = cube.coord('latitude').points.ndim\n+    mx_dim = mask_cube.coord('longitude').points.ndim\n+    my_dim = mask_cube.coord('latitude').points.ndim\n+    len_x = len(cube.coord('longitude').points)\n+    len_y = len(cube.coord('latitude').points)\n+    len_mx = len(mask_cube.coord('longitude').points)\n+    len_my = len(mask_cube.coord('latitude').points)\n+    if x_dim == mx_dim and y_dim == my_dim:\n+        if len_x == len_mx and len_y == len_my:\n+            logger.debug('Data cube and fx mask have same dims')\n+            return True\n+        else:\n+            logger.error('Data cube and fx mask have different grids!')\n+            sys.exit(1)","path":"esmvaltool/preprocessor/_mask.py","position":34,"original_position":34,"commit_id":"3ed740900947cb34a6893cd53c56a91827fb68ef","original_commit_id":"3ed740900947cb34a6893cd53c56a91827fb68ef","user":{"login":"valeriupredoi","id":28983971,"node_id":"MDQ6VXNlcjI4OTgzOTcx","avatar_url":"https://avatars0.githubusercontent.com/u/28983971?v=4","gravatar_id":"","url":"https://api.github.com/users/valeriupredoi","html_url":"https://github.com/valeriupredoi","followers_url":"https://api.github.com/users/valeriupredoi/followers","following_url":"https://api.github.com/users/valeriupredoi/following{/other_user}","gists_url":"https://api.github.com/users/valeriupredoi/gists{/gist_id}","starred_url":"https://api.github.com/users/valeriupredoi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/valeriupredoi/subscriptions","organizations_url":"https://api.github.com/users/valeriupredoi/orgs","repos_url":"https://api.github.com/users/valeriupredoi/repos","events_url":"https://api.github.com/users/valeriupredoi/events{/privacy}","received_events_url":"https://api.github.com/users/valeriupredoi/received_events","type":"User","site_admin":false},"body":"what's the model that's hanging for? I tested with MPI-ESM-LR and MR and it works fine with the ```sftof``` files you gave me. ```sys.exit()``` propagates the failure and always gives you a stacktrace -- unless it's something not to like about your tcsh shell? what say you @bouweandela ","created_at":"2018-07-30T15:50:50Z","updated_at":"2018-07-30T15:50:50Z","html_url":"https://github.com/ESMValGroup/ESMValTool/pull/488#discussion_r206220239","pull_request_url":"https://api.github.com/repos/ESMValGroup/ESMValTool/pulls/488","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/ESMValGroup/ESMValTool/pulls/comments/206220239"},"html":{"href":"https://github.com/ESMValGroup/ESMValTool/pull/488#discussion_r206220239"},"pull_request":{"href":"https://api.github.com/repos/ESMValGroup/ESMValTool/pulls/488"}},"in_reply_to_id":206198849},"pull_request":{"url":"https://api.github.com/repos/ESMValGroup/ESMValTool/pulls/488","id":197170222,"node_id":"MDExOlB1bGxSZXF1ZXN0MTk3MTcwMjIy","html_url":"https://github.com/ESMValGroup/ESMValTool/pull/488","diff_url":"https://github.com/ESMValGroup/ESMValTool/pull/488.diff","patch_url":"https://github.com/ESMValGroup/ESMValTool/pull/488.patch","issue_url":"https://api.github.com/repos/ESMValGroup/ESMValTool/issues/488","number":488,"state":"open","locked":false,"title":"added functionality to call for masking using sftlf fx files land or …","user":{"login":"valeriupredoi","id":28983971,"node_id":"MDQ6VXNlcjI4OTgzOTcx","avatar_url":"https://avatars0.githubusercontent.com/u/28983971?v=4","gravatar_id":"","url":"https://api.github.com/users/valeriupredoi","html_url":"https://github.com/valeriupredoi","followers_url":"https://api.github.com/users/valeriupredoi/followers","following_url":"https://api.github.com/users/valeriupredoi/following{/other_user}","gists_url":"https://api.github.com/users/valeriupredoi/gists{/gist_id}","starred_url":"https://api.github.com/users/valeriupredoi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/valeriupredoi/subscriptions","organizations_url":"https://api.github.com/users/valeriupredoi/orgs","repos_url":"https://api.github.com/users/valeriupredoi/repos","events_url":"https://api.github.com/users/valeriupredoi/events{/privacy}","received_events_url":"https://api.github.com/users/valeriupredoi/received_events","type":"User","site_admin":false},"body":"Hey guys now we can call mask_landocean from the recipe and apply either land or ocean masks after vertical level selection and before regridding -- it is done at each level and it works since I just tested it -- one catch -- for OBS I got no files, second catch: I noticed that (for example) for bcc model the sftlf file is corrupter on BADC, so that's why the try/except in the function mask_landocean; this shouldn't be a problem since for the multimodel analysis we superimpoze all masks anyway, what you think @mattiarighi ?","created_at":"2018-06-25T16:33:20Z","updated_at":"2018-07-30T15:50:50Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7d74a3b79dac9e60dc7542e6b5fdeb4287390376","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[{"id":616795735,"node_id":"MDU6TGFiZWw2MTY3OTU3MzU=","url":"https://api.github.com/repos/ESMValGroup/ESMValTool/labels/backend","name":"backend","color":"d4c5f9","default":false}],"milestone":null,"commits_url":"https://api.github.com/repos/ESMValGroup/ESMValTool/pulls/488/commits","review_comments_url":"https://api.github.com/repos/ESMValGroup/ESMValTool/pulls/488/comments","review_comment_url":"https://api.github.com/repos/ESMValGroup/ESMValTool/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ESMValGroup/ESMValTool/issues/488/comments","statuses_url":"https://api.github.com/repos/ESMValGroup/ESMValTool/statuses/3ed740900947cb34a6893cd53c56a91827fb68ef","head":{"label":"ESMValGroup:version2_apply_fx","ref":"version2_apply_fx","sha":"3ed740900947cb34a6893cd53c56a91827fb68ef","user":{"login":"ESMValGroup","id":24584460,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI0NTg0NDYw","avatar_url":"https://avatars1.githubusercontent.com/u/24584460?v=4","gravatar_id":"","url":"https://api.github.com/users/ESMValGroup","html_url":"https://github.com/ESMValGroup","followers_url":"https://api.github.com/users/ESMValGroup/followers","following_url":"https://api.github.com/users/ESMValGroup/following{/other_user}","gists_url":"https://api.github.com/users/ESMValGroup/gists{/gist_id}","starred_url":"https://api.github.com/users/ESMValGroup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ESMValGroup/subscriptions","organizations_url":"https://api.github.com/users/ESMValGroup/orgs","repos_url":"https://api.github.com/users/ESMValGroup/repos","events_url":"https://api.github.com/users/ESMValGroup/events{/privacy}","received_events_url":"https://api.github.com/users/ESMValGroup/received_events","type":"Organization","site_admin":false},"repo":{"id":80120461,"node_id":"MDEwOlJlcG9zaXRvcnk4MDEyMDQ2MQ==","name":"ESMValTool","full_name":"ESMValGroup/ESMValTool","owner":{"login":"ESMValGroup","id":24584460,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI0NTg0NDYw","avatar_url":"https://avatars1.githubusercontent.com/u/24584460?v=4","gravatar_id":"","url":"https://api.github.com/users/ESMValGroup","html_url":"https://github.com/ESMValGroup","followers_url":"https://api.github.com/users/ESMValGroup/followers","following_url":"https://api.github.com/users/ESMValGroup/following{/other_user}","gists_url":"https://api.github.com/users/ESMValGroup/gists{/gist_id}","starred_url":"https://api.github.com/users/ESMValGroup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ESMValGroup/subscriptions","organizations_url":"https://api.github.com/users/ESMValGroup/orgs","repos_url":"https://api.github.com/users/ESMValGroup/repos","events_url":"https://api.github.com/users/ESMValGroup/events{/privacy}","received_events_url":"https://api.github.com/users/ESMValGroup/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ESMValGroup/ESMValTool","description":"ESMValTool: A community diagnostic and performance metrics tool for routine evaluation of Earth system models in CMIP ","fork":false,"url":"https://api.github.com/repos/ESMValGroup/ESMValTool","forks_url":"https://api.github.com/repos/ESMValGroup/ESMValTool/forks","keys_url":"https://api.github.com/repos/ESMValGroup/ESMValTool/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ESMValGroup/ESMValTool/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ESMValGroup/ESMValTool/teams","hooks_url":"https://api.github.com/repos/ESMValGroup/ESMValTool/hooks","issue_events_url":"https://api.github.com/repos/ESMValGroup/ESMValTool/issues/events{/number}","events_url":"https://api.github.com/repos/ESMValGroup/ESMValTool/events","assignees_url":"https://api.github.com/repos/ESMValGroup/ESMValTool/assignees{/user}","branches_url":"https://api.github.com/repos/ESMValGroup/ESMValTool/branches{/branch}","tags_url":"https://api.github.com/repos/ESMValGroup/ESMValTool/tags","blobs_url":"https://api.github.com/repos/ESMValGroup/ESMValTool/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ESMValGroup/ESMValTool/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ESMValGroup/ESMValTool/git/refs{/sha}","trees_url":"https://api.github.com/repos/ESMValGroup/ESMValTool/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ESMValGroup/ESMValTool/statuses/{sha}","languages_url":"https://api.github.com/repos/ESMValGroup/ESMValTool/languages","stargazers_url":"https://api.github.com/repos/ESMValGroup/ESMValTool/stargazers","contributors_url":"https://api.github.com/repos/ESMValGroup/ESMValTool/contributors","subscribers_url":"https://api.github.com/repos/ESMValGroup/ESMValTool/subscribers","subscription_url":"https://api.github.com/repos/ESMValGroup/ESMValTool/subscription","commits_url":"https://api.github.com/repos/ESMValGroup/ESMValTool/commits{/sha}","git_commits_url":"https://api.github.com/repos/ESMValGroup/ESMValTool/git/commits{/sha}","comments_url":"https://api.github.com/repos/ESMValGroup/ESMValTool/comments{/number}","issue_comment_url":"https://api.github.com/repos/ESMValGroup/ESMValTool/issues/comments{/number}","contents_url":"https://api.github.com/repos/ESMValGroup/ESMValTool/contents/{+path}","compare_url":"https://api.github.com/repos/ESMValGroup/ESMValTool/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ESMValGroup/ESMValTool/merges","archive_url":"https://api.github.com/repos/ESMValGroup/ESMValTool/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ESMValGroup/ESMValTool/downloads","issues_url":"https://api.github.com/repos/ESMValGroup/ESMValTool/issues{/number}","pulls_url":"https://api.github.com/repos/ESMValGroup/ESMValTool/pulls{/number}","milestones_url":"https://api.github.com/repos/ESMValGroup/ESMValTool/milestones{/number}","notifications_url":"https://api.github.com/repos/ESMValGroup/ESMValTool/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ESMValGroup/ESMValTool/labels{/name}","releases_url":"https://api.github.com/repos/ESMValGroup/ESMValTool/releases{/id}","deployments_url":"https://api.github.com/repos/ESMValGroup/ESMValTool/deployments","created_at":"2017-01-26T14:15:37Z","updated_at":"2018-07-30T10:42:08Z","pushed_at":"2018-07-30T15:46:20Z","git_url":"git://github.com/ESMValGroup/ESMValTool.git","ssh_url":"git@github.com:ESMValGroup/ESMValTool.git","clone_url":"https://github.com/ESMValGroup/ESMValTool.git","svn_url":"https://github.com/ESMValGroup/ESMValTool","homepage":null,"size":109663,"stargazers_count":34,"watchers_count":34,"language":"NCL","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":30,"mirror_url":null,"archived":false,"open_issues_count":110,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":30,"open_issues":110,"watchers":34,"default_branch":"version2_development"}},"base":{"label":"ESMValGroup:version2_development","ref":"version2_development","sha":"697ab9dca84b672e5d3a18eec50bc610125bb9f6","user":{"login":"ESMValGroup","id":24584460,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI0NTg0NDYw","avatar_url":"https://avatars1.githubusercontent.com/u/24584460?v=4","gravatar_id":"","url":"https://api.github.com/users/ESMValGroup","html_url":"https://github.com/ESMValGroup","followers_url":"https://api.github.com/users/ESMValGroup/followers","following_url":"https://api.github.com/users/ESMValGroup/following{/other_user}","gists_url":"https://api.github.com/users/ESMValGroup/gists{/gist_id}","starred_url":"https://api.github.com/users/ESMValGroup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ESMValGroup/subscriptions","organizations_url":"https://api.github.com/users/ESMValGroup/orgs","repos_url":"https://api.github.com/users/ESMValGroup/repos","events_url":"https://api.github.com/users/ESMValGroup/events{/privacy}","received_events_url":"https://api.github.com/users/ESMValGroup/received_events","type":"Organization","site_admin":false},"repo":{"id":80120461,"node_id":"MDEwOlJlcG9zaXRvcnk4MDEyMDQ2MQ==","name":"ESMValTool","full_name":"ESMValGroup/ESMValTool","owner":{"login":"ESMValGroup","id":24584460,"node_id":"MDEyOk9yZ2FuaXphdGlvbjI0NTg0NDYw","avatar_url":"https://avatars1.githubusercontent.com/u/24584460?v=4","gravatar_id":"","url":"https://api.github.com/users/ESMValGroup","html_url":"https://github.com/ESMValGroup","followers_url":"https://api.github.com/users/ESMValGroup/followers","following_url":"https://api.github.com/users/ESMValGroup/following{/other_user}","gists_url":"https://api.github.com/users/ESMValGroup/gists{/gist_id}","starred_url":"https://api.github.com/users/ESMValGroup/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ESMValGroup/subscriptions","organizations_url":"https://api.github.com/users/ESMValGroup/orgs","repos_url":"https://api.github.com/users/ESMValGroup/repos","events_url":"https://api.github.com/users/ESMValGroup/events{/privacy}","received_events_url":"https://api.github.com/users/ESMValGroup/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ESMValGroup/ESMValTool","description":"ESMValTool: A community diagnostic and performance metrics tool for routine evaluation of Earth system models in CMIP ","fork":false,"url":"https://api.github.com/repos/ESMValGroup/ESMValTool","forks_url":"https://api.github.com/repos/ESMValGroup/ESMValTool/forks","keys_url":"https://api.github.com/repos/ESMValGroup/ESMValTool/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ESMValGroup/ESMValTool/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ESMValGroup/ESMValTool/teams","hooks_url":"https://api.github.com/repos/ESMValGroup/ESMValTool/hooks","issue_events_url":"https://api.github.com/repos/ESMValGroup/ESMValTool/issues/events{/number}","events_url":"https://api.github.com/repos/ESMValGroup/ESMValTool/events","assignees_url":"https://api.github.com/repos/ESMValGroup/ESMValTool/assignees{/user}","branches_url":"https://api.github.com/repos/ESMValGroup/ESMValTool/branches{/branch}","tags_url":"https://api.github.com/repos/ESMValGroup/ESMValTool/tags","blobs_url":"https://api.github.com/repos/ESMValGroup/ESMValTool/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ESMValGroup/ESMValTool/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ESMValGroup/ESMValTool/git/refs{/sha}","trees_url":"https://api.github.com/repos/ESMValGroup/ESMValTool/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ESMValGroup/ESMValTool/statuses/{sha}","languages_url":"https://api.github.com/repos/ESMValGroup/ESMValTool/languages","stargazers_url":"https://api.github.com/repos/ESMValGroup/ESMValTool/stargazers","contributors_url":"https://api.github.com/repos/ESMValGroup/ESMValTool/contributors","subscribers_url":"https://api.github.com/repos/ESMValGroup/ESMValTool/subscribers","subscription_url":"https://api.github.com/repos/ESMValGroup/ESMValTool/subscription","commits_url":"https://api.github.com/repos/ESMValGroup/ESMValTool/commits{/sha}","git_commits_url":"https://api.github.com/repos/ESMValGroup/ESMValTool/git/commits{/sha}","comments_url":"https://api.github.com/repos/ESMValGroup/ESMValTool/comments{/number}","issue_comment_url":"https://api.github.com/repos/ESMValGroup/ESMValTool/issues/comments{/number}","contents_url":"https://api.github.com/repos/ESMValGroup/ESMValTool/contents/{+path}","compare_url":"https://api.github.com/repos/ESMValGroup/ESMValTool/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ESMValGroup/ESMValTool/merges","archive_url":"https://api.github.com/repos/ESMValGroup/ESMValTool/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ESMValGroup/ESMValTool/downloads","issues_url":"https://api.github.com/repos/ESMValGroup/ESMValTool/issues{/number}","pulls_url":"https://api.github.com/repos/ESMValGroup/ESMValTool/pulls{/number}","milestones_url":"https://api.github.com/repos/ESMValGroup/ESMValTool/milestones{/number}","notifications_url":"https://api.github.com/repos/ESMValGroup/ESMValTool/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ESMValGroup/ESMValTool/labels{/name}","releases_url":"https://api.github.com/repos/ESMValGroup/ESMValTool/releases{/id}","deployments_url":"https://api.github.com/repos/ESMValGroup/ESMValTool/deployments","created_at":"2017-01-26T14:15:37Z","updated_at":"2018-07-30T10:42:08Z","pushed_at":"2018-07-30T15:46:20Z","git_url":"git://github.com/ESMValGroup/ESMValTool.git","ssh_url":"git@github.com:ESMValGroup/ESMValTool.git","clone_url":"https://github.com/ESMValGroup/ESMValTool.git","svn_url":"https://github.com/ESMValGroup/ESMValTool","homepage":null,"size":109663,"stargazers_count":34,"watchers_count":34,"language":"NCL","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":30,"mirror_url":null,"archived":false,"open_issues_count":110,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":30,"open_issues":110,"watchers":34,"default_branch":"version2_development"}},"_links":{"self":{"href":"https://api.github.com/repos/ESMValGroup/ESMValTool/pulls/488"},"html":{"href":"https://github.com/ESMValGroup/ESMValTool/pull/488"},"issue":{"href":"https://api.github.com/repos/ESMValGroup/ESMValTool/issues/488"},"comments":{"href":"https://api.github.com/repos/ESMValGroup/ESMValTool/issues/488/comments"},"review_comments":{"href":"https://api.github.com/repos/ESMValGroup/ESMValTool/pulls/488/comments"},"review_comment":{"href":"https://api.github.com/repos/ESMValGroup/ESMValTool/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ESMValGroup/ESMValTool/pulls/488/commits"},"statuses":{"href":"https://api.github.com/repos/ESMValGroup/ESMValTool/statuses/3ed740900947cb34a6893cd53c56a91827fb68ef"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"valeriupredoi"}}