~All my gpt graphs produce target files, even though they all include the write operator. This has been an issue in versions 6.x through 7.0. Below is a simple example of a graph processed with the command: “gpt graph.xml”, that produces the write operator output file as well as target.dim and target.data.
Should we use: “gpt graph.xml -t outfile” and abandon the write operator?
What is the overhead associated with writing both the target file and the write operator file? Just I/O and storage?
The order of Apply-Orbit-File does not have any bearing here and probably does not make any difference. The issue is that GPT creates a target file even though there is a write operator on the graph.
The real issue is that target file should not be created if there is a write operator on the graph.
Without the write operator, it may be possible to specify the path and file using -t:
gpt graph.xml -t $directory/$file
Using the -t outfille does not work since that is not the output needed. That output is from an intermediate step. So we still need to eliminate this and just preserve the output from the write operation.
SOLVED!
If the write node is not the last node in the graph XML file, GPT will create a target file with data from the last node. The write node may be the last node in the Model Builder display. However that does not guarantee it will be the last in the XML file. This can occur if intermediate steps are added to the model. (Specifically this occurred after adding a Subset node)
The Write node must be the last node in the XML to avoid creation of undesired target files: target.data, target.dim.