BASGRA wrapper function. Runs and writes model outputs in PEcAn standard.
Usage
run_BASGRA(
run_met,
run_params,
site_harvest,
site_fertilize,
start_date,
end_date,
outdir,
sitelat,
sitelon,
co2_file = NULL,
write_raw_output = FALSE
)Arguments
- 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
Details
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