Gallery

## Oregon Dunes

This gallery contains 9 photos.

All of my roommates are gone right now for various reasons, so with nothing better to do last weekend I drove out to the coast to camp by myself for a night. I stayed at Jesse Honeyman state park, just … Continue reading

## Synchronizing Documents Across Computers

This post is a bit different than what I’ve been posting lately, but I’ve spent a lot of time thinking about this problem recently and I wanted to post what I’ve found for the sake of documenting something that I think is useful.

As anyone with more than one computer knows, keeping documents synchronized between computers is a problem which, considering how common it is, is surprisingly poorly addressed by existing solutions. Most common problems like this have dozens of implemented solutions and agreed upon best practices but everyone seems to have different ideas about this particular one, and none of them seem very well implemented.

Of course I’m aware that services like DropBox and Google Docs do exactly what I’m about to describe, but I’m skeptical of any service that describes its self using the word “cloud.”

If “cloud computing” has a meaning, it is not a way of doing computing, but rather a way of thinking about computing: a devil-may-care approach which says, “Don’t ask questions. Don’t worry about who controls your computing or who holds your data. Don’t check for a hook hidden inside our service before you swallow it. Trust companies without hesitation.” In other words, “Be a sucker.” A cloud in the mind is an obstacle to clear thinking. For the sake of clear thinking about computing, let’s avoid the term “cloud.”

-Richard Stallman, Who does that server really serve?

I’d prefer to keep my data safely on my own computers, and not give it away to be mined for advertising keywords. The solution I’ve come up with is just a combination of commonly available tools to build ones own dropbox-like service.

First, a little on some alternatives I’ve looked at. Of course there are DropBox and Google Docs and the like, but those come with privacy concerns which I’d rather avoid.

Then there are services like SpiderOak, which is closer to what I want. I used their service for a few months back in 2011 and the client eventually randomly corrupted all of my documents, which were between backups so I lost a lot of important stuff. Maybe it’s gotten better since then, but that left a bad taste in my mouth. Also, their client is mostly proprietary software. They claim to be willing to open it up, but they have yet to do so.

Then there are the half dozen packages intended to run on ones own server which all claim to do exactly what I’m looking for. Unfortunately, none of them worked out for me:

• NFS/sshfs. One option would obviously be to keep all of my files on a network mounted filesystem. That way, the exact same files are accessible from anywhere. This solution works fine, but the files load slowly if you’re not physically close to the server and they won’t be accessible when away from internet access.
• SparkleShare is a great tool, and I like that it’s just a thin interface to a standard git repository. The downside is that the git tree grows out of control if you have files that change very often. I wanted to be able to synchronize my Thunderbird profile, and within 24 hours my 5GB profile had grown to 35GB.
• OwnCloud. Also a cool idea, but it has lots of features I don’t need and the synchronization protocol (csync) is too slow.
• Bittorrent Sync is proprietary software so it has the same problems as dropbox, etc.

What I need is something that transparently fits in a small script; based on simple, well-tested utilities; is easy to maintain across heterogeneous systems; and is easy to back up in case something goes wrong.

What I found is a utility called Unison that uses the rsync protocol for efficient transfers, and never leaves the system in an unusable state. If there are conflicts it simply does nothing to avoid making simplistic assumptions. Fortunately I rarely create conflicting files between devices because I don’t often use two computers at once. I typically do things like change files at home, and like to have those same files automatically updated on my work computer by the time I bike in.

I set up my network in a “star” topology where there is one server that holds the master copy, and all the others synchronize with it. The server keeps hourly backups of the home directory and has duplicated hard drives in case one breaks. I generally don’t like centralized systems like this, but every client has its own full copy of every file so there is plenty of redundancy.

I could spend a while explaining my whole file server setup, but the basics are that I have a server called “Andromeda”, for which all of my other computers have passwordless SSH keys. To keep them synchronized, each computer runs this small script through cron every ten minutes to sync up with Andromeda.

#!/bin/bash   args="-batch"   if [ $# -gt 0 ]; then case$1 in "check") # Just print out the status of the last unison run grep "^Synchronization" ~/.unison/unison.log | \ tail -n 1 | awk '{print($1,$2,$3,$4)}' exit ;; "manual") # Do not use Unison's -batch option, # ask for user confirmations args="" ;; *) echo "Unknown option: $1" exit ;; esac fi args="$args -sshargs -C"   # Use different ssh profile if I'm on home LAN ap=/sbin/iwconfig 2>/dev/null | \ grep "Access Point" | \ awk '{print($6)}' if [$ap == "1C:7E:E5:3B:BD:68" ]; then echo "At home, using LAN IP address." ip="Andromeda" else echo "Away from home, using DNS IP." ip="Andromeda-remote" fi   ## Wait until server is done syncing with other clients echo -n "Checking whether unison is already running on server..." isrunning=ssh $ip "ps aux" | grep -c "unison" niter=6 while [$isrunning -gt 0 ]; do echo ""; echo -n "Waiting 10 seconds for server to free up..." sleep 10 isrunning=ssh $ip "ps aux" | grep -c "unison" if [$niter -le 0 ]; then echo " Failed"; exit; fi niter=$(($niter - 1 )) done echo " OK"   ## Finally, sync with server unison $args /home/jmp ssh://$ip//home/jmp \ -path Documents \ -path .thunderbird \ -path .gnupg

To take this even further, I wanted to make sure that if I updated this script, it would run the same way on all of my computers. In other words, I wanted to synchronize the synchronization process. To do that I planned on uploading the above script to a server, then making a smaller script which wouldn’t ever need to be changed, that would download and execute the actual commands.

I realize that there are security concerns associated with automatically executing commands downloaded from the internet. For instance, if someone were to intercept the script on its way to me, they could change the commands and have my computer automatically execute arbitrary code. To avoid that hypothetical scenario I could have just put the actual script on my server, and access it by scp. Instead I chose a slightly more involved method.

I first sign the script with my PGP key, then upload it to the public internet:

gpg --sign sink.sh scp sink.sh.gpg jonper24@invertedearth.net:invertedearth.net/content/ rm sink.sh.gpg

and when my main script accesses it, it verifies the signature before executing the content:

#!/bin/bash   ## Check internet connection echo -n "Checking network connection..." ping -c 1 invertedearth.net >/dev/null 2>/dev/null if [ ! $? -eq 0 ]; then echo " Failed"; exit; fi echo " OK" # Download and verify authenticity of script script=mktemp siginfo=mktemp echo -n "Downloading script..." curl http://www.invertedearth.net/content/sink.sh.gpg 2>/dev/null | \ gpg --decrypt 2>$siginfo > $script goodsig=$? key=awk '/Signature made/{print $NF}'$siginfo echo " OK"   echo -n "Verifying signature..." if [ $goodsig -eq 0 ] & [$key == "45611A51" ]; then echo " OK" chmod +x $script$script $@ else echo " Bad signature!!!" fi rm$script \$siginfo

One could argue that this is unnecessarily nerdy, which is true. There are simpler ways to do this, but I like that this solution could also be used for sharing more public scripts online, etc. Also, it’s a nice use of GnuPG, which I always like.

Anyway, whenever I think about problems like this that should have been solved once and for all a long time ago, I’m reminded of this particular XKCD comic:

Gallery

## Charlotte’s Visit: Broken Top + McKenzie River Trail

This gallery contains 85 photos.

My sister, Charlotte, visited this past weekend with her girlfriend, Lizzie. We had a big weekend hiking up Broken Top mountain near the Three Sisters and Bend, and also mountain biking the McKenzie River Trail. Broken Top was really nice. … Continue reading

Gallery

## Bishop, CA Spring Break 2014

This gallery contains 15 photos.

During spring break I headed down to Bishop to boulder for a week with a couple of friends and climb Mt. Tom if weather permitted. We were lucky enough to get a nice day on Mt. Tom and plenty of … Continue reading

## Lithospheric Delamination in the Western U.S. – Part IV: Delam Styles / Type Localities

In my last post I tried to explain the fundamentals of delamination. I used a floating wooden board being weighed down by metal as an analogy for the state of the Earth’s lithosphere. In the Earth, the crust is buoyantly floating on top of the mantle and is being weighed down by cold mantle material stuck to its bottom. If the two materials were to separate, the cold mantle material would sink off in to the warmer mantle below and the buoyant crust would rebound, rapidly building mountain ranges. So, in the most general sense, delamination refers to the process of heavy material peeling of the lithosphere and sinking down in to the mantle. This can be manifested in a few different forms.

The first form I’ll mention is the one which most resembles the analogy I gave before. In this case the cold mantle lithosphere peels back from the crust and sinks away in to the mantle (Figure 1). Hotter mantle material from deeper in the Earth replaces the cold lithosphere as it recedes.

Figure 1. Mantle lithosphere can peel off from the base of the crust, forcing hotter mantle to flow in to its place.

This sort of thing is most likely happening beneath the edges of the Colorado Plateau, contributing the dish-like shape to its edges [1]. Whether or not this is actually the case is a contentious question but the evidence is convincing enough to mention it here.

Secondly, it is possible for the mantle lithosphere to drip off, with similar shape to the form which cold wax at the top of a lava lamp takes as it convects back toward the bottom. This is known as a “Rayleigh-Taylor Instability.”

Figure 2. Mantle lithosphere can drip off of the crust as a Rayleigh-Taylor instability.

This appears to have happened as a late stage in the formation of the Wallowa Mountains in northeastern Oregon [2].

Lastly, lithosphere can be forced to depth by horizontal tectonic forces from the plates. In this case, the lithosphere isn’t really delaminating because of its own inherent density instability, but because it is being pushed to depth by the material above it.

Figure 3 Horizontal tectonic forces can push lithosphere deep in to the mantle.

This is apparently the case for lithosphere beneath the transverse ranges of southern California, around the Los Angeles basin for instance [3].

My research is focused on understanding the mechanisms that enable each of these processes to happen. Assuming the mantle lithosphere is always buoyantly unstable, can it actually ever stably stick around? Is delamination the exception or the rule? And what controls whether the lithosphere will drip off in small Rayleigh-Taylor stabilities or in massive intact slab roll-backs.

All of these questions have impacts on, and feedback from other, associated tectonic and magmatic processes. I’m interested in untangling the causes and effects of each of these mechanisms and placing them in real-world context using the western US as a natural laboratory. All of my experiments have already been run for me, I just need to sort out what happened.

#### References

[1] Levander, A., et al. “Continuing Colorado plateau uplift by delamination-style convective lithospheric downwelling.” Nature 472.7344 (2011): 461-465.

[2] Darold, Amberlee, and Eugene Humphreys. “Upper mantle seismic structure beneath the Pacific Northwest: A plume-triggered delamination origin for the Columbia River flood basalt eruptions.” Earth and Planetary Science Letters 365 (2013): 232-242.

[3] Houseman, Gregory A., Emily A. Neil, and Monica D. Kohler. “Lithospheric instability beneath the Transverse Ranges of California.” Journal of Geophysical Research: Solid Earth (1978–2012) 105.B7 (2000): 16237-16250.

## Lithospheric Delamination in the Western U.S. – Part III: Delamination

In my last post I covered the basics of mantle dynamics and now I should be just about ready to dive in to the actual content of this series of posts: lithospheric delamination. I’ll start by just explaining the concept. In my next post in this series I’ll talk about type-localities in the western U.S. and some basics on the methods I use to study the process. I’ll finish the series by explaining specifics of my research and where I hope to go with it.

In geodynamics, delamination refers to a process in which something that was formerly attached to the lithosphere becomes unstable and falls off, sinking deep into the mantle. This can happen if the material is substantially more dense than the material below it. We call this a buoyant instability.

A nice way to visualize what’s happening, and an analogy that I’ll return to in a moment, is to imagine a piece of wood floating in water with a heavy chunk of metal glued to its bottom. The wood in this case represents the buoyant crust and the metal represents the cold upper mantle that’s stuck to its bottom. The water it’s floating on represents the rest of the mantle. Delamination would be the process of the glue that holds the two together coming undone and allowing the metal to sink away.

So, why would we care? This is a process that happens tens or hundreds of kilometers below the surface of the Earth so how does it affect anything else on Earth?

First of all, in Earth sciences even the processes which seem most esoteric and intangible usually have massive consequences to other processes and systems which directly affect life on Earth. Secondly, it’s just interesting, okay? It shouldn’t need justification to be interesting.

In this case however there is a direct, tangible consequence that’s fairly interesting in its own right. Let’s go back to the floating board being weighed down by the chunk of metal analogy for a moment. Basic physics tells us that the buoyant force pushing the board up equals the weight of the displaced water and that the system will find equilibrium when the weight of the floating stuff equals this buoyant force. Since the metal is dense, when the two are attached the whole thing will float relatively low (assuming it’s not so heavy that it just sinks all together). When the metal comes loose and sinks away, the board is much less dense and will float higher in the water. It’s similar to a boat weighed down with cargo floating super low until the cargo is unloaded.

So, what does this look like in geophysical terms? If there’s heavy material attached to the bottom of the crust, it’s being weighed down and will float relatively low, but if the heavy material falls off the crust will float up higher. This is usually expressed on the surface as (relatively) rapid uplift. In other words, it can build mountains.

We suspect that this has happened in the southern Sierra Nevada (adding to an already impressive mountain range), the Wallowa Mountains in eastern Oregon (building a mountain range entirely from scratch), and around the edges of the Colorado Plateau (responsible for its dish-like topographic expression).

I think I’ll cut this post short here and talk about the different forms of delamination in my next post. As illustrations, I’ll give specifics on the three type-localities I just mentioned: the southern Sierra Nevada, Wallowas and Colorado Plateau.

## Lithospheric Delamination in the Western U.S. – Part II: Mantle Dynamics

In my last post I tried to do a quick overview of seismic tomography. The takeaway message being that it is possible, through seismology, to “see” structures inside the Earth. It’s how we know that the Earth has layers, for example.

Other significant structures that we observe with seismic imaging are seismically fast (cold) regions beneath subduction zones where we can see tectonic plates being subducted deep into the mantle, and seismically slow (hot) regions beneath mid-ocean ridges. All of these examples are to be expected from the basics of plate tectonic theory and the fact that we see them seismically nicely supports both plate tectonic theory and seismic imaging theory.

More interestingly, in some areas we see hot and cold blobs in places that aren’t obviously associated with plate tectonics. Some examples from the western U.S. are circled in the seismic image from the last post.

This would be a nice point to lead me in to my topic, lithospheric delamination, but I feel like I should first take a tangent to explain something that I think is non-obvious about the way the Earth operates, and come back to my main point in my next post.

The Earth’s mantle makes up a huge percentage of the mass of the Earth. It’s a chemically distinct layer between the crust and the core, encompassing almost 85% of Earth’s total volume. It’s very hot but is also under enormous amounts of pressure, the deeper you go, the more pressure the mantle is under. This has weird mineralogical and rheological consequences. The mantle can be divided in to several distinct layers in which pressure and temperature trade off differently. From the top down:

At the top of the mantle there is a cold region which is, for the most part, frozen on to the bottom of the crust. The crust floats at the surface because it is chemically buoyant (made of much lighter materials) and the top of the mantle hangs on to the bottom of it. If it weren’t being held up by the buoyant crust it would prefer to sink deep in to the mantle because it is cold and dense. This frozen mantle along with the crust is collectively called the lithosphere. The part of the lithosphere which is made of mantle rock and not crustal rock is referred to (not very imaginatively) as the mantle lithosphere.

Relative geometries of the compositional layers of the Earth, drawn to scale.

Below the lithosphere, the mantle is hotter but it isn’t under too much pressure so it’s able to flow relatively easily. It’s not melted (at least not entirely, this is an area of some debate) because the pressure forces it to be a solid. It is hot enough and under sufficiently low pressure that it can “flow” by allowing crystal grains to slide past each other and deform. This layer is called the asthenosphere and it allows plate motion by decoupling the lithosphere from the rest of the mantle..

Below the asthenosphere, the mantle is very hot but is also under much more pressure. It can still flow but significantly more viscously. Flow in this part of the mantle is dominated by whole-mantle scale convection. Much like the way water flows around in a pot to equalize temperature, the mantle is heated from below and cooled from above so there is a constant flux of material rising and falling throughout.

The mantle is able to convect similarly to a pot of water being heated from below and cooled from above. [Figure generated with ASPECT mantle convection code]

The convecting interior of the mantle is all made of the same elements but is actually divided in to layers of its own because higher pressure at depth can force the minerals to reorganize their structure (think graphite -> diamond style transition). There are mineralogical transitions at 410km and 660km depth, as well as a possible transition right near the core-mantle-boundary at around 3000km. For the purpose of my story though, we’ll assume that the mantle is homogeneous below the asthenosphere.

Now that I’ve given a quick overview of the way the mantle acts and moves, I think this is a reasonable place to stop for now. Next time I’ll get to the actual content of my research and talk about the ways in which the cold mantle lithosphere can come detached from the crust to sink back down in to the mantle.

## Lithospheric Delamination in the Western U.S. – Part I: Seismic Imaging

I recently put together a poster about lithospheric delamination in the western U.S. for the CIDER workshop that’s coming up in Berkeley and I thought I’d share the content here too.

I’d like to start with the basics to tell the whole story but it’s a long one so I’m gonna split this in to several installments. This first one is just going to fill in some background on methods we use in Geophysics, starting with teleseismic imaging of the Western U.S.

Seismic Imaging: What Is It And Why Do We Care?

As a geodynamicist I’m interested in deep-Earth processes. Most of my work is focused on understanding what’s inside the Earth, where it came from and where it’s going. More specifically, I’m interested in modeling deep-Earth processes, i.e. using analogy of a simplified system to explain the behavior of a complex one like the Earth’s mantle. Of course, just making up analogies between simple systems and complex ones isn’t really science. To relate our simplified system to the real world we need an idea of what the real system looks like and how it behaves.

Geophysicists have relatively few tools at their disposal for seeing the structure of the Earth at depth: geochemists can tell us about the origin of rocks once they emerge at the surface, and geomorphologists can tell us about the evolution of landscapes which can both give hints at the processes happening at depth (or at least processes that have happened at depth in the past) but neither gets at the current state of the Earth below a few kilometers.

That’s where geophysical imaging comes in.  I’ll be specifically talking about teleseismic imaging. The concept is relatively simple: seismic waves from earthquakes all over the planet propagate through the Earth’s interior and interact with the different structures they encounter along the way. Namely, they travel faster through some materials than through others. When the waves arrive somewhere far away we can measure the relative delays among arrival times at different seismometers and use that information to reconstruct an image of the structures through which they passed.

As seismic waves propagate through the earth, they pass through lots of different structures and interact with the Earth’s interior in many different ways.

Techniques for seismic imaging have been meticulously developed over the past century or more, but in the past decade advancements in, and access to, computational hardware as well as amazing data from the EarthScope project have enabled unprecedented progress in imaging structures beneath the U.S.

Horizontal slice of seismic wave velocity through the upper mantle in the western U.S. (Schmandt, 2010)

Things that affect the wave speed include chemical properties, pressure, and directional strain but the one we’re most interested in studying is usually the temperature. The other effects on seismic velocity are either easy enough to correct for (like pressure) or small enough effects over large distances that we usually assume all seismic velocity perturbations are caused by temperature perturbations. Typically, a rock at low temperature conducts seismic waves more rapidly than the same rock at higher temperature. Temperature is an interesting property because it can tell a lot about where an object came from and where it’s headed.

Since most materials, including rock, are less dense when they’re hot, temperature is typically a good indicator of relative buoyancy. For example, when we see a cold object we can guess it’s heavy and therefore actively sinking deeper in to the Earth, or it at least wants to. There are other methods of using seismic waves to measure different properties about the Earth but temperature and buoyancy of objects in the mantle are the most interesting to me.

In my next installment I’ll talk about the significance of some of the objects we see in the most recent seismic images, such as the figure above.

References

Schmandt, Brandon, and Eugene Humphreys. “Complex subduction and small-scale convection revealed by body-wave tomography of the western United States upper mantle.” Earth and Planetary Science Letters 297.3 (2010): 435-445.

## Hello, world!

As the first post on my new site I feel like this one should be somehow special. On the other hand, since there isn’t a pattern for my posts yet, I don’t know how to make this one different. I’m still not sure exactly what the theme for this site is going to be or even how much I’ll end up using it.

I set it up to use as something like an open lab notebook. I want a space to share interesting results that I find in my research and also interesting articles I read, cool stuff I learn or figure out, good music that I discover, general ramblings about stuff that’s going on in the world at the moment, etc. Unfortunately, there probably won’t be a strict theme but I’ll do my best to categorize the posts in a way that allows others to filter out ones they’re not interested in.

That brings me to my next point: who is this blog aimed at? I’m not sure yet. As I already mentioned, I would like to use it as an open lab notebook. Therefore, the intended audience is in some ways just myself. Since I don’t know anyone else who shares all of my interests, it’s unlikely that anyone else will be interested in every post. But hopefully my friends and family find it interesting enough to pay some attention to, even if it doesn’t constantly advertise its self on their facebook walls or twitter feeds or whatever.

Well, in any case, this will be an interesting experiment in to whether or not I can keep my motivation up for something like this. I’ve never done it before but perhaps this time will be different.