Showing posts with label research. Show all posts
Showing posts with label research. Show all posts

It's like, so meta

Monday, February 16, 2009

So I've been reading up a bit more on the Climate Interactive project (brought to you by the Sustainability Institute and MIT's Center for Collaborative Intelligence).  One part of their approach to climate issues involves building and distributing simulations for education, persuasion, and decision-making.

The rest of what they're doing is a little more "meta": they're building simplified climate models and a framework around those models to make it easier for others to create simulations.  A platform for constructing climate simulations.  Okay, cool -- rather than create the thing, create the machine so that anyone can create the thing. Oh, and open the process too. 

I think this idea may hit at a level which has a bit more traction for my background (as a computer science student) than what I've been doing.  For the past while, I've been looking into what sort of educational tool to build.  I'm no teacher, so I've been reading papers and speaking to educators to find out where I can help.  I'm working this angle, and it's going, slowly, but the idea of creating the framework for making simple climate simulations -- well, that's something that on first blush seems to more closely suit my capabilities.  Hrmm..

Bathtub dynamics and climate change

Friday, February 13, 2009

In Understanding public complacency about climate change, Sterman & Sweeney speculate that:
Low public support for mitigation policies may arise from misconceptions of climate dynamics rather than high discount rates or uncertainty about the impact of climate change. 
In the study they investigate the sorts of errors people make with "simple" stocks and flows problems, since these sorts of problems are fundamental to understanding the climate and climate change. 

Here's an example of one their tests:

After a bit of education about climate and climate dynamics, participants are shown the top chart and asked to fill in the bottom chart.  That is, given a scenario of future CO2 concentration what would be the corresponding emissions and removal rate of CO2. They have to extend the emissions line to the right, and also draw in the corresponding net removal rate, so that the top chart is explained by the bottom.

Their study finds that most people fail this test.  They assume that if the CO2 concentration rises a little and then levels off, so too must the emissions have risen and then levelled off.  Most people keep the removal rate constant or have it rise and level off too and they keep it well below the emission rate.

If you haven't spotted why these answers are wrong yet, think about bathtubs.  (This is a popular metaphor used by Sterman and Sweeney elsewhere.  See below.)  We can think of the above example in terms of a bathtub.  Replace the atmosphere with a bathtub and CO2 with water.  Now, the emission rate is the rate water is flowing into the tub from the tap, removal rate is the rate water flows out the drain, and CO2 concentration is the water level. 

In the example above, the question is: given that the water level rises but eventually stops rising and stabilises, what needs to happen to the rate of the water from the tap and through the drain Obviously if the water level stabilises eventually then both the rate the water is running into the tub and the rate the water is draining out must converge.  I think you can work the rest out for yourself. 

That these kinds of problems (systems thinking) are so tricky to answer correctly means we likely have the wrong intuitions of climate dynamics.  We may think certain climate change mitigation strategies are effective enough even when they aren't at all.  The sort of thinking that leads to you to the wrong answers above would also lead you to be in favour of a strategy that simply stops are CO2 emissions from rising from today's levels as a way to stop CO2 concentration from rising.  Wrong.  They have to drop, and drop dramatically enough to reach the removal rate.  And that's only the explanation that you get without invoking all the other, even trickier bits of systems dynamics like feedbacks and delays.

This study is cool because it isolates a class of tricky concepts that are fundamental to understanding climate change and its mitigation.  The suggestion is that if we could only teach people basic systems dynamics concepts then they'd make the right decisions.  We've seen this is not the case entirely, but I suspect it's part of it.

In any case, this paper gives me the framework for a study.  It gives me something concrete to measure and something concrete to teach.  I can imagine a study where I measure how well students do on these sorts of "bathtub dynamics" tests before and after they use the tool/visualisation/etc.. I develop.  

Cool, I'm starting to see ground.

As I mentioned above, the bathtub metaphor is one that's been used quite a bit.  Here are some very interesting and relevant links:
  • Linda Booth Sweeney's recent blog post on the subject. A great post about bathtub dynamics and climate change, with some excellent (but broken) links at the end which I'll repeat here (but fixed, of course).
  • John Sterman's interactive bathtub dynamics and greenhouse gas emissions simulator.  This basically steals all my recent ideas for climate change teaching tools and knits them together into a really slick flash application.  You get a bit of background and a few simple demonstrations/experiments that drill the stocks and flows concepts in.  
  • A simple and fun bathtub dynamics climate model from SEED that puts you in a similar situation to the test I describe above, and then allows you to see future predictions under three different mitigation scenarios. 
  • And finally, an cool looking blog associated with an exceptionally cool looking initiative called climate interactive. The project here is to create climate simulations (and entire simulation platform) that have "engaging interfaces and compelling output displays" with the express purpose of getting these simulations out in the hands of the general public and policy makers to enable them to make better decisions.  

    Well now, I think I've found folks to work with, wouldn't you say?  I haven't dug much into this project yet, but as I do I'll post up what I find.  Exciting stuff.

2 1/2 papers on engineering climate models

Tuesday, January 6, 2009

Here are two papers (plus another that goes into more depth) on the software engineering of the Community Climate System Model, and the Earth Systems Modelling Framework. I'm just starting to get into these projects, and these papers have been very helpful so far:
  1. Overview of the Software Design of the Community Climate System Model by J. Drake et. al.
    This paper describes the dreamy world of the CCSM project, a seemingly well-oiled software engineering enterprise. This paper covers the design of the CCSM, plus an overview of the software development process.

  2. The Architecture of the Earth System Modeling Framework by C. Hill et al.
    This is a larger project that incorporates the CCSM. This paper just outlines the design (no process). For more details see: Design and Implementation of Components in the Earth System Modeling Framework by N. Collins et al.

Extensible programming

Monday, January 5, 2009

A couple of years ago I did some extra-curricular work with Greg Wilson and Miles Thibault related to the idea of extensible programming. As a warm up, I built a scheme interpreter and implemented hygenic macros from scratch. Learned heaps. Two of Greg's students (golly, can't remember their names) appear to be taking up the extensible programming idea in earnest as their master's projects. For what it's worth, I'll summarise two of the ideas that came out of the project:
  • You can't have an extensible language without an extensible parser. Stating it this way makes it seem pretty obvious, but when we moved from scheme to Java this was a bit of a revelation. In Scheme you can extend the language anyway you want simply with a macro, but that's only because the language has an extremely constrained syntax. For Java you'd either have to have predefined grammatical constructs that extensions would fit into (like the JSE macro syntax), or have your language extensions also extend the parser to support themselves.

  • Fully qualified language keywords. One option I came up with to support grammer extensions was the notion of a fully qualified language keyword. In the same way that Java lets you fully qualify classes (e.g. org.w3c.Document) why not fully qualify keywords to allow the parser to handle ambiguous bits of syntax. For example:
    import syntax com.pipitone.try;

    ...

    java.lang.syntax.try {// standard try-catch
    ...
    }
    catch (FooException e) {...}
    catch (BarException e2) {...}

    com.pipitone.try {// custom, multi-exception try-catch
    ...
    }
    catch (FooException e1, BarException e2) { ... }
Interesting stuff, this. It's still exciting. If I wasn't trying to save the world I'd probably being working on this project. ;-)

Exploratory spatio-temporal visualisation

The last paper I reviewed discussed and evaluated different visual querying techniques for general relational databases. Today's paper, Exploratory spatio-temporal visualisation: an analytical review by N. Andrienko et al., narrows the discussion to just spatio-temporal data and focuses less on querying specifically than on evaluating a variety of exploratory techniques specific to spatio-temporal data.

The paper begins with a long discussion intent on classifying the kinds of questions one can ask of spatio-temporal data. The authors point to spatio-temporal data having three major dimensions: what, where, and when, and that a classification system natural falls out from this observation. Questions about the data are usually posed about one dimension given the other two (e.g. when did x happen at y?) with answers needed at various levels of aggregation (e.g. at specific points, over a range of points, or overall; they refer to this as the "search level") and with various types of comparisons/relations done on the results (they're rather vague about this bit). At the end of their discussion the authors decide to explore only those questions that focus on the time dimension: given a time (or range) what happened where?; or when did what happen where. Here's their handy graphical representation of all of this:



The paper then turns to briefly surveying existing exploratory techniques: querying (they focus on dynamic querying and filtering), map animation, and other visualisations to explore changes in locations, events, or attributes.

With these techniques in hand the authors get to the real meat of the paper and evaluate how each technique serves to answer the two general kinds of questions. In the process of doing so they to break down the two question types into more specific questions types, detailing various search levels and cognitive operations. For instance, an elementary when -> what + where question might involve comparing behaviours over the same time interval (e.g. "compare the movements of stork X and Y") or at distinct intervals (e.g. "compare the migration behaviours of the stork X in the years 2001 and 2002"). Each of these question subtypes are explained and matched to appropriate exploratory techniques, often with references to existing implementations.

This paper is another (seemingly b/c what do I know?) decent survey of existing software and techniques. It presents a slightly more principled classification (the question types) and evaluation criteria but is fairly light-weight on the analysis (it all seems rather ad-hoc), and provides no empirical backup for many claims.

There is one thing I can take away from this paper: that visual querying is more than just a visual represention of the query question. It's also exploration. This paper implicitly assumes this with its highlighting of techniques which blur the visualisation of the query and the results, à la dynamic queries.

The other take away is dead obvious but I'll state it anyway: the type of questions you're asking tell you (or contstrain, or inform) what exploratory/query techniques to use. Creating a novel SQL query visualiser might not be what climate scientists or grade 10 students need to answer their types of questions. It's worth mentioning all of this only because it highlights an important point for me: I need to get a handle on what questions folks can't answer easily (or aren't asking, but ought to).

Visual Query Systems for Databases

Wednesday, December 31, 2008

I've been reviewing the work done on visual querying systems to see what the state of the art is. A visual system for querying climate model datasets might turn out to be a compelling way to enable citizens and scientists to dig through and understand the climate. This idea, minus the visual bit, came up during our brainstorm and looks likely a promising space for a thesis.

First up in my review is the paper "Visual Query Systems for Databases: A Survey" by T. Catarci et al. This paper seems like a good start because it surveys and classifies, from a user's point of view, visual query systems (VQS) used for "traditional databases". Whether or not this applies to climate datasets I don't know, but since I'm familiar with traditional databases it certainly gives me a known point of departure. Apart from classifiying VQSs, this paper also attempts to define various kinds of users and then match them to the classes of VQSs identified earlier and, thankfully, attempt to back up their claims with empirical studies.

At the outset the authors break out visual query systems into those that visually represent the schema and query, and those that visually represent the query results. Many do both but often using different approaches. A variety of VQSs are classified according to what visual representations they use, organised into four broad classes: form-based (tabular), diagram-based, icon-based, and hybrids using a combination. On its own this classification system is unmotivated and lacks utility; the authors do not state any reasons for choosing this classification other than because it differentiates systems by their "the most distinguishing aspect". The classification only becomes relevant later on in the paper when the authors describe the kinds of users who would benefit from them.

Catarci et al. also break out the goals of using a query system into: understanding the database schema and formulating a query. They then classify each of the VQSs according to the various approaches they use to accomplish each of these goals. This is where the paper gets more interesting.

The goal of understanding the database schema -- or "understanding the reality of interest" in their words -- is broken down into three classes of approaches: top-down (i.e. exploring from general to specific parts of the schema); browsing (i.e. exploring a schema, or data, by walking along the relations in the schema); and schema simplification (i.e. incrementally transforming the schema to be closer to user's mental model).

Approaches to formulating a query are classified as: by schema navigation (wandering around a visualisation of the schema, picking out the bits you want to know about); by subqueries (composing partial results of existing queries); by matching (either by supplying an example of the data you want to see (query-by-example), or by supplying a pattern to match results to); and by range selection (adjusting the range of values for a search condition on a preset query -- think dynamic queries).

The second-to-last section (section 6) contains the most interesting part of this paper. In this section the authors discuss the usability of VQSs for different kinds of users. Right from the start they state that casual users will benefit most from visual query systems. Then they break down casual in various ways: by computer training (the focus is on non-professionals), frequency of interaction, variance of queries, complexity of queries; and familiarity with the domain. Each visual representation type (form-based, diagram-based, etc..) from earlier in the paper is discussed and classified in relation to the various user aspects. For instance, from the analysis we can conclude such things as: users unfamiliar with the domain are best served by icon-based systems since visual metaphor of the icons are immediately understandable. Familiar users are best served by diagram-based systems because they can articulate more nuanced query concepts.

The analysis in this section is not incredibly thorough or principled. I suppose it does give us somewhat of a framework for understanding the usability of VQSs, though. We just don't know if it's valid, is all. The end of this section surveys the empirical usability studies done on VQSs, from which only the authors find only partially support for their previous classifications.

So, overall, this paper does do what it sets out to do: it surveys many different visual query systems and chops them up in all sorts of classifications, from the type of visual representations they use to the sorts of users they best serve. It's just not clear those classifications are meaningful. Of course, they are intuitive so the classifications ought to make this paper useful as a reference or as an introduction to the field. This paper suggests to me that VQS usability isn't well understood (or wasn't in 12 years ago). We'll see how this observation holds up after I review a few other papers .

Brainstorm: Software Engineering and Climate Change

Monday, December 15, 2008

A few of us in the software engineering group have met over the past few weeks to brainstorm software engineering research ideas for dealing with climate change. We are attempting to refine our ideas into research questions and projects, and this is what we've come up with so far.

Better understanding of climate processes

The general public doesn't have a such a great understanding of some of the basic climate processes (Sterman & Sweeney, 2007). So, what about creating an environment to learn these sorts of things in? This is, of course, directly connected to raising awareness of climate change and enabling people to make better decisions (see below).
  • Simplified Climate Model: create a really simple climate model (even simpler than JCM[1]) that an 8 year old would want to use to explore various climate scenarios.
  • SimClimate: like SimCity, create a game that's played out in a world with a simulated climate and players learn about climate process implicitly through playing. Maybe you have to play out various scenarios, or maybe it's a massively multiplayer game where each player controls a region and has to work with others in the game. There are several existing examples of this sort of thing.
  • Climate laboratory: let users build simple climate models themselves, or tinker with existing models, and then run experiments on them. The focus with this idea is to get users to understand climate processes by directly manipulating them, rather than just tweaking various settings.

Raising awareness and making better decisions

The more information you have, the better decisions you can make...
  • Wiki decision: a wiki-like database linking decisions and an explanation of the impacts of those decisions. For instance, in choosing a particular Ontario apple v.s. a New Zealand apple, you might be able to follow the chain of events in the production, transportation and distribution. Maybe expert opinions are included or figures for fuel consumption.
  • Barcode Reader: for any product, a hand-held reader that provides all sorts of related environmental information. E.g. food miles, carbon footprint, pesticide use, etc... like current Nutritional Information given on packages.
My bias: I'm really wary of ideas like these that may increase obsessive, paralyzing worrying about making the best decision. Sometimes more information is not what's needed. I'd want plenty of care and forethought to go into crafting such tools.

Access to climate data and resources

What can we do to provide both the public and scientists with easier and more useful access and analysis of existing climate data (both observations and model predictions)?
  • WikiClimateStats. In the same vein as StatsJam (watch the screencast), give people a method to easily explore and analyse climate data, and have discussions about it. As a tool for scientists we'd want this to help them share results and analysis (i.e. furthering open science).
Some questions:
  • What questions are climate scientists asking about their data?
  • What questions are the public asking? What questions would it be helpful to be able to ask? What does 'helpful' mean here?
  • What sort of query interface makes sense (SQL won't cut it for non-programmers)?
For climate modellers, sharing their "digital resources" is still troublesome:
  • No standards yet for model metadata, configuration data, experiment output, etc..
  • Data visualisation
  • No way to discover existing climate modules, or to see if existing runs satisfy your questions
  • Access rights (data isn't always public)
See the Earth System Curator wiki page on Use Cases for some ideas on what's needed.

Collaboration and coordination amongst climate modelling groups

Climate modelling groups don't often collaborate or coordinate with other modelling groups, and when they do it's done face-to-face rather than in a distributed fashion. For really complex climate models, development may need to go distributed. How can we assist?
  • Integrate awareness tools. Get scientists to use existing collaboration and awareness tools and see if it improves things.
  • What are scientists asking about their code?
  • How can we help scientists to share tacit knowledge?
  • Allow access to the decision making of other modelling groups.

Software Engineering challenges in building climate models

We know a little bit about this (see here).
  • Can we borrow software engineering practices from other disciplines, or from commercial outfits?
  • What are questions scientists asking about their code?
  • Where do they get this information currently?
  • Why is it hard to modularise their models? (As mentioned before, it's tough)
Ideas:
  • Build better FORTRAN tools. FORTRAN is the language of choice for scientific computing but there doesn't seem to be the same level of sophistication of tools for it as for "modern" languages. We could build better a better IDE, debugger, refactoring tools, static analysis tools, etc...
  • Try standard tool-based code exploration. Would scientists write better code (or write it with less trouble) if they had access to some standard code exploration techniques. For example, profiling, code metrics, or reverse engineering tool analysis?
  • Teach 'em the basics. See Software Carpentry. If we teach scientists the basics of crafting software, does it help?

Validation and Verification

  • Document current methods of validation and verification.
  • Link climate model V&V to standard software engineering V&V
  • Link climate model V&V to philosophy of science.
  • Link to their software development practices and the choice of approximations used in the model.
  • Investigate current model benchmarks. What is a better benchmark?
  • Traceability (the ability to trace results from the simplifications of a model to their details in a more comprehensive model)
  • Seamless Assessment (the ability to vary resolution and time scales)

[1] Do me a favour: Start up JCM, click the 'mitigation' button/dropdown in the far right corner and choose "stabilise CO2 emissions", and then try to stop the global mean temperature from rising (bottom right chart) by playing with the CO2 emissions (top left chart). (Let your mouse hover over the CO2 emissions handle to get a read out.) Speak to me when you're no longer scared.