Coastal Ocean Modeling Tools
LiveOcean Architecture Notes

Getting code libraries

The code in tools/ is kept under version control using Mercurial and is available to "clone" from You can easily find them there by searching for "uwcmg".

Name in tools/ Name in Description Curator
alpha uwcmg-alpha code to set global definitions for rtools and others Parker MacCready
rtools uwcmg-rtools tools to make ROMS grids and forcing files "
moor uwcmg-moor tools for mooring extraction and plotting "
pandora uwcmg-pandora tools to plot ROMS output "
shared uwcmg-shared useful 3rd-party code "
post_tools uwcmg-post-tools post-processing code and essential utilities Neil Banas

There are two main ways you could get the code:

1. On one of the linux machines like skua you would work from the command line:

  • go to your own directory .../tools and execute:
  • hg clone alpha
  • and after that, to get newer versions of the tools, execute:
  • hg pull -R alpha to bring in changes, and then
  • hg update -R alpha to update later (there has to be a one-step methind for doing this??)
  • NOTE on NAMING: the tools system assumes that the directories in tools have the names given in the table above and this is why you need the "alpha" at the end of the clone command above. Without it the hg command would put the contents into a directory called uwcmg-alpha and the tools would get confused.

2. On your mac, install the software SourceTree (free download), and then do File => New/Clone and then enter in the various boxes (for alpha on my mac as an example):

  • Source Path/URL:
  • Destination Path: /Users/PM3/Documents/tools/alpha
  • Bookmark Name: alpha (filled in automatically)

Then click "Clone"

Now you have a Working Copy that you can look at (and edit) in the usual way using the Finder or MATLAB or whatever. You can also look at it in SourceTree, which is where you find the power of working with version control.

To see if a repository owner (Neil or Parker) has made changes to the remote code, open up a bookmark, and then in the left hand pane click on "default" instead of "Working Copy" and then click on Update to get the changed code.

3. Need instructions for Windows...

NOTES for my own benefit on Adminstration stuff

STEP 1 in creating a new repository:
Create the project in Google Code

At click on Create a new project and then fill in:

  • Name: uwcmg-alpha
  • Summary: whatever
  • Description: longer whatever
  • Version Control: Mercurial
  • License: MIT

Then click on Create Project

Then on the project page go to Administer => Source => Reset and choose the option for "hg push" and then click on Reset Repository

Then copy the URL it generates (in the hg clone line) (* keep this page open)

STEP 2 in creating a new repository:

Start by opening SourceTree (on my mac), then click icons to Add Repository => Create Repository, and set the Destination Path by navigating to the directory where the code lives. Then click on the project to open it, and do Settings => Add, and here is where you paste in the URL from Google Code. Keep the name as "default"

Then click on Commit, and Select All, and add a comment and Commit, and finally Push which sends it to the Google Code repository.

NOTE: when I did this the first time I had to get an automatically generated Google Code password (the button is on the page at step *) and paste it in when SourceTree asked for it. But I didn't have to do it the next times, presumably because I had Keychain remember the password.

NOTE 2/14/2015: When I moved to a new computer, and new SourceTree, I had to refresh the Google code password.  To do this (i) go to my Kaychain and remove the entry for, and (ii) in Google code, go through the steps for Reset again (in STEP 1 above), ignoring the dire warnings.  This will bring up a box that has a link to generate a new password.  Click on it and get the password.  Then in STEP 2 when you get to the Push step a dialog should come up asking for the new password that you just made.

Parker MacCready 09/18/2015