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 10 forks source link

Undocumented units conversion with Wind Speed #134

Closed tucker-furniss closed 2 years ago

tucker-furniss commented 3 years ago

Hi folks,

I've noticed that the MeanWindSpeed (and EffectiveWindSpeed) values in the scrapple-events-log are much (3-4 times) higher than the Wind Speed values for the corresponding fire day in the ClimateFile. I finally diagnosed the issue: MeanWindSpeed in the scrapple-events-log is always 3.6 times higher than the wind speed values for that ecoregion specified by the ClimateFile. Wind speed in the climate file is in meters / second, but it appears that the MeanWindSpeed used in SCRAPPLE is in kilometers / hour.

I don't see this as a problem, but units need to be reported in either the SCRAPPLE metadata file (ClimateFireEventsLog_Metadata.xml), or in the SCRAPPLE User Guide, or preferably both. Failure to report units makes it appear that this inconsistency is due to a problem with the model, and it takes a long time to parse out exactly what is going on. I recognize how difficult it must be to keep track of units in / units out for all the various extensions, but perhaps it would be useful to have a master units document that contains information about what units are expected and what unit conversions are implemented within each extension? Again, I know this would take some work, but the lack of clarity regarding units with model outputs is a persistent difficulty and can cause major downstream problems for end users.

Many thanks for considering it, -Tucker

P.S. I dug through the source code, and I was never actually able to figure out where this unit conversion was happening. So I am not 100% sure exactly what's going on, only that the output wind speed is always exactly 3.6 times higher than the input wind speed.

ZacharyRobbins commented 3 years ago

Hi Tucker, I will put some time into this. However, it is not the SCRPPLE code that is converting your wind speed, it is the climate library. I am not sure why

See ln 97 here https://github.com/LANDIS-II-Foundation/Library-Climate/blob/8a08d93e89f2f2bd789a7ae6b0c55ed28c4206e7/src/ClimateFileFormatProvider.cs

Can you compare your climate input to your future spin-up log? I don't have the wind on for spread in my model currently (Other than FWI calculations), are you getting 3 times as much spread as anticipated in your spread equation?

I can test this also, and will put my priority on resolving it. I also hope you know I hear your larger complaint. I would also love for those things to exist, and I appreciate you identifying what needs to be changed in the metadata.

ZacharyRobbins commented 3 years ago

Also, this being said. If you fit the model using the LANDIS-II climate file (say by ecoregion), then the conversion would be carried over in both instances. Still a bug though.

tucker-furniss commented 3 years ago

Hi Zachary, Thanks very much for helping track down where that unit conversion was happening. Fortunately, I was calibrating the wind speed beta values using the range of wind speed values in the climate file, so the unit conversion wasn't causing any problems with my fire spread probabilities.

I recognize how difficult it must be to keep track of the details like this with so many people simultaneously developing the various LANDIS-ii extensions. I guess this was perhaps an issue better fit for the Climate Library repository, but I really appreciate you taking the time to isolate the source of the conversion! I don't think any actual changes are necessary, it would just be useful to have the units documented somewhere so that the beta values can be calibrated correctly.

Many thanks for your help, on this issue and all the others! -Tucker

ZacharyRobbins commented 3 years ago

Hey Tucker, I am working to make sure everything is documented for the next update in Sept. Hopefully this comment will inform others in the meantime.

rmscheller commented 2 years ago

Additional information added, thanks, Tucker!