Skip to content

[feature] set start and end year as input parameters in get_n_years_daily_WD

Summary

In method get_n_years_daily_WD() of class Weather_data, start year and end year are hard-coded in the function which is not flexible at all.

Current behavior

The start year and end year are hard-coded in the function. It can crash the simulation if we forget to go change it in the Weather_data class.

Addendum 2025-03-11:

Those dates are related to the file currently under INPUTS/WEATHER_FILES/PRECIP_VP_Loc1.csv, which is derived from the Agri4cast database. This file is likely for the Siguesol location but we cannot be sure.

The point of the 2005-2015 date range is that the dataframes' lengths must match and this period was covered by the irradiance data files provided by the PVGIS API (SARAH2 ? database).

Desired behavior

MODULES/DATA_MANAGEMENT/weather_data_provider.py > add sim_start_year et sim_end_year as input parameters to method get_n_years_daily_WD() of class Weather_data.

Explain the process of generating a new data file for precipitation and vapor pressure with Agri4cast @Roxane.Bruhwyler

Sources

n/a

Linked features or branches

Linked to bug described in #83 (closed)

Edited by Bouvry Arnaud