Installation

B2SPM is compatible with Windows, Mac, and Linux. You can install B2SPM from GitHub using:

# install.packages("devtools")
devtools::install_github("colinfabre/b2spm")

Dependencies

Internal Functionality

B2SPM relies on several other packages to function; make sure to download them beforehand to ensure proper operation:

install.packages("utils", "stats", "terra", "sf", "gstat", "ps")

There are no specific package versions required.

External Data

B2SPM requires a DEM (Digital Elevation Model) covering at least the entire study area where the modeling will be conducted. The resolution of this DEM should not exceed 25m (the final analysis grid is 250m, and a resolution that is too fine (e.g., 5m) significantly increases computation times without improving model accuracy).

The phenological model relies on ponctual climate data, ie various climate variables measured/well-estimated at a point whose spatial coordinates are precisely known.

The climate parameters required to run B2SPM are:

Such data can be user-provided (from a local climate station), or sourced from official database. One climate data provider in France is the DRIAS portal. It provides regionalized climate projections for mainland France. The corrected DRIAS-2020 data are available for several different models, but the most accurate for France is MétéoFrance’s global ARPEGE-Climat model, forced by the regional climate model (RCM) and used in the ALADIN63 simulation. The preferred scenario is RCP8.5, as it aligns with the current greenhouse gas emission curve.

The user can select the desired study year and extract all DRIAS points contained within their study area, adding a one-row and one-column margin on all sides to ensure proper spatialization of phenological indicators.

User-provided data or one downloaded from the DRIAS portal must be provided as .txt files (native format) following this structure:

Example of an expected DRIAS file structure:

point_id, X_LambII, Y_LambII,date,tmin,tmax,tmoy,tot_pr,spec_hum,vis_solrad,ir_solrad,wind,pet
ID001,908000,2129000,01/01/2030,-2.3,5.7,1.5,0.0,0.0025,150.0,220.0,2.1,0.0
ID001,908000,2129000,02/01/2030,-1.8,6.2,2.1,0.0001,0.0024,152.5,225.0,1.8,0.00005