Title: | PEcAn Package for Integration of the BASGRA Model |
---|---|
Description: | This module provides functions to link the BASGRA model to PEcAn. |
Authors: | Istem Fer [aut, cre], University of Illinois, NCSA [cph] |
Maintainer: | Istem Fer <[email protected]> |
License: | BSD_3_clause + file LICENSE |
Version: | 1.8.0.9000 |
Built: | 2024-12-17 17:28:01 UTC |
Source: | https://github.com/PecanProject/pecan |
Read Restart for BASGRA
read_restart.BASGRA(outdir, runid, stop.time, settings, var.names, params)
read_restart.BASGRA(outdir, runid, stop.time, settings, var.names, params)
outdir |
Output directory |
runid |
Run ID |
stop.time |
Year that is being read |
settings |
PEcAn settings object |
var.names |
Variable names to be extracted |
params |
Any parameters required for state calculations |
X.vec vector of forecasts
Istem Fer
BASGRA wrapper function. Runs and writes model outputs in PEcAn standard.
run_BASGRA( run_met, run_params, site_harvest, site_fertilize, start_date, end_date, outdir, sitelat, sitelon, co2_file = NULL, write_raw_output = FALSE )
run_BASGRA( run_met, run_params, site_harvest, site_fertilize, start_date, end_date, outdir, sitelat, sitelon, co2_file = NULL, write_raw_output = FALSE )
run_met |
path to CF met |
run_params |
parameter vector |
site_harvest |
path to harvest file |
site_fertilize |
path to fertilizer application file |
start_date |
start time of the simulation |
end_date |
end time of the simulation |
outdir |
where to write BASGRA output |
sitelat |
latitude of the site |
sitelon |
longitude of the site |
co2_file |
path to daily atmospheric CO2 concentration file, optional, defaults to 350 ppm when missing |
write_raw_output |
write raw output in csv or not |
BASGRA is written in fortran is run through R by wrapper functions written by Marcel Van Oijen. This function makes use of those wrappers but gives control of datastream in and out of the model to PEcAn. With this function we skip model2netcdf, we can also skip met2model but keeping it for now. write.config.BASGRA modifies args of this function through template.job then job.sh runs calls this function to run the model
Istem Fer, Julius Vira
Write restart files for BASGRA
write_restart.BASGRA( outdir, runid, start.time, stop.time, settings, new.state, RENAME = TRUE, new.params = FALSE, inputs )
write_restart.BASGRA( outdir, runid, start.time, stop.time, settings, new.state, RENAME = TRUE, new.params = FALSE, inputs )
outdir |
outout directory |
runid |
run id |
start.time |
Time of current assimilation step |
stop.time |
Time of next assimilation step |
settings |
pecan settings list |
new.state |
Analysis state matrix returned by |
RENAME |
flag to either rename output file or not |
new.params |
optional, additionals params to pass write.configs that are deterministically related to the parameters updated by the analysis |
inputs |
new input paths updated by the SDA workflow, will be passed to write.configs |
TRUE if successful
Istem Fer
Writes a BASGRA config file.
write.config.BASGRA(defaults, trait.values, settings, run.id, IC = NULL)
write.config.BASGRA(defaults, trait.values, settings, run.id, IC = NULL)
defaults |
list of defaults to process |
trait.values |
vector of samples for a given trait |
settings |
list of settings from pecan settings file |
run.id |
id of run |
IC |
initial conditions list |
Requires a pft xml object, a list of trait values for a single model run, and the name of the file to create
configuration file for BASGRA for given run
Istem Fer