PhreeqcUsers Discussion Forum

Registrations currently disabled due to excessive spam. Please email phreeqcusers at gmail.com to request an account.
Welcome Guest
 

  • Forum Home
  • Login
  • Register

  • PhreeqcUsers Discussion Forum »
  • Conceptual Models »
  • Database selection and modification »
  • DATABASE keyword
« previous next »
  • Print
Pages: [1]   Go Down

Author Topic: DATABASE keyword  (Read 7889 times)

ChristopherHall

  • Contributor
  • Posts: 4
DATABASE keyword
« on: 10/08/15 22:11 »
Having just installed PhreeqcI v3, I find I am unable to run any example using the DATABASE keyword.  For instance, Example 20B gives an error message telling me that DATABASE keyword should be the first keyword, which of course it is. The database folder is present and the full path is given.

Explanations?

Chris Hall
Logged

dlparkhurst

  • Global Moderator
  • *****
  • Posts: 4067
Re: DATABASE keyword
« Reply #1 on: 11/08/15 02:45 »
If you open the file with PhreeqcI, PhreeqcI should read the file and set the database to the specified file. If the file does not exist, PhreeqcI will default to the phreeqc.dat in the directory in which PhreeqcI was installed.

However, the logic is not foolproof, and, as you have experienced, you can get the error message that DATABASE must be the first line in the file. If this happens, simply comment the DATABASE line.

To make sure you are using the database that you want, with PhreeqcI, you can set the database in the File->properties screen, or in the run screen.
Logged

ChristopherHall

  • Contributor
  • Posts: 4
Re: DATABASE keyword
« Reply #2 on: 11/08/15 09:36 »
Dear David

Thank you for your prompt reply. I think this means that since the database is always set in the Run screen (mandatory) in PhreeqcI then a DATABASE keyword in the file will always give an error message.  In fact, Examples 14, 15, 15a, and 20b (Example files with DATABASE keyword) give an immediate error message "Input file contains errors" on opening in PhreeqcI 3.2.

I conclude it is best not to use DATABASE keyword, or comment it out if it occurs.

Kind regards

Chris
Logged

dlparkhurst

  • Global Moderator
  • *****
  • Posts: 4067
Re: DATABASE keyword
« Reply #3 on: 11/08/15 16:33 »
If you open the file from the File->Open menu, it should work properly. If you copy and paste into the edit menu, then you will get the error message.
Logged

ChristopherHall

  • Contributor
  • Posts: 4
Re: DATABASE keyword
« Reply #4 on: 11/08/15 16:37 »
No, I get this error message consistently when I open the Example files  14, 15 etc from the File/Open menu.

However, it is a minor point, and I can work around it by setting the database in the Run screen.

Please don't spend any more time on it. I am grateful for your help and advice.

Kind regards

Chris
Logged

dlparkhurst

  • Global Moderator
  • *****
  • Posts: 4067
Re: DATABASE keyword
« Reply #5 on: 11/08/15 18:57 »
So you get that error if you open or double click C:\Program Files (x86)\USGS\Phreeqc Interactive 3.2.0-9767\examples\ex14.pqi?

(I would save the file somewhere I had write access before you run it. Windows may let you run it, without write access to the directory, I have no idea where the output files are actually written.)
Logged

ChristopherHall

  • Contributor
  • Posts: 4
Re: DATABASE keyword
« Reply #6 on: 11/08/15 19:52 »
If I open PhreeqcI and then use File/Open to open ex15.pqi from the Examples folder, I immediately get a error message in the edit window "Input file contains errors". In addition, I notice that the first two lines of the file in the edit window read:

DATABASE C:\Program Files (x86)\USGS\...\examples\ex15.dat
# must use DATABASE ex15.dat

**On the other hand, if I close PhreeqcI and double click ex15.pqi in the Examples folder, then I do not get an error message and I do not see the first line of the file in the edit window. Instead the first line is
# must use DATABASE ex15.dat 

You are right that I cannot run ex15.dat from the Examples folder because the .pqo file is write-protected.

Finally, if a try to run the little test file

DATABASE C:\Program Files (x86)\USGS\Phreeqc Interactive 3.2.0-9820\database\wateq4f.dat

SOLUTION 1 Pure water    #Pure water default
temp 25
EQUILIBRIUM_PHASES
Portlandite 0.0          #Use wateq4f or llnl database
Gypsum 0.0
END

then I get output ...

DATABASE C:\Program Files (x86)\USGS\Phreeqc Interactive 3.2.0-9820\database\phreeqc.dat
DATABASE C:\Program Files (x86)\USGS\Phreeqc Interactive 3.2.0-9820\database\wateq4f.dat
ERROR: DATABASE must be the first keyword in the input file.

My impression is that the DATABASE keyword conflicts with the prior database setting from the File Properties or the Run screen.

I hope this is interesting but please do not spend time on it. It is easy to see the workaround.

Best regards

Chris



Logged

dlparkhurst

  • Global Moderator
  • *****
  • Posts: 4067
Re: DATABASE keyword
« Reply #7 on: 11/08/15 22:23 »
Thanks.
Logged

  • Print
Pages: [1]   Go Up
« previous next »
  • PhreeqcUsers Discussion Forum »
  • Conceptual Models »
  • Database selection and modification »
  • DATABASE keyword
 

  • SMF 2.0.19 | SMF © 2021, Simple Machines | Terms and Policies
  • XHTML
  • RSS
  • WAP2