{"id":2452,"date":"2009-12-17T13:38:45","date_gmt":"2009-12-17T18:38:45","guid":{"rendered":"http:\/\/www.realclimate.org\/?p=2452"},"modified":"2010-07-27T10:27:16","modified_gmt":"2010-07-27T15:27:16","slug":"please-show-us-your-code","status":"publish","type":"post","link":"https:\/\/www.realclimate.org\/index.php\/archives\/2009\/12\/please-show-us-your-code\/","title":{"rendered":"Please, show us your code"},"content":{"rendered":"<div class=\"kcite-section\" kcite-section-id=\"2452\">\n<p>The 1991 <em>Science<\/em> paper by Friis-Christensen &#038; Lassen, work by Henrik Svensmark (<em>Physical Review Letters<\/em>), and calculations done by Scafetta &#038; West (in the journals <em>Geophysical Research Letters<\/em>, <em>Journal of Geophysical Research<\/em>, and <em>Physics Today<\/em>) have inspired the idea that the recent warming is due to changes in the sun, rather than greenhouse gases.<\/p>\n<p>We have discussed these papers before here on RealClimate (<a href=\"http:\/\/www.realclimate.org\/index.php\/archives\/2005\/07\/the-lure-of-solar-forcing\/\">here<\/a>,<a href=\"http:\/\/www.realclimate.org\/index.php\/archives\/2006\/10\/taking-cosmic-rays-for-a-spin\/\"> here<\/a>, and <a href=\"http:\/\/www.realclimate.org\/index.php\/archives\/2006\/03\/solar-variability-statistics-vs-physics-2nd-round\/\">here<\/a>), and I think it&#8217;s fair to say that these studies have been fairly influential one way or the other. But has anybody ever seen the details of the methods used, or the data? I believe that a full disclosure of their codes and data would really boost the confidence in their work, if they were sound. So if they believe so strongly that their work is solid, why not more transparency?<\/p>\n<p><!--more--><\/p>\n<p>There is a <a href=\"http:\/\/www.independent.co.uk\/environment\/climate-change\/sun-sets-on-sceptics-case-against-climate-change-1839875.html\">recent story<\/a> in the British paper <em>The Independent<\/em>, where Friis-Christensen and Svensmark responded to the criticism forwarded by Peter Laut (<a href=\"http:\/\/www.realclimate.org\/index.php\/archives\/2009\/11\/something-is-x-in-the-state-of-denmark\/\">here<\/a>). All this would perhaps be unnecessary if they had disclosed their codes and data.<\/p>\n<p>Gavin and I published<a href=\"http:\/\/pubs.giss.nasa.gov\/abstracts\/2009\/Benestad_Schmidt.html\"> a paper<\/a> in <em>Journal of Geophysical Research<\/em>, where we tested the general approach used by Scafetta &#038; West, and tried to repeat their analysis. We were up-front about our lack of success in a 100% <a href=\"http:\/\/www.realclimate.org\/index.php\/archives\/2009\/02\/on-replication\/\">replication<\/a> of their work, but we argue that the any pronounced effect &#8211; as claimed by Scafetta &#038; West &#8211; should be detectable even if the set-up is not 100% identical.<\/p>\n<p>However, Scafetta does not accept our analysis and has criticized me for lacking knowledge about wavelet analysis &#8211; he tells me to read the text books. So I asked him to post his code openly on the Internet so that others could repeat our test with their code. That should settle our controversy.<\/p>\n<p>After repeated requests, he told me that he doesn&#8217;t really understand why I&#8217;m not able to write my own program to reproduce the calculations (actually, I did in the paper together with Gavin, but Scafetta wouldn&#8217;t accept our analysis), and keeps insulting me by telling me to take a course on wavelet analysis. Furthermore, he stated that there &#8220;are several other and even more serious problems&#8221; in our work. I figure then that the easiest way to get to the bottom of this issue it to repeat our tests with his code.<\/p>\n<p>A <a href=\"http:\/\/www.realclimate.org\/index.php\/archives\/2009\/02\/on-replication\/\">replication<\/a> in general doesn&#8217;t require full disclosure of source code because the description in the paper should be sufficient, though in this case it clearly wasn&#8217;t. So to both save having us do it again and perhaps miss some other little detail &#8211; in addition to using an algorithm that Scafetta is happy with &#8211; it&#8217;s worth getting the code with which to validate our efforts. <\/p>\n<p>It should be a common courtesy to provide methods requested by other scientists in order to speedily get to the essence of the issue, and not to waste time with the minutiae of which year is picked to end the analysis. <\/p>\n<p>The reason why Gavin and I were not able to repeat Scafetta&#8217;s analysis in exact details is that his papers didn&#8217;t disclose all the necessary details. The first point  he raised was that we used periodic instead of<a href=\"http:\/\/cran.r-project.org\/web\/packages\/wavelets\/wavelets.pdf\"> reflection boundaries<\/a>. The fact that the paper referred to the expression &#8216;1\/2 A sin (2 pi t)&#8217; to describe the temperatures or solar forcing would normally suggest that they used periodic rather than reflection boundaries. There was no information in the paper about reflection boundary. But this is no big deal, as we have subsequently repeated the analysis with reflection boundary, and that doesn&#8217;t alter our conclusions.<\/p>\n<p>After further communication, we found out that Scafetta re-sampled the data in such a way that the center of the wavelet band pass filter was located exactly on the 11 and 22 year solar cycles, which were the frequencies of interest. He also informed me that a reasonable choice of the year when the reflection boudary was made should be the year 2002-3 when the sun experienced a maximum for both the 11 and 22 year cycles. This information was not provided in the papers.<\/p>\n<p>I&#8217;m <a href=\"http:\/\/www.frp.no\/Klimaduell+med+S.+Fred+Singer+og+Rasmus+Benestad.d25-TwljI2q.ips\">no psychic<\/a>, so I couldn&#8217;t have guessed that all this was needed to reproduce his result. But since Scafetta has lost faith in my ability to repeat his work, I think it&#8217;s even a greater reason to disclose his code so that others can have a go.<\/p>\n<p><em>For the record, we did not just use wavelets to filter the data &#8211; we obtained the same conclusion with an ordinary band-pass filter.<\/em><\/p>\n<!-- kcite active, but no citations found -->\n<\/div> <!-- kcite-section 2452 -->","protected":false},"excerpt":{"rendered":"<p>The 1991 Science paper by Friis-Christensen &#038; Lassen, work by Henrik Svensmark (Physical Review Letters), and calculations done by Scafetta &#038; West (in the journals Geophysical Research Letters, Journal of Geophysical Research, and Physics Today) have inspired the idea that the recent warming is due to changes in the sun, rather than greenhouse gases. We [&hellip;]<\/p>\n","protected":false},"author":11,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_exactmetrics_skip_tracking":false,"_exactmetrics_sitenote_active":false,"_exactmetrics_sitenote_note":"","_exactmetrics_sitenote_category":0,"_genesis_hide_title":false,"_genesis_hide_breadcrumbs":false,"_genesis_hide_singular_image":false,"_genesis_hide_footer_widgets":false,"_genesis_custom_body_class":"","_genesis_custom_post_class":"","_genesis_layout":"","footnotes":""},"categories":[1,26,34],"tags":[],"class_list":{"0":"post-2452","1":"post","2":"type-post","3":"status-publish","4":"format-standard","6":"category-climate-science","7":"category-rc-forum","8":"category-skeptics","9":"entry"},"aioseo_notices":[],"post_mailing_queue_ids":[],"_links":{"self":[{"href":"https:\/\/www.realclimate.org\/index.php\/wp-json\/wp\/v2\/posts\/2452","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.realclimate.org\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.realclimate.org\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.realclimate.org\/index.php\/wp-json\/wp\/v2\/users\/11"}],"replies":[{"embeddable":true,"href":"https:\/\/www.realclimate.org\/index.php\/wp-json\/wp\/v2\/comments?post=2452"}],"version-history":[{"count":45,"href":"https:\/\/www.realclimate.org\/index.php\/wp-json\/wp\/v2\/posts\/2452\/revisions"}],"predecessor-version":[{"id":4660,"href":"https:\/\/www.realclimate.org\/index.php\/wp-json\/wp\/v2\/posts\/2452\/revisions\/4660"}],"wp:attachment":[{"href":"https:\/\/www.realclimate.org\/index.php\/wp-json\/wp\/v2\/media?parent=2452"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.realclimate.org\/index.php\/wp-json\/wp\/v2\/categories?post=2452"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.realclimate.org\/index.php\/wp-json\/wp\/v2\/tags?post=2452"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}