Thanks for the help, but I am not quite clear on the part you say the script has to be an executable. I copied and pasted the script from the wiki page and stored it in ~/Library/GRASS/6.4/Modules/bin; called the script by typing it (called chlatransl) to the Terminal shell. It said "chlatranl not found". How do I compile the script to make it an executable. Right now it is stored in a text file.

I apologize for being naive.

Andrew


Andrew Lewin, M.Sc., Adv. Dipl. GIS
Email: [email protected]
Tel: (905) 639-4646
Mobile: (905) 630-8441
Skype: andrew.lewin99

On 18-Aug-09, at 4:54 PM, William Kyngesburye wrote:

On Aug 18, 2009, at 3:18 PM, Andrew Lewin wrote:

Hi Everyone,

I am a beginner user of GRASS (I normally use ArcGIS) running on Mac OS X Grass 6.4 ORC5.

I am trying to process MODIS chlor-a images according to the MODIS Wiki page. There are many scripts on the wiki page that I would like to use; however, I do not know how to:
1) save the script file, i.e. what file extension to I use?

use whatever filename the script has (or is specified). No extension needed, but 'sh' is the standard shell script extension. But it does need to be executable, which won't be true if you download the raw script text or copy-n-paste. It should be set if the script is compressed.

In a Terminal, type this (drag-n-drop the script from a Finder window to the Terminal to paste the path to the script):

chmod +x /path/to/script

2) where to store the script, i.e. Do I store it in the mapset location?

You can put it whereever you like, but in the GISBASE is probably not a good idea. There is a GRASS environment setting to specify custom paths where to find GRASS addon executables: GRASS_ADDON_PATH.

Even easier, on OSX (for the application build), put it in:

~/Library/GRASS/6.4/Modules/bin

This is automatically added to GRASS_ADDON_PATH on startup. It will be created the first time you run GRASS.

3) how to call the script, i.e. within the terminal shell (bash).

type the name of the script.

Any help would be greatly appreciated.

Andrew
_______________________________________________
grass-user mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-user

-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/

"Oh, look, I seem to have fallen down a deep, dark hole. Now what does that remind me of? Ah, yes - life."

- Marvin




_______________________________________________
grass-user mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/grass-user

Reply via email to