{"action":"created","issue":{"url":"https://api.github.com/repos/StrikeNP/trac_test/issues/476","repository_url":"https://api.github.com/repos/StrikeNP/trac_test","labels_url":"https://api.github.com/repos/StrikeNP/trac_test/issues/476/labels{/name}","comments_url":"https://api.github.com/repos/StrikeNP/trac_test/issues/476/comments","events_url":"https://api.github.com/repos/StrikeNP/trac_test/issues/476/events","html_url":"https://github.com/StrikeNP/trac_test/issues/476","id":330447441,"node_id":"MDU6SXNzdWUzMzA0NDc0NDE=","number":476,"title":"Tune values of model flags in CLUBB (Trac #476)","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":958019852,"node_id":"MDU6TGFiZWw5NTgwMTk4NTI=","url":"https://api.github.com/repos/StrikeNP/trac_test/labels/Migrated%20from%20Trac","name":"Migrated from Trac","color":"FFFFFF","default":false},{"id":958042830,"node_id":"MDU6TGFiZWw5NTgwNDI4MzA=","url":"https://api.github.com/repos/StrikeNP/trac_test/labels/clubb_src","name":"clubb_src","color":"FFFFFF","default":false},{"id":958042829,"node_id":"MDU6TGFiZWw5NTgwNDI4Mjk=","url":"https://api.github.com/repos/StrikeNP/trac_test/labels/dschanen@uwm.edu","name":"dschanen@uwm.edu","color":"FFFFFF","default":false},{"id":958019578,"node_id":"MDU6TGFiZWw5NTgwMTk1Nzg=","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/12","html_url":"https://github.com/StrikeNP/trac_test/milestone/12","labels_url":"https://api.github.com/repos/StrikeNP/trac_test/milestones/12/labels","id":3408906,"node_id":"MDk6TWlsZXN0b25lMzQwODkwNg==","number":12,"title":"Improve tuners","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":2,"closed_issues":0,"state":"open","created_at":"2018-06-07T20:13:39Z","updated_at":"2018-06-07T21:46:31Z","due_on":null,"closed_at":null},"comments":27,"created_at":"2018-06-07T21:46:31Z","updated_at":"2018-06-09T04:44:28Z","closed_at":null,"author_association":"OWNER","body":"'''Introduction'''\n\nPete Bogenschutz of NCAR has found that CAM-CLUBB is highly sensitive to whether bells and whistles are turned on or off (cpt:https://github.com/larson-group/clubb/issues/100).  This brings up the general question of tuning model flags, i.e. choosing the optimal configuration of CLUBB.  In the past, we have tuned parameters that take on continuous values.  It might also be worthwhile to add functionality that finds which values of Boolean flags yield the best results.\n\nWhat configuration flags would we want to vary?  I think the following are important:\n\n1.  l_upwind_wpxp_ta in model_flags.F90\n2.  l_upwind_xpyp_ta in model_flags.F90\n3.  l_quintic_polynomial in interpolation.F90\n4.  bells and whistles: i.e., l_trapezoidal_rule_zt, l_trapezoidal_rule_zm, and l_call_pdf_closure_twice in clubb_core. (We should probably combine these into one flag, l_bells_and_whistles.)\n\nOther flags we could tune:\n\n```text\nl_single_C2_Skw\nl_standard_term_ta\nl_tke_aniso\nl_constant_thickness\nl_nu_grid_dependent\n```\nAre there others?\n\n'''Technical spec'''\n\nTo start with, the simplest thing to do is simply to set up a script that runs CLUBB with all combinations of options and sorts the results according to a cost function.  If there are ```n``` true-false flags, there will be 2^n^ simulations to run.  For n <=5, this should be feasible. \n\nWe should try to re-use the existing tuner code as much as possible.\n\nOne early step would be putting the relevant flags in some namelist like tunable_parameters.in so that they don't need to be changed in the source code.  Is this feasible, or would it take too long to code?\n\nIn the future, we could try to think of clever ways to avoid having to run all 2^n^ simulations.  \n\nIn the far future, we could try to think of ways to combine tuning of discrete flag in conjunction with continuous parameters.\n\n'''Tests'''\n\nWe should run a few of the configurations manually and see if indeed the higher-ranked ones look better.\n\nAttachments:\n\nhttp://carson.math.uwm.edu/trac/clubb/attachment/ticket/476/clubb_model_flags.ods\nhttp://carson.math.uwm.edu/trac/clubb/attachment/ticket/476/clubb_model_flags.2.ods\nhttp://carson.math.uwm.edu/trac/clubb/attachment/ticket/476/clubb_model_flags.csv\nhttp://carson.math.uwm.edu/trac/clubb/attachment/ticket/476/clubb_model_flags_15_Dec_1700.ods\n\nMigrated from http://carson.math.uwm.edu/trac/clubb/ticket/476\n```json\n{\n    \"status\": \"new\", \n    \"changetime\": \"2017-10-22T21:47:56\", \n    \"description\": \"'''Introduction'''\\n\\nPete Bogenschutz of NCAR has found that CAM-CLUBB is highly sensitive to whether bells and whistles are turned on or off (cpt:comment:25:ticket:100).  This brings up the general question of tuning model flags, i.e. choosing the optimal configuration of CLUBB.  In the past, we have tuned parameters that take on continuous values.  It might also be worthwhile to add functionality that finds which values of Boolean flags yield the best results.\\n\\nWhat configuration flags would we want to vary?  I think the following are important:\\n\\n1.  l_upwind_wpxp_ta in model_flags.F90\\n2.  l_upwind_xpyp_ta in model_flags.F90\\n3.  l_quintic_polynomial in interpolation.F90\\n4.  bells and whistles: i.e., l_trapezoidal_rule_zt, l_trapezoidal_rule_zm, and l_call_pdf_closure_twice in clubb_core. (We should probably combine these into one flag, l_bells_and_whistles.)\\n\\nOther flags we could tune:\\n{{{\\nl_single_C2_Skw\\nl_standard_term_ta\\nl_tke_aniso\\nl_constant_thickness\\nl_nu_grid_dependent\\n}}}\\nAre there others?\\n\\n'''Technical spec'''\\n\\nTo start with, the simplest thing to do is simply to set up a script that runs CLUBB with all combinations of options and sorts the results according to a cost function.  If there are {{{n}}} true-false flags, there will be 2^n^ simulations to run.  For n <=5, this should be feasible. \\n\\nWe should try to re-use the existing tuner code as much as possible.\\n\\nOne early step would be putting the relevant flags in some namelist like tunable_parameters.in so that they don't need to be changed in the source code.  Is this feasible, or would it take too long to code?\\n\\nIn the future, we could try to think of clever ways to avoid having to run all 2^n^ simulations.  \\n\\nIn the far future, we could try to think of ways to combine tuning of discrete flag in conjunction with continuous parameters.\\n\\n'''Tests'''\\n\\nWe should run a few of the configurations manually and see if indeed the higher-ranked ones look better.\", \n    \"reporter\": \"vlarson@uwm.edu\", \n    \"cc\": \"vlarson@uwm.edu\", \n    \"resolution\": \"\", \n    \"_ts\": \"1508708876387540\", \n    \"component\": \"clubb_src\", \n    \"summary\": \"Tune values of model flags in CLUBB\", \n    \"priority\": \"major\", \n    \"keywords\": \"\", \n    \"time\": \"2011-12-08T17:44:15\", \n    \"milestone\": \"Improve tuners\", \n    \"owner\": \"dschanen@uwm.edu\", \n    \"type\": \"enhancement\"\n}\n```\n"},"comment":{"url":"https://api.github.com/repos/StrikeNP/trac_test/issues/comments/395939580","html_url":"https://github.com/StrikeNP/trac_test/issues/476#issuecomment-395939580","issue_url":"https://api.github.com/repos/StrikeNP/trac_test/issues/476","id":395939580,"node_id":"MDEyOklzc3VlQ29tbWVudDM5NTkzOTU4MA==","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-09T04:44:28Z","updated_at":"2018-06-09T04:44:28Z","author_association":"OWNER","body":"Trac update at 2013/07/08 at 20:43\n\ndschanen@uwm.edu commented:\n\nReplying to [comment:23 vlarson@…]:\n> The specification of the variable ```saturation_formula``` is somewhat confusing because it appears to be specified in two different places.  It is set in module model_flags to ```saturation_formula = saturation_flatau```.  I presume we need to do this for the case when CLUBB is called by a host model?  But then when we run CLUBB standalone, it appears that saturation_formula is set in subroutine run_clubb to ```saturation_formula = \"flatau\"```.  \n> \n> Was the intention to specify saturation_formula in namelist configurable_model_flags.in rather than run_clubb, even for CLUBB standalone?  Is this worth doing?  Are there other flags that are set in two places and should be refactored?\n\nI general I think initializing all \"module\" / \"common\" variables to a value in their declaration might be a good refactoring because it ensures they're not uninitialized, but I don't know how much work this would be.  I'm not sure why the the saturation formula is set the way it is and I think it could be changed easily, but if we decide to do that for all variables we might need another ticket.\n\n"}}
{"actor":{"display_login":"StrikeNP"}}