Jump to content
Geochemist's Workbench Support Forum

carbonate alkalinity as output from SpecE8


Herdis Schopka

Recommended Posts

Dear all,

 

I am plotting multiple data points in Gtplot 7.0 and one of the plots I use is a Piper plot, which has the variable "HCO3 + CO3". I just read that I need to have a column for carbonate alkalinity (as CaCO3 in units of mg/kg) in the scatter data file for this variable to be plotted correctly.

 

My question is, how can I tell SpecE8 7.0 to report this variable? My current script is attached, so is an example from my input file.

 

My input data for the SpecE8 multiple speciations contain both pH and HCO3-. The HCO3- concentration is not measured directly, I calculated it as the balance of negative and positive charges.

 

On page 66 of the GWB 7.0 Essentials Guide, it says that "alkalinity" can be used to specify the composition of the initial system. There are two notes on this, one saying "Carbonate alkalinity, in mg/kg as CaCO3" and the other saying "Can be applied to constrain HCO3- only; pH must be set explicitly". I don't understand the second note and I certainly don't know if it pertains to the issue I'm asking for help here with. I just wonder if my input file, with its explicit values for both pH and HCO3-, is confusing the software.

 

Thanks in advance for your help,

Herdis

HHS_example.sp8

HHS_example_input.txt

Link to comment
Share on other sites

Hi Herdis:

 

I am plotting multiple data points in Gtplot 7.0 and one of the plots I use is a Piper plot, which has the variable "HCO3 + CO3". I just read that I need to have a column for carbonate alkalinity (as CaCO3 in units of mg/kg) in the scatter data file for this variable to be plotted correctly.

 

My question is, how can I tell SpecE8 7.0 to report this variable?

 

In your scatter data file, simply create a column with header Carbonate alkalinity and specify the correct values (mg/kg as CaCO3). Given that you have specified a bicarbonate concentration and pH, SpecE8 is already calculating alkalinity values for you.

 

On page 66 of the GWB 7.0 Essentials Guide, it says that "alkalinity" can be used to specify the composition of the initial system. There are two notes on this, one saying "Carbonate alkalinity, in mg/kg as CaCO3" and the other saying "Can be applied to constrain HCO3- only; pH must be set explicitly". I don't understand the second note and I certainly don't know if it pertains to the issue I'm asking for help here with. I just wonder if my input file, with its explicit values for both pH and HCO3-, is confusing the software.

 

I don't think this pertains to your issue. SpecE8 will calculate an alkalinity value based on your pH and HCO3- input. What the user's guide is referring to pertains to setting an alkalinity value as input (suppose you have an alkalinity measurement, rather than bicarbonate). In this case, alkalinity be can set by first loading the HCO3- component into the Basis panel, and then choosing the alkalinity option in the units drop-down menu to the right. Alkalinity can not be set via the H+ component, hence the note that pH must be set explicitly.

 

I hope that helps,

 

Tom Meuzelaar

RockWare, Inc.

Link to comment
Share on other sites

In your scatter data file, simply create a column with header Carbonate alkalinity and specify the correct values (mg/kg as CaCO3). Given that you have specified a bicarbonate concentration and pH, SpecE8 is already calculating alkalinity values for you.

 

Tom, thanks for the quick reply. I'm not sure I understand what you are saying - what values exactly do I put into the column with header "Carbonate alkalinity"? The carbonate alkalinity value calculated by specE8 (as reported in the generic output file generated by SpecE8 after each sample and then overwritten by every subsequent speciation) is different from all the values I have in the input file and I cannot see a term for exporting the "Carbonate alkalinity" in the list of reportable results on page 258 of the GWB 7.0 reference manual. I did experiment with running the file I attached here in SpecE8 and plotting it on a Piper plot and then loading the input file as scatter data to see if they would coincide and they did, but I don't know if that will always be the case. So, in short, seeing as the generic output from SpecE8 does include "Carbonate alkalinity", how do I explicitly export that value to the output file? And if I don't have to, why the clause on page 90 in GWB 7.0 Essentials Guide that one needs a column for "Carbonate alkalinity" to correctly plot "HCO3+CO3".

 

Thanks again,

Herdis

Link to comment
Share on other sites

Hi Herdis:

 

I'm not sure I understand what you are saying - what values exactly do I put into the column with header "Carbonate alkalinity"?

 

Whichever values you wish to plot as scatter data, whether it be your input file values (are these lab data?) or the alkalinity that SpecE8 calculates.

 

The carbonate alkalinity value calculated by specE8 (as reported in the generic output file generated by SpecE8 after each sample and then overwritten by every subsequent speciation) is different from all the values I have in the input file and I cannot see a term for exporting the "Carbonate alkalinity" in the list of reportable results on page 258 of the GWB 7.0 reference manual. I did experiment with running the file I attached here in SpecE8 and plotting it on a Piper plot and then loading the input file as scatter data to see if they would coincide and they did, but I don't know if that will always be the case. So, in short, seeing as the generic output from SpecE8 does include "Carbonate alkalinity", how do I explicitly export that value to the output file? And if I don't have to, why the clause on page 90 in GWB 7.0 Essentials Guide that one needs a column for "Carbonate alkalinity" to correctly plot "HCO3+CO3".

 

By "export", I assume you mean: saving alkalinity data calculated by SpecE8 via the Gtplot interface, correct? To do this, plot the Carbonate alkalinity variable on the Y-axis - this is available under the System parameters variable type. Next, choose the File - Save Image.. menu option and save as type Text File (tab delimited) (*.txt). This should get it close to the form you'll need for plotting scatter data.

 

I hope that helps,

 

Tom

Link to comment
Share on other sites

Tom, thanks again for your input.

 

By "export", I assume you mean: saving alkalinity data calculated by SpecE8 via the Gtplot interface, correct?

 

No. I should probably specify again what I am trying to do:

 

First I run SpecE8 with around 100 samples. The results for each sample are "exported" to an output file with the command "report", see this clip from the script I attached to the original post:

 

if {[report success]} {

puts $out_id \

"[report TDS]\t[report Carbonate alkalinity]\t[report activity Ca++]\t[report activity Mg++]\t[report activity Na+]\t[report activity K+]\t[report activity Cl-]\t[report activity SO4--]\t[report activity HCO3-]\t[report activity CO3--]\t[report activity SiO2(aq)]\t[report activity H+]\t[report gamma Ca++]\t[report gamma Mg++]\t[report gamma Na+]\t[report gamma K+]\t[report gamma Cl-]\t[report gamma SO4--]\t[report gamma HCO3-]\t[report gamma CO3--]\t[report gamma SiO2(aq)]\t[report gamma H+]\t[report SI Antigorite]\t[report SI Talc]\t[report SI Dolomite]\t[report SI Tremolite]\t[report SI Quartz]\t[report SI Chalcedony]\t[report SI Calcite]\t[report SI Chrysotile]\t[report SI SiO2(am)]\t[report SI Diopside]\t[report SI Enstatite]\t[report SI Wollastonite]\t[report SI Forsterite]"

 

I then take this output file and use it to plot all kinds of stuff in Gtplot (and also for scatter data in Act2 and other programs).

 

 

You see that I put in bold my attempt at exporting, or reporting, the carbonate alkalinity to the output file. This setup gives me an error message that the keyword is not recognized. I guess I could speciate each sample separately and copy and paste the calculated carbonate alkalinity into the output file, but that completely defeats the purpose of writing scripts for speciating many samples at once.

 

If you download the script and input file I attached, run the script and then open the output file specified in the script, you'll see what I mean.

 

I hope my question makes sense now,

Herdis

Link to comment
Share on other sites

By "export", I assume you mean: saving alkalinity data calculated by SpecE8 via the Gtplot interface, correct? To do this, plot the Carbonate alkalinity variable on the Y-axis - this is available under the System parameters variable type. Next, choose the File - Save Image.. menu option and save as type Text File (tab delimited) (*.txt). This should get it close to the form you'll need for plotting scatter data.

 

Hi Tom,

 

I tried to do as you described above and it worked, but only for the last speciation that spece8 performed. I loaded the scatter data set I have and none of the data plotted when I picked "system parameters" - "Carbonate alkalinity".

 

To sum up, I use a script to speciate multiple water samples at the same time. In the script is a command that reports the result of each speciation to an output file which I later use as input to activity diagrams and various plots in Gtplot. I believe that in order to plot the Piper plot correctly, I have to have a column of carbonate alkalinity, as calculated by Spece8, in my scatter data file. I still haven't figured out how to report the results for the carbonate alkalinity from SpecE8 to the output file. I would greatly appreciate your help on the issue.

 

Best,

Herdis

Link to comment
Share on other sites

I hope my question makes sense now,

Herdis

 

Hi Herdis:

 

Indeed- I think we're finally on the same page.

 

In version 7, there is no argument that will return alkalinity using the report command. In version 8, we've added hardness (total hardness), hardness_carb (carbonate hardness) and hardness_ncarb (non-carbonate hardness), all with units mg/kg soln as CaCO3.

 

What you could do is report HCO3-, CO3-- and any other contributors to solution alkalinity, sum the respective columns, title it 'Carbonate alkalinity', and use this value for plotting your scatter data in Gtplot.

 

I hope that helps,

 

Tom Meuzelaar

RockWare, Inc.

Link to comment
Share on other sites

Hi Herdis:

 

I just realized my response was incomplete. To correctly compute alkalinity from HCO3- and CO3-- concentrations (molal), as the code computes it, you should use the following formula:

 

Alk =  50.0445 * 1000 * (m_HCO3 + 2 m_CO3) * (kg_solv/kg_soln)

 

I hope that helps,

 

Tom Meuzelaar

RockWare, Inc.

Link to comment
Share on other sites

Hi Herdis:

 

I just realized my response was incomplete. To correctly compute alkalinity from HCO3- and CO3-- concentrations (molal), as the code computes it, you should use the following formula:

 

Alk =  50.0445 * 1000 * (m_HCO3 + 2 m_CO3) * (kg_solv/kg_soln)

 

I hope that helps,

 

Tom Meuzelaar

RockWare, Inc.

 

Tom, thanks! I was away for a week and didn't see your answer until now. I won't have access to a computer running GWB until next week; I'll let you know if I have any further problems then.

 

Thanks again,

Herdis

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.

Guest
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.

Loading...
×
×
  • Create New...