{"action":"created","issue":{"url":"https://api.github.com/repos/GLEON/LakeMetabolizer/issues/75","labels_url":"https://api.github.com/repos/GLEON/LakeMetabolizer/issues/75/labels{/name}","comments_url":"https://api.github.com/repos/GLEON/LakeMetabolizer/issues/75/comments","events_url":"https://api.github.com/repos/GLEON/LakeMetabolizer/issues/75/events","html_url":"https://github.com/GLEON/LakeMetabolizer/issues/75","id":55419417,"number":75,"title":"SW to PAR conversion wrong given stated units","user":{"login":"lawinslow","id":347600,"avatar_url":"https://avatars.githubusercontent.com/u/347600?v=3","gravatar_id":"","url":"https://api.github.com/users/lawinslow","html_url":"https://github.com/lawinslow","followers_url":"https://api.github.com/users/lawinslow/followers","following_url":"https://api.github.com/users/lawinslow/following{/other_user}","gists_url":"https://api.github.com/users/lawinslow/gists{/gist_id}","starred_url":"https://api.github.com/users/lawinslow/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lawinslow/subscriptions","organizations_url":"https://api.github.com/users/lawinslow/orgs","repos_url":"https://api.github.com/users/lawinslow/repos","events_url":"https://api.github.com/users/lawinslow/events{/privacy}","received_events_url":"https://api.github.com/users/lawinslow/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/GLEON/LakeMetabolizer/labels/bug","name":"bug","color":"fc2929"},{"url":"https://api.github.com/repos/GLEON/LakeMetabolizer/labels/invalid","name":"invalid","color":"e6e6e6"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":6,"created_at":"2015-01-25T15:42:18Z","updated_at":"2015-02-18T14:51:02Z","closed_at":null,"body":"From Peter:\r\n\r\n>The function that you have is \r\n> sw.to.par.base\r\n```{r} \r\nfunction (sw) \r\n{\r\n    par = sw * 0.473\r\n}\r\n<environment: namespace:LakeMetabolizer>\r\n````\r\n \r\n> which seemed funny to me. The citation in the help file is to Britton and Dodd 1976, which I looked up. They do give a 47% number for the proportion of shortwave energy in the PAR spectrum, but this number should come after converting the units from umol m-2 s-1 to W m-2. The conversion used for that is given in the first paragraph of the methods section as 4.57 umol m-2 s-1 for clear-sky irradiance, and 4.24 umol m-2 s-1 for diffuse radiation. \r\nThe tables in the paper give values for direct conversions (taking into account unit conversions) under the “Relationship” column, and they fall into the range of \r\n```{r} \r\npar = 2.08 * sw\r\n````\r\n>to \r\n>```{r}\r\npar = 2.61 * sw\r\n````\r\n> with clear-sky summer irradiance days generally in the 2.1-2.2 range.\r\n> Just thought that you’d like to be aware—the value that the function returns for PAR as written should be interpreted as W m-2 units, not umol m-2 s-1. The same problem holds for the reverse conversion (sw.to.par.base).\r\n"},"comment":{"url":"https://api.github.com/repos/GLEON/LakeMetabolizer/issues/comments/74875861","html_url":"https://github.com/GLEON/LakeMetabolizer/issues/75#issuecomment-74875861","issue_url":"https://api.github.com/repos/GLEON/LakeMetabolizer/issues/75","id":74875861,"user":{"login":"jread-usgs","id":2349007,"avatar_url":"https://avatars.githubusercontent.com/u/2349007?v=3","gravatar_id":"","url":"https://api.github.com/users/jread-usgs","html_url":"https://github.com/jread-usgs","followers_url":"https://api.github.com/users/jread-usgs/followers","following_url":"https://api.github.com/users/jread-usgs/following{/other_user}","gists_url":"https://api.github.com/users/jread-usgs/gists{/gist_id}","starred_url":"https://api.github.com/users/jread-usgs/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jread-usgs/subscriptions","organizations_url":"https://api.github.com/users/jread-usgs/orgs","repos_url":"https://api.github.com/users/jread-usgs/repos","events_url":"https://api.github.com/users/jread-usgs/events{/privacy}","received_events_url":"https://api.github.com/users/jread-usgs/received_events","type":"User","site_admin":false},"created_at":"2015-02-18T14:51:02Z","updated_at":"2015-02-18T14:51:02Z","body":"One last comment - you could have the conversion factor as are arg that defaults to 2.11. I think the conversion is variable in time and space, so you may want to let people have some play with it if it makes sense. "}}