geco-bern / rsofun

Implements the Simulating Optimal FUNctioning framework for site-scale simulations of ecosystem processes, including model calibration. It contains Fortran 90 modules for the P-model, SPLASH, and BiomeE models.
https://geco-bern.github.io/rsofun/
GNU General Public License v3.0
25 stars 29 forks source link

`params_species` (in both BiomeE example drivers) is needlessly filled up to 16 rows #267

Closed fabern closed 18 hours ago

fabern commented 5 days ago

params_species is needlessly filled up to 16 rows. This concerns both: biomee_gs_leuning_drivers and biomee_p_model_drivers

The reasons was that historically only 16-row data.frames were valid input into the Fortran code. This has been mitigated in the meantime.

library(rsofun)
library(dplyr)
library(tidyr)

# params_species <- rsofun::biomee_gs_leuning_drivers$params_species[[1]]
params_species <- rsofun::biomee_p_model_drivers$params_species[[1]]
params_species |> distinct()                                       #actually only 4 out of 16 rows are distinct
params_species |> distinct() |> select(where(~ n_distinct(.) > 1)) #showing the 4 properties where the 4 rows are distinct
params_species |> select(where(~ n_distinct(.) > 1))               #showing the 4 properties across all 16 rows
#                                                                  #the 4 properties are: phenotype, thetaBM, LMA, rho_wood