.. ...................................... .. UHDAS/CODAS restructured text document .. ...................................... .. _CODAS_Compilation: Getting CODAS Mercurial Components -------------------------------------------- This is the first of four final steps required to get the CODAS software installed on the computer built using earlier sections of this documentation. .. NOTE:: If you are running the pre-built virtual computer, you can skip this step. It is already done. `Mercurial `_ is a distributed version control system. We use it to store and track changes in CODAS software. By any of the options (1,2,3) for installation, Mercurial should already be installed. **Make a location for CODAS software** Make a directory that will hold two folders (1) ``programs`` (for these mercurial repositories and a few zip archives) (2) ``topog`` (for topography) for example: - ubuntu or OSX: ``~/adcpcode`` For this documentation, we chose to match the directory used in the Ubuntu Virtual computer, so we used ``/home/adcpcode``. If you decide to do this, You need to use the ``sudo`` command to make these directories, and then change permissions so the appropriate users can read/write to that location. For example:: sudo mkdir /home/adcpcode sudo chown youruser:yourgroup /home/adcpcode Now that you have the ``adcpcode`` directory, make the two subdirectories, so you have - ``/home/adcpcode/programs`` - ``/home/adcpcode/topog`` All codas mercurial repositories, plus CODAS documentation must land in the ``adcpcode/programs`` (or equivalent) directory. This ``programs`` directory is the directory in which you will run ``hg clone`` to make repositories. .. image:: programsdir.png :alt: CODAS Python programs directory layout :scale: 70 Using Mercurial to clone repositories is fast and easy, especially for subsequent updates. You are strongly encouraged to use Mercurial for these directories. If you do, and find a bug, we can fix the bug and you can get an update that addresses the problem. In a terminal window, change directories to your ``programs`` directory and clone these **four** (4) repositories as follows: :: hg clone http://currents.soest.hawaii.edu/hg/codas3 codas3 hg clone http://currents.soest.hawaii.edu/hg/pycurrents pycurrents hg clone http://currents.soest.hawaii.edu/hg/onship onship hg clone http://currents.soest.hawaii.edu/hg/uhdas uhdas That's it. You you have the code. (you still have to compile and install it) You can browse the code at the web site http://currents.soest.hawaii.edu/hg. Compiling CODAS and Python extension code ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ Now you need to compile and install the code. There are 3 directories, each with a specific set of instructions. (1) ``codas3``: compile CODAS, which will create binary (executable) programs that actually do the processing, and libraries we used to extend the Python code. (2) ``pycurrents``: compile and install Python extension code, allowing us to use the CODAS libraries as well as all the rest of the CODAS Python code (3) install the ``uhdas`` python code (4) install the ``onship`` python code For the next step, follow the appropriate instructions for: - `Anaconda `_ - `Ubuntu `_