ats5482 Posted May 2, 2022 Share Posted May 2, 2022 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? Quote Link to comment Share on other sites More sharing options...
Jia Wang Posted May 3, 2022 Share Posted May 3, 2022 Hello, 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 Quote Link to comment Share on other sites More sharing options...
ats5482 Posted May 4, 2022 Author Share Posted May 4, 2022 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. Thanks, Adam Quote Link to comment Share on other sites More sharing options...
Jia Wang Posted May 4, 2022 Share Posted May 4, 2022 Hello Adam, You're welcome. I am glad to hear that was helpful. Best, Jia Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.