{"action":"created","issue":{"url":"https://api.github.com/repos/StrikeNP/trac_test/issues/639","repository_url":"https://api.github.com/repos/StrikeNP/trac_test","labels_url":"https://api.github.com/repos/StrikeNP/trac_test/issues/639/labels{/name}","comments_url":"https://api.github.com/repos/StrikeNP/trac_test/issues/639/comments","events_url":"https://api.github.com/repos/StrikeNP/trac_test/issues/639/events","html_url":"https://github.com/StrikeNP/trac_test/issues/639","id":334661645,"node_id":"MDU6SXNzdWUzMzQ2NjE2NDU=","number":639,"title":"Feed wphmp and other xphmp variables into subroutine pdf_closure (Trac #639)","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":971576851,"node_id":"MDU6TGFiZWw5NzE1NzY4NTE=","url":"https://api.github.com/repos/StrikeNP/trac_test/labels/enhancement","name":"enhancement","color":"a2eeef","default":true},{"id":971649570,"node_id":"MDU6TGFiZWw5NzE2NDk1NzA=","url":"https://api.github.com/repos/StrikeNP/trac_test/labels/raut@uwm.edu","name":"raut@uwm.edu","color":"FFFFFF","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/StrikeNP/trac_test/milestones/5","html_url":"https://github.com/StrikeNP/trac_test/milestone/5","labels_url":"https://api.github.com/repos/StrikeNP/trac_test/milestones/5/labels","id":3442835,"node_id":"MDk6TWlsZXN0b25lMzQ0MjgzNQ==","number":5,"title":"Microphysics and 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":8,"closed_issues":7,"state":"open","created_at":"2018-06-21T18:02:12Z","updated_at":"2018-06-23T14:22:20Z","due_on":null,"closed_at":null},"comments":10,"created_at":"2018-06-21T21:18:58Z","updated_at":"2018-06-23T15:48:55Z","closed_at":null,"author_association":"OWNER","body":"\n**Introduction**\n\nCLUBB originated as a model for non-precipitating warm clouds.  However, now we'd like to generalize it to account for precipitation (rain, snow, and graupel) and ice processes (e.g. cloud ice).  \n\nPart of this involves generalizing CLUBB's buoyancy variable, thv (virtual potential temperature or theta_v).  CLUBB's subgrid-scale thv variables do not include loading by rain, snow, cloud ice, or graupel.  Furthermore, CLUBB's subgrid variability is not influenced by latent heating effects of ice, except through the approximate `l_use_ice_latent` option.\n\nParameterizing the effects of ice and precip on thv will be a long-term project.  But a first software step is to feed the relevant thv variables into pdf_closure, where they can be included in the relevant thv calculations.\n\n**Technical spec**\n\nPrecip and ice effects need to be included into four variables in pdf_closure: wpthvp, wp2thvp, rtpthvp, and thlpthvp.  To include these effects, we need to feed the following four variable arrays into pdf_closure: wphmp, wp2hmp, rtphmp, thlphmp.  \n\nwphmp already exists and is available to be fed into pdf_closure.  Right now, wphydrometp is calculated in [clubb:source:/trunk/src/microphys_driver.F90?rev=6620#L1890 subroutine advance_microphys].  Then wphmp is assigned to wphydrometp in [clubb:source:/trunk/src/CLUBB_core/setup_clubb_pdf_params.F90?rev=6622#L3517 subroutine precip_hm_arrays], which is called from [clubb:source:/trunk/src/CLUBB_core/setup_clubb_pdf_params.F90?rev=6622#L278 subroutine setup_pdf_parameters].\n\nThe other variables --- wp2hmp, rtphmp, and thlphmp --- don't yet exist.  However, we should create the variables, set them to zero, and feed them into pdf_closure.  \n\nI don't know yet where the 4 variable arrays will ultimately be computed.  They involve hydrometeors, and as such, they seem to belong more down toward the microphysical part of the code.  We will probably have an option to compute them via SILHS.  We will probably also have another non-SILHS estimate.  I could imagine this estimate being done in setup_pdf_parameters.  In this case, they would be fed through advance_microphys.  \n\nOne design question for the future is what variables we want to preserve from time step to time step.  We could preserve wphmp, wp2hmp, rtphmp, thlphmp from time step to time step.  Or we could merely preserve the pdf parameters and re-construct wphmp, wp2hmp, rtphmp, thlphmp before the call to advance_clubb_core.  But this decision won't affect the refactoring in this ticket.\n\nIn either case, I think we'd want to feed the 4 variable arrays through advance_clubb_core before going into pdf_closure.  Of course, then we'd need to change the calls to advance_clubb_core in SAM, CAM, and WRF.  A key design aspect is to think about how information will flow in these host models.\n\nI think that we'd want to output the components of the 4 variable-arrays to the stats output.  wp2hmp would go on the zt grid, and wphmp, thlphmp, and rtphmp would go on the zm grid.\n\n**Tests**\n\nSimply feeding the variables in shouldn't change the output.  So the results should be bit-for-bit identical except for the output of new variables.\n\nDo you have any good ideas on how to check whether wphmp has been fed through without corruption?  We should compile with the debug options on in order to check for array out-of-bound errors and the like.\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/639\n```json\n{\n    \"status\": \"new\", \n    \"changetime\": \"2014-09-19T09:16:02\", \n    \"description\": \"\\n'''Introduction'''\\n\\nCLUBB originated as a model for non-precipitating warm clouds.  However, now we'd like to generalize it to account for precipitation (rain, snow, and graupel) and ice processes (e.g. cloud ice).  \\n\\nPart of this involves generalizing CLUBB's buoyancy variable, thv (virtual potential temperature or theta_v).  CLUBB's subgrid-scale thv variables do not include loading by rain, snow, cloud ice, or graupel.  Furthermore, CLUBB's subgrid variability is not influenced by latent heating effects of ice, except through the approximate `l_use_ice_latent` option.\\n\\nParameterizing the effects of ice and precip on thv will be a long-term project.  But a first software step is to feed the relevant thv variables into pdf_closure, where they can be included in the relevant thv calculations.\\n\\n'''Technical spec'''\\n\\nPrecip and ice effects need to be included into four variables in pdf_closure: wpthvp, wp2thvp, rtpthvp, and thlpthvp.  To include these effects, we need to feed the following four variable arrays into pdf_closure: wphmp, wp2hmp, rtphmp, thlphmp.  \\n\\nwphmp already exists and is available to be fed into pdf_closure.  Right now, wphydrometp is calculated in [clubb:source:/trunk/src/microphys_driver.F90?rev=6620#L1890 subroutine advance_microphys].  Then wphmp is assigned to wphydrometp in [clubb:source:/trunk/src/CLUBB_core/setup_clubb_pdf_params.F90?rev=6622#L3517 subroutine precip_hm_arrays], which is called from [clubb:source:/trunk/src/CLUBB_core/setup_clubb_pdf_params.F90?rev=6622#L278 subroutine setup_pdf_parameters].\\n\\nThe other variables --- wp2hmp, rtphmp, and thlphmp --- don't yet exist.  However, we should create the variables, set them to zero, and feed them into pdf_closure.  \\n\\nI don't know yet where the 4 variable arrays will ultimately be computed.  They involve hydrometeors, and as such, they seem to belong more down toward the microphysical part of the code.  We will probably have an option to compute them via SILHS.  We will probably also have another non-SILHS estimate.  I could imagine this estimate being done in setup_pdf_parameters.  In this case, they would be fed through advance_microphys.  \\n\\nOne design question for the future is what variables we want to preserve from time step to time step.  We could preserve wphmp, wp2hmp, rtphmp, thlphmp from time step to time step.  Or we could merely preserve the pdf parameters and re-construct wphmp, wp2hmp, rtphmp, thlphmp before the call to advance_clubb_core.  But this decision won't affect the refactoring in this ticket.\\n\\nIn either case, I think we'd want to feed the 4 variable arrays through advance_clubb_core before going into pdf_closure.  Of course, then we'd need to change the calls to advance_clubb_core in SAM, CAM, and WRF.  A key design aspect is to think about how information will flow in these host models.\\n\\nI think that we'd want to output the components of the 4 variable-arrays to the stats output.  wp2hmp would go on the zt grid, and wphmp, thlphmp, and rtphmp would go on the zm grid.\\n\\n'''Tests'''\\n\\nSimply feeding the variables in shouldn't change the output.  So the results should be bit-for-bit identical except for the output of new variables.\\n\\nDo you have any good ideas on how to check whether wphmp has been fed through without corruption?  We should compile with the debug options on in order to check for array out-of-bound errors and the like.\", \n    \"reporter\": \"vlarson@uwm.edu\", \n    \"cc\": \"vlarson@uwm.edu, bmg2@uwm.edu\", \n    \"resolution\": \"\", \n    \"_ts\": \"1411118162057113\", \n    \"component\": \"clubb_src\", \n    \"summary\": \"Feed wphmp and other xphmp variables into subroutine pdf_closure\", \n    \"priority\": \"major\", \n    \"keywords\": \"\", \n    \"time\": \"2013-12-11T16:38:11\", \n    \"milestone\": \"Microphysics and CLUBB\", \n    \"owner\": \"raut@uwm.edu\", \n    \"type\": \"enhancement\"\n}\n```\n"},"comment":{"url":"https://api.github.com/repos/StrikeNP/trac_test/issues/comments/399687883","html_url":"https://github.com/StrikeNP/trac_test/issues/639#issuecomment-399687883","issue_url":"https://api.github.com/repos/StrikeNP/trac_test/issues/639","id":399687883,"node_id":"MDEyOklzc3VlQ29tbWVudDM5OTY4Nzg4Mw==","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-23T15:48:55Z","updated_at":"2018-06-23T15:48:55Z","author_association":"OWNER","body":"**Trac update on 2013/12/26 at 18:02**\n**raut@uwm.edu commented:**\n\nCommit comment from wrf:r559 For https://github.com/larson-group/clubb/issues/639, I am modifying WRF to match changes to CLUBB for this ticket.\n\nWRF still does not compile, but I don't think that has anything to do with this ticket.\n\n\n"}}
{"actor":{"display_login":"StrikeNP"}}