silvxlabs / quicfire-tools

Input and output tools for working with QUIC-Fire
MIT License
3 stars 0 forks source link

fuel_flag and moisture_flag 3 used for QF v5 #170

Closed ntutland closed 2 days ago

ntutland commented 5 months ago

When setting custom fuels, the moisture and fuel flags are set to 3 instead of 4, which don't seem to work in qf version 5. I can't remember if flag 3 works for v6 so we never changed it, or if we did change it but only for v6 and not v5. Probably not hard to fix but I don't have time right now. Leaving it as a cold fix since I don't think too many people are using v5 anymore

amarcozzi commented 5 months ago

If I remember right fuel flag 4 interpolates the fuels data to the fuel grid. This is more a QF thing than a qf-tools thing, but I've had it happen where QF doesn't like my .dat files (even if they're the same shape as the fuel grid) and I have to use fuel flag 4 to interpolate. Does this happen with QF v6 as well?

A potentially easy fix is to add an interpolate_flag: bool = True argument to the setter method. If interpolate_flag is True it sets the fuel flags to 4, otherwise it sets them to 3. What do you think of that?

ntutland commented 5 months ago

You're correct about the distinction between flags 3 and 4, and yeah I'm pretty sure it's a quicfire bug. I think it only happens when using custom dat files but non-custom ignitions. I can't remember if it got fixed in v6 or not. I feel like we were maybe going to issue a warning but never did? The interpolate_flag argument could work well as a quick fix. I don't think there are any downsides to using the interpolation even when the resolution is the same, so maybe we just default it to 4

ntutland commented 4 months ago

Update, I believe this also happens in v6