{"action":"created","issue":{"url":"https://api.github.com/repos/StrikeNP/trac_test/issues/671","repository_url":"https://api.github.com/repos/StrikeNP/trac_test","labels_url":"https://api.github.com/repos/StrikeNP/trac_test/issues/671/labels{/name}","comments_url":"https://api.github.com/repos/StrikeNP/trac_test/issues/671/comments","events_url":"https://api.github.com/repos/StrikeNP/trac_test/issues/671/events","html_url":"https://github.com/StrikeNP/trac_test/issues/671","id":334662381,"node_id":"MDU6SXNzdWUzMzQ2NjIzODE=","number":671,"title":"Could we refactor the clubb_driver or microphys_driver modules? (Trac #671)","user":{"login":"StrikeNP","id":2577059,"node_id":"MDQ6VXNlcjI1NzcwNTk=","avatar_url":"https://avatars0.githubusercontent.com/u/2577059?v=4","gravatar_id":"","url":"https://api.github.com/users/StrikeNP","html_url":"https://github.com/StrikeNP","followers_url":"https://api.github.com/users/StrikeNP/followers","following_url":"https://api.github.com/users/StrikeNP/following{/other_user}","gists_url":"https://api.github.com/users/StrikeNP/gists{/gist_id}","starred_url":"https://api.github.com/users/StrikeNP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StrikeNP/subscriptions","organizations_url":"https://api.github.com/users/StrikeNP/orgs","repos_url":"https://api.github.com/users/StrikeNP/repos","events_url":"https://api.github.com/users/StrikeNP/events{/privacy}","received_events_url":"https://api.github.com/users/StrikeNP/received_events","type":"User","site_admin":false},"labels":[{"id":971577014,"node_id":"MDU6TGFiZWw5NzE1NzcwMTQ=","url":"https://api.github.com/repos/StrikeNP/trac_test/labels/Migrated%20from%20Trac","name":"Migrated from Trac","color":"FFFFFF","default":false},{"id":971577274,"node_id":"MDU6TGFiZWw5NzE1NzcyNzQ=","url":"https://api.github.com/repos/StrikeNP/trac_test/labels/clubb_src","name":"clubb_src","color":"FFFFFF","default":false},{"id":971577273,"node_id":"MDU6TGFiZWw5NzE1NzcyNzM=","url":"https://api.github.com/repos/StrikeNP/trac_test/labels/dschanen@uwm.edu","name":"dschanen@uwm.edu","color":"FFFFFF","default":false},{"id":971576851,"node_id":"MDU6TGFiZWw5NzE1NzY4NTE=","url":"https://api.github.com/repos/StrikeNP/trac_test/labels/enhancement","name":"enhancement","color":"a2eeef","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/StrikeNP/trac_test/milestones/4","html_url":"https://github.com/StrikeNP/trac_test/milestone/4","labels_url":"https://api.github.com/repos/StrikeNP/trac_test/milestones/4/labels","id":3442833,"node_id":"MDk6TWlsZXN0b25lMzQ0MjgzMw==","number":4,"title":"3. Refactor CLUBB","description":null,"creator":{"login":"StrikeNP","id":2577059,"node_id":"MDQ6VXNlcjI1NzcwNTk=","avatar_url":"https://avatars0.githubusercontent.com/u/2577059?v=4","gravatar_id":"","url":"https://api.github.com/users/StrikeNP","html_url":"https://github.com/StrikeNP","followers_url":"https://api.github.com/users/StrikeNP/followers","following_url":"https://api.github.com/users/StrikeNP/following{/other_user}","gists_url":"https://api.github.com/users/StrikeNP/gists{/gist_id}","starred_url":"https://api.github.com/users/StrikeNP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StrikeNP/subscriptions","organizations_url":"https://api.github.com/users/StrikeNP/orgs","repos_url":"https://api.github.com/users/StrikeNP/repos","events_url":"https://api.github.com/users/StrikeNP/events{/privacy}","received_events_url":"https://api.github.com/users/StrikeNP/received_events","type":"User","site_admin":false},"open_issues":38,"closed_issues":106,"state":"open","created_at":"2018-06-21T18:01:51Z","updated_at":"2018-06-23T18:43:19Z","due_on":null,"closed_at":null},"comments":25,"created_at":"2018-06-21T21:21:15Z","updated_at":"2018-06-23T18:45:02Z","closed_at":null,"author_association":"OWNER","body":"**Introduction**\nThe two largest files in the CLUBB repository are clubb_driver.F90 and microphys_driver, which as of right now are whopping 4,434 and 4,474 lines, respectively.  We have found in the past that huge files are harder to follow the logic of, and that TRAC starts to have problems with them when source files reach a certain size.  I can think of a few obvious solutions.\n\n**Possible plans of action**\n1. Since these files have multiple subroutines in them, we could do the simplest thing and most some of those subroutines into separate modules/files.  The downside of this is that then you have to open multiple files to see the flow of the program, but with code browsers and Doxygen this can be ameliorated to a large extant. \n2. We used to have a separate subroutine that did the tasks needed to interface with the microphysics and call SILHS, but now it's a big block of code in run_clubb.  I think run_clubb is a pretty long for a single subroutine.  Could we break up some of the tasks it performs into several subroutines? \n3. Could we pull all the general SILHS code out of microphys_driver as suggested on the roadmap?   A separate namelist for SILHS specific variables (e.g. number of sample points) seems reasonable.\n4. In general the loops in microphys_driver are long and hard to follow.  I think we might be able to refactor some of the clipping and various adjustments to a separate subroutine(s).\nedit: typos and clarification.\n\nAttachments:\n\n[plot_explicit_ta_configs.maff](https://github.com/larson-group/trac_attachment_archive/blob/master/trac_test/822/plot_explicit_ta_configs.maff)\n[plot_new_pdf_config_1_plot_2.maff](https://github.com/larson-group/trac_attachment_archive/blob/master/trac_test/822/plot_new_pdf_config_1_plot_2.maff)\n[plot_combo_pdf_run_3.maff](https://github.com/larson-group/trac_attachment_archive/blob/master/trac_test/822/plot_combo_pdf_run_3.maff)\n[plot_input_fields_rtp3_thlp3_1.maff](https://github.com/larson-group/trac_attachment_archive/blob/master/trac_test/822/plot_input_fields_rtp3_thlp3_1.maff)\n[plot_new_pdf_20180522_test_1.maff](https://github.com/larson-group/trac_attachment_archive/blob/master/trac_test/822/plot_new_pdf_20180522_test_1.maff)\n[plot_attempts_8_10.maff](https://github.com/larson-group/trac_attachment_archive/blob/master/trac_test/822/plot_attempts_8_10.maff)\n[plot_attempt_8_only.maff](https://github.com/larson-group/trac_attachment_archive/blob/master/trac_test/822/plot_attempt_8_only.maff)\n[plot_beta_1p3.maff](https://github.com/larson-group/trac_attachment_archive/blob/master/trac_test/822/plot_beta_1p3.maff)\n[plot_beta_1p3_all.maff](https://github.com/larson-group/trac_attachment_archive/blob/master/trac_test/822/plot_beta_1p3_all.maff)\n\nMigrated from http://carson.math.uwm.edu/trac/clubb/ticket/671\n```json\n{\n    \"status\": \"assigned\", \n    \"changetime\": \"2015-04-04T23:43:27\", \n    \"description\": \"'''Introduction'''\\nThe two largest files in the CLUBB repository are clubb_driver.F90 and microphys_driver, which as of right now are whopping 4,434 and 4,474 lines, respectively.  We have found in the past that huge files are harder to follow the logic of, and that TRAC starts to have problems with them when source files reach a certain size.  I can think of a few obvious solutions.\\n\\n'''Possible plans of action'''\\n1. Since these files have multiple subroutines in them, we could do the simplest thing and most some of those subroutines into separate modules/files.  The downside of this is that then you have to open multiple files to see the flow of the program, but with code browsers and Doxygen this can be ameliorated to a large extant. \\n2. We used to have a separate subroutine that did the tasks needed to interface with the microphysics and call SILHS, but now it's a big block of code in run_clubb.  I think run_clubb is a pretty long for a single subroutine.  Could we break up some of the tasks it performs into several subroutines? \\n3. Could we pull all the general SILHS code out of microphys_driver as suggested on the roadmap?   A separate namelist for SILHS specific variables (e.g. number of sample points) seems reasonable.\\n4. In general the loops in microphys_driver are long and hard to follow.  I think we might be able to refactor some of the clipping and various adjustments to a separate subroutine(s).\\nedit: typos and clarification.\", \n    \"reporter\": \"dschanen@uwm.edu\", \n    \"cc\": \"vlarson@uwm.edu, raut@uwm.edu\", \n    \"resolution\": \"\", \n    \"_ts\": \"1428191007037297\", \n    \"component\": \"clubb_src\", \n    \"summary\": \"Could we refactor the clubb_driver or microphys_driver modules?\", \n    \"priority\": \"minor\", \n    \"keywords\": \"\", \n    \"time\": \"2014-03-12T20:43:17\", \n    \"milestone\": \"3. Refactor CLUBB\", \n    \"owner\": \"dschanen@uwm.edu\", \n    \"type\": \"enhancement\"\n}\n```\n"},"comment":{"url":"https://api.github.com/repos/StrikeNP/trac_test/issues/comments/399700303","html_url":"https://github.com/StrikeNP/trac_test/issues/671#issuecomment-399700303","issue_url":"https://api.github.com/repos/StrikeNP/trac_test/issues/671","id":399700303,"node_id":"MDEyOklzc3VlQ29tbWVudDM5OTcwMDMwMw==","user":{"login":"StrikeNP","id":2577059,"node_id":"MDQ6VXNlcjI1NzcwNTk=","avatar_url":"https://avatars0.githubusercontent.com/u/2577059?v=4","gravatar_id":"","url":"https://api.github.com/users/StrikeNP","html_url":"https://github.com/StrikeNP","followers_url":"https://api.github.com/users/StrikeNP/followers","following_url":"https://api.github.com/users/StrikeNP/following{/other_user}","gists_url":"https://api.github.com/users/StrikeNP/gists{/gist_id}","starred_url":"https://api.github.com/users/StrikeNP/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/StrikeNP/subscriptions","organizations_url":"https://api.github.com/users/StrikeNP/orgs","repos_url":"https://api.github.com/users/StrikeNP/repos","events_url":"https://api.github.com/users/StrikeNP/events{/privacy}","received_events_url":"https://api.github.com/users/StrikeNP/received_events","type":"User","site_admin":false},"created_at":"2018-06-23T18:45:02Z","updated_at":"2018-06-23T18:45:02Z","author_association":"OWNER","body":"**Trac update on 2014/06/27 at 17:53**\n**vlarson@uwm.edu commented:**\n\nBrian, is there anything on this ticket related to the microphysics driver that you'd still like to see done?  If so, please enumerate the comments that list refactorings that might be beneficial.  \n\n"}}
{"actor":{"display_login":"StrikeNP"}}