GRASS logo


r.pops.spread - A dynamic species distribution model for pest or pathogen spread in forest or agricultural ecosystems


raster, spread, model, disease, pest


r.pops.spread --help
r.pops.spread [-ms] host=name total_plants=name infected=name [average=name] [average_series=basename] [single_series=basename] [stddev=name] [stddev_series=basename] [probability=name] [probability_series=basename] [outside_spores=name] [spread_rate_output=name] [treatments=name[,name,...]] [treatment_date=string[,string,...]] [treatment_length=integer[,integer,...]] [treatment_application=string] [moisture_coefficient_file=name] [temperature_coefficient_file=name] [weather_coefficient_file=name] [lethal_temperature=float] [lethal_month=integer] [temperature_file=name] start_date=string end_date=string seasonality=from,to step_unit=string step_num_units=integer [output_frequency=string] [output_frequency_n=integer] [reproductive_rate=float] natural_dispersal_kernel=string natural_distance=float natural_direction=string natural_direction_strength=float [anthropogenic_dispersal_kernel=string] [anthropogenic_distance=float] [anthropogenic_direction=string] [anthropogenic_direction_strength=float] [percent_natural_dispersal=float] [mortality_rate=float] [mortality_time_lag=integer] [mortality_series=basename] [random_seed=integer] [runs=integer] [nprocs=integer] [--overwrite] [--help] [--verbose] [--quiet] [--ui]


Apply mortality
After certain number of years, start removing dead hosts from the infected pool with a given rate
Generate random seed (result is non-deterministic)
Automatically generates random seed for random number generator (use when you don't want to provide the seed option)
Allow output files to overwrite existing files
Print usage summary
Verbose module output
Quiet module output
Force launching GUI dialog


host=name [required]
Input host raster map
Number of hosts per cell.
total_plants=name [required]
Input raster map of total plants
Number of all plants per cell
infected=name [required]
Input raster map of initial infection
Number of infected hosts per cell
Average infected across multiple runs
Basename for output series of average infected across multiple runs
Basename for output series of infected as single stochastic run
Standard deviations
Basename for output series of standard deviations
Infection probability (in percent)
Basename for output series of probabilities
Output vector map of spores or pest units outside of modeled area
Output CSV file containg yearly spread rate in N, S, E, W directions
Raster map(s) of treatments (treated 1, otherwise 0)
Dates when treatments are applied (e.g. 2020-01-15)
Treatment length in days
Treatment length 0 results in simple removal of host, length > 0 makes host resistant for certain number of days
Type of treatmet application
Options: ratio_to_all, all_infected_in_cell
Default: ratio_to_all
Input file with one moisture coefficient map name per line
Moisture coefficient
Input file with one temperature coefficient map name per line
Temperature coefficient
Input file with one weather coefficient map name per line
Weather coefficient
Temperature at which the pest or pathogen dies
The temerature unit must be the same as for thetemerature raster map (typically degrees of Celsius)
Month when the pest or patogen dies due to low temperature
The temperature unit must be the same as for thetemperature raster map (typically degrees of Celsius)
Input file with one temperature raster map name per line
The temperature should be in actual temperature units (typically degrees of Celsius)
start_date=string [required]
Start date of the simulation in YYYY-MM-DD format
end_date=string [required]
End date of the simulation in YYYY-MM-DD format
seasonality=from,to [required]
Seasonal spread (from,to)
Spread limited to certain months (season), for example 5,9 for spread starting at the beginning of May and ending at the end of September
Default: 1,12
step_unit=string [required]
Unit of simulation steps
Options: day, week, month
Default: month
day: Compute next simulation step every N days
week: Compute next simulation step every N weeks
month: Compute next simulation step every N months
step_num_units=integer [required]
Number of days/weeks/months in each step
Step is given by number and unit, e.g. step_num_units=5 and step_unit=day means step is 5 days
Options: 1-100
Default: 1
Frequency of simulation output
Options: yearly, monthly, every_n_steps
Default: yearly
Output frequency every N steps
Options: 1-100
Default: 1
Number of spores or pest units produced by a single host
Number of spores or pest units produced by a single host under optimal weather conditions
Default: 4.4
natural_dispersal_kernel=string [required]
Natural dispersal kernel type
Options: cauchy, exponential
Default: cauchy
natural_distance=float [required]
Distance parameter for natural dispersal kernel
natural_direction=string [required]
Direction of natural dispersal kernel
Typically prevailing wind direction; none means that there is no directionality or no wind
Options: N, NE, E, SE, S, SW, W, NW, NONE, none
Default: none
natural_direction_strength=float [required]
Strength of direction of natural dispersal kernel
The kappa parameter of von Mises distribution (concentration); typically the strength of the wind direction
Anthropogenic dispersal kernel type
Options: cauchy, exponential
Distance parameter for anthropogenic dispersal kernel
Direction of anthropogenic dispersal kernel
Value none means that there is no directionality
Options: N, NE, E, SE, S, SW, W, NW, NONE, none
Default: none
Strength of direction of anthropogenic dispersal kernel
The kappa parameter of von Mises distribution (concentration); typically the strength of the wind direction
Percentage of natural dispersal
How often is the natural dispersal kernel used versus the anthropogenic dispersal kernel
Options: 0-1
Mortality rate of infected hosts
Percentage of infected hosts that die in a given year (hosts are removed from the infected pool)
Options: 0-1
Time lag from infection until mortality can occur in years
How many years it takes for an infected host to die (value 1 for hosts dying at the end of the first year)
Basename for series of number of dead hosts
Basename for output series of number of dead hosts (requires mortality to be activated)
Seed for random number generator
The same seed can be used to obtain same results or random seed can be generated by other means.
Number of simulation runs
The individual runs will obtain different seeds and will be averaged for the output
Number of threads for parallel computing
Options: 1-

Table of contents


Module r.pops.spread is a dynamic species distribution model for pest or pathogen spread in forest or agricultural ecosystems. The model is process based meaning that it uses understanding of the effect of weather on reproduction and survival of the pest/pathogen in order to simulate spread of the pest/pathogen into the future.
r.pops.spread example

Module r.pops.spread is using Pest or Pathogen Spread library.

PoPS logo
Figure: Logo of Pest or Pathogen Spread simulation



Obtaining list of rasters

Use R script to create weather coefficients based on a defined polynomial.

Example of creating file with list of input maps (unix-like command line):

g.list type=raster pattern="moisture_*" mapset=climate -m > moistures.txt
g.list type=raster pattern="temperature_*" mapset=climate -m > temperatures.txt
Note that the above assumes that the names will be ordered by time. This will happen automatically if they are, e.g. numbered as 001, 002, etc. (e.g. temperature_001 and not temperature_1). If they are numbered without the zero-padding, i.e. 1, 2, ..., 10, 11, ..., then in a unix-like command line, you can do pipe the result through sort with -n (| sort -n). For example, for map names like temperature_1, the following unix-like command will do the sorting:
g.list type=raster pattern="temperature_*" mapset=climate | sort -k2 -t_ -n > temperatures.txt
Note the underscore which tells sort where to split the name for sorting and the number 2 which indicates which part of the name to use for sorting after splitting. If you have the weather-related timeseries in a separate mapset, you can add this mapset to the search path of your current mapset so that you can have the rasters in the list without specifying the mapset. To add to the search path, use for example:
g.mapsets mapset=climate

Generating a constant coefficient

In case the moisture coefficient is not used, we can generate a constant raster map to be used as the coefficient:
r.mapcalc "const_1 = 1"
Then using unix-like command line, we can create a list of these rasters in a file based on the number of lines in a temperature list files we created earlier:
NUM_LINES=`cat temperatures.txt | wc -l`
echo const_1 > moistures.txt
for LINE in `seq 2 $NUM_LINES`; do echo const_1 >> moistures.txt; done;

Creating treatments

To account for (vector) treatments partially covering host cells:
# set resolution for treatments and convert to raster
g.region res=10 -ap input=treatment output=treatment use=val

# resample to lower resolution (match host map resolution)
g.region align=host_map -p
r.resamp.stats -w input=treatment output=treatment_resampled method=count
# get maximum value, which is dependent on resolution
# e.g. when resampling from 10m to 100m, max will be 100 (100 small cells in 1 big cell) -r treatment_resampled
# result will be 0 to 1
r.mapcalc "treatment_float = test_treatment_resampled / 100"
# adjust host layer
r.mapcalc "treated_host = host - host * treatment_float"

Running the model

Example of the run of the model (unix-like command line):
r.pops.spread host=host total_plants=all infected=infected_2005 \
    moisture_coefficient_file=moistures.txt temperature_coefficient_file=temperatures.txt \
    output=spread step=week start_time=2005 end_time=2010 \
    reproductive_rate=4 dispersal_kernel=cauchy wind=NE random_seed=4





Francesco Tonini* (original R version)
Zexi Chen* (C++ version)
Vaclav Petras* (parallelization, GRASS interface)
Anna Petrasova* (single species simulation)

* Center for Geospatial Analytics, NCSU


Available at: r.pops.spread source code (history)

Main index | Raster index | Topics index | Keywords index | Graphical index | Full index

© 2003-2020 GRASS Development Team, GRASS GIS 7.8.4dev Reference Manual