{"action":"created","issue":{"url":"https://api.github.com/repos/ESMValGroup/ESMValTool/issues/667","repository_url":"https://api.github.com/repos/ESMValGroup/ESMValTool","labels_url":"https://api.github.com/repos/ESMValGroup/ESMValTool/issues/667/labels{/name}","comments_url":"https://api.github.com/repos/ESMValGroup/ESMValTool/issues/667/comments","events_url":"https://api.github.com/repos/ESMValGroup/ESMValTool/issues/667/events","html_url":"https://github.com/ESMValGroup/ESMValTool/pull/667","id":371108331,"node_id":"MDExOlB1bGxSZXF1ZXN0MjIzNjI4NDU3","number":667,"title":"Generalize derivation of variables","user":{"login":"schlunma","id":32543114,"node_id":"MDQ6VXNlcjMyNTQzMTE0","avatar_url":"https://avatars3.githubusercontent.com/u/32543114?v=4","gravatar_id":"","url":"https://api.github.com/users/schlunma","html_url":"https://github.com/schlunma","followers_url":"https://api.github.com/users/schlunma/followers","following_url":"https://api.github.com/users/schlunma/following{/other_user}","gists_url":"https://api.github.com/users/schlunma/gists{/gist_id}","starred_url":"https://api.github.com/users/schlunma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schlunma/subscriptions","organizations_url":"https://api.github.com/users/schlunma/orgs","repos_url":"https://api.github.com/users/schlunma/repos","events_url":"https://api.github.com/users/schlunma/events{/privacy}","received_events_url":"https://api.github.com/users/schlunma/received_events","type":"User","site_admin":false},"labels":[{"id":526450344,"node_id":"MDU6TGFiZWw1MjY0NTAzNDQ=","url":"https://api.github.com/repos/ESMValGroup/ESMValTool/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"open","locked":false,"assignee":{"login":"schlunma","id":32543114,"node_id":"MDQ6VXNlcjMyNTQzMTE0","avatar_url":"https://avatars3.githubusercontent.com/u/32543114?v=4","gravatar_id":"","url":"https://api.github.com/users/schlunma","html_url":"https://github.com/schlunma","followers_url":"https://api.github.com/users/schlunma/followers","following_url":"https://api.github.com/users/schlunma/following{/other_user}","gists_url":"https://api.github.com/users/schlunma/gists{/gist_id}","starred_url":"https://api.github.com/users/schlunma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schlunma/subscriptions","organizations_url":"https://api.github.com/users/schlunma/orgs","repos_url":"https://api.github.com/users/schlunma/repos","events_url":"https://api.github.com/users/schlunma/events{/privacy}","received_events_url":"https://api.github.com/users/schlunma/received_events","type":"User","site_admin":false},"assignees":[{"login":"schlunma","id":32543114,"node_id":"MDQ6VXNlcjMyNTQzMTE0","avatar_url":"https://avatars3.githubusercontent.com/u/32543114?v=4","gravatar_id":"","url":"https://api.github.com/users/schlunma","html_url":"https://github.com/schlunma","followers_url":"https://api.github.com/users/schlunma/followers","following_url":"https://api.github.com/users/schlunma/following{/other_user}","gists_url":"https://api.github.com/users/schlunma/gists{/gist_id}","starred_url":"https://api.github.com/users/schlunma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schlunma/subscriptions","organizations_url":"https://api.github.com/users/schlunma/orgs","repos_url":"https://api.github.com/users/schlunma/repos","events_url":"https://api.github.com/users/schlunma/events{/privacy}","received_events_url":"https://api.github.com/users/schlunma/received_events","type":"User","site_admin":false}],"milestone":null,"comments":10,"created_at":"2018-10-17T14:32:10Z","updated_at":"2018-10-22T10:03:30Z","closed_at":null,"author_association":"CONTRIBUTOR","pull_request":{"url":"https://api.github.com/repos/ESMValGroup/ESMValTool/pulls/667","html_url":"https://github.com/ESMValGroup/ESMValTool/pull/667","diff_url":"https://github.com/ESMValGroup/ESMValTool/pull/667.diff","patch_url":"https://github.com/ESMValGroup/ESMValTool/pull/667.patch"},"body":"As suggested in #643, this PR simplifies variable derivation by moving them into a designated [directory](https://github.com/ESMValGroup/ESMValTool/tree/version2_generalize_derive/esmvaltool/preprocessor/derived_variables) with a python file for each variable.\r\n\r\nI moved all existing derived variables into the new [recipe_preprocessor_derive_test.yml](https://github.com/ESMValGroup/ESMValTool/blob/version2_generalize_derive/esmvaltool/recipes/examples/recipe_preprocessor_derive_test.yml) recipe and compared the `preproc` files in the old and new derivation scheme, all files are identical.\r\n\r\nCloses #643."},"comment":{"url":"https://api.github.com/repos/ESMValGroup/ESMValTool/issues/comments/431792414","html_url":"https://github.com/ESMValGroup/ESMValTool/pull/667#issuecomment-431792414","issue_url":"https://api.github.com/repos/ESMValGroup/ESMValTool/issues/667","id":431792414,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMTc5MjQxNA==","user":{"login":"bettina-gier","id":25502781,"node_id":"MDQ6VXNlcjI1NTAyNzgx","avatar_url":"https://avatars3.githubusercontent.com/u/25502781?v=4","gravatar_id":"","url":"https://api.github.com/users/bettina-gier","html_url":"https://github.com/bettina-gier","followers_url":"https://api.github.com/users/bettina-gier/followers","following_url":"https://api.github.com/users/bettina-gier/following{/other_user}","gists_url":"https://api.github.com/users/bettina-gier/gists{/gist_id}","starred_url":"https://api.github.com/users/bettina-gier/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bettina-gier/subscriptions","organizations_url":"https://api.github.com/users/bettina-gier/orgs","repos_url":"https://api.github.com/users/bettina-gier/repos","events_url":"https://api.github.com/users/bettina-gier/events{/privacy}","received_events_url":"https://api.github.com/users/bettina-gier/received_events","type":"User","site_admin":false},"created_at":"2018-10-22T10:03:30Z","updated_at":"2018-10-22T10:03:30Z","author_association":"CONTRIBUTOR","body":"To cut down on code for all the variables which are only differences - would it be possible to write general derive_sum / derive_difference functions which only take the variables as input, and then uses the CMOR tables to supply the rest of the information?\r\nThe structure could then be a bit more similar to the original approach, using a dictionary in one file to list all the variables with derivations and their derive functions - or even put this into a yml file similar to config_developer for ease of reading, and then only requires separate files for the derive functions if they are not covered by basic sums/differences/multiplications. Those are usually the ones that take more space."}}
{"actor":{"display_login":"bettina-gier"}}