0% found this document useful (0 votes)
109 views2 pages

Installing Manual-Py3

This document provides instructions for installing the beta version 3 of the Rosetta code for estimating soil hydraulic properties from basic soil properties. It describes how to uncompress and enter the Rosetta folder, and explains that the ANN_Module.py and DB_Module.py files contain the main functionality. It also provides examples of commands to run the code to estimate properties using different Rosetta models, and notes that models 2-5 are preferred over 102-105. The document clarifies this is a beta version that may contain bugs.

Uploaded by

Hani oveissy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
109 views2 pages

Installing Manual-Py3

This document provides instructions for installing the beta version 3 of the Rosetta code for estimating soil hydraulic properties from basic soil properties. It describes how to uncompress and enter the Rosetta folder, and explains that the ANN_Module.py and DB_Module.py files contain the main functionality. It also provides examples of commands to run the code to estimate properties using different Rosetta models, and notes that models 2-5 are preferred over 102-105. The document clarifies this is a beta version that may contain bugs.

Uploaded by

Hani oveissy
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Installing Rosetta-v3beta (Updated May 14, 2020)

This is a document that provides instructions for the BETA version of the code described in
Zhang and Schaap (2017). This document is intended for users/developers familiar with the
python programming language.
Step 0.

Step 1.
Uncompress Rosetta-3.0beta_py3.tar.gz
(Unix/Linux: tar -zxvf Rosetta-3.0beta-py3.tar.gz, on Mac-OSX or windows 7/8/10 there are
utilities available that will do this for you)

Step 2
Enter the folder Rosetta-3.0beta-py3
(Unix/Linux/Mac-OSX: cd Rosetta-3.0beta-py3)
This folder contains all the files needed to work with the code. If you know what you are doing:
copy these to an appropriate place and stop here.

Using the code


The ANN_Module.py and DB_Module.py include all functionality, and while these have some
comments, you probably do not want to look at these first. I tried to hide all the messy stuff
here in the hope no-one else needs to look & modify this.

The Rpredict.py contains an implementation example and you should get some output.

To use the Rosetta-V3 H2w model, please make sure that at line 88 in Rpredict.py, the first
input in 'PTF_MODEL' function is 2, which means that the ‘PTF_MODEL’ function is
ptf_model=PTF_MODEL(2, db). The input data for Rosetta-V3 H2w to estimate is soil sand,
silt, and clay percentages (in weight %). To make an estimation, you can type (or copy/paste)
the following command at terminal:

python Rpredict.py -i ./output/test_input_H2w.txt -o ./output/test_output_H2w.txt --


predict --sqlite=./sqlite/Rosetta.sqlite

To use the Rosetta-V3 H3w model, please make sure that at line 88 in Rpredict.py, the first
input in 'PTF_MODEL' function is 3, which means that the ‘PTF_MODEL’ function is:
ptf_model=PTF_MODEL(3, db). This model uses an additional soil bulk density as input, i.e.,
silt, clay percentages (in weight %), and bulk density (g/cm3). To make an estimation, you can
type (or copy/paste) the following command at terminal:

python Rpredict.py -i ./output/test_input_H3w.txt -o ./output/test_output_H3w.txt --


predict --sqlite=./sqlite/Rosetta.sqlite

Please also note that our code has been modified to be compatible with python 2.7, python 3.0,
and higher versions. The directory “output” contains an exemplary input (in
“test_input_H2w.txt” file) and the estimation (in “test_output_H2w.txt” file). Please find the
run_Rosetta.sh file for detailed information. Please make sure that you are using the correct
data input format and correct Rosetta model, i.e., PTF_MODEL(2, db), PTF_MODEL(3, db)…
PTF_MODEL(102, db), PTF_MODEL(103, db)...

Available Models

Note that there are two sets of models: 2..5 and 102..105. The latter series are the OLD (Schaap
et al., 2001) models. The models 2..5 are NEW and better (see Zhang and Schaap, 2017).

NOT included in the current beta version


the class textural averages. Some extra code must be written to make these work
seamlessly with the old and new models estimation of unsaturated conductivity

Both are on the TODO list.

Please understand that this is NOT the final version (it is a beta version), and that there may be
some bugs. However, we have checked the estimates and found these in good order. If you find
any bugs or have feature requests (or need help), please let me know.

I did some (minimal) testing under windows/MacOSX and found that the code works without
the need for changes. However, I cannot guarantee that the setup.py script will install the files
in a sane place on theses OS's .....

References

Zhang, Y. and Schaap, M.G., 2017. Weighted recalibration of the Rosetta pedotransfer model
with improved estimates of hydraulic parameter distributions and summary statistics (Rosetta3).
Journal of Hydrology, 547, pp.39-53.
Schaap, M.G., Leij, F.J., and Van Genuchten, M.T., 2001. ROSETTA: a computer program for
estimating soil hydraulic parameters with hierarchical pedotransfer functions. Journal of
hydrology, 251(3), pp.163-176.

You might also like