Spring 2011

Our intern, Ali - an undergraduate student from Middlebury College, details her experiences from her summer with the HOT program.

Wednesday, April 27, 2011

Peace with Dreamweaver, Plotting with Matlab

A peace treaty has been signed with Dreamweaver, for now.  Yesterday, with the spry menu bar back in good health and alignments of boxes, images and text on a short leash, the page was sent out for approval. Approval was granted! All that was left to do was to populate the menu bar with the rest of the available data – a simple task of copy and pasting.   For Craig, this posed some problems because he had to make the rest of the data available for me to link.  Luckily his magic fingers and head banging were up to the task and we now have a completed html with ADCP plots aplenty.

With a functional understanding of the language of Dreamweaver, I turn to Matlab, which I have neglected over the past week.  Today I worked towards verifying the calculations that the Caley crane, which lowers and raises the CTD during casts, makes for wire speed and wire out. Along the way, I am continually learning new functions that expand my repertoire of commands.  I started by calculating the speed of the wire by determining the change in wire out over time.  When plotted, this looks more like a tangled ball on the axis rather than a line because the wire speed is constantly changing over the cast. To smooth out the line I averaged the wire speed over 5-second intervals, and then 60-second intervals to see the pattern more clearly.  I learned of the possibility of plotting more than one line in the same figure, which allowed me to compare my calculated wire speed to the Caley’s calculated wire speed.

From this plot I found the time boundaries of the upcast and downcast.  Within these boundaries I can find the average wire speed when the CTD is going down, when it’s coming up, and for the whole time that it is in the water. What I found, for the first cast at least, is that the downcast is about 25 m/min and the upcast about 16 m/min making the overall speed about 20 m/min.  This shows that the heave compensation is, in fact, working to make the casts faster, but that the average speed of the wire is slower than previously thought – at about 35 m/min.

Computer language lesson for today:

‘cd’            means change directory to a designated folder
‘ls’             means list the contents of the folder
‘cp’            means copy

Monday, April 25, 2011

R2D2 Meets the Autosal


Wednesday, the Autosal and I were mere acquaintances. By Thursday afternoon, we were thick as thieves.  Duplicate water samples needed to be run through the machine to verify the machine’s salinity measurements remained accurate throughout the processing that Cammy completed this week.  I watched Craig run ten or so of these samples trying to memorize every button to press and surface to Kimwipe dry.  The key to getting to know the Autosal, apparently, is the opposite of that of any normal friendship. You must try to be as robotic and void of character in your interactions in order to function properly together. The Autosal determines the salinity of a water sample by running current in four spiral metal probes and measuring the extent to which the water surrounding the probes conducts electricity.  Small bubbles around the spirals, variations in the time the water sits in the cell, rinsing once to many or once too few times or failing to vacuum away all the water from the past sample can affect your results in small ways.  These small effects easily compound to skew your overall patterns.  After watching with strenuous attention to detail, I tried to repeat his robotic routine.  My first few runs were littered with small mistakes – forgetting to flush the water here, forgetting to Kimwipe there. But by my fourth practice run, I was feeling pretty characterless. I stayed true to the routine to the very end – even entering my results into the database, which was powered off and could care less. Just call me R2D2.

The war against Dreamweaver continues.  Naively, I had thought that I had won the war when, 20 minutes before 1700, I came to Craig’s office to show him what I had completed so far.  He did some more clicking of his magic fingers and put my page on the honest to goodness internet. Of course, it would be quite an Easter egg hunt to find the page online without knowing the URL. But that did not inhibit my excitement at being an official webmaster.  ‘Master’ turn out to be a little preemptive. The moment we opened the page, my spry menu disintegrated into a jumble of broken links.  The battle ahead will be to recreate the links and nurse my spry menu bar back to health.

Thursday, April 21, 2011

The Battle of the Bulging Spry Bar Menu


Today, I experienced great victories over Dreamweaver. These victories were equaled by moments of head banging (which, against a laptop, you have to be careful with.) Morale is up, however, and the troops are hopeful.  After our win at the Battle of the Bulging Spry Menu Bar, it seems that nothing can keep us down.

The Battle of the Bulging Spry Menu Bar extended over a day and a half, with intermittent fighting. My adversary, the code window, far outnumbered me with brackets and equal signs.  I was only armed with ADCP plot figures, which are not particularly cooperative soldiers in this kind of battle. In fact, they sometimes appear to be fighting for the wrong side when they need to be resized or repositioned. The battleground was the left margin, where I intended to place my vertical menu bar. The code window defended this territory ferociously for unknown reasons. My intention was to layout links to the data in a more compact way to avoid excessive scrolling. The menu bar can only be described as bulging because of the 70 or so HOT cruise tabs to be inserted into and the submenus to be attached to each.  Victory came when an unexpected ally, the div tag, came riding in upon a white horse and divided my page into sections, leaving the left margin open for a menu bar.  Small victories followed in the form of color-schemes and margin adjustments. A battle waits in the next valley over concerning resizing the submenu tabs.

Wednesday, April 20, 2011

Weaving Tangled Dreams

Yesterday, Craig sent me a link to a branch of the HOT website which displays Acoustic Doppler Current Profiler (ADCP) data from past cruises.  Anyone can come to this site to look through plots of current velocity and direction recorded by the ADCPs aboard the Kilo Moana or the Ka`imikai-o-Kanaloa.  Despite its noble attempts to make cruise data available to the masses, this is the ugly duckling of websites. Its first offense is its background color: beige, the internationally recognized color for blandness.  It also hasn’t been updated with new data for a while and has some functionality issues.

With the link to this website, Craig gave me the task of giving the ugly duckling a makeover.  However, the extent to which I am able to name the flaws of the ADCP page is equaled by my inability to fix them.   Dreamweaver, the software that I am using to redesign the page, has its own language wholly different from the other computer languages I have previously mentioned.   My learning process involves many trials and even more errors.  Edit > Undo is my savior as I accidentally turn the page upside time after time. My limited successes so far include inserting links to anchors on the page, or to other html files, resizing and aligning images, and my greatest triumph: changing the background color from beige to blue.
One of my successes: cropping an image.
At some point in the afternoon, after too many Edit > Undo’s for one day, Craig gave me a new project. Though this project still involves an unknown language, that of Matlab, it comes more logically to me. On the cruise last week, heave compensation was used for the first time during the casts in order to let the CTD descend more smoothly.  This means that the winch lets out the wire at varying speeds depending on the heave of the boat in order to keep the tension on the wire relatively constant. What remains to be seen about heave compensation is how accurately it reports the speed at which the CTD descends. This is where my project begins: I will use Matlab to plot wire speed from the winch over time and compare it to the pressure versus time data from the CTD.  This will show how accurate the winch data is, as well as show how beneficial the heave compensation is.

To the first twenty commands I tried, Matlab stubbornly refused to acquiesce. Matlab is quite particular, I have learned, about the use of parentheses and colons. It is training me quickly to pay attention to these details. Success came slowly and even the simplest plot gave me great satisfaction. Craig introduced me to the m-file, a text document in which I can record all of my commands and explain their functions, with whom I got along much better than with Matlab itself.  With a couple of magic movements from Craig’s fingers, Matlab ran the functions in my m-file and out popped 2 new plots. I aspire to Craig’s magic fingers someday. In the meantime, the Matlab vocabulary lessons continue:

‘pwd’               stands for ‘print working database’ which means ‘where am I?’  to which the answer is invariably an address to a database which I do not understand. I’ve got the question down, though.

Tuesday, April 19, 2011

Sifting Out the Noise to Find the Signal


Imagine you are sitting in a coffee shop, reading a book. This is a horrible place to find peace and quiet, but you are determined.  The story heated up a couple of chapters ago when someone in the library shouted, “Murder!” You are on the edge of your seat to know which character is the killer, and whether it was with the candlestick or rope.  You suspect Colonel Mustard, but you can’t be sure. Just then, the barista begins grinding a fresh batch of coffee beans. The new barista, still in training, is shouting completed drink orders across the whole room.  Your telephone rings.  It’s your mother so you must pick up.  It’s been a few days, so there is a lot to reassure her about how you’ve been getting in all your food groups. The subtle jazz music to which you had enjoyed tapping your foot has become dominated by saxophone squeaking in your ear.  A little gray-haired woman asks you if you’d mind if she sat next to you. You’re trying to determine Colonel Mustard’s integrity but the author has employed all sorts of literary tools like foreshadowing and analogy, which make the author a bestseller but now just annoy you.  The gray-haired woman is discouraged at your lack of response and begins inquiring more loudly and you’ve completely forgotten what you were telling your mother about.  Solving the murder mystery seems far afield.

After talking with Roger this afternoon for an hour, this is how I imagine analyzing a time-series might feel. It started with a question of how HOT fits in anthropogenic climate change research. The answer will not fit in this blog but the short version of the short version that he summarized for me is that it all depends on sifting out the noise to get the signals. The noise can range widely spatially, from turbulence on the scale of a molecule to global ocean circulation, and temporally from internal tides on the scale of tens of minutes to the earth’s motion on a scale of tens of thousands of years. The signals could be telling us how our climate is changing.  Identifying the patterns of noise is hard enough, and when those patterns begin to change – due to climate change or otherwise – it becomes harder. That is where a time-series becomes useful.  They attempt to give consistent data with high enough frequency over a long period of time in order to start picking out the patterns so that the signal becomes clear: Professor Plum in the library with the candlestick. Troubles, of course, include limited ranges.  You can’t measure the whole ocean and data is only available a few decades back, not thousands of years.  It is becoming clearer to me, however, that this work is ever more pressing and ever more complicated in light of those limitations.

Sunday, April 17, 2011

On Solid Ground Among Foreign Tongues

A little less rolling and heaving than the ship, but equally air-conditioned and packed with new information, Friday was my first full day in the office. I spent it trying to understand the processing through which the raw data from the ship must go in order to mean something in a language closer to English.  First, Fernando, who was kind enough to let me abduct the back desk of his office, explained it to me conceptually. Next I tried to retain this comprehension as I watched Branden, a Computer Science major light-years beyond me in the language of the keyboard, type code into Matlab to execute this processing.  Later on, I even tried my hand at Matlab, under Cammy’s supervision. Though I am not a natural born whiz at the keyboard, with a little training I may be able to rapidly type streams of gibberish with the best of them.

What come from the ship are many columns of numbers in engineering language – volts.  Every electronic signal from the instruments indicates a value in degrees Celsius, decibars, practical salinity units or micromoles per kilogram.  Scripts in Matlab are designed to perform the translation from engineering units to scientific units. While they do this, they also scan for errors in the data. A temperature that reads higher than 40°C, for instance, is an error that would be deleted.   If that were a feasible temperature to encounter at sea, I would be in trouble.

After that translation and error screening is complete, you have columns of numbers in a familiar language but they are speaking much too rapidly to comprehend their meaning. Underwater, the CTD records data at a frequency of 24 Hz, or 24 times a second. For practical purposes, this is TMI (too much information.) Run again through a script in Matlab, the data is averaged to a frequency of 2 Hz. 

Next you must account for the inherent skewing of data over the course of each cast. The skewing comes from the differences in pressure on the instrument between the downcast and upcast, giving you two slightly different data strings. Some calculations, which the computer seems to find quite simple but I’m sure I would not, match the two lines to the best fit giving you close to one single data string.

Similarly inherent to the operation of the instruments is a time lag between the moments in which each variable are measured.  The CTD works like a water slide with several loops through which water must flow. First the water enters through a pump that sends it to the temperature sensor. Next it loops the loop to the conductivity sensor and swirls on to the oxygen sensor before exiting the slide. In order to know that you are looking at the temperature, salinity and oxygen values for the same parcel of water, you must account for the time it takes for the parcel to travel from sensor to sensor.  In addition, there is a secondary slide for every variable that must be aligned temporally with the first.  There is a Matlab script for this too.

There are many more alterations to the data that were explained to me – some of which I chose not to explain in favor of the more intriguing and understandable processes, many of which escape my memory. Today challenged my capacity to follow computer commands and I am proud of what the steel trap still contains, two days later. 

Matlab language lesson for today:

‘Exit’, followed by ‘enter’ means ‘close Matlab, please’

‘y’ means ‘yes’

More to come, I’m sure.

Saturday, April 16, 2011

Without Hitch or Sneeze

My last watch on the KM was a slow one for science.  The science that remained did not involve the regular CTD deployments nor a meter net tow but something entirely new to the ship and myself.  As the wire was cranked in, a series of Plexiglas contraptions emerged from the surface and hung in a column under the A-frame. They dripped with seawater and waved ever so slightly in the wind like stubborn kites. Who knew science could be so lovely? Aside from bringing a little beauty to the back deck, these kites, actually called vanes, carefully capture water samples for iron testing. The vanes must be very careful in this capture because iron levels in the ocean are extremely low, particularly in the northern Pacific, and anything from a human hair to a speck of dust can contaminate the sample. From when I saw her at lunch, rapidly swallowing a PB&J while staring at her timer, to when I went to sleep at 0200 Jesse, the graduate student from MIT running the iron testing, looked tense.  I even felt tense while helping Cammy take apart the vanes and put the sealed water samples in a Ziploc bag – and I only had to hold the Ziploc. A sneeze in the wrong direction and all was lost, it seemed.   Luckily, the collection of the vanes went off without hitch or sneeze.

For the rest of my watch, I observed the painstaking pouring of iron samples until the whole ship seemed to be asleep.   When 0200 finally came and the last thermosalinograph sample was taken, I joined the rest of the ship’s company in sleep.