My internship/research this summer involves a great deal of plotting data from giant netCDF files, generated from runs of NCAR’s CCSM3. Initially, I used legacy scripts written in IDL to create the necessary figures for my professor’s analysis. Those scripts had been collected over the years and while performing the job adequately, I was unhappy to find them poorly commented or documented. Thus, I persuaded my professor to let me explore alternative ways to accomplish our plotting needs. Continue reading ‘Visualizing Climate Data – A Better Approach’
Before the semester ended, two of my good friends – Dave and Adrian – procrastinated a bit and developed a very cool Matlab program. The program generates Moire patterns by creating arrangements of concentring circles and having them decay across the screen into one another. It’s a very clever program, and I’ve decided to one-up them a little bit. I just finished prototyping my own version of the program, but there’s a catch – rather than use Matlab, I decided to tackle the problem with a different set of tools.
For starters, I’m addicted to Python. I think it’s the go-to language for a myriad of tasks as diverse as scirpting, software prototyping, and even applicaiton development. Although the climate models I study are coded mostly in Fortran, I’ve developed my own set of tools for processing their outpat data through Python – mostly through the help of RPy, NumPy, and SciPy (with the help of NCO for working with netCDF files, of course, although SciPy has a great I/O functionality for them). I decided to port Dave and Adrian’s code to Python.
However, there were issues. For starters, I wasn’t sure how to do 2D graphics with Python. I first tried TKinter but I couldn’t optimize the drawing very well. So, I settled with PyGame, which turned out to be very easy to use! Even with PyGame, though, the prototype program ran very sluggishly. So, I decided to up the ante and try something a bit esoteric – PyCUDA. PyCUDA is a convenient module for utilizing CUDA code within a Python script or program. For those of you who don’t know, CUDA is nVidia’s solution for bringing GPGPU to the masses – that is, general purpose programming on graphics processing units. In a nutshell, modern GPU’s are massively parallel constrcuts; they have hundreds of cores and have theoretical computing powerof over a teraflop! They are perfectly suited for SIMD situations.
The code for my prototype program follows after the break, and serves as a practice attempt at utilizing PyCUDA. Now, this isn’t real hardcore CUDA programming here – I’m using very convenient abstractions available in PyCUDA because my translation algorithm is so simple. As far as I can tell, there isn’t even any real speed increase in this situation (although I plan on modifying things a bit here in a second and doing some time trials). However, this is a neat project for seeing how PyCUDA can be effortlessly thrown into a script or small program. Again, this is only a prototype program to explore PyGame and PyCUDA; hopefully in the coming days I’ll flesh out the same simulation that Dave and Adrian ran, and then I’ll post both their Matlab code and my Python code for comparison and experimentation.
Jeff Id, the author of the skeptical (with respect to anthropogenic global warming) blog The Air Vent, has posted several replies to Gavin Schmidt’s “Advocacy vs. Science” post over at RealClimate. Thus, in the name of a good ol’ fashioned blog-o-sphere tumult, I’d like to reply Jeff’s responses to Gavin’s post (which is in response to posts at WattsUpWithThat and Chris Colose’s blog.) We’ll do this block-quote style (all quotes are from Jeff I’ds post above unless otherwise noted):
So I left this blog project to die a bit over the past few months, mainly becuase of the intensity of my coursework this semester. As I procrastinated a reading for my Environmental Governance course today, though, I decided to log in to WordPress and see how the blog was doing. Things were pretty routine: ~5 hits per day, almost entirely on my Volcanoes and Climate Change post or “About Me” page. But sometime in February, I got a massive surge in hits – like ~200-300 per day for a while, still mostly directed at that volcano page. I’m not sure where it’s all coming from, although my name seems to be a very popular search on WordPress during that time.
The episode leaves me enthusiastic. I think I’m going to take some time out of my schedule and try to keep this blog regularly updated from now on. I’m also going to shift its focus from just climate science to incorporate discourse analysis related to the climate change debate. I’ll try to post something interesting later tonight, after Orchestra rehearsal, on the Heartland Institute’s climate change conference and what Dryzek coins the “Economic Rationalism” discourse with respect to environmental politics.
Every once in a while, I’ll come across a comment in the global warming blog-o-sphere that is just so staggeringly ill-informed, so breathtakingly out of touch with the science, so – well, naive or dumb – that I’m left wondering whether or not winning the “global warming is a hoax” debate is tenable. I came across one such comment this afternoon on WUWT: Continue reading ‘Sometimes, I’m Left Speechless’
A good way to unwind after an arduous 3-hour orchestra rehearsal is to read – so that’s exactly what I did this evening after finishing up with The Planets. Unfortunately, I decided to read the wrong thing this evening. While browsing what was new at a site that I was just recently banned from, I came across an upsetting entry about a young girl. Shades of a memory not-long-since forgotten, eh? Continue reading ‘To Be Young and Carefree’
First post in a while, but unfortunately it’s more for me than anyone else. The following is a compliation of links to various documents I need to be able to access quickly while I’m working with the CAM. I’ll write a short description of each in case anyone else is interested in diving into them. Continue reading ‘Resources on the CAM’