{"action":"created","issue":{"url":"https://api.github.com/repos/bandre-ucar/junk-issues/issues/36","repository_url":"https://api.github.com/repos/bandre-ucar/junk-issues","labels_url":"https://api.github.com/repos/bandre-ucar/junk-issues/issues/36/labels{/name}","comments_url":"https://api.github.com/repos/bandre-ucar/junk-issues/issues/36/comments","events_url":"https://api.github.com/repos/bandre-ucar/junk-issues/issues/36/events","html_url":"https://github.com/bandre-ucar/junk-issues/issues/36","id":271966425,"number":36,"title":"Crop patch-level restart variables read after enter_spinup code","user":{"login":"bandre-ucar","id":9341547,"avatar_url":"https://avatars2.githubusercontent.com/u/9341547?v=4","gravatar_id":"","url":"https://api.github.com/users/bandre-ucar","html_url":"https://github.com/bandre-ucar","followers_url":"https://api.github.com/users/bandre-ucar/followers","following_url":"https://api.github.com/users/bandre-ucar/following{/other_user}","gists_url":"https://api.github.com/users/bandre-ucar/gists{/gist_id}","starred_url":"https://api.github.com/users/bandre-ucar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bandre-ucar/subscriptions","organizations_url":"https://api.github.com/users/bandre-ucar/orgs","repos_url":"https://api.github.com/users/bandre-ucar/repos","events_url":"https://api.github.com/users/bandre-ucar/events{/privacy}","received_events_url":"https://api.github.com/users/bandre-ucar/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/bandre-ucar/junk-issues/milestones/1","html_url":"https://github.com/bandre-ucar/junk-issues/milestone/1","labels_url":"https://api.github.com/repos/bandre-ucar/junk-issues/milestones/1/labels","id":2895144,"number":1,"title":"clm5","description":null,"creator":{"login":"bandre-ucar","id":9341547,"avatar_url":"https://avatars2.githubusercontent.com/u/9341547?v=4","gravatar_id":"","url":"https://api.github.com/users/bandre-ucar","html_url":"https://github.com/bandre-ucar","followers_url":"https://api.github.com/users/bandre-ucar/followers","following_url":"https://api.github.com/users/bandre-ucar/following{/other_user}","gists_url":"https://api.github.com/users/bandre-ucar/gists{/gist_id}","starred_url":"https://api.github.com/users/bandre-ucar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bandre-ucar/subscriptions","organizations_url":"https://api.github.com/users/bandre-ucar/orgs","repos_url":"https://api.github.com/users/bandre-ucar/repos","events_url":"https://api.github.com/users/bandre-ucar/events{/privacy}","received_events_url":"https://api.github.com/users/bandre-ucar/received_events","type":"User","site_admin":false},"open_issues":36,"closed_issues":0,"state":"open","created_at":"2017-11-07T19:52:57Z","updated_at":"2017-11-07T20:08:57Z","due_on":null,"closed_at":null},"comments":1,"created_at":"2017-11-07T20:08:57Z","updated_at":"2017-11-07T20:09:09Z","closed_at":null,"author_association":"OWNER","body":"**Bill Sacks < sacks > - 2017-01-18 10:46:20 -0700**\n**Bugzilla Id:** 2406\n**Bugzilla Blocks:** , None\n**Bugzilla Depends:** , None\n**Bugzilla CC:** , cdkoven, dlawren, oleson, rfisher\n**Bugzilla Attachment:**  None\n\nI don't fully understand this code, so I'm not positive of my assessment, but this looks wrong to me:\n\nCNVegCarbonStateType: Restart has some code to reset some patch-level variables when (I think) entering spinup mode. It looks to me like all of the patch-level variables are supposed to be read before that point. However, some crop-specific patch-level variables are read after that point (the various grain pools, and the new cropseedc_deficit pool that I am just adding).\n\nI'm guessing (but am not sure) that the crop restartvar calls should be moved to before this enter_spinup code?\n\nBonus points will be awarded for:\n\n(1) Explaining why this resetting only needs to happen for C variables, not the analogous N state variables\n\n(2) Extracting this resetting code into its own subroutine. Ideally, this code would be shared with the routine it was (seemingly) copy & pasted from (initCold, it appears)."},"comment":{"url":"https://api.github.com/repos/bandre-ucar/junk-issues/issues/comments/342606497","html_url":"https://github.com/bandre-ucar/junk-issues/issues/36#issuecomment-342606497","issue_url":"https://api.github.com/repos/bandre-ucar/junk-issues/issues/36","id":342606497,"user":{"login":"bandre-ucar","id":9341547,"avatar_url":"https://avatars2.githubusercontent.com/u/9341547?v=4","gravatar_id":"","url":"https://api.github.com/users/bandre-ucar","html_url":"https://github.com/bandre-ucar","followers_url":"https://api.github.com/users/bandre-ucar/followers","following_url":"https://api.github.com/users/bandre-ucar/following{/other_user}","gists_url":"https://api.github.com/users/bandre-ucar/gists{/gist_id}","starred_url":"https://api.github.com/users/bandre-ucar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bandre-ucar/subscriptions","organizations_url":"https://api.github.com/users/bandre-ucar/orgs","repos_url":"https://api.github.com/users/bandre-ucar/repos","events_url":"https://api.github.com/users/bandre-ucar/events{/privacy}","received_events_url":"https://api.github.com/users/bandre-ucar/received_events","type":"User","site_admin":false},"created_at":"2017-11-07T20:09:09Z","updated_at":"2017-11-07T20:09:09Z","author_association":"OWNER","body":"**Erik Kluzek < erik > - 2017-10-31 15:28:37 -0600**\n**Bugzilla Id:** 2406\nWhen the option reseed_dead_plants came to the trunk in clm4_5_15_r233 we have it handling both Nitrogen as well as Carbon. So that answers the first part of the bonus questions in original query for this report.\n\nBut, yes it looks like crop restartvar should be done first, and this section should be done last."}}
{"actor":{"display_login":"bandre-ucar"}}