Skip to main content
Back to overview

Detailed Information

Software name

Plasmopy

Organisation

Short description

Plasmopara viticola (downy mildew) infection risk prediction model for grapevine.

Documentation

Infection prediction modeling of Plasmopara viticola life cycle stages in vineyards using weather data. This project represents a revisited and customizable Python version of the VitiMeteo-Plasmopara model in use at Agroscope (Switzerland) for downy mildew infection forecasting. Input data - Weather variables Input data needs to be in the form of timeseries in a semicolon-delimited CSV file, where the positioning of columns must be precisely kept in the following order: 1) Date and time of measurement in the %d.%m.%Y %H:%M local timezone format. 2) Average temperature [°C] in degrees Celsius. 3) Relative humidity [%] in percentages. 4) Rainfall intensity [mm/h] in millimeters per hour. 5) Leaf wetness [min] in minutes of wetness over 10 minutes (by default, or whatever sampling period is available). Such timeseries data is publicly available for Switzerland from the Agroscope weather stations, accessible at Agrometeo. Examples of input weather data are available in data/input/. Be sure to update accordingly the most important input-dependent parameters in config/main.yaml: measurement_time_interval, computational_time_steps, algorithmic_time_steps. The file can be managed directly, or through the streamlit web-app, as detailed in the README. Optional input data - Spore counts Input spore counts data (e.g. from qPCR, microscopy, ...) columns must be ordered and formatted in the following way: 1) Date of daily spore counts in the %d.%m.%Y %H:%M local timezone format. 2) Spore counts. Infection model The main.py and infection_model.py Python scripts orchestrate a computational framework for modeling infection dynamics based on meteorological and biological parameters. Below, the main components of the methodology are outlined: Data Preprocessing and Initialization The script requires input data formatted as a time-series DataFrame, model parameters provided via a configuration file, and supporting metadata such as time zones and column formats. Model parameters are validated and logged, ensuring consistency across computational stages. Determination of Oospore Maturation The get_oospore_maturation_date function identifies the date of oospore maturation using daily temperature data. If a predefined maturation date is unavailable, the function computes it based on degree-day thresholds and writes results to a log file. Missing data or unmet threshold conditions halt the process. Infection Event Construction The function get_infection_events_dictionary compiles and organizes data into a dictionary containing key infection event datetimes (e.g., oospore germination, sporulation) and their associated parameters (e.g., sporangia density, spore lifespan). Primary Infection Prediction The run_infection_model function coordinates the infection prediction process, starting with primary infection stages: Oospore Germination: Simulated based on relative humidity, temperature thresholds, and environmental conditions. Oospore Dispersion: Modeled as a rainfall-driven process with latency considerations. Oospore Infection: Dependent on leaf wetness, degree-hour accumulation, and environmental conditions. Secondary Infection and Incubation Dynamics Subsequent infection stages include: Incubation Period: Duration is computed based on mean temperatures. Sporulation: Triggered by environmental factors such as humidity, temperature, and darkness duration. Sporangia Density: Simulated as a function of temperature and latency parameters. Spore Lifespan: Calculated using vapor pressure and lifespan constants. Secondary Infections: Modeled based on spore availability, temperature thresholds, and leaf wetness conditions. Logging and Error Handling The script employs robust error logging to identify issues such as missing configuration parameters or unfulfilled biological conditions. Warnings are issued if model requirements (e.g., maturation thresholds) are unmet. Output The final output is a structured pickle dictionary summarizing infection event properties and datetimes. This dictionary serves as the primary interface for downstream analyses or reporting. Additional output files included in data/output/: PDF and HTML graphs of the simulated infection events across the input datetime range; a logfile detailing the simulation data pre-processing, model parameters and eventual workflow errors; the post-processing weather variables input file; a summary description of the successful primary and secondary infection events. The output files as well as the model parameters and input files for running new simulations can be interactively explored and configured through the streamlit web-app, activated with the command: make app

Software version

1.0

License

AGPL-3.0-only

Publiccode.yml Version

0.5.0