{"action":"created","issue":{"url":"https://api.github.com/repos/StrikeNP/trac_test/issues/376","repository_url":"https://api.github.com/repos/StrikeNP/trac_test","labels_url":"https://api.github.com/repos/StrikeNP/trac_test/issues/376/labels{/name}","comments_url":"https://api.github.com/repos/StrikeNP/trac_test/issues/376/comments","events_url":"https://api.github.com/repos/StrikeNP/trac_test/issues/376/events","html_url":"https://github.com/StrikeNP/trac_test/issues/376","id":334631170,"node_id":"MDU6SXNzdWUzMzQ2MzExNzA=","number":376,"title":"Create upwind differencing option for sedimentation of hydrometeors (Trac #376)","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":null,"comments":19,"created_at":"2018-06-21T19:44:04Z","updated_at":"2018-06-22T19:33:16Z","closed_at":null,"author_association":"OWNER","body":"**Introduction**\n\nCurrently, we sediment (let fall) hydrometeors such as rain and snow using centered differencing.  However, centered differencing can create spurious negative values of rain and snow (see ticket:373).  In contrast, upwind differencing (see http://www.nrbook.com/fortran/ , p. 832) is monotonic, i.e. does not create spurious extrema.  Upwind differencing is diffusive, but precipitation sedimentation is inherently diffusive because drops of different sizes fall at different fall speeds.  For these reasons, Bill Skamarock at NCAR recommends trying upwind differencing.\n\n**Technical spec**\n\nThe relevant code is contained in\n\n\n```text\nsubroutine advance_microphys  \n   subroutine microphys_solve \n      subroutine microphys_lhs\n         function sedimentation\n```\n\nI believe that the only code change needed is to create a new function (\"upwind_sediment\") that replaces function sedimentation when a flag (\"l_sed_upwind\") is true.  We want to use implicit (not explicit) upwinding.  With upwinding, we will no longer need to interpolate values of sedimentation velocity, V_hm, to the momentum levels.  This is done in subroutine advance_microphys:\n\n```text\nhydromet_vel(:,i) = zt2zm( hydromet_vel(:,i) )\n```\nIf we comment out these lines, then we will have to change other lines.  E.g. we will need to change zm to zt in\n\n```text\n     if ( l_stats_samp ) then\n        ! Sedimentation velocity for rrainm\n        call stat_update_var( iVrr, hydromet_vel(:,iirrainm), zm )\n\n        ! Sedimentation velocity for Nrm\n        call stat_update_var( iVNr, hydromet_vel(:,iiNrm), zm )\n     end if\n```\nThere will undoubtedly be other changes you'll need to make.\n\nCLUBB sediments only when the KK or COAMPS microphysics schemes are used; the Morrison scheme contains its own sedimentation.\n\nThere are two major complications.  First, we need to allow for a stretched grid.  Second, we need to make sure that the upwinding scheme is conservative.  Notes on both these aspects can be found in function sedimentation.  \n\n**Tests**\n\n1.  Run all benchmark cases that contain KK or COAMPS microphysics, and make sure that they produce reasonable results.  \n\n2.  Test that the new scheme is conservative.  CLUBB has a test that was implemented in ticket:255.  To run this test, we should promote CLUBB to double precision at compile time.\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/376\n```json\n{\n    \"status\": \"closed\", \n    \"changetime\": \"2011-04-05T21:53:48\", \n    \"description\": \"'''Introduction'''\\n\\nCurrently, we sediment (let fall) hydrometeors such as rain and snow using centered differencing.  However, centered differencing can create spurious negative values of rain and snow (see ticket:373).  In contrast, upwind differencing (see http://www.nrbook.com/fortran/ , p. 832) is monotonic, i.e. does not create spurious extrema.  Upwind differencing is diffusive, but precipitation sedimentation is inherently diffusive because drops of different sizes fall at different fall speeds.  For these reasons, Bill Skamarock at NCAR recommends trying upwind differencing.\\n\\n'''Technical spec'''\\n\\nThe relevant code is contained in\\n\\n{{{\\nsubroutine advance_microphys  \\n   subroutine microphys_solve \\n      subroutine microphys_lhs\\n         function sedimentation\\n}}}\\n\\nI believe that the only code change needed is to create a new function (\\\"upwind_sediment\\\") that replaces function sedimentation when a flag (\\\"l_sed_upwind\\\") is true.  We want to use implicit (not explicit) upwinding.  With upwinding, we will no longer need to interpolate values of sedimentation velocity, V_hm, to the momentum levels.  This is done in subroutine advance_microphys:\\n{{{\\nhydromet_vel(:,i) = zt2zm( hydromet_vel(:,i) )\\n}}}\\nIf we comment out these lines, then we will have to change other lines.  E.g. we will need to change zm to zt in\\n{{{\\n     if ( l_stats_samp ) then\\n        ! Sedimentation velocity for rrainm\\n        call stat_update_var( iVrr, hydromet_vel(:,iirrainm), zm )\\n\\n        ! Sedimentation velocity for Nrm\\n        call stat_update_var( iVNr, hydromet_vel(:,iiNrm), zm )\\n     end if\\n}}}\\nThere will undoubtedly be other changes you'll need to make.\\n\\nCLUBB sediments only when the KK or COAMPS microphysics schemes are used; the Morrison scheme contains its own sedimentation.\\n\\nThere are two major complications.  First, we need to allow for a stretched grid.  Second, we need to make sure that the upwinding scheme is conservative.  Notes on both these aspects can be found in function sedimentation.  \\n\\n'''Tests'''\\n\\n1.  Run all benchmark cases that contain KK or COAMPS microphysics, and make sure that they produce reasonable results.  \\n\\n2.  Test that the new scheme is conservative.  CLUBB has a test that was implemented in ticket:255.  To run this test, we should promote CLUBB to double precision at compile time.\", \n    \"reporter\": \"vlarson@uwm.edu\", \n    \"cc\": \"vlarson@uwm.edu\", \n    \"resolution\": \"wontfix\", \n    \"_ts\": \"1302040428000000\", \n    \"component\": \"clubb_src\", \n    \"summary\": \"Create upwind differencing option for sedimentation of hydrometeors\", \n    \"priority\": \"major\", \n    \"keywords\": \"\", \n    \"time\": \"2010-11-09T17:10:42\", \n    \"milestone\": \"\", \n    \"owner\": \"dschanen@uwm.edu\", \n    \"type\": \"enhancement\"\n}\n```\n"},"comment":{"url":"https://api.github.com/repos/StrikeNP/trac_test/issues/comments/399558224","html_url":"https://github.com/StrikeNP/trac_test/issues/376#issuecomment-399558224","issue_url":"https://api.github.com/repos/StrikeNP/trac_test/issues/376","id":399558224,"node_id":"MDEyOklzc3VlQ29tbWVudDM5OTU1ODIyNA==","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-22T19:33:16Z","updated_at":"2018-06-22T19:33:16Z","author_association":"OWNER","body":"**Trac update on 2011/03/30 at 16:09**\n**dschanen@uwm.edu commented:**\n\nReplying to [comment:17 vlarson@…]:\n> Replying to [comment:16 dschanen@…]:\n> > Professor Larson noticed that the formula being used for the upwind difference approximation wasn't using the sedimentation velocity at the k+1 level, which we want in order to put the term inside the derivative.  Fixed in r5063.\n>\n> > The results after making this change are [http://www.larson-group.com/dschanen/protected/rev2_centered_vs_upwind_diff_plot.maff here].   It appears that this fixes the issues we noticed. I'm completely baffled how such a small change could create the changes we saw at 1 meter grid spacing, and I'm still not sure don't potentially have non-conservation issues somewhere.\n> At this resolution, centered and upwind differencing look similar.  It might be worth re-running the same cases but using the GFDL 48-level grid.\n\nI posted that plot [http://www.larson-group.com/dschanen/protected/L48_upwind_vs_centered_plot.maff here].  We noticed yesterday that while the time intermittency of DYCOMS II RF02 is improved at 48 levels the RICO case looks worse.  Coincidently, we noticed in ticket #390 that applying upwinding to rtp_ta, et al. make the shallow cumulus cases look less intermittent and the stratocumulus cases like RF02 look worse.  We're not sure if there's a connection.\n\n"}}
{"actor":{"display_login":"StrikeNP"}}