LANDIS-II-Foundation / Extension-Social-Climate-Fire

Social and Climate-driven fire extension.
https://landis-ii-foundation.github.io/Extension-SCRPPLE/
Apache License 2.0
2 stars 11 forks source link

Not all landscapes have Min RH, which can create negative values of landscapeAverageRH for ignitions #113

Closed mslucash closed 3 years ago

mslucash commented 3 years ago

If you don't supply MinRH for your landscape, then RHmin=-99, and then landscapeAverageRelHumidity ends up being like -55. landscapeAverageRelHumidity += weatherData.DailyMinRH[day] * climateRegionFractionSites;

So I'm proposing these code changes at L314 of PlugIn: if (weatherData.DailyMinRH[day] == -99.0) { double relativeHumidity = AnnualClimate_Daily.ConvertSHtoRH(weatherData.DailySpecificHumidity[day], weatherData.DailyTemp[day]); if (relativeHumidity > 100) { relativeHumidity = 100.0; } landscapeAverageRelHumidity += relativeHumidity climateRegionFractionSites; } else { landscapeAverageRelHumidity += weatherData.DailyMinRH[day] climateRegionFractionSites; } // modelCore.UI.WriteLine(" Fire Weather Check Daily={0}, Average={1}", weatherData.DailyFireWeatherIndex[day], landscapeAverageFireWeatherIndex); }

mslucash commented 3 years ago

Actually it's only used for Rx fire. And code will also need to be adjusted later in the code as well.

image

rmscheller commented 3 years ago

Thanks for the catch. This was pushed to the upcoming release, v3.