GPT Cookbook: Band Maths

Workflow 1
Hello World



Read    --> Write
   --> Write



This example illustrates a gpt workflow in SeaDAS by stringing together possibly the two simplest operators (Read and Write) to create multiple copies (one NetCDF-CF and one BEAM-DIMAP) of an input file adding the suffix 'HelloWorld' to each output file.

Although seemingly useless on its face, (because individual operators can read and write), one benefit to the use of the read and write operator, is that you can send the source file in as a parameter to be used in the formulation of both the input and output file names. Additionally, multiple read and write nodes may be used in a single graph file.


Command Line Entry

gpt WorkflowEx01.xml -p WorkflowEx01.par -Pfile=A2010283180500.L2_LAC_SST -PofileSuffix='HelloWorld'

File = WorkflowEx01.xml

<graph id="WorkflowEx01Graph">
  <version>1.0</version>

    <node id="ReadNode">
      <operator>Read</operator>
      <sources/>
      <parameters>
        <file>${file}.${ifileExtension}</file>
      </parameters>
    </node>



    <node id="WriteFile1Node">
      <operator>Write</operator>
      <sources>
        <source>ReadNode</source>
      </sources>
      <parameters>
        <file>${file}_${ofileSuffix}.${ofile1Extension}</file>
        <formatName>${ofile1Format}</formatName>
      </parameters>
    </node>



    <node id="WriteFile2Node">
      <operator>Write</operator>
      <sources>
        <source>ReadNode</source>
      </sources>
      <parameters>
        <file>${file}_${ofileSuffix}.${ofile2Extension}</file>
        <formatName>${ofile2Format}</formatName>
      </parameters>
    </node>


</graph>

File = WorkflowEx01.par

ifileExtension=nc

ofile1Format=NetCDF-CF
ofile1Extension=nc

ofile2Format=BEAM-DIMAP
ofile2Extension=dim