Skip to content

Commit

Permalink
Proper FuelType Check
Browse files Browse the repository at this point in the history
  • Loading branch information
BadgerOnABike committed Sep 18, 2024
1 parent 266ac13 commit 2975dc8
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion R/fire_behaviour_prediction.r
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ fire_behaviour_prediction <- function(
# set local scope variables from the parameters for simpler to referencing
names(input) <- toupper(names(input))
ID <- input$ID
FUELTYPE <- if(is.null(input$FUELTYPE))stop("FuelType does not exist in input, it is necessary for FBP calculation") else (toupper(input$FUELTYPE))
FUELTYPE <- input$FUELTYPE
FFMC <- input$FFMC
BUI <- input$BUI
WS <- input$WS
Expand Down Expand Up @@ -84,6 +84,7 @@ fire_behaviour_prediction <- function(
)
FUELTYPE <- rep("C2", n0)
}
FUELTYPE <- toupper(FUELTYPE)
if (!exists("FFMC") | is.null(FFMC)) {
warning(
paste0(
Expand Down

0 comments on commit 2975dc8

Please sign in to comment.