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

Enable BiomeE likelihood for calibration with a) multiple targets and b) multiple sites #233

Closed fabern closed 1 month ago

fabern commented 1 month ago

BiomeE likelihood function was very basic, mainly a hardcoded proof-of-concept but not flexible enough to apply to multiple sites or multiple target variables. This PR updates this.

This PR further serves as a opportunity to streamline the likelihoods/RMSE calculations and properly applying the DRY principle (reducing the repeated code).

This is not only relevant for BiomeE but also changing the calibration of p-model to use ET instead/in addition to GPP. Hence this is also related to: https://github.com/geco-bern/sofunCalVal/issues/5 and https://github.com/geco-bern/sofunCalVal/pull/17