adsspeciesvsph.inc
|
|
|
PRINT
-reset false
SELECTED_OUTPUT
-high_precision true
-reset false
# Used to generate data for a %species vs pH plot just for adsorbed species.
# The 'mainSpecies' keyword in the input file is used to set the main species (sets the "<mainspecies>" tag).
# Writes successive 'species names-value' pairs to the 'out' file.
# These are plotted with a custom plot.
# The species always starts with the x-axis variable (here pH) then all the other main component
# species in descending abundance order returning relative concns (% of total adsorbed) for each adsorbed species.
#
# The input file
#
# '<mainspecies>' must be set to the component of interest (or "elements" for all adsorbed 'elements')
# 'customxcolumn' must be set to the column where the pH is written, here 2
#
USER_PUNCH
-start
10 main$ = "<mainspecies>"
20 PUNCH "pH", -LA("H+")
30 totads = SYS("surf", n, n$, t$, c)
40 totads = 0
50 FOR i = 1 TO n
60 ipos = INSTR(n$(i), main$)
70 IF(ipos > 0) THEN 80 ELSE 90
80 totads = totads+c(i)
90 NEXT i
100 FOR i = 1 TO n
110 IF main$ = "elements" THEN 140
120 ipos = INSTR(n$(i), main$)
130 IF(ipos > 0) THEN 140 ELSE 150
140 PUNCH n$(i), 100*c(i)/totads
150 NEXT i
-end
|
|