GPT Cookbook

Configuration and General Options


    1. The "gpt" Alias
    2. Memory Allocation
    3. GPF versus GUI
    4. Use of Parameters in the Graph File
    5. Use of the Graph Builder of SNAP




These are some top level configuration and general options for the gpt tool.



The "gpt" Alias


The tool which runs the GPF is GPT (Graph Processing Tool). This is executed at the command line by running a shell script which is platform dependent and its name is also platform dependent. The script is located within the bin directory of your SeaDAS home directory (the directory where you installed SeaDAS). It is named as follows for the various platforms:

Mac - gpf.command

Linux/Unix - gpf.sh

Windows - gpf.bat

For platform independence, this cookbook will simply use the command "gpt". You can configure your system creating a "gpt" alias such that the command "gpt" will point to the respective gpt command script on your system.



Memory Allocation


The default memory allocated for use by gpt is 1 MB. If you are processing large files (for instance those of Landsat 8), or processing a large number of files (for instance doing a Mosaic of many level-2 files) will likely run into memory issues. You can increase this memory allocation by editing the gpt file (of course staying within the confines of your systems total memory). Here are a few possible options:


File = gpt (gpt.sh : gpt.bat : gpt.command)
# 1 MB allocation to GPT
-Xmx1024M


# 2 MB allocation to GPT
-Xmx2048M


# 4 MB allocation to GPT
-Xmx4096M



GPF versus GUI


While it would be desirable that all features for every tool located within the GUI be both included and behave the same within GPF, and vice versa, for many tools there are some subtle usage and parameter differences. Before tackling the configuration of your xml file for the gpf operator node for a particular tool, you should first familiarize yourself with the GUI version. For most tools within the GUI, once you have defined all your desired parameters, there is the option to view the gpt xml equivalent parameters. This can be a highly useful feature in devising your xml file and its parameters.



Use of Parameters in the Graph File


One way to make an xml graph file more readable and generic is to define variables for its parameters and then place all the variable value pairs in a par file. Most of the examples in this cookbook make use of this feature.



Use of the Graph Builder of SNAP


Currently SeaDAS 7.x does not include an xml multi-node graph builder. However, this feature is now available in SNAP. If you want to use this GUI feature, you can download and install SNAP, build the graph, and then use this graph within SeaDAS (or SNAP). But some words of caution: an important distinction between SNAP and SeaDAS in doing this is that SNAP may contain gpf tools not availabe in SeaDAS 7.x and vice versa. Another distinction is that a tool in SNAP could differ from its SeaDAS counterpart tool. One such example of differing gpf operators is the Statistics operator "StatisticsOp" due to the revisions of the statistics tool as of SeaDAS 7.5.