Overall, the package uses the {tidyverse} data paradigm (Wickham, 2017), using nested data frames (tibbles) to store model input and output, and validation data. Where possible the package uses a consistent ontogeny in terms of variables and data structures used. Each site is defined by a site name (sitename), location specific site information (site_info), soil characteristics (params_soil), simulation parameter settings (params_siml) and environmental forcing data (forcing). Sites are grouped by row in a nested tibble.

# call to the included p-model demo data
rsofun::p_model_drivers
#> # A tibble: 1 × 4
#>   sitename params_siml       site_info        forcing              
#>   <chr>    <list>            <list>           <list>               
#> 1 FR-Pue   <tibble [1 × 11]> <tibble [1 × 4]> <tibble [2,190 × 13]>

Here, the forcing data contains environmental variables commonly available at fluxnet (reference) or ICOS atmospheric gas exchange measurement locations or gathered from various gridded or re-analysis sources. Data are provided at a daily time step and for complete years.

# detailed look at the forcing data
rsofun::p_model_drivers$forcing
#> [[1]]
#> # A tibble: 2,190 × 13
#>    date        temp   vpd     ppfd netrad   patm  snow    rain  tmin  tmax fapar
#>    <date>     <dbl> <dbl>    <dbl>  <dbl>  <dbl> <dbl>   <dbl> <dbl> <dbl> <dbl>
#>  1 2007-01-01 10.0  183.   1.06e-4   4.17 9.99e4     0 2.55e-5  7.12 13.0  0.605
#>  2 2007-01-02  8.42 417.   1.92e-4 -22.2  1.00e5     0 6.94e-6  6.79  9.33 0.603
#>  3 2007-01-03  9.13 566.   1.87e-4 -16.6  1.00e5     0 0        4.21 11.2  0.600
#>  4 2007-01-04 10.1  375.   8.28e-5 -16.8  9.93e4     0 0        3.96 12.2  0.598
#>  5 2007-01-05 10.7  508.   1.83e-4  -6.60 9.94e4     0 0        9.26 11.4  0.596
#>  6 2007-01-06 13.6  656.   1.88e-4 -11.2  9.95e4     0 0        8.96 15.4  0.596
#>  7 2007-01-07 13.7  567.   1.55e-4   7.32 9.93e4     0 0        9.55 15.6  0.597
#>  8 2007-01-08 10.7  273.   7.17e-5  -3.00 9.89e4     0 0        7.04 12.0  0.597
#>  9 2007-01-09 16.4  682.   1.88e-4   9.94 9.91e4     0 0        9.46 19.0  0.598
#> 10 2007-01-10 11.4   26.0  2.77e-5  -6.41 9.94e4     0 0        8.98 12.0  0.598
#> # ℹ 2,180 more rows
#> # ℹ 2 more variables: co2 <dbl>, ccov <dbl>

To create your own driver data it should be arranged into a tibble with the same structure as the example drivers objects. Within {rsofun} optional checks are executed to ensure that the required variables are present in the used dataset using the ‘check’ argument in the runread_pmodel_f() function calls. Throughout the package verbose output is provided (if desired) as to evaluate errors or progress when running the model on a particular dataset.