{"action":"created","comment":{"url":"https://api.github.com/repos/UW-Hydro/VIC/pulls/comments/46778064","id":46778064,"diff_hunk":"@@ -688,6 +691,32 @@ double func_surf_energy_bal(double Ts, va_list ap)\n   else\n     Ra_used[0] = HUGE_RESIST;\n   \n+  if (veg_var->vegcover < 1) {\n+    if (Ra_used[0] > 0) {\n+      ga_veg = 1/Ra_used[0];\n+      tmp_wind[0] = wind[0];\n+      tmp_wind[1] = -999.;\n+      tmp_wind[2] = -999.;\n+      tmp_height = soil_con->rough/0.123;\n+      tmp_displacement[0] = calc_veg_displacement(tmp_height);\n+      tmp_roughness[0] = soil_con->rough;\n+      tmp_ref_height[0] = 10;\n+      Error = CalcAerodynamic(0,0,0,soil_con->snow_rough,soil_con->rough,0,Ra_bare,tmp_wind,tmp_displacement,tmp_ref_height,tmp_roughness);\n+      Ra_bare[0] /= StabilityCorrection(tmp_ref_height[0], tmp_displacement[0], TMean, Tair, tmp_wind[0], tmp_roughness[0]);\n+      if (Ra_bare[0] > 0) {\n+        ga_bare = 1/Ra_bare[0];\n+        ga_average = veg_var->vegcover*ga_veg + (1-veg_var->vegcover)*ga_bare;\n+        Ra_used[0] = 1/ga_average;\n+      }\n+      else {\n+        Ra_used[0] = 0;\n+      }\n+    }\n+    else {\n+      Ra_used[0] = 0;\n+    }\n+  }\n+","path":"src/func_surf_energy_bal.c","position":65,"original_position":39,"commit_id":"c3b772b5b1ff6db9989bc4566f5a36673ee81ceb","original_commit_id":"649243c69b475397a935d1df83c0d7cd39ef71d2","user":{"login":"tbohn","id":3496314,"avatar_url":"https://avatars.githubusercontent.com/u/3496314?v=3","gravatar_id":"","url":"https://api.github.com/users/tbohn","html_url":"https://github.com/tbohn","followers_url":"https://api.github.com/users/tbohn/followers","following_url":"https://api.github.com/users/tbohn/following{/other_user}","gists_url":"https://api.github.com/users/tbohn/gists{/gist_id}","starred_url":"https://api.github.com/users/tbohn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tbohn/subscriptions","organizations_url":"https://api.github.com/users/tbohn/orgs","repos_url":"https://api.github.com/users/tbohn/repos","events_url":"https://api.github.com/users/tbohn/events{/privacy}","received_events_url":"https://api.github.com/users/tbohn/received_events","type":"User","site_admin":false},"body":"But I added several lines of comments...  It needs *more*?  Which lines in particular need comments?","created_at":"2015-12-06T23:18:53Z","updated_at":"2015-12-06T23:18:53Z","html_url":"https://github.com/UW-Hydro/VIC/pull/315#discussion_r46778064","pull_request_url":"https://api.github.com/repos/UW-Hydro/VIC/pulls/315","_links":{"self":{"href":"https://api.github.com/repos/UW-Hydro/VIC/pulls/comments/46778064"},"html":{"href":"https://github.com/UW-Hydro/VIC/pull/315#discussion_r46778064"},"pull_request":{"href":"https://api.github.com/repos/UW-Hydro/VIC/pulls/315"}}},"pull_request":{"url":"https://api.github.com/repos/UW-Hydro/VIC/pulls/315","id":52177643,"html_url":"https://github.com/UW-Hydro/VIC/pull/315","diff_url":"https://github.com/UW-Hydro/VIC/pull/315.diff","patch_url":"https://github.com/UW-Hydro/VIC/pull/315.patch","issue_url":"https://api.github.com/repos/UW-Hydro/VIC/issues/315","number":315,"state":"open","locked":false,"title":"Update to code for Esoil in sparse vegetation.","user":{"login":"tbohn","id":3496314,"avatar_url":"https://avatars.githubusercontent.com/u/3496314?v=3","gravatar_id":"","url":"https://api.github.com/users/tbohn","html_url":"https://github.com/tbohn","followers_url":"https://api.github.com/users/tbohn/followers","following_url":"https://api.github.com/users/tbohn/following{/other_user}","gists_url":"https://api.github.com/users/tbohn/gists{/gist_id}","starred_url":"https://api.github.com/users/tbohn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tbohn/subscriptions","organizations_url":"https://api.github.com/users/tbohn/orgs","repos_url":"https://api.github.com/users/tbohn/repos","events_url":"https://api.github.com/users/tbohn/events{/privacy}","received_events_url":"https://api.github.com/users/tbohn/received_events","type":"User","site_admin":false},"body":"I had intended to add this update to the original 4.2 release, but forgot about it until now.  This addresses issue #306.","created_at":"2015-11-30T20:53:53Z","updated_at":"2015-12-06T23:18:53Z","closed_at":null,"merged_at":null,"merge_commit_sha":"58f99d46af6a2cea68001d24b0419b4f91aa0b8a","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/UW-Hydro/VIC/pulls/315/commits","review_comments_url":"https://api.github.com/repos/UW-Hydro/VIC/pulls/315/comments","review_comment_url":"https://api.github.com/repos/UW-Hydro/VIC/pulls/comments{/number}","comments_url":"https://api.github.com/repos/UW-Hydro/VIC/issues/315/comments","statuses_url":"https://api.github.com/repos/UW-Hydro/VIC/statuses/c3b772b5b1ff6db9989bc4566f5a36673ee81ceb","head":{"label":"tbohn:fix_ra","ref":"fix_ra","sha":"c3b772b5b1ff6db9989bc4566f5a36673ee81ceb","user":{"login":"tbohn","id":3496314,"avatar_url":"https://avatars.githubusercontent.com/u/3496314?v=3","gravatar_id":"","url":"https://api.github.com/users/tbohn","html_url":"https://github.com/tbohn","followers_url":"https://api.github.com/users/tbohn/followers","following_url":"https://api.github.com/users/tbohn/following{/other_user}","gists_url":"https://api.github.com/users/tbohn/gists{/gist_id}","starred_url":"https://api.github.com/users/tbohn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tbohn/subscriptions","organizations_url":"https://api.github.com/users/tbohn/orgs","repos_url":"https://api.github.com/users/tbohn/repos","events_url":"https://api.github.com/users/tbohn/events{/privacy}","received_events_url":"https://api.github.com/users/tbohn/received_events","type":"User","site_admin":false},"repo":{"id":8425024,"name":"VIC","full_name":"tbohn/VIC","owner":{"login":"tbohn","id":3496314,"avatar_url":"https://avatars.githubusercontent.com/u/3496314?v=3","gravatar_id":"","url":"https://api.github.com/users/tbohn","html_url":"https://github.com/tbohn","followers_url":"https://api.github.com/users/tbohn/followers","following_url":"https://api.github.com/users/tbohn/following{/other_user}","gists_url":"https://api.github.com/users/tbohn/gists{/gist_id}","starred_url":"https://api.github.com/users/tbohn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tbohn/subscriptions","organizations_url":"https://api.github.com/users/tbohn/orgs","repos_url":"https://api.github.com/users/tbohn/repos","events_url":"https://api.github.com/users/tbohn/events{/privacy}","received_events_url":"https://api.github.com/users/tbohn/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/tbohn/VIC","description":"The Variable Infiltration Capacity (VIC) Macroscale Hydrologic Model","fork":true,"url":"https://api.github.com/repos/tbohn/VIC","forks_url":"https://api.github.com/repos/tbohn/VIC/forks","keys_url":"https://api.github.com/repos/tbohn/VIC/keys{/key_id}","collaborators_url":"https://api.github.com/repos/tbohn/VIC/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/tbohn/VIC/teams","hooks_url":"https://api.github.com/repos/tbohn/VIC/hooks","issue_events_url":"https://api.github.com/repos/tbohn/VIC/issues/events{/number}","events_url":"https://api.github.com/repos/tbohn/VIC/events","assignees_url":"https://api.github.com/repos/tbohn/VIC/assignees{/user}","branches_url":"https://api.github.com/repos/tbohn/VIC/branches{/branch}","tags_url":"https://api.github.com/repos/tbohn/VIC/tags","blobs_url":"https://api.github.com/repos/tbohn/VIC/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/tbohn/VIC/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/tbohn/VIC/git/refs{/sha}","trees_url":"https://api.github.com/repos/tbohn/VIC/git/trees{/sha}","statuses_url":"https://api.github.com/repos/tbohn/VIC/statuses/{sha}","languages_url":"https://api.github.com/repos/tbohn/VIC/languages","stargazers_url":"https://api.github.com/repos/tbohn/VIC/stargazers","contributors_url":"https://api.github.com/repos/tbohn/VIC/contributors","subscribers_url":"https://api.github.com/repos/tbohn/VIC/subscribers","subscription_url":"https://api.github.com/repos/tbohn/VIC/subscription","commits_url":"https://api.github.com/repos/tbohn/VIC/commits{/sha}","git_commits_url":"https://api.github.com/repos/tbohn/VIC/git/commits{/sha}","comments_url":"https://api.github.com/repos/tbohn/VIC/comments{/number}","issue_comment_url":"https://api.github.com/repos/tbohn/VIC/issues/comments{/number}","contents_url":"https://api.github.com/repos/tbohn/VIC/contents/{+path}","compare_url":"https://api.github.com/repos/tbohn/VIC/compare/{base}...{head}","merges_url":"https://api.github.com/repos/tbohn/VIC/merges","archive_url":"https://api.github.com/repos/tbohn/VIC/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/tbohn/VIC/downloads","issues_url":"https://api.github.com/repos/tbohn/VIC/issues{/number}","pulls_url":"https://api.github.com/repos/tbohn/VIC/pulls{/number}","milestones_url":"https://api.github.com/repos/tbohn/VIC/milestones{/number}","notifications_url":"https://api.github.com/repos/tbohn/VIC/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/tbohn/VIC/labels{/name}","releases_url":"https://api.github.com/repos/tbohn/VIC/releases{/id}","created_at":"2013-02-26T04:24:03Z","updated_at":"2015-08-14T03:50:13Z","pushed_at":"2015-11-30T22:21:39Z","git_url":"git://github.com/tbohn/VIC.git","ssh_url":"git@github.com:tbohn/VIC.git","clone_url":"https://github.com/tbohn/VIC.git","svn_url":"https://github.com/tbohn/VIC","homepage":null,"size":12448,"stargazers_count":0,"watchers_count":0,"language":"C","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"UW-Hydro:hotfix/4.2.c","ref":"hotfix/4.2.c","sha":"25e33979b19c577e7564f0b98a16aaf41b01b242","user":{"login":"UW-Hydro","id":3475662,"avatar_url":"https://avatars.githubusercontent.com/u/3475662?v=3","gravatar_id":"","url":"https://api.github.com/users/UW-Hydro","html_url":"https://github.com/UW-Hydro","followers_url":"https://api.github.com/users/UW-Hydro/followers","following_url":"https://api.github.com/users/UW-Hydro/following{/other_user}","gists_url":"https://api.github.com/users/UW-Hydro/gists{/gist_id}","starred_url":"https://api.github.com/users/UW-Hydro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UW-Hydro/subscriptions","organizations_url":"https://api.github.com/users/UW-Hydro/orgs","repos_url":"https://api.github.com/users/UW-Hydro/repos","events_url":"https://api.github.com/users/UW-Hydro/events{/privacy}","received_events_url":"https://api.github.com/users/UW-Hydro/received_events","type":"Organization","site_admin":false},"repo":{"id":8064928,"name":"VIC","full_name":"UW-Hydro/VIC","owner":{"login":"UW-Hydro","id":3475662,"avatar_url":"https://avatars.githubusercontent.com/u/3475662?v=3","gravatar_id":"","url":"https://api.github.com/users/UW-Hydro","html_url":"https://github.com/UW-Hydro","followers_url":"https://api.github.com/users/UW-Hydro/followers","following_url":"https://api.github.com/users/UW-Hydro/following{/other_user}","gists_url":"https://api.github.com/users/UW-Hydro/gists{/gist_id}","starred_url":"https://api.github.com/users/UW-Hydro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/UW-Hydro/subscriptions","organizations_url":"https://api.github.com/users/UW-Hydro/orgs","repos_url":"https://api.github.com/users/UW-Hydro/repos","events_url":"https://api.github.com/users/UW-Hydro/events{/privacy}","received_events_url":"https://api.github.com/users/UW-Hydro/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/UW-Hydro/VIC","description":"The Variable Infiltration Capacity (VIC) Macroscale Hydrologic Model","fork":false,"url":"https://api.github.com/repos/UW-Hydro/VIC","forks_url":"https://api.github.com/repos/UW-Hydro/VIC/forks","keys_url":"https://api.github.com/repos/UW-Hydro/VIC/keys{/key_id}","collaborators_url":"https://api.github.com/repos/UW-Hydro/VIC/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/UW-Hydro/VIC/teams","hooks_url":"https://api.github.com/repos/UW-Hydro/VIC/hooks","issue_events_url":"https://api.github.com/repos/UW-Hydro/VIC/issues/events{/number}","events_url":"https://api.github.com/repos/UW-Hydro/VIC/events","assignees_url":"https://api.github.com/repos/UW-Hydro/VIC/assignees{/user}","branches_url":"https://api.github.com/repos/UW-Hydro/VIC/branches{/branch}","tags_url":"https://api.github.com/repos/UW-Hydro/VIC/tags","blobs_url":"https://api.github.com/repos/UW-Hydro/VIC/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/UW-Hydro/VIC/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/UW-Hydro/VIC/git/refs{/sha}","trees_url":"https://api.github.com/repos/UW-Hydro/VIC/git/trees{/sha}","statuses_url":"https://api.github.com/repos/UW-Hydro/VIC/statuses/{sha}","languages_url":"https://api.github.com/repos/UW-Hydro/VIC/languages","stargazers_url":"https://api.github.com/repos/UW-Hydro/VIC/stargazers","contributors_url":"https://api.github.com/repos/UW-Hydro/VIC/contributors","subscribers_url":"https://api.github.com/repos/UW-Hydro/VIC/subscribers","subscription_url":"https://api.github.com/repos/UW-Hydro/VIC/subscription","commits_url":"https://api.github.com/repos/UW-Hydro/VIC/commits{/sha}","git_commits_url":"https://api.github.com/repos/UW-Hydro/VIC/git/commits{/sha}","comments_url":"https://api.github.com/repos/UW-Hydro/VIC/comments{/number}","issue_comment_url":"https://api.github.com/repos/UW-Hydro/VIC/issues/comments{/number}","contents_url":"https://api.github.com/repos/UW-Hydro/VIC/contents/{+path}","compare_url":"https://api.github.com/repos/UW-Hydro/VIC/compare/{base}...{head}","merges_url":"https://api.github.com/repos/UW-Hydro/VIC/merges","archive_url":"https://api.github.com/repos/UW-Hydro/VIC/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/UW-Hydro/VIC/downloads","issues_url":"https://api.github.com/repos/UW-Hydro/VIC/issues{/number}","pulls_url":"https://api.github.com/repos/UW-Hydro/VIC/pulls{/number}","milestones_url":"https://api.github.com/repos/UW-Hydro/VIC/milestones{/number}","notifications_url":"https://api.github.com/repos/UW-Hydro/VIC/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/UW-Hydro/VIC/labels{/name}","releases_url":"https://api.github.com/repos/UW-Hydro/VIC/releases{/id}","created_at":"2013-02-07T02:30:14Z","updated_at":"2015-09-27T03:26:50Z","pushed_at":"2015-12-01T23:05:30Z","git_url":"git://github.com/UW-Hydro/VIC.git","ssh_url":"git@github.com:UW-Hydro/VIC.git","clone_url":"https://github.com/UW-Hydro/VIC.git","svn_url":"https://github.com/UW-Hydro/VIC","homepage":"http://vic.readthedocs.org","size":18446,"stargazers_count":27,"watchers_count":27,"language":"C","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":102,"mirror_url":null,"open_issues_count":59,"forks":102,"open_issues":59,"watchers":27,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/UW-Hydro/VIC/pulls/315"},"html":{"href":"https://github.com/UW-Hydro/VIC/pull/315"},"issue":{"href":"https://api.github.com/repos/UW-Hydro/VIC/issues/315"},"comments":{"href":"https://api.github.com/repos/UW-Hydro/VIC/issues/315/comments"},"review_comments":{"href":"https://api.github.com/repos/UW-Hydro/VIC/pulls/315/comments"},"review_comment":{"href":"https://api.github.com/repos/UW-Hydro/VIC/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/UW-Hydro/VIC/pulls/315/commits"},"statuses":{"href":"https://api.github.com/repos/UW-Hydro/VIC/statuses/c3b772b5b1ff6db9989bc4566f5a36673ee81ceb"}}}}