{"id":1234,"date":"2010-01-13T06:29:11","date_gmt":"2010-01-13T11:29:11","guid":{"rendered":"http:\/\/www.easterbrook.ca\/steve\/?p=1234"},"modified":"2010-01-13T16:28:10","modified_gmt":"2010-01-13T21:28:10","slug":"documenting-climate-models","status":"publish","type":"post","link":"http:\/\/www.easterbrook.ca\/steve\/2010\/01\/documenting-climate-models\/","title":{"rendered":"Documenting climate models"},"content":{"rendered":"<p>This week I&#8217;m visiting the <a title=\"MPI-M website\" href=\"http:\/\/www.mpimet.mpg.de\/en\/home.html\" target=\"_blank\">Max Planck Institute for Meteorology (MPI-M)<\/a> in Hamburg. I gave my talk yesterday on the <a title=\"Full paper in CiSE (subscription required)\" href=\"http:\/\/dx.doi.org\/10.1109\/MCSE.2009.193\" target=\"_blank\">Hadley study<\/a>, and it led to some fascinating discussions about software practices used for model building. One of the topics that came up in the discussion afterwards was how this kind of software development compares with agile software practices, and in particular the reliance on face-to-face communication, rather than documentation. Like many software projects, climate modellers struggle to keep good, up-to-date documentation, but generally feel they should be doing better. The problem of course, is that traditional forms of documentation (e.g. large, stand-alone descriptions of design and implementation details) are expensive to maintain, and of questionable value &#8211; the typical experience is that you wade through the documentation and discover that despite all the details, it <a title=\"Herbsleb and Kuwana, 1993: Preserving knowledge in design projects - What Designers Need to Know\" href=\"http:\/\/portal.acm.org\/citation.cfm?id=169061\" target=\"_blank\">never quite answers your question<\/a>. Such documents are often produced in a huge burst of enthusiasm for the first release of the software, but then never touched again through subsequent releases. And as the code in the climate models evolves steadily over decades, the chances of any stand-alone documentation keeping up are remote.<\/p>\n<p>An obvious response is that the code itself should be <a href=\"http:\/\/en.wikipedia.org\/wiki\/Self-documenting\" target=\"_blank\">self-documenting<\/a>. I&#8217;ve looked at a lot of climate model code, and readability is somewhat variable (to put it politely). This could be partially addressed with more attention to <a title=\"A very old coding standards guide for the Met Office's Unified Model. There's a newer version out there somewhere, but google can't see it.\" href=\"http:\/\/ncas-cms.nerc.ac.uk\/index.php\/um-documentation\/met-office-documents\/doc_download\/2-003-software-standards-for-the-um-fortran-and-unix-\" target=\"_blank\">coding standards<\/a>, although it&#8217;s not clear how familiar you would have to be with the model already to be able to read the code, even with very good coding standards. Initiatives like <a title=\"clearclimatecode.org\" href=\"http:\/\/clearclimatecode.org\/\" target=\"_blank\">Clear Climate Code<\/a> intend to address this problem, by re-implementing climate tools as open source projects in Python, with a strong focus on making the code as understandable as possible.\u00a0<a title=\"MT's post on literate climate model development\" href=\"http:\/\/initforthegold.blogspot.com\/2009\/07\/literate-climate-model-development.html\" target=\"_blank\">Michael Tobis<\/a> and <a title=\"My post: &quot;Designing your own Earth System Model&quot;\" href=\"http:\/\/www.easterbrook.ca\/steve\/?p=482\" target=\"_blank\">I have speculated<\/a> recently about how we&#8217;d scale up this kind of initiative to the development of coupled GCMs.<\/p>\n<p>But readable code won&#8217;t fill the need for\u00a0a higher level explanation of the physical equations and their numerical approximations used in the model, along with rationale for algorithm choices. These are often written up in various forms of (short) white papers when the numerical routines are first developed, and as these core routines rarely change, this form of documentation tends to remain useful. The problem is that these white papers tend to have no official status (or perhaps at best, they appear as technical reports), and are not linked in any usable way to distributions of the source code. The idea of <a title=\"wikipedia has a good explanation\" href=\"http:\/\/en.wikipedia.org\/wiki\/Literate_programming\" target=\"_blank\">literate programming<\/a> was meant to solve this problem, but it never took off, probably because it demands that programmers must tear themselves away from using programming languages as their main form of expression, and start thinking about how to express themselves to other human beings. Given that most programmers define themselves in terms of the programming languages they are fluent in, the tyranny of the source code is unlikely to disappear anytime soon. In this respect, climate modelers have a very different culture from most other kinds of software development teams, so perhaps this is an area where the ideas of literate programming could take root.<\/p>\n<p>Lack of access to these white papers could also be solved by publishing them as journal papers (thus instantly making them citeable objects). However,\u00a0scientific journals tend not to publish descriptions of the designs of climate models, unless they are accompanied with new scientific results from the models. There are occasional exceptions (e.g. see the\u00a0<a title=\"Journal of Climate, vol 19, no 16, Aug 2006\" href=\"http:\/\/ams.allenpress.com\/perlserv\/?request=get-toc&amp;issn=1520-0442&amp;volume=19&amp;issue=16\" target=\"_blank\">special issue of the Journal of Climate<\/a> devoted to the MPI-M models). But things are changing, with the recent appearance of two new journals:<\/p>\n<ul>\n<li><a title=\"Geoscientific Model Development website\" href=\"http:\/\/www.geoscientific-model-development.net\/\" target=\"_blank\">Geoscientific Model Development<\/a>, an open access journal that accepts technical descriptions of the development and evaluation of the models;<\/li>\n<li><a title=\"Springer's main site for ESI\" href=\"http:\/\/www.springer.com\/earth+sciences\/computer+&amp;+mathematical+applications\/journal\/12145\" target=\"_blank\">Earth Science Informatics<\/a>, a Springer Journal with a broader remit than GMD, but which does cover descriptions of the development of computational tools for climate science.<\/li>\n<\/ul>\n<p>The problem is related to another dilemma in climate modeling groups: acknowledgement for the contributions of those who devote themselves more to model development rather than doing &#8220;publishable science&#8221;. Most of the code development is done by scientists whose performance is assessed by their publication record. Some modeling centres have created job positions such as &#8220;programmers&#8221; or &#8220;systems staff&#8221;, although most people hired into these roles have a very strong geosciences background. A growing recognition of the importance of their contributions represents a major culture change in the climate modeling community over the last decade.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This week I&#8217;m visiting the Max Planck Institute for Meteorology (MPI-M) in Hamburg. I gave my talk yesterday on the Hadley study, and it led to some fascinating discussions about software practices used for model building. One of the topics that came up in the discussion afterwards was how this kind of software development compares [&hellip;]<\/p>\n","protected":false},"author":392,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[10],"tags":[],"aioseo_notices":[],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"http:\/\/www.easterbrook.ca\/steve\/wp-json\/wp\/v2\/posts\/1234"}],"collection":[{"href":"http:\/\/www.easterbrook.ca\/steve\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.easterbrook.ca\/steve\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.easterbrook.ca\/steve\/wp-json\/wp\/v2\/users\/392"}],"replies":[{"embeddable":true,"href":"http:\/\/www.easterbrook.ca\/steve\/wp-json\/wp\/v2\/comments?post=1234"}],"version-history":[{"count":6,"href":"http:\/\/www.easterbrook.ca\/steve\/wp-json\/wp\/v2\/posts\/1234\/revisions"}],"predecessor-version":[{"id":1237,"href":"http:\/\/www.easterbrook.ca\/steve\/wp-json\/wp\/v2\/posts\/1234\/revisions\/1237"}],"wp:attachment":[{"href":"http:\/\/www.easterbrook.ca\/steve\/wp-json\/wp\/v2\/media?parent=1234"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.easterbrook.ca\/steve\/wp-json\/wp\/v2\/categories?post=1234"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.easterbrook.ca\/steve\/wp-json\/wp\/v2\/tags?post=1234"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}