knitr::opts_chunk$set( collapse = TRUE, comment = "#>", fig.path = "man/figures/README-", out.width = "100%" )
The goal of Ryassofortran is to provide a convenient way to call the Fortran90-release of the soil carbon model YASSO15 in R.
The Fortran-release of YASSO is up to two orders of magnitude faster than the R-release. The absolute speed increase is not necessarily significant while simulating soil carbon, but for model calibration purposes the Fortran-release is superior.
NOTE: This package is very early in development and is subject to changes. Furthermore, the package might be removed and included into a more advanced calibration package in the following months.
You can install the development version of Ryassofortran from GitHub with:
# install.packages("devtools") devtools::install_github("jpusa/Ryassofortran")
On Windows systems the installation requires Rtools to be installed.
Simulate soil carbon with YASSO:
library(Ryassofortran)
# The initial carbon is given as a vector (A, W, E, N, H) sample_data_run$init
# Run the YASSO model with sample parameters and data soil_c <- run_yasso( par = sample_parameters, n_runs = sample_data_run$n_runs, time = sample_data_run$time, temp = sample_data_run$temp, prec = sample_data_run$prec, init = sample_data_run$init, litter = sample_data_run$litter, wsize = sample_data_run$wsize, leac = sample_data_run$leac ) # Show the results round(soil_c, 3)
Run YASSO in a way intended for calibration:
# The initial carbon is given as a matrix sample_data_cal$init
# There is a single leaching value for the entire data set sample_data_cal$leac
# Run in calibration mode soil_c_cal <- calibrate_yasso( par = sample_parameters, n_runs = sample_data_cal$n_runs, time = sample_data_cal$time, temp = sample_data_run$temp, prec = sample_data_run$prec, init = sample_data_cal$init, litter = sample_data_cal$litter, wsize = sample_data_cal$wsize, leac = sample_data_cal$leac ) # Show the results round(soil_c_cal, 3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.