Welcome
Project Overview
Contributor Covenant Code of Conduct
1
About the PEcAn Book
1.1
How to Contribute
1.1.1
Editing the book yourself
1.1.2
Feedback/Comments/Suggestions
1.2
How this Book is organized
I Basic User Guide
2
Getting Started
2.1
How PEcAn Works in a nutshell
2.2
Quick Start
2.2.1
Working with the PEcAn VM
2.2.2
Using AmazonWeb Services (AWS)
3
The model-site page
3.1
Selecting a model
3.2
Selecting a site
3.2.1
Using existing sites
3.2.2
Adding a new site
3.2.3
Troubleshooting
4
Basic model configuration
4.1
Choosing meteorology
4.1.1
Met workflow
4.1.2
Troubleshooting meteorological conversions
4.2
Choosing initial vegetation
4.2.1
Spin up
4.2.2
Veg workflow
4.3
Selecting a soils product
5
VM Desktop Conversion
5.0.1
Install RStudio Desktop
II Advanced User Guide - Web
6
Advanced Web Interface Guide
6.0.1
What do all those other buttons on the web interface do?
6.0.2
How do I perform specific analyses?
7
Using Browndog
8
PEcAn XML Configuration
8.1
PEcAn folders
8.2
Database Access
8.3
BETY Database Configuration
8.4
Brown Dog Configuration
8.5
PFT Selection
8.6
Meta Analysis
8.7
Ensemble Runs
8.8
Sensitivity Runs
8.9
Model Setup
8.10
Run Setup
8.11
State Data Assimilation Tags
8.12
Parameter Data Assimilation
8.13
Benchmarking
9
Parameter Data Assimilation
9.1
All functions pertaining to Parameter Data Assimilation are housed within:
pecan/modules/assim.batch
9.1.1
pda.mcmc.R
9.1.2
pda.mcmc.bs.R
9.1.3
pda.emulator
9.1.4
pda.mcmc.recover.R
9.1.5
pda.utils.R
9.1.6
**get.da.data.*.R, plot.da.R** Old codes written by Carl Davidson. Defunct now, but may contain good ideas so currently left in.
10
State Data Assimilation
10.1
sda.enkf.R is housed within:
/pecan/modules/assim.sequential/R
10.2
The tree ring tutorial is housed within:
/pecan/documentation/tutorials/StateAssimilation
10.2.1
sda.enkf.R Description
10.2.2
sda.enkf.R Arguments
10.2.3
State Data Assimilation Workflow
10.2.4
State Data Assimilation Tags Example
10.2.5
State Data Assimilation Tags Descriptions
10.2.6
Model Specific Functions for SDA Workflow
10.2.7
Analysis Options
10.2.8
The Generalized Ensemble Filter
11
Specific Model Configurations
12
Advanced Setup
III Advanced User Guide - Cmd Line
13
Advanced Command Line Guide
14
Run PEcAn from COmmand Line
15
Working with the VM
15.1
Connecting to the VM via SSH
16
Extra Tools In PEcAn
IV User Appendix
17
User Appendix
18
Updating PEcAn Code and Bety Database
18.0.1
Updating PEcAn
18.1
Updating BETY
19
PEcAn Models
19.1
BioCro
19.2
BioCro Configuration
19.3
CLM
19.4
DALEC
19.5
ED
19.5.1
ED Configuration
19.6
ED2IN configuration variables
19.7
GDAY
19.8
LINKAGES
19.9
LPJ-GUESS
19.10
MAESPA
19.11
PRELES
19.12
Sipnet
20
Model Output Variables
21
Available Meteorological Drivers
21.1
Ameriflux
21.2
AmerifluxLBL
21.3
Fluxnet2015
21.4
NARR
21.5
CRUNCEP
21.6
CMIP5
21.7
NLDAS
21.8
GLDAS
21.9
PalEON
21.10
FluxnetLaThuile
V PEcAn Workflow
22
Workflow
23
The PEcAN BETY connection
VI Development Guide
24
Overview
24.1
Bugs, Issues, Features, etc.
24.1.1
Reporting a bug
24.1.2
Required content
24.2
Requesting a feature
24.3
Closing an issue
24.4
When to submit an issue?
24.4.1
Ideally, non-trivial code changes will be linked to an issue and a commit.
25
Using Git
25.1
Git
25.1.1
PEcAnProject on GitHub:
https://github.com/organizations/PecanProject
25.1.2
Milestones, Issues, Tasks
25.1.3
Quick and Easy
25.2
Recommended Git Workflow
25.2.1
Before any work is done:
25.3
During development:
25.3.1
Basic Workflow
25.3.2
Advanced Workflow: A new branch for each change
25.3.3
After pull request is merged
25.3.4
Link commits to issues
25.4
For PEcAn
25.4.1
Committing Changes Using Pull Requests
25.4.2
Other Useful Git Commands:
25.4.3
Tags
25.5
Git + Rstudio
25.5.1
Creating a Read-only version:
25.6
For development:
25.7
References:
26
Directory structure
26.1
Overview of PEcAn repository as of PEcAn 1.2
26.2
Generic R package structure:
27
Adding An Ecosystem Model
27.1
PEcAn Database
27.2
Define MODEL_TYPE
27.3
MACHINE
27.4
MODEL
27.5
FORMATS
27.5.1
Formats -> Variables
27.5.2
MODEL_TYPE -> Formats
27.6
INPUTS
27.7
PFTS (Plant Functional Types)
27.7.1
Species
27.8
PRIORS
27.9
Interface Modules
27.9.1
Setting up the module directory (required)
27.9.2
DESCRIPTION
27.9.3
NAMESPACE
27.9.4
Building the package
27.9.5
write.config.MODEL (required)
27.9.6
Output Conversions
27.9.7
met2model.MODEL
27.9.8
Commit changes
28
Met Data
28.1
Dimensions:
28.2
The variable names should be
standard_name
28.2.1
PEcAn Configuration Files
28.2.2
Model-specific configuration files
29
Coding Style
29.1
Use Roxygen2 documentation
29.2
Write your name at the top
29.3
Use testthat testing package
29.4
Don’t use shortcuts
29.4.1
Function Names (
verb.noun
)
29.4.2
File Names
29.4.3
Use “<-” as an assignment operator
29.4.4
Use Spaces
29.4.5
Use curly braces
29.5
Package Dependencies:
29.5.1
library vs require
29.5.2
DEPENDS, SUGGESTS, IMPORTS
30
Roxygen2
30.1
Canonical references:
30.2
Basic Roxygen2 instructions:
30.2.1
Tags
30.2.2
Text markup
30.3
Example
30.4
Updating documentation
31
Testing
31.1
Rationale
31.2
Tests makes development easier and less error prone
31.3
Quick Start:
31.4
Test files
31.4.1
Settings
31.4.2
Helper functions created to make testing easier
31.4.3
When should I test?
31.4.4
What types of testing are important to understand?
31.4.5
Unit Testing / Test Driven Development
31.4.6
Regression Testing
31.4.7
How should I test in R? The testthat package.
31.4.8
basic use of the testthat package
32
Package Data
32.1
Summary:
32.2
Accessing data
32.3
Packages used in development
32.3.1
roxygen2
32.3.2
devtools
33
Logging
33.1
PEcAn logging functions
33.1.1
Examples
33.1.2
Related Issues (requires Redmine developer account)
33.2
Other R logging packages
33.2.1
logging
33.2.2
futile
33.3
Example Usage
33.4
Inputs
33.4.1
Defining new input formats
33.5
Outputs
VII Appendix
34
Installing PEcAn
34.1
Installing Prerequisites
34.1.1
Set
R_LIBS_USER
34.2
Install models
34.2.1
ED2
34.2.2
SIPNET
34.2.3
BioCro
34.2.4
Linkages
34.2.5
DALEC
34.2.6
LINKAGES
34.2.7
CLM 4.5
34.3
CLM-FATES
34.4
PEcAn Installation
34.5
Installing PEcAn
34.6
Installing BETY
34.6.1
Install Postgres
34.6.2
Install Database + Data
34.6.3
Installing BETYdb Web Application
34.6.4
PEcAn Testrun
35
Creating a Virtual Machine
36
CentOS/RedHat
36.1
Install build environment
36.2
Install Postgres
36.3
Apache Configuration PEcAn
36.4
Apache Configuration BETY
36.5
Rstudio-server
36.6
Additional packages
37
CentOS / RHEL
37.1
Install build environment
37.2
Apache Configuration
37.3
Install and configure Rstudio-server
37.4
Install Postgres
38
Mac OSX
38.1
Install build environment
38.2
Install Postgres
38.3
Additional installs
38.3.1
Install JAGS
38.3.2
Install udunits
38.4
Apache Configuration
38.5
Ruby
38.6
Rstudio Server
39
Ubuntu
39.1
Install build environment
39.2
Install Postgres
39.3
Apache Configuration BETY
39.4
Rstudio-server
39.5
Additional packages
39.6
Download and Install Models
39.7
Install instructions
39.7.1
ED2
39.7.2
SIPNET
39.7.3
BioCro
39.7.4
Linkages
39.7.5
DALEC
39.7.6
LINKAGES
39.7.7
CLM 4.5
39.7.8
JULES
39.7.9
MAESPA
39.7.10
GDAY
39.7.11
LPJ-GUESS
40
Porting VM to AWS
40.0.1
Convert PEcAn VM
40.0.2
Set up an account on
AWS
40.0.3
Install
EC2 command line tools
40.0.4
Create an AWS S3 ‘bucket’ to upload VM to
40.0.5
Upload
40.0.6
Configuring the VM
40.0.7
Set up multiple instances (optional)
40.0.8
Booting the VM
41
Installing and configuring Shiny for PEcAn
41.1
Install the Shiny R package and Shiny server
41.2
CentOS
41.3
Ubuntu
41.4
Modify the shiny configuration file
41.5
Set the httpd proxy
41.6
Create a symbolic link to the shiny server service
41.7
Start the shiny server and restart httpd
41.8
Troubleshooting
41.9
Further reading
42
FAQ
The Predictive Ecosystem Analyzer
17
User Appendix