The model is based on several years of experiments where trap plants have been placed next to a potato field infected with late blight. Infections on these plants have been correlated with weather conditions the day of exposure, and this is the data the model is based on. The model predicts if there are favorable conditions for spore production and the following spread, survival and infection of these spores. The model produces an infection risk, and a value of 2.5 corresponds to one spot of late blight on each trap plant exposed. This value of 2.5 is the threshold where the model issues a warning.
## Technical description
## Technical description
### Software requirements
###Software requirements
The model can only be run on Linux, as some of the tools mentioned below are only available on Linux. The development and testing of the model has been done using Ubuntu Linux 22.04LTS.
The model can only be run on Linux, as some of the tools mentioned below are only available on Linux. The development and testing of the model has been done using Ubuntu Linux 22.04LTS.
####CDO and GDAL
####CDO and GDAL
The heavy lifting in this model is done by the tools CDO and GDAL. These tools need to be installed and available. CDO is only available on Linux.
The heavy lifting in this model is done by the tools CDO and GDAL. These tools need to be installed and available. CDO is only available on Linux.
####Python requirements
#### Python requirements
The Python requirements are specified in requirements.txt file, and are included in the virtualenv created by the run_NAERSTADMO.sh (see below).
The Python requirements are specified in the `requirements.txt` file, and are included in the virtualenv created by the `run_NAERSTADMO.sh` (see below).
#### Input data requirements
The model assumes weather data files named `met_1_0km_nordic-[YYYY-MM-DD].nc` with hourly values of:
* Temperature (TM)
* Relative humidity (UM)
* Precipitation (RR)
* Wind speed (FF)
* Global radiation (Q0)
#### Running the model
It is required that you have set the following environment variables:
```bash
# Path to this code (HOME_DIR + NAERSTADMO)
HOME_DIR=/foobar/gridmodels/
# Path to the weather data files. Expecting hourly values in files named met_1_0km_nordic-[YYYY-MM-DD].nc
WEATHER_DATA_DIR=/foobar/met_1_0km_nordic/2024/
# Start date for the model
START_DATE=2024-05-15
# Use this file to crop the output of the grid
MASK_FILE=Norge_landomrader.csv
# Where the GeoTIFF files will be output
DATA_DIR=/foobar/mapserver/data/NAERSTADMO/
# Where the mapfile will be output
MAPFILE_DIR=/foobar/mapserver/wms/NAERSTADMO/
# Path to the GeoTIFF files used by mapserver (written to mapfile)