Skip to content

Commit

Permalink
fix: ls_fD8 to ls_mD8
Browse files Browse the repository at this point in the history
  • Loading branch information
gisler committed Dec 27, 2024
1 parent 330cb55 commit f86c1bb
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 8 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Package: RPhosFate
Type: Package
Title: Soil and Chemical Substance Emission and Transport Model
Version: 1.0.4.9004
Version: 1.0.4.9005
Authors@R: person("Gerold", "Hepp", email = "[email protected]", role = c("aut", "cre"))
Description: An enhanced version of the semi-empirical, spatially distributed
emission and transport model PhosFate implemented in 'R' and 'C++'. It is
Expand Down Expand Up @@ -41,7 +41,7 @@ Suggests:
LinkingTo:
Rcpp,
RcppArmadillo
RoxygenNote: 7.3.1
RoxygenNote: 7.3.2
Roxygen: list(markdown = TRUE)
VignetteBuilder: knitr
Collate:
Expand Down
2 changes: 1 addition & 1 deletion NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ This version introduces a new flow method, but also comes with several breaking
* `DEMrelatedInput()` function changes:
* Considerable adjustments to reflect the aforementioned input data changes.
* Addition of `ns_cha` argument: allows for specifying the minimum D8 flow accumulation determining a channel.
* Addition of `ls_fD8` argument: allows for mimicking D8 flow directions by rounding the D-infinity flow directions to the nearest multiple of 45 degrees. Please note that this treatment is always applied to channel cells independently of this argument.
* Addition of `ls_mD8` argument: allows for mimicking D8 flow directions by rounding the D-infinity flow directions to the nearest multiple of 45 degrees. Please note that this treatment is always applied to channel cells independently of this argument.
* Removal of the `cs_wgs` and `cs_dir` arguments: These input data are no longer supported for the time being.
* Switched to utilising the `SpatRaster` and `SpatVector` classes from the `terra` package instead of the `RasterLayer` class from the `raster` and the `Spatial*DataFrame` classes from the `sp` packages.
* Added `is_ths` argument to the `RPhosFate()` and `catchment()` constructors: allows for specifying the number of threads to use for processing, where applicable.
Expand Down
6 changes: 3 additions & 3 deletions R/input.R
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ demoProject <- function(cs_dir = tempdir(TRUE)) {
#' shall be burnt.
#' @param is_ths An integer scalar specifying the number of threads to use for
#' processing, where applicable.
#' @param ls_fD8 A logical scalar specifying if D8 flow directions shall be
#' @param ls_mD8 A logical scalar specifying if D8 flow directions shall be
#' mimicked, i.e. the D-infinity flow directions are rounded to the nearest
#' multiple of 45 degrees. Please note that this treatment is always applied
#' to channel cells independently of this argument.
Expand Down Expand Up @@ -161,7 +161,7 @@ DEMrelatedInput <- function(
ns_brn = 50,
is_adj = 1L,
is_ths = 1L,
ls_fD8 = FALSE,
ls_mD8 = FALSE,
ls_tmp = FALSE
) {
if (!requireNamespace("whitebox", quietly = TRUE) ||

Check warning on line 167 in R/input.R

View workflow job for this annotation

GitHub Actions / Lint Code Base

file=/github/workspace/R/input.R,line=167,col=8,[missing_package_linter] Package 'whitebox' is not installed.
Expand Down Expand Up @@ -353,7 +353,7 @@ DEMrelatedInput <- function(

rl_dir_inf[rl_dir_inf == -1] <- NA_real_

if (ls_fD8) {
if (ls_mD8) {
rl_dir_inf <- app(
rl_dir_inf,
function(x) {
Expand Down
1 change: 1 addition & 0 deletions RPhosFate.Rproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
Version: 1.0
ProjectId: b59480b2-0069-4152-b8f8-1272b262a933

RestoreWorkspace: Default
SaveWorkspace: Default
Expand Down
4 changes: 2 additions & 2 deletions man/DEMrelatedInput.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit f86c1bb

Please sign in to comment.