
This script creates a job called "Spearfish" and requests execution on any available compute node in SciClone's RHEL6/Xeon environment (i.e. The lines that begin with #PBS are embedded options for TORQUE's qsub command the rest are shell commands. #!/bin/tcsh #PBS -N Spearfish #PBS -l nodes=1:x5672:compute #PBS -l walltime=00:01:00 #PBS -j oe setenv GRASS_BATCH_JOB $HOME/grassdata/myscript.sh # Tell GRASS where to find your script cd $HOME/grassdata grass64 -text $HOME/grassdata/spearfish60/PERMANENT It should look something like the following: The job script passes the necessary information to GRASS via environment variables and command line arguments, as described in the grass64 man page. But since you are running in batch mode through a job scheduler, you will need to write a job script instead. If you were running GRASS interactively using the wxGUI interface, you would manually direct the program to the appropriate files. Now you have a location and a mapset to use in GRASS.
#Starting grass gis download
To download and unpack the mapset, run the following two commands: wget tar xzvf spearfish_grass60data-0.3.tar.gz For this example we will use the Spearfish mapset. To finish setting up the GRASS environment, you will need to have a mapset available in your grassdata directory. Make the script executable: chmod u+x myscript.sh

#!/bin/sh export GRASS_PNGFILE=spearfish_elevation.png d.mon start=png1 r.colors map=elevation.10m rules=elevation d.rast map=elevation.10m -o d.vect map=landuse

In your grassdata directory, create a file titled myscript.sh which contains the following: For the purposes of this tutorial, we will use the following very simple GRASS script. Now you will need to create a script of commands for GRASS to run. Next, create a subdirectory called grassdata in which to store scripts and data: mkdir $HOME/grassdata
#Starting grass gis software
The GRASS software package is now available for use. Use a text editor to put the following line at the end of your ~/.cshrc.rhel6-xeon file: module load grass/6.4.2Īfter saving the file, log out and log back in to load the changes into your environment. This sets the proper environment variables for GRASS, and also loads a number of other software packages upon which GRASS depends. First, you need to load the GRASS 6.4.2 module into your shell environment. In order to do this, a few setup steps are required. Instead, GRASS jobs should be submitted to an appropriate compute node on the cluster via the job scheduler.

GRASS can be very resource intensive so it should not be run directly on SciClone's login servers.
