11 January 2016

Struggle

We grow up being asked questions in which others expect us to define ourselves, and there are so many variations on the theme. One of the most common in childhood is "What do you want to be when you grow up?" As we set (or fall into) a course that carries us from high school to college, or wherever else we choose to go, it transforms with the implication of possibilities: "Where do you want to go with your life?" When we (finally) get a sense of ourselves and the world around us, maybe by the end of college, it becomes a still-youthful seizing of the world: "What do you want out of life?" As the newness of graduate school wears off, as we recognize that there's more to life than university courses and literature searches and $0.50 beer nite, it slowly and philosophically morphs into "What do you want in your life?" From there we go on to professional work, new families, 401k and 529 contributions... It changes every once in a while, kids grow up, jobs change, families move. The opportunities to make new choices about what you want come along once in a while as we journey through our years of productivity and leadership. If we're unhappy with things the previous generations did to the world around us, now is our chance to change it. I think I've talked about that stuff before, so I'll refrain here.

Granted, this all comes from a position of privilege. I am an educated white male. My childhood was fractured but not entirely broken. I have siblings, a literal community of extended family at this point. My baseline is a lot different from that for a woman, or someone of a racial or ethnic minority, or those with less opportunities for education. I don't suffer from discrimination. I recognize these things, and I wish everyone had the opportunities that I've had. It's my generation's responsibility to help make that happen, to challenge "the way we've always done it" and do whatever I can for my colleagues and my daughter to get what they deserve.

But even underneath those overt struggles, there are questions that each of us deal with as we define and direct our individual efforts toward what we want to be in the world. I am still, or again, at the "What do you want in your life?" stage. We ask ourselves different questions in order to find ourselves out. We might revert to the taking version: "What do you want out of life?" Unfortunately many of the answers are amorphous and dreamy, with no clear path to them. I want a nice family, a nice house, a nice car. I want a loving spouse and good kids. I want to be modestly wealthy, or at least comfortable, or at least debt-free. I want a job that I enjoy and that challenges but never overwhelms me. I want a successful business.

Great! Those are all things that everyone deserves in some way or another. So then, how do you get there? That's where it gets messy... That's where life happens, on the way to the amorphous outcomes that we dreamed about as younger versions of ourselves.

There's an easier and more specific version of the question that we might get to: "If you never wanted for money, and all of your basic needs (food, water, shelter, clothing, WiFi) were cared for, what would you do with your days?" Supposedly, the answer to that question is what you should pursue as your vocation, your career, because it's what makes you happy, and as the saying goes, "if you love your job, you never really work a day in your life." Would you move to the beach and paint sunrises? Would you build a log cabin in the mountains and go skiing? Would you go to the library and read all day? Would you work at a scientific lab, researching a subject that is dear to you? Would you write novels? Make computer games? Teach 3rd graders? Run a restaurant kitchen? Communicate science to the public? Campaign for clean air and clean water?

Unfortunately, this way to your future also doesn't address the practicalities of life along the way to your goals. How do you get to the point where you want for nothing essential, and that the rest of your life happens by choice and whim? Maybe this prompts the very question that I'm getting to, that I read recently in a thought-provoking article on Quartz. It's the best framing for the question of my future that I've met in a long time: "What are you willing to struggle for?"

That struggle is where life is already happening for you. It's what you're doing on the way to achieving the things you want in your life, the things you want out of life, the things you would do if the essentials were already taken care of. On the way to educational success, we struggle with student loan debt. On the way to a happy family, we struggle with finding the right partner and raising kids through often tough times. On the way to a nice house, we struggle with a mortgage and maintenance and markets that change the value of our investment at the blink of an eye. On the way to a successful career, we struggle with tasks that are sometimes more trouble than they seem worth, with writing proposals and convincing administrators that our work is worthwhile. We struggle for purpose, for meaning, for justification, for vindication. On the way to comfort and success, we struggle with discomfort and failure. It gets demoralizing, we feel like giving up, we think of chucking it all for an alternative.

And then we pause. We think of what we're trying to achieve. We ask ourselves, "Is that goal worth this struggle?" Do you feel like you have too many things going on and want to simplify your life, or even just your workload? Do this. Is that house worth this mortgage and upkeep? Is that salary worth this schedule of meetings and tasks? Is that published paper worth dealing with this collaborator or co-author? Is that feeling of satisfaction and accomplishment worth this tedium and bureaucracy and the long time to recognition for a job well-done? Is that new job worth the effort and expense of uprooting and moving your family across the country?

As we go through life, we become more adept at judging those answers. Another fun saying: "Good decisions come from experience, but experience comes from bad decisions." When presented with choices, we do the best we can, and we decide what we're willing to struggle for, to hold up as our goals and do whatever we can to make it happen. I have a daughter who is worth struggling for—the time away from each other, the financial support, no matter what happens along the way, I want to do everything in my power to help her become the best person she can be. I have a dissertation that is worth struggling for—the time and effort it takes to develop analytical results, or to get a chunk of my work published, or to collaborate with difficult colleagues (which is exceedingly rare, I'll grant). I want a partner, but I'm not sure about struggling through the dating phase again just yet, so that's something of a conundrum that will resolve in its own time, with a partner who is worth struggling for. I have some sanity to maintain, which is obviously worth struggling for—I take meds that help make it so that I can function in those other capacities of life, instead of lying in bed with the curtains closed and an empty heart and a brain that won't shut up. Sometimes I'm happy, sometimes I'm flat, sometimes I weep, sometimes I need to rest and recharge. Sometimes I'm truly in the zone while programming and writing, and I forget to eat lunch, stand and stretch, catch the bus home, acknowledge my officemate. Sometimes I need a vacation, a change of scenery, some perspective on the important things. Sometimes I just need reminders of what I want in my life that is worth struggling for. I keep pictures of my daughter on my wall, and usually have at hand The Plan that I worked out with my advisor for my dissertation. Sometimes I just need to look up.

06 January 2016

Wednesday Infographic: Great Lakes Water Budgets

Just a little something to hold you over while I ponder my next narrative post.

The North American (Laurentian) Great Lakes constitute the largest collection of surface freshwater in the world, containing about 21% of the world's liquid freshwater. Lake Superior is itself the largest freshwater lake in the world in terms of surface area and has the third largest freshwater volume of any single lake in the world (behind Lakes Baikal and Tanganyika). The Great Lakes were formed as the Laurentide ice sheet melted and retreated northeastward to the Hudson Bay region at the end of the last North American Ice Age, around 14,000 years ago. The largest lakes in Canada (Winnipeg, Athabasca, Great Slave, and Great Bear) and Lake Champlain in the US, as well as innumerable others, were also formed during glacial retreat around that time.

This infographic (click for full resolution version) by Kaye Margaret LaFond appeared on the NOAA Great Lakes Environmental Lab's twitter feed (@NOAA_GLERL). It's based on this paper in the Journal of Great Lakes Research, in which I hope to publish sometime soon...

03 January 2016

Programming

Part of my writing this past summer and autumn involved a lot of programming. In fact, that's been going on for a long time. I won't take you all the way back to 1995. In spring 2014 I decided that I was going to do all of my dissertation analyses in Python, and I started at the beginning with the free interactive course at Codecademy. It was a good course and I highly recommend it. One of the exercises was to write a little Battleship game, which I took up again after I finished the course and expanded to include most of the rules in the real board game. It even tells you if you get a near-miss!

Anyway, I chose Python because it could be a catch-all for the various things I needed to do for my research work. Parts of my workflow use external programs, image processing, mathematical modeling, statistical analyses, visualization, large-array I/O, etc. all requiring repeatability for different locations and times. ArcGIS can't do all that, and it's expensive anyway. Perhaps I could do it in R, but I'd be learning that from scratch as I already did with Matlab, which can't do all of what I want. Fortran, my "home language" for a long time, would be too cumbersome. Python has this interactivity, this flexibility, and this lack of a compile step that was greatly appealing. It's called a "glue language" by many programmers for good reason. One Codecademy course and one O'Reilly book (Python for Data Analysis) and I was off and running up the learning curve.

One other consideration: this autumn my advisor and I decided together that my analysis code would be published with the papers that I would be producing. We're going for transparency and repeatability, but we're also looking to make something useful for the community. The things that I'm looking at around Lake Superior, other people might want to examine around Lake Michigan or in the Appalachians or who knows where. Something with Python that you really don't get with compiled programming languages is readability. If you know the basics (again, the Codecademy course is just about enough) then you can read the whole script and know what it's doing.

Now, of course, you might say "Don't you want to keep that for yourself, get those publications for yourself, have the University sell it to generate research money?" Nope. I don't have time to analyze every interesting place on Earth, I'll get enough publications through my own research interests (which are constantly evolving, too), and money (specifically, lack of) is so often an obstacle to good science. Lots of universities have strict rules about publishing software—the creator of the Gnu linux OS has a good story about MIT's license requirements and why he quit his job there before developing the OS. I've noticed that anything developed within the California state university system (including my Mac's underlying Debian linux OS) is copyrighted to the university system Regents, not the people that actually wrote the software. As for me, I prefer to put my brain out there for free, and my University allows that. It's just how I want the science to be.

So, for that paper I mentioned a couple days ago, we will be posting the accompanying analysis scripts to a GitHub repository for anyone and everyone to pull down, reproduce our results (with the provided raw dataset, same as I used to develop the paper), generate new results for other places, find bugs, make improvements, add features and methods, collaborate to make it even better. 5500 lines of Python in 24 scripts, through which about 60 MB in input data generates something like 280GB of analytical output (including tons of plots and maps). While also writing the paper, I spent this past autumn prepping, commenting, reorganizing, modularizing, simplifying, and streamlining that package so that it will be as easy as I can make it for a new user to get started. I'm still working on the README (that is, instructions for use) but I figure I'll have the time while the paper is in review to get that finished.

We intend to do the same for the next two papers in The Plan—this is just "Part 1." Publishing the code is certainly more work than just getting the results and publishing the paper. But this way, interested researchers can dig in to their hearts' content. Reproduce my analyses and tell me if I missed something. Use it for your own analyses for that area you're interested in, cite my paper in your own publication, and then take the time to tell me how you think the code can be improved for more general use. Everybody wins.

Oh, and about Fortran, I resurrected from my archives some code that I wrote for a paper that I published in 2008, and I replaced a rather opaque 300-line F90 module with an equivalent 20-line Python/NumPy function for the analyses that went into this new paper. I'm pretty sure I have a new "home language" now.