DrylandEcology / STEPWAT2

folder
4 stars 5 forks source link

Allow calculation of wildfire probability as long as at least one functional type belonging to afg and pfg is present in inputs #533

Closed kpalmqui closed 1 year ago

kpalmqui commented 1 year ago

Currently the calculation of wildfire probability will fail if any functional type belonging to annual forbs and grasses (afg) or perennial forbs and grasses (pfg) is not present in the input files (e.g. rgroup.in). This is despite the fact that another functional type that represents either afg or pfg may be present in inputs. For example, p.cool.forb might be absent from inputs, but p.warm.forb is present (thus calculation of pfg biomass is possible).

This enhancement will allow wildfire probability to be calculated as long as at least one functional type belonging to afg and at least one functional type belonging to pfg is present in inputs.

afg = a.cool.forb, a.warm.forb, a.cool.grass pfg = p.cool.forb, p.warm.forb, p.cool.grass, p.warm.grass

@mnovo323 will add details on the proposed code implementation

kpalmqui commented 1 year ago

@mnovo323 let's also implement a logwarning here when there is no functional type specified in inputs that represents afg and/or pfg

alexisBelt commented 1 year ago

Commenting out any of the rgroups seems to result in a segment fault.