[CHNOSZ-commits] r353 - in pkg/CHNOSZ: . R inst
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Tue Jan 8 05:44:06 CET 2019
Author: jedick
Date: 2019-01-08 05:44:05 +0100 (Tue, 08 Jan 2019)
New Revision: 353
Modified:
pkg/CHNOSZ/DESCRIPTION
pkg/CHNOSZ/R/util.affinity.R
pkg/CHNOSZ/R/util.plot.R
pkg/CHNOSZ/R/util.units.R
pkg/CHNOSZ/inst/NEWS
Log:
water.lines(): reduce message clutter
Modified: pkg/CHNOSZ/DESCRIPTION
===================================================================
--- pkg/CHNOSZ/DESCRIPTION 2019-01-07 06:10:01 UTC (rev 352)
+++ pkg/CHNOSZ/DESCRIPTION 2019-01-08 04:44:05 UTC (rev 353)
@@ -1,6 +1,6 @@
-Date: 2019-01-07
+Date: 2019-01-08
Package: CHNOSZ
-Version: 1.1.3-60
+Version: 1.1.3-61
Title: Thermodynamic Calculations and Diagrams for Geo(bio)chemistry
Authors at R: c(
person("Jeffrey", "Dick", , "j3ffdick at gmail.com", role = c("aut", "cre"),
Modified: pkg/CHNOSZ/R/util.affinity.R
===================================================================
--- pkg/CHNOSZ/R/util.affinity.R 2019-01-07 06:10:01 UTC (rev 352)
+++ pkg/CHNOSZ/R/util.affinity.R 2019-01-08 04:44:05 UTC (rev 353)
@@ -264,12 +264,12 @@
}
# report non-variables to user
if(!T.is.var)
- message('energy.args: temperature is ',outvert(T,'K'),' ',T.units())
+ message('affinity: temperature is ',outvert(T,'K'),' ',T.units())
if(!P.is.var) {
- if(identical(P,"Psat")) message("energy.args: pressure is Psat")
- else message('energy.args: pressure is ',outvert(P,'bar'),' ',P.units())
+ if(identical(P,"Psat")) message("affinity: pressure is Psat")
+ else message('affinity: pressure is ',outvert(P,'bar'),' ',P.units())
}
- if(!IS.is.var & !identical(IS,0)) message('energy.args: ionic strength is ',IS)
+ if(!IS.is.var & !identical(IS,0)) message('affinity: ionic strength is ',IS)
# default values for resolution
res <- 128
# where we store the output
@@ -299,12 +299,12 @@
if(transect) args[[i]] <- -args[[i]]
else args[[i]][1:2] <- -args[[i]][1:2]
if(!'H+' %in% rownames(thermo$basis))
- message('energy.args: pH requested, but no H+ in the basis')
+ message('affinity: pH requested, but no H+ in the basis')
}
if(names(args)[i]=="pe") {
names(args)[i] <- "e-"
if(!'e-' %in% rownames(thermo$basis))
- message('energy.args: pe requested, but no e- in the basis')
+ message('affinity: pe requested, but no e- in the basis')
if(transect) args[[i]] <- -args[[i]]
else args[[i]][1:2] <- -args[[i]][1:2]
}
@@ -332,7 +332,7 @@
if(nametxt=="T") unittxt <- " K"
if(nametxt=="P") unittxt <- " bar"
if(nametxt=="Eh") unittxt <- " V"
- message("energy.args: variable ", length(vars), " is ", nametxt,
+ message("affinity: variable ", length(vars), " is ", nametxt,
" at ", n, " values from ", lims.orig[1], " to ", lims.orig[2], unittxt)
}
}
Modified: pkg/CHNOSZ/R/util.plot.R
===================================================================
--- pkg/CHNOSZ/R/util.plot.R 2019-01-07 06:10:01 UTC (rev 352)
+++ pkg/CHNOSZ/R/util.plot.R 2019-01-08 04:44:05 UTC (rev 353)
@@ -127,12 +127,12 @@
if('reduction' %in% which) {
logfH2 <- logaH2O # usually 0
if(yaxis=="H2") {
- logK <- subcrt(c("H2", "H2"), c(-1, 1), c("gas", H2state), T=T, P=P, convert=FALSE)$out$logK
+ logK <- suppressMessages(subcrt(c("H2", "H2"), c(-1, 1), c("gas", H2state), T=T, P=P, convert=FALSE))$out$logK
# this is logfH2 if H2state=="gas", or logaH2 if H2state=="aq"
logfH2 <- logfH2 + logK
y.reduction <- rep(logfH2, length.out=length(xpoints))
} else {
- logK <- subcrt(c("H2O", "O2", "H2"), c(-1, 0.5, 1), c("liq", O2state, "gas"), T=T, P=P, convert=FALSE)$out$logK
+ logK <- suppressMessages(subcrt(c("H2O", "O2", "H2"), c(-1, 0.5, 1), c("liq", O2state, "gas"), T=T, P=P, convert=FALSE))$out$logK
# this is logfO2 if O2state=="gas", or logaO2 if O2state=="aq"
logfO2 <- 2 * (logK - logfH2 + logaH2O)
if(yaxis=="O2") y.reduction <- rep(logfO2, length.out=length(xpoints))
@@ -143,12 +143,12 @@
if('oxidation' %in% which) {
logfO2 <- logaH2O # usually 0
if(yaxis=="H2") {
- logK <- subcrt(c("H2O", "O2", "H2"), c(-1, 0.5, 1), c("liq", "gas", H2state), T=T, P=P, convert=FALSE)$out$logK
+ logK <- suppressMessages(subcrt(c("H2O", "O2", "H2"), c(-1, 0.5, 1), c("liq", "gas", H2state), T=T, P=P, convert=FALSE))$out$logK
# this is logfH2 if H2state=="gas", or logaH2 if H2state=="aq"
logfH2 <- logK - 0.5*logfO2 + logaH2O
y.oxidation <- rep(logfH2, length.out=length(xpoints))
} else {
- logK <- subcrt(c("O2", "O2"), c(-1, 1), c("gas", O2state), T=T, P=P, convert=FALSE)$out$logK
+ logK <- suppressMessages(subcrt(c("O2", "O2"), c(-1, 1), c("gas", O2state), T=T, P=P, convert=FALSE))$out$logK
# this is logfO2 if O2state=="gas", or logaO2 if O2state=="aq"
logfO2 <- logfO2 + logK
if(yaxis=="O2") y.oxidation <- rep(logfO2, length.out=length(xpoints))
Modified: pkg/CHNOSZ/R/util.units.R
===================================================================
--- pkg/CHNOSZ/R/util.units.R 2019-01-07 06:10:01 UTC (rev 352)
+++ pkg/CHNOSZ/R/util.units.R 2019-01-08 04:44:05 UTC (rev 353)
@@ -86,7 +86,7 @@
}
else if(units %in% c('e0','logfo2')) {
# convert between Eh and logfO2
- supcrt.out <- subcrt(c("H2O", "oxygen", "H+", "e-"), c(-1, 0.5, 2, 2), T=T, P=P, convert=FALSE)
+ supcrt.out <- suppressMessages(subcrt(c("H2O", "oxygen", "H+", "e-"), c(-1, 0.5, 2, 2), T=T, P=P, convert=FALSE))
if(units=='logfo2') value <- 2*(supcrt.out$out$logK + logaH2O + 2*pH + 2*(convert(value,'pe',T=T)))
if(units=='e0') value <- convert(( -supcrt.out$out$logK - 2*pH + value/2 - logaH2O )/2, 'Eh',T=T)
}
Modified: pkg/CHNOSZ/inst/NEWS
===================================================================
--- pkg/CHNOSZ/inst/NEWS 2019-01-07 06:10:01 UTC (rev 352)
+++ pkg/CHNOSZ/inst/NEWS 2019-01-08 04:44:05 UTC (rev 353)
@@ -1,4 +1,4 @@
-CHANGES IN CHNOSZ 1.1.3-60 (2019-01-07)
+CHANGES IN CHNOSZ 1.1.3-61 (2019-01-08)
---------------------------------------
NEW FEATURES
@@ -186,6 +186,8 @@
- The arguments in expr.species() have been reorganized for more
flexible and concise usage.
+- Reduce message clutter for diagrams showing water stability limits.
+
CHANGES IN CHNOSZ 1.1.3 (2017-11-13)
------------------------------------
More information about the CHNOSZ-commits
mailing list