SHO Weather Generator: Difference between revisions
(12 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
* PHP script that produces quasi-realistic weather scenarios from real weather data | * PHP script that produces quasi-realistic weather scenarios from real weather data | ||
* Uses | * Uses real weather data from OpenWeatherMap.org in sqlite databases | ||
* Produces weather scenarios based on probabilities derived from real weather data metrics | * Produces weather scenarios based on probabilities derived from real weather data metrics | ||
* Supports weather parameters like Conditions (Sunny, Cloudy, Overcast, Rainy, Storm), Ambient Temperature, Track Temperature, and Track On/Off Path Initial Wetness | * Supports weather parameters like Conditions (Sunny, Cloudy, Overcast, Rainy, Storm), Ambient Temperature, Track Temperature, and Track On/Off Path Initial Wetness | ||
Line 9: | Line 9: | ||
** A single weather scenario can be generated in less than 100ms covering 7 distinct weather sessions and each containing up to 24 hours worth of weather progression. | ** A single weather scenario can be generated in less than 100ms covering 7 distinct weather sessions and each containing up to 24 hours worth of weather progression. | ||
** On an i7 2600 32GB RAM with SSDs, it takes: | ** On an i7 2600 32GB RAM with SSDs, it takes: | ||
*** | *** 3-5min to generate realtime and 10/15/20/30/60/120min slots weather for ~100 tracks x 12 months x 10 weather scenarios | ||
*** | *** 9-26min for ~ x 100 weather scenarios | ||
*** | *** 1-5h for ~ x 1000 weather scenarios | ||
*** The ranges are because some weather file types take longer than others. 120min slots are the fastest with least bytes generated, 10min slots take longer, and realtime is slowest with most most bytes generated. | |||
*** For example, in the 1000 weather scenarios case, you would only need 1h for slots and it takes 4 more hours to complete the realtime files | |||
*** 2024-11-05 Benchmark: 10ct - 3m40s | 100ct - 19m03s | 1000ct - 3h24m | |||
**** Added xargs location-parallelization for realtime (slots might benefit from the same change but already has parallelization by slot length) | |||
** 8.8 Million files generated for the 1000 weather scenarios variation | |||
** The algorithm could be extracted, ported, and put inside another program to enable seamless weather scenarios in-game | ** The algorithm could be extracted, ported, and put inside another program to enable seamless weather scenarios in-game | ||
*** For example, maybe one day the algorithm is included as a DLL with the Crew Chief GTR2 Enhancements Plugin which transparently and seamlessly generates a weather scenario when you load into a track | *** For example, maybe one day the algorithm is included as a DLL with the Crew Chief GTR2 Enhancements Plugin which transparently and seamlessly generates a weather scenario when you load into a track | ||
'''Related:''' | '''Related:''' | ||
* | * Data consumed: [[Weather_Data#Racing_Circuits_Real_Weather_Data|Racing Circuits Real Weather Data]] | ||
* | * Generated weather files used by [[Modernizing_GTR2_with_the_Crew_Chief_GTR2_Enhancements_Plugin#Real_Weather|Crew Chief GTR2 Enhancements Plugin Custom Weather]] to power real weather scenarios in GTR2 | ||
* Release notes: [[Modernizing_GTR2_with_the_Crew_Chief_GTR2_Enhancements_Plugin#Real_Weather|Crew Chief GTR2 Enhancements Plugin Custom Weather]] | |||
== Download == | == Download == | ||
* [https://1drv.ms/u/s!AqWsLwV2vzN8h_tgI5YiaZ371oEHdQ?e=hhC11P Download (744 KB)] | * 2024-11-06: [https://1drv.ms/u/c/7c33bf76052faca5/EYgljsjD-fZMm5i2-8nFcG4B_n2dRjLgJ7XDe2hvgQHtHQ?e=ynE3mg Download (747 KB)] | ||
* 2024-10-06: [https://1drv.ms/u/s!AqWsLwV2vzN8h_tgI5YiaZ371oEHdQ?e=hhC11P Download (744 KB)] | |||
== Buy me a coffee == | |||
Donate to [mailto:paypal@shovas.ca paypal@shovas.ca] or send <span style="color: Green;">BTC Bitcoin</span> to bc1q8nwwnwp9zljndlcaw4jcmj0yfyqe69fa5k54dm, <span style="color: Green;">LTC Litecoin</span> to ltc1qljlmg5673q6j0s5cmxk4ggyn0x5d4npaw25vah, <span style="color: Green;">DOGE Dogecoin</span> to DSMwwdHqJ3LMxPe1HiGgNKsWBY2jPi2RwW, or <span style="color: Green;">XRP Ripple</span> to rGUoiGSjhsM14sPyePao1eqvjD6sXa1uLL. Thank you! | |||
== Getting Started == | == Getting Started == |
Revision as of 18:38, 6 November 2024
Description
- PHP script that produces quasi-realistic weather scenarios from real weather data
- Uses real weather data from OpenWeatherMap.org in sqlite databases
- Produces weather scenarios based on probabilities derived from real weather data metrics
- Supports weather parameters like Conditions (Sunny, Cloudy, Overcast, Rainy, Storm), Ambient Temperature, Track Temperature, and Track On/Off Path Initial Wetness
- Outputs real-time and slots-based weather scenarios generated from templates
- Fast and scalable:
- A single weather scenario can be generated in less than 100ms covering 7 distinct weather sessions and each containing up to 24 hours worth of weather progression.
- On an i7 2600 32GB RAM with SSDs, it takes:
- 3-5min to generate realtime and 10/15/20/30/60/120min slots weather for ~100 tracks x 12 months x 10 weather scenarios
- 9-26min for ~ x 100 weather scenarios
- 1-5h for ~ x 1000 weather scenarios
- The ranges are because some weather file types take longer than others. 120min slots are the fastest with least bytes generated, 10min slots take longer, and realtime is slowest with most most bytes generated.
- For example, in the 1000 weather scenarios case, you would only need 1h for slots and it takes 4 more hours to complete the realtime files
- 2024-11-05 Benchmark: 10ct - 3m40s | 100ct - 19m03s | 1000ct - 3h24m
- Added xargs location-parallelization for realtime (slots might benefit from the same change but already has parallelization by slot length)
- 8.8 Million files generated for the 1000 weather scenarios variation
- The algorithm could be extracted, ported, and put inside another program to enable seamless weather scenarios in-game
- For example, maybe one day the algorithm is included as a DLL with the Crew Chief GTR2 Enhancements Plugin which transparently and seamlessly generates a weather scenario when you load into a track
Related:
- Data consumed: Racing Circuits Real Weather Data
- Generated weather files used by Crew Chief GTR2 Enhancements Plugin Custom Weather to power real weather scenarios in GTR2
- Release notes: Crew Chief GTR2 Enhancements Plugin Custom Weather
Download
- 2024-11-06: Download (747 KB)
- 2024-10-06: Download (744 KB)
Buy me a coffee
Donate to paypal@shovas.ca or send BTC Bitcoin to bc1q8nwwnwp9zljndlcaw4jcmj0yfyqe69fa5k54dm, LTC Litecoin to ltc1qljlmg5673q6j0s5cmxk4ggyn0x5d4npaw25vah, DOGE Dogecoin to DSMwwdHqJ3LMxPe1HiGgNKsWBY2jPi2RwW, or XRP Ripple to rGUoiGSjhsM14sPyePao1eqvjD6sXa1uLL. Thank you!
Getting Started
- See README.txt in the download
Sim Support
- Supported:
- GTR2 Weather File Format (ie. UserData\Log\weather.txt)
- Future:
- Since output files are generated from templates, the code could be updated to support other file formats
- The algorithm and data could be included in other software directly
What does SHO stand for?
SHO is the first three letters of my username (Shovas) but also happens to be an acronym used by Ford, which stands for "Super High Output", so I feel it's an appropriately fun acronym for a sim racing mod :)
License
SHO Weather Generator © 2024 by Shovas is licensed under Creative Commons Attribution-NonCommercial 4.0 International. This license requires that users give credit to the creator. It allows users to distribute, remix, adapt, and build upon the material in any medium or format, for noncommercial purposes only.
View the full license here: http://creativecommons.org/licenses/by-nc/4.0/
You don't have to ask permission for legitimate uses. You just have to give credit.
I think this provides clarity and is a nice compromise that maintains modding freedom while protecting the people that made them from losing credit to their work and against people who would cut out authors from profit from copying it.