7 The PEcAn XML
The PEcAn system is configured using a xml file, often called settings.xml. The configuration file contains the following sections:
- PEcAn Folders
- Database Access
- BETY Configuration
- Brown Dog
- PFT Selection
- Meta Analysis
- Ensemble Runs
- Sensitivity Runs
- Model Setup
- Run Setup
- State Data Assimilation
- Parameter Data Assimilation
- Benchmarking
7.1 PEcAn folders
The following are the tags that can be used to configure the folders used by PEcAn. All of these are optional.
- outdir : [optional] specifies where PEcAn will write all outputs and create folders. If this is not specified the folder pecan in the current folder will be used.
7.2 Database Access
The connection to the BETY database is configured using this section. In this section you will specify what driver to use to connect to the database (PostgreSQL by default) and the connection parameters to connect to the database. This section is very picky and will only accept parameters that are passed into the connection function for each database driver, any other entries will result in an error by the database driver.
7.2.0.1 functions:
db.open()
, and thus by db.query()
and db.check()
.
New format (starting with PEcAn 1.3.6)
<database>
<bety>
<dbname>bety</dbname>
<username>bety</username>
<password>bety</password>
<host>localhost</host>
<write>true</write>
</bety>
<fia>
<dbname>fia5data</dbname>
<username>bety</username>
<password>bety</password>
<host>localhost</host>
</fia>
</database>
The connection information under bety will be used by most of the PEcAn system, only the extraction of pss/css/site information from the FIA database will use the connection information in the fia section.
- driver : [optional] the driver to use to connect to the database. Default value is PostgreSQL
- dbname : [optional] the name of the database (was name), default value is the username of the current user logged in.
- user : [optional] the username to connect to the database (was userid), default value is the username of the current user logged in (PostgreSQL uses user for this field).
- password : [optional] the password to connect to the database (was passwd), if not specified no password is used.
- host : [optional] the name of the host to connect to, default value is localhost.
- write : [optional] should any results be written back to the database, setting this to TRUE (the default) will write any results back into the database. (since PEcAn 1.3.6)
For other database drivers these parameters will change. See the driver documentation in R for the right parameters.
7.3 BETY Database Configuration
This section describes how to connect to the BETY Database. This section is used for versions of PEcAn prior to version 1.3.6, starting at 1.3.6 this parameter is part of <database><bety> and defaults to TRUE.
7.3.0.1 functions:
db.check()
, write.configs()
, run.models()
- write : [optional] this can be TRUE/FALSE (the default is TRUE). If set to TRUE, runs, ensembles and workflows are written to the database.
7.4 Brown Dog Configuration
This section describes how to connect to Brown Dog. This will allow for conversions of data (currently only met data).
7.4.0.1 functions:
met.process()
- url : [required] endpoint for Brown Dog to be used.
- username : [optional] username to be used with the endpoint for Brown Dog.
- password : [optional] password to be used with the endpoint for Brown Dog.
7.5 PFT Selection
The PEcAn system requires at least 1 PFT (Plant Functional Type) to be specified inside the <pfts>
section.
7.5.0.1 functions:
get.traits()
7.6 Meta Analysis
7.6.0.1 functions:
run.meta.analysis()
7.7 Ensemble Runs
Only if this section is defined an ensemble analysis is done.
7.7.0.1 functions:
write.configs()
,write.ensemble.configs
, run.ensemble.analysis()
7.8 Sensitivity Runs
Only if this section is defined a sensitivity analysis is done. This section will have <quantile>
or <sigma>
nodes. If neither are given, the default is to use the median +/- [1 2 3] x sigma (e.g. the 0.00135 0.0228 0.159 0.5 0.841 0.977 0.999 quantiles); If the 0.5 (median) quantile is omitted, it will be added in the code.
7.8.0.1 functions:
write.configs()
, run.sensitivity.analysis()
7.9 Model Setup
This section is required and tells PEcAn what model to run. This section should either specify <id>
or both <name>
and <binary>
of the model. If both id and name and/or binary are specified the id is used to check the specified name and/or binary.
As of version 1.3.7 the <name>
tag has been renamed <type>
. The <type>
tag refers to the “type” of model and is used for a) identifying appropriate pfts and b) identifying whether appropriate inputs (i.e. met data) are available for the given site and model (or if they can be created).
To ensure compatability, the code will automatically convert from <name>
to <type>
.
7.9.0.1 functions:
write.configs()
, run.models()
7.10 Run Setup
7.12 Parameter Data Assimilation
The following tags can be used for state data assimilation. More detailed information can be found here: Parameter Data Assimilation Documentation
7.13 Benchmarking
Coming soon…