BurnP3 / BurnP3Plus

A SyncroSim package to explore fire risk and susceptibility across a landscape.
https://burnp3.github.io/BurnP3Plus/
MIT License
7 stars 4 forks source link

[Burn-P3+ Bug]: Unclear what fuels actually need to be added #21

Open BadgerOnABike opened 7 months ago

BadgerOnABike commented 7 months ago

Contact Details

brett.moore@nrcan-rncan.gc.ca

What happened?

Throws an error with more fuels than just the one that needs to be added in.

What component are you seeing the problem on?

R

Relevant log output

image

image

That goes all the way up to 900 series.

33 was what I was actually missing.

Approvals Process

shreeramsenthi commented 7 months ago

This is the line in BP3+ C2F that is responsible for that check:

https://github.com/BurnP3/BurnP3PlusCell2Fire/blob/bda7a8862dd85e04c7d89607673268b632df6624/src/growth-cell2fire.R#L249

I think that second argument to setdiff should just pull out Fuel ID as a numeric vector since fuelIdsPresent is numeric, but I think that's what we were doing before and based on the git commit it looks like you had to change that as part of the data.table migration.

I'm also not sure what happens when you pass str_c() a data.frame. Maybe we could just use FuelType[,"ID"]?