Archive for January, 2010

Debian, Ubuntu, and dpkg

Over the last few days,  I’ve been trying to get GMT up and running on Ubuntu 9.10.  I’ve run into several roadblocks and difficulties along the way, including problems with installing and accessing supporting software packages.  The one that’s been causing me the most headaches is GDAL.

Kurt was helping me to figure it all out, and in the process introduced me to a new command that I’d never used before:  dpkg.  He got me to use it to look for installed packages.   I looked up the man page for it, and discovered that it is a package manager for Debian.  Which led to my question “What is Debian?”.  I’ve seen all kinds of references to Debian in Ubuntu, and lots of cross references in documentation and online forums.  I always thought Debian was a completely different OS, but there is more to it than that.

Here is a link to a page on the Ubuntu website:  Debian and Ubuntu. Ubuntu is built on the Debian Linux distribution. It is supposed to have more frequent security updates, a nicer desktop user interface, and frequent system updates so that an up-to-date Ubuntu system will provide access to software packages that are at most 6 months old. The Ubuntu website also claims that they provide bug fixes and feedback to Debian during their development process, not just at the release. In fact, there are supposedly several Ubuntu developers who are also Debian developers.

However, it’s probably worth knowing about the other side, too – some people really like Debian a lot more than Ubuntu, or other Debian-based distros.  This person discusses some dissent over Ubuntu being owned by a company (Canonical), thus undermining its open-source-ness.  Debian’s also strict about free software, while Ubuntu, apparently, is a bit lax on that issue. (re-branding Firefox as Iceweasel??)  They also say that Debian is compatible with Special Computer Architecture – so more robust for unusual setups, I guess.

In any case, I am happy with Ubuntu 9.10, but it’s good to know some background.

AUV runs on Debian Linux

This is sort of old news (October 2009), but I just found it on the Debian website. This article describes how a team of 35 students at Cornell University won a competition for autonomous underwater vehicles, AUVs (or unmanned underwater vehicles, UUVs). And their award winning underwater robot runs on Debian. Cool!

Installing GDAL

Last night I didn’t finish installing GMT because I wanted to make sure I had access to GDAL (Geospatial Data Abstraction Library). I got it by running sudo apt-get install gdal-bin. I am not entirely certain if that was the right thing to do. And if it does install GDAL, I’m not sure what version it will be. (I think it’s 1.5?)

It installed and I ran the GMT install file again, this time choosing the GDAL option and specifying the appropriate path. Seemed like it worked at first…but I now think I’m worse off than ever…

I think maybe my problem is that I don’t know where my installed folders are going. I just found this little hint:

sudo updatedb
locate gdal

This command returned a ton of lines – I guess that means I have a lot of files and folders on my computer that contain the string “gdal” in their title. Anyway, this was enough to show me where to find my elusive GDAL directory. (it’s in /usr/share/, it’s called /gdal15).

I also tried to use this to find my netcdf directory, since that was also giving me similar errors during GMT installation. But there are so many netcdf files and folders that I don’t know which one is the installation folder. I need to figure out how to install things where I want them.

I finally just ran install_gmt without the GDAL option. I think it went okay, except for a bunch of warnings and errors at the end about “gmt_support” and the triangulate function.

*sigh* … I still have a lot to figure out. I’m at that stage where every question I ask raises about 10 new questions.

What is NetCDF, anyway?

After all of the problems I had with the NetCDF portion of my GMT install yesterday, it seems like I ought to figure out what NetCDF is. Here’s the description, quoted directly from the Unidata Program Center in Boulder, Colorado:

NetCDF (network Common Data Form) is a set of interfaces for array-oriented data access and a freely-distributed collection of data access libraries for C, Fortran, C++, Java, and other languages. The netCDF libraries support a machine-independent format for representing scientific data. Together, the interfaces, libraries, and format support the creation, access, and sharing of scientific data.

NetCDF data is:

Self-Describing. A netCDF file includes information about the data it contains.
Portable. A netCDF file can be accessed by computers with different ways of storing integers, characters, and floating-point numbers.
Scalable. A small subset of a large dataset may be accessed efficiently.
Appendable. Data may be appended to a properly structured netCDF file without copying the dataset or redefining its structure.
Sharable. One writer and multiple readers may simultaneously access the same netCDF file.
Archivable. Access to all earlier forms of netCDF data will be supported by current and future versions of the software.
The netCDF software was developed by Glenn Davis, Russ Rew, Ed Hartnett, John Caron, Steve Emmerson, and Harvey Davies at the Unidata Program Center in Boulder, Colorado, with contributions from many other netCDF users.

Installing GMT

(Warning: This is a long, and probably confusing post. Read at your own risk!)

My life for the last 7 years has basically revolved around oceans and maps in one way or another.  Since I’m now trying to embrace the wonderful world of open source, I thought it would be a good idea to combine my passions and finally figure out GMT and MB System.  I thought this tutorial on installing MB-System on Ubuntu would be helpful, but I was doing something wrong and couldn’t even get past the very first step.

So the way it works is that on the GMT home page, you can use a form to automatically generate a script that you can save as a text file and use as an argument to the install_gmt command. I tried to do this for (literally) hours. I kept getting an error message about how it couldn’t find my netcdf directory. So a couple of minutes ago, I finally ran the install_gmt script without the GMTparams.txt argument, and I think I got a little further. It installed the necessary netcdf stuff, appeared to be installing GMT, and then gave me errors about not being able to find some files or directories. I think that the errors were all related to a missing GDAL directory. The GDAL thing is an optional feature that you can set up during installation that is supposed to allow you to create geo-tiffs. But I think I must haave set it up wrong…

So in the end, I am not certain whether I successfully installed GMT or not. But it’s now getting too late, and I’m too tired to figure it out. To be be continued…

**** a bit later *****
Ah-ha! I started the installation again found this little tidbit:
GMT offers experimental and optional support for other grid formats
and plotting of geotiffs via GDAL. To use this option you must already
have the GDAL library and include files installed.

I think this means it’s getting late and I’m starting to miss obvious things. More tomorrow!

NOAA + Google

Thanks Kurt for pointing this out – very cool.

NOAA and Google have signed a cooperative research agreement. It’s really exciting because NOAA has so much great data, and this will hopefully help it to become more readily available to both the scientific community and the public.

Adding a website icon

Finally – I figured out how to get rid of that ugly website icon. The one that just looks like a little page with the corner turned over. After some Googling, I found out that the little icon is actually called a “favicon”, short for “favorites icon”. I made a really simple, silly one using Inkscape, I didn’t really care too much what it was, I just didn’t want that ugly default one. So now it’s just a purple star on a light blue background (it should be showing at the top of the web browser right now). I saved it as a .xpm file, then converted it to .ico format using a little command line program called xpm2wico. It took me a while to figure out that for it to work, I had to name the file favicon.ico. All I had to do then was upload it to the main directory on my website. Easy peasy.

Publishing an html file

Wow.  Talk about baby steps.  I didn’t realise just how much I DIDN’T know.  All I wanted to do was put something, anything, at my shiny new domain, www.michw.com.  I call myself a geek, but I don’t think I am anywhere near reaching that status, what with never having created an .html file before.  Ever.  Let alone upload one to a server – eek!

Thanks to the world wide web, I fairly rapidly created this simple little thing:

<html>

  <head>
    Welcome to michw.com...
  </head>

  <body>
    Sorry, nothing to see here...please visit <a href="http://blog.michw.com"> my blog /:-)</a>
  </body>

</html>

Wow. I almost didn’t want to post this because I’m embarrassed at home simple it is. But hey, everyone’s gotta start somewhere, right? Next step: get it onto my server, in the right location so that it displays when someone goes to my web address. In my Bluehost server directory, I needed to put my file into /public_html. I’m not sure if that’s standard, or just Bluehost’s way of setting things up. But anyway, that’s where I had to put it. I also read somewhere that I need to name my main html file index.html or index.htm… I’m not sure why, but that seemed to work out for me. So now at least *something* comes up when people type http://michw.com. I think…

My new home

Well, aside from a few kinks along the way, I think I’ve got the most painful part of the migration done.  I’m all set up here at http://blog.michw.com. As far as I can tell, all the links now point to where they should in my new domain. It was a bit confusing – I had to make changes to my name server – I had to temporarily point it to my blog wordpress.com instead of letting Bluehost manage it. Then I configured the domain from wordpress.com, paid my $9.97, switched back the name server on Bluehost, and I was on my way. Aside from some pesky things like the sourcecode plugin, the theme, and the layout… oh yes, and I also lost all of my links! :( I think I’ll have to put them back in manually.

Moving to WordPress.org…

In a completely impulsive decision, I decided to move my WordPress.com blog over to my own domain hosted on Bluehost. It’s impulsive mostly because I have no idea what I’m doing, and am quickly becoming overwhelmed. I don’t know how the transition will go, because I’m still figuring it all out. So far, I’ve got myself space and a domain name at Bluehost – michw.com. Pretty simple. But there’s nothing at michw.com yet. I managed to export this blog to xml, and import it to Bluehost really easily (it can be found, in a sort of incomlete state, at www.michw.com/blog). Now I need to figure out how to get my wordpress.com posts linked over to there. So essentially, most of the content of my blog exists in two places simultaneously. I have no idea what happens when someone searches for something in that blog now. I guess they’ll get directed here…

I did find some helpful stuff on good ol’ Google — such as this document (from this website). Although it may be a bit dated. And it’s discouraging that the links on the blog in their example don’t work any more. But I am guessing that they might have stopped paying WordPress the 10 bucks a year to forward the links to their new site…