Jump to content
Geochemist's Workbench Support Forum

Export all React/Gtplot results to tab delimited text file

Recommended Posts

Is it possible to export all results from an experiment to a tab delimited text file that can be used in another program (e.g., MATLAB)?

For example, if I run a simple water-rock experiment in React that dissolves quartz in water, I can use Gtplot to plot pH vs reaction progress, species concentration vs temperature, etc. However, I can only export two axes at a time, e.g., File --> Save Image --> Spreadsheet File will save a text file with columns only for pH and reaction progress. Is it possible to have a column for every output of an experiment?

Link to comment
Share on other sites


Gtplot reads in an xml type file (ends with extension .gtp) to create plots. Like you described, Gtplot allows you to plot XY plots and export numerical data from each variable type. You can select multiple options within the variable type (e.g. Ca++, HCO3-, Na+, etc under Species Concentration) and export all the selected options' numerical data. However, Gtplot does not allow you to select more than one option under the same variable type with different units (e.g. porosity and permeability) at the same time. In this sense, there is not really any way to support the selection of all data read in by the plotting application and export them into tab delimited form. 

If you are familiar with coding, you can parse the text output file (would be something like React_output.txt) for data you want at time steps throughout the simulation. At each time step, the program writes out the data related to the equilibrium state solved. You can control what gets printed to this file in the Output dialog (go to Edit -> Output...). For more information on the output dialog, please see section 2.9 Controlling the printout in the GWB Reaction Modeling User Guide.

In the same Output Dialog, you can also select the XML file type to be character instead of binary. You can rerun your simulation and open the plot file .gtp directly in a text editor (e.g. notepad) to see the data being pulled in by Gtplot. This adds the option for you to parse the xml file for the data you need instead of the text file React prints.

Best regards,
Jia Wang
Aqueous Solutions LLC

Link to comment
Share on other sites

Hi Jia,

Thank you for the detailed reply. Exporting at least the concentrations all at once will be useful. I'll see if I can write a bash script using something like grep to parse through the React_output.txt files.



Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...