Accessing the World Ocean Database (2009) in svp_tool

I've been coding up access for the World Ocean Database 2009 (WOD2009) into svp_tool and it's pretty much ready for general use. This particular functionality is terribly useful when you need to have a peek at the range of oceanographic conditions that have been observed for any given location in the world for whatever reason. For example, Jim Gardner is heading out on a deep water EM122 survey on the Marianas and need to confirm that his Deep Blue XBTs are going to get deep enough to capture the variability in the watermass. We queried WOD and found that the watermass is pretty tame below ~700m so his Deep Blue XBTs would be just fine as they sample down to about that depth at the survey speeds he was planning. If you're really bored and want to see my thought process as this was developed, check out my blog on this: I think this would be a tremendous teaching tool for the Oceanography classes as it allows you direct and easy access to data to help explore some of the concepts (e.g. western boundary currents, origin and distribution of water masses). If you want to try this out, read on. If you're never going to use any of those tools then just read the "compiling" section below so that you'll know to safely ignore the error messages when you run 'compile_every_gd_thing'.


The new functionality requires the libsqlite3-dev library at compilation time (and libsqlite3 at runtime, which I've found to be installed on Ubuntu by default). If you want to 'compile_every_gd_thing', it'll choke in jonnyb/subr/ and jonnyb/wod/ and jonnyb/svp/svp_tool/ unless you have libsqlite3-dev installed. I've been testing this on Amundsen via ssh and I can get it to compile and run.

Download and Configuration

You'll find the WOD2009 downloaded into /homes/share/datasets/WOD2009/ (or something like that). There's also a little script in there to download it to your local hard drive if you want a local copy. You'll need access to that directory and then you'll need to set a few environment variables before running svp_tool:

For bashers, edit ~/.bash_profile and add: export WOD_PATH=/homes/share/datasets/WOD2009 export WOD_DATABASE_NAME=/homes/share/datasets/WOD2009/wod.db3

For tcshers, edit ~/.cshrc and add: setenv WOD_PATH /homes/share/datasets/WOD2009 setenv WOD_DATABASE_NAME /homes/share/datasets/WOD2009/wod.db3


After that's done (and you've refreshed your environment), run svp_tool with your favourite 8-bit map sheet (it's a little dumb about Lambert projections though). Click the 'WOD' button in the top left of the map window. A little "Query builder" window will pop up: click on the month(s) and instrument(s) of interest (currently only CTD and XBT are supported) and then right-click and drag in the geographic window to extract casts for that location. Note that the right-click and drag will continue to do WOD lookups until you "Exit" the WOD query builder bar (at which point right-click and drag returns to its normal behaviour: selection of profiles in the map window).


If you want a bit more info on what it's doing, run svp_tool with the -debug_wod option and watch the command line as you make queries. It might help you debug incorrect installations as well if it doesn't quite work out of the box.
Last modified: 20100810 by J. Beaudoin