Difference between revisions of "How to get RHESSys"

From Rhessys
Jump to navigationJump to search
 
(33 intermediate revisions by the same user not shown)
Line 1: Line 1:
===Getting the source===
+
===Getting the RHESSys source code===
 
The source for RHESSys and various tools for use with RHESSys is hosted on [http://sourceforge.net/projects/rhessys/ sourceforge] and
 
The source for RHESSys and various tools for use with RHESSys is hosted on [http://sourceforge.net/projects/rhessys/ sourceforge] and
accessible via anonymous subversion access. For the latest stable release, check out<br>
+
accessible via anonymous subversion access.
  
'''<pre>$> svn co https://rhessys.svn.sourceforge.net/svnroot/rhessys/tags/5.12.4</pre>'''
+
The latest stable release can be checked out with the following terminal window command: <br>
  
 +
'''<pre>$> svn co -r 318 https://rhessys.svn.sourceforge.net/svnroot/rhessys/trunk/</pre>'''
  
For the latest development version, check out
+
(the -r ### will download the latest RHESSys version deemed stable)
  
'''<pre>$> svn co https://rhessys.svn.sourceforge.net/svnroot/rhessys/trunk/</pre>'''
 
  
 +
The latest development version can be checked out with the following terminal window command:
  
===Locating GRASS GISBASE===
+
'''<pre>$> svn co https://rhessys.svn.sourceforge.net/svnroot/rhessys/trunk/</pre>'''
====OS X====
 
 
 
If you are running GRASS from the application folder, your GISBASE will be
 
/Applications/<GRASS application name>/Contents/MacOS.
 
For example, if your GRASS application was named GRASS-6.4, you would
 
type the command:
 
 
 
<pre>
 
$> export GISBASE=/Applications/GRASS-6.4.app/Contents/MacOS
 
</pre>
 
 
 
====Linux====
 
 
 
 
 
====Windows====
 
 
 
 
 
===Building RHESSys===
 
 
 
The RHESSys source tree contains three separate tools: rhessys, cf, and g2w. Note that default values
 
are specified in the makefiles. This means if you choose to override them you must specify the
 
<code>-e</code> option when running <code>make</code>. As a convenience there is a makefile at the trunk
 
of the source tree that will build and install all RHESSys programs. Before running that file, make sure that
 
you have set all necessary environment variables as listed below.
 
====rhessys====
 
 
 
=====Dependencies=====
 
*None
 
 
 
=====Build Instructions=====
 
from the RHESSys/trunk directory containing the makefile
 
 
 
<code>$> make; make install</code>
 
 
 
=====Environmental Variables=====
 
{| {{table}}
 
 
 
| align="center" style="background:#f0f0f0;"|Name
 
| align="center" style="background:#f0f0f0;"|Description
 
| align="center" style="background:#f0f0f0;"|Default
 
|-
 
| RHESSYS_BIN
 
| The path of the RHESSys installation location
 
| /usr/local/bin
 
|-
 
|PGM
 
|Name of the RHESSys binary prodouced
 
|rhessys<version>
 
|-
 
|CC
 
|C Compiler to use
 
|gcc
 
|}
 
 
 
  
====cf====
+
(this will download the most recent RHESSys version that was checked in and may still be undergoing bug fixes)
  
=====Dependencies=====
 
* GRASS version 6.x
 
  
=====Build Instructions=====
+
When the download completes, a message will print to the screen "Checked out revision ###".  Take note of this revision number. A directory called 'trunk' will download (to the directory you are in) containing all the RHESSys code directories/files.  It may be useful to append the revision number to the directory called trunk, i.e. trunk###, in the event you do not want future downloads to overwrite the code for this particular version.  Also, after compiling RHESSys, if the revision number is not already contained in the executable name, it may be useful to include it, i.e. rhessys5.15.r### (recommended).
<code>$> make; make install</code>
 
  
=====Environmental Variables=====
+
While RHESSys itself is a stand alone C program that can be compiled and run on it's own, in order to install/compile certain RHESSys programs (g2w to create a worldfile (required to run RHESSys) and CF to create a flowtable), GRASS GIS libraries and header files must first be installed.  Therefore, before compiling g2w and CF, you must first install GRASS GIS. (see [[Installing RHESSys and associated programs]])
{| {{table}}
 
  
| align="center" style="background:#f0f0f0;"|Name
+
Trunk contents:
| align="center" style="background:#f0f0f0;"|Description
 
| align="center" style="background:#f0f0f0;"|Default
 
|-
 
| RHESSYS_BIN
 
| The path of the RHESSys installation location
 
| /usr/local/bin
 
|-
 
| PGM
 
| Name of the create flowpaths executable
 
| cf
 
|-
 
|GISBASE
 
|Base GRASS install
 
|none, this variable must be set
 
|-
 
|CC
 
|C Compiler to use
 
|gcc
 
|}
 
  
 +
makefile - to be used for global installation, must be signed in as root to use.  each subdirectory (as follows) contains an independent makefile to compile each program individually, can be used for local installation.
 +
 +
rhessys - RHESSys code files
  
====g2w====
+
The following are RHESSys/GRASS interface programs and require GRASS first be installed before they can be compiled:
  
=====Dependencies=====
+
g2w - Grass to World and Average Tables code
* GRASS version 6.x
 
  
=====Build Instructions=====
+
cf - Create Flowpaths code  
<code>$> make; make install</code>
 
  
=====Environmental Variables=====
+
create_in_files - non standard functionality programs used for more specific applications: cst - used with in stream routing; lairead - used to initialize vegetation from spatial data inputs
{| {{table}}
 
  
| align="center" style="background:#f0f0f0;"|Name
+
util - Useful utilities and tools. Contains some RHESSys/GRASS interface programs (cxy - used to create x/y maps).
| align="center" style="background:#f0f0f0;"|Description
 
| align="center" style="background:#f0f0f0;"|Default
 
|-
 
| RHESSYS_BIN
 
| The path of the RHESSys installation location
 
| /usr/local/bin
 
|-
 
| PGM
 
| Name of the grass2world executable
 
| g2w
 
|-
 
|GISBASE
 
|Base GRASS install
 
|none, this variable must be set
 
|-
 
|CC
 
|C Compiler to use
 
|gcc
 
|}
 

Latest revision as of 17:47, 11 October 2012

Getting the RHESSys source code

The source for RHESSys and various tools for use with RHESSys is hosted on sourceforge and accessible via anonymous subversion access.

The latest stable release can be checked out with the following terminal window command:

$> svn co -r 318 https://rhessys.svn.sourceforge.net/svnroot/rhessys/trunk/

(the -r ### will download the latest RHESSys version deemed stable)


The latest development version can be checked out with the following terminal window command:

$> svn co https://rhessys.svn.sourceforge.net/svnroot/rhessys/trunk/

(this will download the most recent RHESSys version that was checked in and may still be undergoing bug fixes)


When the download completes, a message will print to the screen "Checked out revision ###". Take note of this revision number. A directory called 'trunk' will download (to the directory you are in) containing all the RHESSys code directories/files. It may be useful to append the revision number to the directory called trunk, i.e. trunk###, in the event you do not want future downloads to overwrite the code for this particular version. Also, after compiling RHESSys, if the revision number is not already contained in the executable name, it may be useful to include it, i.e. rhessys5.15.r### (recommended).

While RHESSys itself is a stand alone C program that can be compiled and run on it's own, in order to install/compile certain RHESSys programs (g2w to create a worldfile (required to run RHESSys) and CF to create a flowtable), GRASS GIS libraries and header files must first be installed. Therefore, before compiling g2w and CF, you must first install GRASS GIS. (see Installing RHESSys and associated programs)

Trunk contents:

makefile - to be used for global installation, must be signed in as root to use. each subdirectory (as follows) contains an independent makefile to compile each program individually, can be used for local installation.

rhessys - RHESSys code files

The following are RHESSys/GRASS interface programs and require GRASS first be installed before they can be compiled:

g2w - Grass to World and Average Tables code

cf - Create Flowpaths code

create_in_files - non standard functionality programs used for more specific applications: cst - used with in stream routing; lairead - used to initialize vegetation from spatial data inputs

util - Useful utilities and tools. Contains some RHESSys/GRASS interface programs (cxy - used to create x/y maps).