Jump to content
Geochemist's Workbench Support Forum

thassell

Members
  • Posts

    6
  • Joined

  • Last visited

Recent Profile Visitors

2,619 profile views

thassell's Achievements

Newbie

Newbie (1/14)

0

Reputation

  1. Hi Herdis, I have been able to batch process analyses using SpecE8 with a temperature input. I know it sounds strange, but I had to put T after pH and Eh in the order for the files to converge. I've attached a sample of one of my input files (as a pdf) below. Hope this helps. Input_v1D.pdf
  2. Thanks Tom, I can see how density would be calculated. What I can't seem to work our is why Chlorinity is reading as 0.00 molal. The second sample: SpecE8_output_SE_run16: TDS 34561 mg/L Density 1.017 g/cm3 T = 18.5 deg C has a composition similar to that of seawater i.e. NaCl dominated (which has an average chlorinity of 0.058 mol/kg - Stumm and Morgan). Does GWB calculate this automatically, and if so is there a command to run it. It seems as if the density of two samples I quoted as an example in the first post has been calculated based on a variable temperature only. If you can help me that would be great. Cheers
  3. Hi Tom, I have been questioned on the relationship between calculated TDS and Density outputs in SpecE8 and was wondering if you might be able to provide some insight. Two water compositions, with very different TDS (confirmed by field EC measurements) had very similar density. SpecE8_output_SE_run4: TDS 1.0 mg/L Density 1.018 g/cm3 T = 18 deg C SpecE8_output_SE_run16: TDS 34561 mg/L Density 1.017 g/cm3 T = 18.5 deg C I noticed that an automatic density calculation is based on chlorinity and temperature. For both of these anaylses, Chlorinity is 0.00 molal. I can't see where or how chlorinity is caluclated or input. Could you please give me a few ideas? Cheers
  4. Hi there, I had success with the following script. Obviously, you will need to modify outputs relevant to your run, but I had the same problem originally and the loop at the end of script seemed to fix it and give each output a unique name. Hope it helps a little. ________________________________________________________________________________ ____________________________________ script start # Set up the input and output. set in_id [open "Input v1S.txt" r] set out_id [open "Output v1S.txt" w] fconfigure $out_id -encoding unicode # First line contains column headers; check for Unicode. gets $in_id headers if {![string is ascii $headers]} { close $in_id set in_id [open "Input v1D.txt" r] fconfigure $in_id -encoding unicode gets $in_id headers } puts $out_id "$headers\tIS\tTDS\tH+\tSO4--\tNa+\tCa++\tCl-\tMg++\tK+\tHCO3-\tCO3--\tCaCO3\tFe++\tFe+++\tHgCl3-\tHgCl2\tHgCl+\tHg2++\tHg++\tQuicksilver SI\tHematite SI\tGoethite SI\tGypsum SI\tCalcite SI" add HCO3- add O2(aq) # Loop through remaining lines. gets $in_id aline report set_digits 4 set x 0 while {$aline != ""} { set i 0 # Set basis constraints from input data. # Define constraints for basis swap CaCO3 for HCO3- swap e- for O2(aq) foreach a [lrange $aline 1 end] { incr i 1 if {[lindex $headers $i] == "pH"} { pH = $a } elseif {[lindex $headers $i] == "Eh"} { Eh = $a } elseif {[lindex $headers $i] == "T"} { T = $a } elseif {[lindex $headers $i] == "Hg++"} { $a = [lindex $headers $i] ug/l } else { $a = [lindex $headers $i] mg/l } } # Run SpecE8 calculation and write data + results. incr x 1 suffix _S_run$x go foreach a [lrange $aline 0 end] { puts -nonewline $out_id "$a\t" } if {[report success]} { puts $out_id \ "[report IS]\t[report TDS]\t[report activity H+]\t[report activity SO4--]\t[report activity Na+]\t[report activity Ca++]\t[report activity Cl-]\t[report activity Mg++]\t[report activity K+]\t[report activity HCO3-]\t[report activity CO3--]\t[report activity CaCO3]\t[report activity Fe++]\t[report activity Fe+++]\t[report activity HgCl3-]\t[report activity HgCl2]\t[report activity HgCl+]\t[report activity Hg2++]\t[report activity Hg++]\t[report SI Quicksilver]\t[report SI Hematite]\t[report SI Goethite]\t[report SI Gypsum]\t[report SI Calcite]" } else { puts $out_id "Did not converge" } # Next line of input. gets $in_id aline } # Clean up. close $out_id close $in_id print species=long show printout script end
  5. Thanks for the help. I wrote it into the script and it's still writing over the same file just giving it a different name each time. I'm still learning the in's and out's of scripting. I'll sopy the section of the script I tried below. Could you please help me with the correct command string? # Run SpecE8 calculation and write data + results. go set i 0 foreach a [lrange $aline 0 end] { incr i 1 suffix _run$i puts -nonewline $out_id "$a\t" } if {[report success]} { puts $out_id \ "[report IS]\t[report TDS]\t[report activity H+]\t[report activity SO4--]\t[report activity Na+]\t[report activity Ca++]\t[report activity Cl-]\t[report activity Mg+]\t[report activity K+]\t[report activity HCO3-]\t[report activity CO3--]\t[report activity CaCO3]\t[report SI Hematite]\t[report SI Goethite]\t[report SI Calcite]\t[report SI Dolomite]\t[report SI Gypsum]\t[report SI Aragonite]\t[report SI Quicksilver]" } else { puts $out_id "Did not converge" } # Next line of input. gets $in_id aline } Cheers
  6. Hi there, I've been working with multiple analysis processing and was wondering is there was a command that enables aSpecE8_output.txt file for each sample listed in the input file, so that the complete speciation is able to be viewed for each individual sample. Cheers
×
×
  • Create New...