Title: | PEcAn Functions Used for Ecological Forecasts and Reanalysis |
---|---|
Description: | The Predictive Ecosystem Carbon Analyzer (PEcAn) is a scientific workflow management tool that is designed to simplify the management of model parameterization, execution, and analysis. The goal of PEcAn is to streamline the interaction between data and models, and to improve the efficacy of scientific investigation. This package provides workhorse functions that can be used to run the major steps of a PEcAn analysis. |
Authors: | Mike Dietze [aut], David LeBauer [aut, cre], Xiaohui Feng [aut], Dan Wang [aut], Carl Davidson [aut], Rob Kooper [aut], Shawn Serbin [aut], University of Illinois, NCSA [cph] |
Maintainer: | David LeBauer <[email protected]> |
License: | BSD_3_clause + file LICENSE |
Version: | 1.8.0.9000 |
Built: | 2024-12-17 17:28:32 UTC |
Source: | https://github.com/PecanProject/pecan |
Create a PEcAn XML file and use it to run a PEcAn workflow
create_execute_test_xml( model_id, met, site_id, start_date, end_date, dbfiles_folder, user_id, output_folder = "batch_test_output", pecan_path = getwd(), pft = NULL, ensemble_size = 1, sensitivity_variable = "NPP", sensitivity = FALSE, db_bety_username = NULL, db_bety_password = NULL, db_bety_hostname = NULL, db_bety_port = NULL, db_bety_driver = "Postgres" )
create_execute_test_xml( model_id, met, site_id, start_date, end_date, dbfiles_folder, user_id, output_folder = "batch_test_output", pecan_path = getwd(), pft = NULL, ensemble_size = 1, sensitivity_variable = "NPP", sensitivity = FALSE, db_bety_username = NULL, db_bety_password = NULL, db_bety_hostname = NULL, db_bety_port = NULL, db_bety_driver = "Postgres" )
model_id |
(numeric) Model ID (from 'models' table) |
met |
(character) Name of meteorology input source (e.g. '"CRUNCEP"') |
site_id |
(numeric) Site ID (from 'sites' table) |
start_date |
(character or date) Run start date |
end_date |
(character or date) Run end date |
dbfiles_folder |
(character) Path to 'dbfiles' directory |
user_id |
(numeric) User ID to associate with the workflow |
output_folder |
(character) Path to root directory for storing outputs. Default = '"batch_test_output"' |
pecan_path |
(character) Path to PEcAn source code. Default is current working directory. |
pft |
(character) Name of PFT to run. If 'NULL' (default), use the first PFT in BETY associated with the model. |
ensemble_size |
(numeric) Number of ensembles to run. Default = 1. |
sensitivity_variable |
(character) Variable for performing sensitivity analysis. Default = '"NPP"' |
sensitivity |
(logical) Whether or not to perform a sensitivity analysis (default = 'FALSE') |
db_bety_username , db_bety_password , db_bety_hostname , db_bety_port
|
(character) BETY database connection options. Default values for all of these are pulled from '<pecan_path>/web/config.php'. |
db_bety_driver |
(character) BETY database connection driver (default = '"Postgres"') |
A list with two entries: * 'sys': Exit value returned by the workflow (0 for sucess). * 'outdir': Path where the workflow results are saved
Alexey Shiklomanov, Tony Gardella
Input conversion workflow
do_conversions( settings, overwrite.met = FALSE, overwrite.fia = FALSE, overwrite.ic = FALSE )
do_conversions( settings, overwrite.met = FALSE, overwrite.fia = FALSE, overwrite.ic = FALSE )
settings |
PEcAn settings list |
overwrite.met , overwrite.fia , overwrite.ic
|
logical |
Ryan Kelly, Rob Kooper, Betsy Cowdery, Istem Fer
model_specific_tags
model_specific_tags(settings, model.info)
model_specific_tags(settings, model.info)
settings |
pecan xml settings |
model.info |
model info extracted from bety |
updated settings list
Generates run scripts and configuration files for all analyses specified
in the provided settings. Most of the heavy lifting is done by the
write.config.*
function for your specific ecosystem model
(e.g. write.config.ED2, write.config.SIPNET).
run.write.configs( settings, write = TRUE, ens.sample.method = "uniform", posterior.files = rep(NA, length(settings$pfts)), overwrite = TRUE )
run.write.configs( settings, write = TRUE, ens.sample.method = "uniform", posterior.files = rep(NA, length(settings$pfts)), overwrite = TRUE )
settings |
a PEcAn settings list |
write |
should the runs be written to the database? |
ens.sample.method |
how to sample the ensemble members('halton' sequence or 'uniform' random) |
posterior.files |
Filenames for posteriors for drawing samples for ensemble and sensitivity analysis (e.g. post.distns.Rdata, or prior.distns.Rdata) |
overwrite |
logical: Replace output files that already exist? |
The default value for posterior.files
is NA, in which case the
most recent posterior or prior (in that order) for the workflow is used.
When specified, posterior.files
should be a vector of filenames with one entry for each PFT.
Specify filenames with no path; PFT outdirs will be appended. This forces use of only
files within this workflow, to avoid confusion.
an updated settings list, which includes ensemble IDs for SA and ensemble analysis
David LeBauer, Shawn Serbin, Ryan Kelly, Mike Dietze
Get trait data for all PFTs in a settings list
runModule.get.trait.data(settings)
runModule.get.trait.data(settings)
settings |
PEcAn configuration list. Must have class 'Settings' or 'MultiSettings' |
Generate model-specific run configuration files for one or more PEcAn runs
runModule.run.write.configs(settings, overwrite = TRUE)
runModule.run.write.configs(settings, overwrite = TRUE)
settings |
a PEcAn Settings or MultiSettings object |
overwrite |
logical: Replace config files if they already exist? |
A modified settings object, invisibly
Start selected ecosystem model runs within PEcAn workflow
start_model_runs(settings, write = TRUE, stop.on.error = TRUE) runModule_start_model_runs(settings, stop.on.error = TRUE)
start_model_runs(settings, write = TRUE, stop.on.error = TRUE) runModule_start_model_runs(settings, stop.on.error = TRUE)
settings |
pecan settings object |
write |
(logical) Whether or not to write to the database. Default TRUE. |
stop.on.error |
Throw error if _any_ of the runs fails. Default TRUE. |
runModule_start_model_runs()
: A lightweight wrapper around 'start_model_runs' that takes 'write' from
'settings' instead of as a separate argument.
Shawn Serbin, Rob Kooper, David LeBauer, Alexey Shiklomanov
## Not run: start_model_runs(settings) ## End(Not run)
## Not run: start_model_runs(settings) ## End(Not run)