This note explains how to set up SVN to always have the latest stable 
version of ModEM. Other OSU projects (e.g., EMTF) could also be obtained
in a similar manner; if interested, contact us for details.

The code and its change log could be browsed using the URL:
http://mt.coas.oregonstate.edu/viewvc/ModEM/branches/stable

Note that some repositories have restricted authentication.

+--------------------+
| Obtaining the code |
+--------------------+

On Linux (assuming an SVN client is already installed):

1) To fetch the code for the first time type
   svn checkout http://mt.coas.oregonstate.edu/svn/ModEM/branches/stable ModEM

2) The ModEM directory should now contain the README and COPYRIGHT files,
   as well as the source code, documentation and some example files.
   Please review the README and COPYRIGHT to compile.

3) The runtime options, capabilities and file formats are described 
   in the User Guide,
   cd ModEM/doc/userguide
   acroread ModularEM_UserGuide.pdf

4) To fetch the latest version of the code at a later stage,
   cd ModEM
   svn update

When you use ModEM, please refer to

Kelbert, A. , N. Meqbel, G. D. Egbert and K. Tandon (2014), "ModEM: 
A modular system for inversion of electromagnetic geophysical data", 
Computers & Geosciences, v. 66, p. 40-53, doi:10.1016/j.cageo.2014.01.010

 and/or

Egbert, G. D. and A. Kelbert (2012), "Computational Recipes 
for Electromagnetic Inverse Problems", Geophys. J. Int., v. 189, 
p. 251--267, doi:10.1111/j.1365-246X.2011.05347.x

   The two papers are available from the ModEM/doc/ subdirectory. 
   Developers might also be interested in the detailed User Manual, 
   found in the ModEM/doc/misc/ subdirectory.

   The above should be sufficient for most users. 
   Developers should also be aware of the following options:  

5) Most useful commands include
   svn mv file1 file2
   svn add new_file new_dir
   svn rm old_file
   svn status

6) Only commit your changes if you know what you are doing:
   svn commit -m 'My commit message'
   svn commit -F msg_file

   Most users do not have the permissions to commit. If you make changes
   to the code and would like to propagate them to the repository, 
   please send us a well commented e-mail with your updated code. 

7) To delete any changes you've made type
   svn revert

   It is good practice to always update (or revert and update)
   before making significant changes and committing.

On Windows:

1) Download and install TortoiseSVN:
   http://tortoisesvn.net/downloads

   The installer is self-explanatory and will require you
   to close almost all programs and restart the computer.

2) Create a directory where you'd like the code to reside.
   Right-click on that directory and choose 'SVN Checkout'

3) Type the URL of repository:
   http://mt.coas.oregonstate.edu/svn/ModEM/branches/stable
   and click 'OK'

4) Your local directory should now contain the README and COPYRIGHT files,
   as well as the source code, documentation and some example files.
   Please review the README and COPYRIGHT to compile.

5) To fetch the latest version of the code at any time,
   right click on the directory and choose 'SVN update'.
   If you've made temporary changes, do 'TortoiseSVN -> Revert'
   before running 'SVN update'.

6) To commit your code changes back to the repository,
   right click and choose 'SVN commit'. The first time
   you do so, it will ask you for a password. In general,
   do not commit unless we've discussed it explicitly. 