Let’s get this thing back rolling…

•December 18, 2009 • Leave a Comment

Early New Years’ Resolution – actually keep this blog regularly updated with interesting things!

Before I do that, though, I’ll probably port it to my website, http://www.danielrothenberg.com

Visualizing Climate Data – I – Using Python Modules

•July 22, 2009 • 1 Comment

Note – I’m going to assume that you have a working knowledge and installation of the Python programming language. I’m starting with Python modules because in my experience, people coming from other languages may not be familiar with the ‘pluggability’ that Python gives to its users via these modules.

Whenever I persuade my friends to try Python, I introduce two initial arguments – it’s easy, and you can use modules. Most people immediately agree with the “it’s easy” part; Python reads like pseudo-code, and it’s usually trivial to translate a program from your brain to the computer screen. However, it usually takes them a while longer to see what is so special with modules. Novices tend to be familiar with the stock modules like math or os, and more advanced converts might experiment with re.

The real power of Python, though, comes from third-party modules. In a nutshell, it is incredibly easy for developers to package their custom-built Python utilities and distribute them to other coders – a search for ‘python’ on Google Code clearly illustrates this fact. You can find third-party modules for nearly any task – manipulating data, managing a web page, plotting data, or even posting to Twitter. Let’s use that last one as an example to explore how to install and use Python modules.

Python-twitter, a module by DeWitt Clinton, provides easy access to the Twitter API via Python. It’s easy to use – a few weeks ago I built some Twitter functionality into my personal website using it. Even if you don’t use Twitter, I’d recommend reading through this example to see how to install, access, and use generic Python modules. Continue reading ‘Visualizing Climate Data – I – Using Python Modules’

Google Wave Beta Application

•July 22, 2009 • 11 Comments

Here’s my request to be chosen for the Google Wave Beta:


Visualizing Climate Data – Index

•July 21, 2009 • 1 Comment

I’ve finally got some time to sit down and punch out a series on analyzing climate data with a Python toolkit. This page will serve as an index page for the entries in the series. Check below to see the planned topics and links to the completed sections.

  1. Using Python Modules
  2. NumPy/SciPy
  3. Reading/Manipulating NetCDF files
  4. Matplotlib – Plotting NetCDF Files
  5. Shell Scripting with Python
  6. Keeping Organized with Mercurial
  7. Miscellaneous

This is the current outline of topics. I plan to cover. I don’t have a set timeline for publishing each part, although I might aim for one section every 4-5 days. Check back here often to see the latest entries.

A bunch of old Methane

•June 26, 2009 • 3 Comments

I took a Digg break from analyzing SOM data this morning, and unfortunately I stumbled across a ridiculous article from the Daily Galaxy entitled, “Is Global Warming Part of Earth’s Natural Cycle: MIT Team says ‘Yes’“. This article is just dripping with ‘fail’ – it fails to honestly portray the story it represents, it fails at synthesizing that story with existing data, and it fails at communicating the implications of the story.

The short of it: last October, a team of researchers at MIT announced that global atmospheric methane levels appeared to be rising once more. This is a big deal; while methane is less abundant in the air than its GHG counterpart CO2, it is a much more effective warmer – nearly 25x more effective. Methane is a similar to CO2 in that we observe a rise in its atmospheric concentrations beggining around the time of the Industrial Revolution, which implicates it as a possible contibutor to AGW. The thing is that it appeared to be in a dynamic equilibrium within the atmosphere – it’s rate of creation by human and geological processes seemed to be about balanced with its natural rate of destruction. The researchers at MIT indicate that a tipping point may have been reached, and methane levels might be rising again.

Here’s where the Daily Galaxy jumps the shark: the MIT press release indiciates nothing more than that last sentence. Seriously. This was nothing more than an early announcement indiciating that observations had been noticed, and further research was to be investigated – particularly attribution experiments with high-resolution GCM’s to try to determine what the source of the methane was (although this isn’t explicitly stated in the press release).

What does Daily Galaxy do? They herald this as an MIT team refuting global warming. I’ll give you a moment to ROFLYAO… Got that out of your system? Good. Let’s see why this is so hilariously incorrect:

For starters, ‘global warming’ is mentioned a whopping two times in the press release – the first in an explanation of methane being a greenhouse gas and the second being an explanation that these results warrant immediate attention due to that first fact. So this really isn’t even a press release about global wamring. The bigger thing, though, is that this research says nothing about natural cycles. Those guys at MIT are really good; they are very accurate when describing what they have found. What they haven’t ascertained yet is a reason behind the rise in methane levels, let alone attributing it to ‘natural cycles’. The key ‘cycle’ isn’t even mentioned a single time in the press relase!

The Daily Galaxy severely twists this release out of context. It misinterprets the piece (it seems to think that methane levels have been stable for centuries are now auto-magically rising as a sign of some natural, geological phenomenon, when in reality they have indeed risen substantially), and then builds a flawed analysis reycling the standard fare of denialist talking points relating to natural cycles, global cooling, incomplete knowledge, yadda-yadda.

The article was Dugg, so it’ll probably be eviscerated in the comments section. But isn’t it unfortunate that we have to waste time refuting such garbage?

New Home Page

•June 26, 2009 • 1 Comment

My new website is deployed here. I’m debating whether to switch completely over to the minimalistic blogging app I built for the website; I’m probably better served by continuing to write here, and continuing to add features to the blog over at my site, so I’ll probably end up staying here for a while.

A foray into web design

•June 20, 2009 • 70 Comments

Before I continue my series on scientific visualization with Python, I want to segue into another realm of computing: web design. I have nearly zero experience with web design and programming for the web, but when people hear that you like to “program,” that’s the first thing they ask about. Back in the day, I learned HTML and some some basic CSS, as well as a small amount of JavaScript, but I’ve never really deployed anything more than a GeoCities website.

Until now. I was asked to become the webmaster of the CCAMS website, a job which really just entails keeping the news up-to-date and making sure the thing doesn’t crash too heinously. But in the vein of Walt Disney, I feel compelled to “plus” it. The site looks a bit dated; it’s got bloated JavaScript menus and a less-than-beautiful design. I immediately thought that it could be rebuilt into something incredible, so I decided that I would finally learn web design and build a great, Web 2.0 site for the club. Problem is, I don’t have any idea how to do that.

Or I didn’t until a few days ago. A friend recommended I use Django to build the site, and after having spent a day reading over version 2.0 of the Django Book, I’m compelled to do so. I envision the new CCAMS website as a hub for our club/department’s activities. It should be able to dynamically serve forecasts and keep up-to-date news and goings of the club. It should support users so that members with certain responsibilities – such as the WeatherPhone or Forecast Competition – can log in and discretely upload their data for others to see. The site could evolve into a really useful utility.

But first I need to practice deploying a fully-functioning site. I decided to design myself a simple 6-page home website. Last night I went into GIMP and drew out a template for what the site should look like (see the bottom of the page). It’s really a simple thing:

  • The title changes to reflect what page you’re on
  • The navigation bar also does
  • The main content is served in the white body wrapper
  • The footer at the bottom will h.ave some sort of cute, random quotes

At least, at first. Each of the navigation pages will afford me a chance to practice a certain technique which will help me learn Django for the CCAMS site:

  • Home – A simple, static page for starting out
  • Resume – I’ll write a simple app which will store the data for me resume in a database. Then, I can dynamically serve that data when the user visits the “Resume” tab; I’ll have Django query the DB for all the information, style it in nice CSS, and present it in a few formats like HTML, PDF, PostScript, the likes.
  • Research – Like Resume, but simpler. Rather than generate a new file to present for download, I’ll just display it directly on the screen.
  • Music – I plan on writing an app for the CCAMS site that downloads information from NOAA/NWS, and this will be preparation for that. I’ll gather media and information for bands like Weggalo Star and the Cornell Symphony Orchestra and present it dynamically on this page
  • Blog – Every web designer undergoes the rite of passage of building a blog application. I’ll take an existing one, hack it to my needs, then re-code it by hand from scratch to synthesize everything I’ve learned
  • Contact – A simple form-driven contact page.

I’m pretty excited. I hope to spend the rest of today coding a static HTML/CSS homepage to get the website all layed out.