Skip to content

Commit

Permalink
r.pops.spread: Update to PoPS version 1.0.0 (#269)
Browse files Browse the repository at this point in the history
Update to PoPS 1.0.0 release, i.e., the tag v1.0.0 in the ncsu-landscape-dynamics/r.pops.spread repo which in turn uses tag v1.0.0 in PoPS Core (ncsu-landscape-dynamics/pops-core).

https://github.com/ncsu-landscape-dynamics/r.pops.spread/releases/tag/v1.0.0
https://github.com/ncsu-landscape-dynamics/pops-core/releases/tag/v1.0.0
  • Loading branch information
wenzeslaus committed Sep 11, 2020
1 parent 7b5e04a commit 6581502
Show file tree
Hide file tree
Showing 53 changed files with 6,229 additions and 1,702 deletions.
10 changes: 10 additions & 0 deletions grass7/raster/r.pops.spread/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,16 @@ All notable changes to this project should be documented in this file.

The format is based on [Keep a Changelog](http://keepachangelog.com/).

## 2020-04-16 - SEI model

### Added

- Add SEI modeling using model_type and latency_period parameters. (Vaclav Petras)

### Changed

- Reduced scope of mortality_simulation_year variable. (Vaclav Petras)

## 2018-09-18 - July 2019 improvements

### Changed
Expand Down
2 changes: 1 addition & 1 deletion grass7/raster/r.pops.spread/CITATION.cff
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
cff-version: 1.0.3
message: If you use this software, please cite it as below.
message: If you use this software, please cite it using the references in the readme (this file is outdated).
authors:
- family-names: Petras
given-names: Vaclav
Expand Down
4 changes: 2 additions & 2 deletions grass7/raster/r.pops.spread/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ PGM = r.pops.spread
LIBES = $(RASTERLIB) $(GISLIB) $(MATHLIB) $(VECTORLIB) $(DATETIMELIB)
DEPENDENCIES = $(RASTERDEP) $(GISDEP) $(VECTORDEP) $(DATETIMEDEP)
EXTRA_LIBS = $(GDALLIBS) $(OMPLIB)
EXTRA_CFLAGS = $(GDALCFLAGS) -std=c++11 -Wall -Wextra -fpermissive $(OMPCFLAGS) $(VECT_CFLAGS)
EXTRA_INC = $(VECT_INC)
EXTRA_CFLAGS = $(GDALCFLAGS) -std=c++11 -Wall -Wextra -Werror=return-type -fpermissive $(OMPCFLAGS) $(VECT_CFLAGS)
EXTRA_INC = $(VECT_INC) -Ipops-core/include

include $(MODULE_TOPDIR)/include/Make/Module.make

Expand Down
139 changes: 100 additions & 39 deletions grass7/raster/r.pops.spread/README.md
Original file line number Diff line number Diff line change
@@ -1,38 +1,75 @@
# r.pops.spread

This is a GRASS GIS module *r.pops.spread* for simulating spread of
pests and pathogens.
pests and pathogens. The module is a GRASS GIS interface to the PoPS
(Pest or Pathogen Spread) model implemented in C++ library maintained
in the [PoPS Core repository](https://github.com/ncsu-landscape-dynamics/pops-core).

This is a GRASS GIS interface to PoPS (Pest or Pathogen Spread) model
which is a C++ library maintained in this repository:
The purpose of the *r.pops.spread* module is to provide easy way of
running the model in GRASS GIS environment once you have calibrated
the model for your purposes. You can obtain the calibration from a
colleague or published work or you can calibrate the model manually (in
GRASS GIS) or use the R interface to PoPS called
[rpops](https://github.com/ncsu-landscape-dynamics/rpops) to do that.

https://github.com/ncsu-landscape-dynamics/PoPS
Note: Earlier versions of this module were called *r.spread.pest* and
*r.spread.sod*.

Note: Former names of the r.pops.spread are r.spread.pest and r.spread.sod.
## How to cite

## References
If you use this software or code, please cite the following papers:

Please, in addition to citing or acknowledging this software, cite the
following papers:
* Ross K. Meentemeyer, Nik J. Cunniffe, Alex R. Cook, Joao A. N. Filipe,
Richard D. Hunter, David M. Rizzo, and Christopher A. Gilligan, 2011.
Epidemiological modeling of invasion in heterogeneous landscapes:
spread of sudden oak death in California (1990–2030).
*Ecosphere* 2:art17.
[DOI: 10.1890/ES10-00192.1](https://doi.org/10.1890/ES10-00192.1)

Ross K. Meentemeyer, Nik J. Cunniffe, Alex R. Cook, Joao A. N. Filipe,
Richard D. Hunter, David M. Rizzo, and Christopher A. Gilligan 2011.
Epidemiological modeling of invasion in heterogeneous landscapes:
spread of sudden oak death in California (1990–2030).
*Ecosphere* 2:art17.
[DOI: 10.1890/ES10-00192.1](https://doi.org/10.1890/ES10-00192.1)
* Tonini, Francesco, Douglas Shoemaker, Anna Petrasova, Brendan Harmon,
Vaclav Petras, Richard C. Cobb, Helena Mitasova,
and Ross K. Meentemeyer, 2017.
Tangible geospatial modeling for collaborative solutions
to invasive species management.
*Environmental Modelling & Software* 92: 176-188.
[DOI: 10.1016/j.envsoft.2017.02.020](https://doi.org/10.1016/j.envsoft.2017.02.020)

Tonini, Francesco, Douglas Shoemaker, Anna Petrasova, Brendan Harmon,
Vaclav Petras, Richard C. Cobb, Helena Mitasova,
and Ross K. Meentemeyer.
Tangible geospatial modeling for collaborative solutions
to invasive species management.
*Environmental Modelling & Software* 92 (2017): 176-188.
[DOI: 10.1016/j.envsoft.2017.02.020](https://doi.org/10.1016/j.envsoft.2017.02.020)
In case you are using the automatic management feature in rpops or the
steering version of r.pops.spread (from the branch steering), please
cite also:

## Obtaining the latest code
* Petrasova, A., Gaydos, D.A., Petras, V., Jones, C.M., Mitasova, H. and
Meentemeyer, R.K., 2020.
Geospatial simulation steering for adaptive management.
*Environmental Modelling & Software* 133: 104801.
[DOI: 10.1016/j.envsoft.2020.104801](https://doi.org/10.1016/j.envsoft.2020.104801)

The PoPS library is in a submodule, so use `--recursive` when cloning,
In addition to citing the above paper, we also encourage you to
reference, link, and/or acknowledge specific version of the software
you are using for example:

* *We have used rpops R package version 1.0.0 from
<https://github.com/ncsu-landscape-dynamics/rpops>*.

## Download

### Download and install

The latest release of the *r.pops.spread* module is available in GRASS GIS Addons repository
and can be installed directly in GRASS GIS through graphical user
interface or using the following command:

```
g.extension r.pops.spread
```

Alternatively, you can obtain latest source code here and install it
from this repository (see below).

### Source code download

Just use Git, but note that the
PoPS Core library is in a submodule, so use `--recursive` when cloning,
for example:

```
Expand All @@ -45,7 +82,16 @@ If you have already cloned, you can obtain the submodules using:
git submodule update --init
```

## Updating submodule to latest version
Note that downloading as ZIP won't include the source code for the submodule,
so downloading as ZIP is not useful for this repo.

## Contributing

Please see the [pops-core](https://github.com/ncsu-landscape-dynamics/pops-core#readme) repository
for contributing best practices and release policies.
Other than that, just open pull requests against this repo.

### Updating submodule to latest version

To update the submodule, i.e. update submodule's commit used in this
repository, use:
Expand All @@ -61,7 +107,7 @@ particular commit in the submodule repository (rather than the latest
version). Git works this way to avoid breaking things unexpectedly due
to changes in the submodule repository.

## Updating the code of the submodule
### Updating the code of the submodule

```
cd pops
Expand All @@ -77,21 +123,20 @@ git commit pops -m "update to latest pops commit"
git push
```



## The files

The main.cpp contains the main program to run.
The `main.cpp` file contains the main program to run.
The model is in `pops-core/include/pops-core` directory.

## To run the model

You can use Linux to run the model in the following way.

Open an terminal and install dependencies:

sudo apt-get install grass-dev
sudo apt-get install grass grass-dev

Download the model code as ZIP or using Git:
Download this repo using Git (see above):

git clone ...

Expand All @@ -103,20 +148,36 @@ Compile:

grass --tmp-location XY --exec g.extension module=r.pops.spread url=.

Run:
Run (assuming you checked how to create a GRASS GIS mapset with our data):

grass .../modeling/scenario1 --exec r.pops.spread ...

## Authors
## Authors and contributors

### Authors

_(alphabetical order)_

* Chris Jones
* Margaret Lawrimore
* Vaclav Petras
* Anna Petrasova

### Previous contributors

_(alphabetical order)_

* Francesco Tonini (original R version)
* Zexi Chen (initial C++ version)
* Vaclav Petras (parallelization, GRASS interface, raster handling, ...)
* Anna Petrasova (single species simulation)
* Zexi Chen
* Devon Gaydos
* Francesco Tonini

See [CHANGELOG.md](CHANGELOG.md) for details about contributions.
See Git commit history, GitHub insights, or CHANGELOG.md file (if present)
for details about contributions.

## License

This program is free software under the GNU General Public License
(>=v2). Read the file LICENSE for details.
Permission to use, copy, modify, and distribute this software and its documentation
under the terms of the GNU General Public License version 2 or higher is hereby
granted. No representations are made about the suitability of this software for any
purpose. It is provided "as is" without express or implied warranty.
See the GNU General Public License for more details.

0 comments on commit 6581502

Please sign in to comment.