Jump to content

cmet24

Members
  • Posts

    32
  • Joined

  • Last visited

Everything posted by cmet24

  1. @Bit Fiddler What you describe is definately possible, although it is not what KWP was originally designed for. That said, if you wanted to create your own mod that solely implented vertical motions (i.e. udrafts/downdrafts) that would be totally doable. The implementation of wind in KWP is found here. If your familiar with C# you might find this module helpful, particular lines 191-300. You could use this code as a baseline for adding adding vertical wind to the game.
  2. @blackrack Excellent questions! Your correct. Currently, the API is set up to request point data. I honestly have little knowledge of rendering textures in KSP. That said, I do think it would be possible to pass a 2D array (with a timestamp) containing cloud cover data for the entire planet. The issue is that the GIF showed in the first post was produced from the full MPAS simulation. The climatological data used in the mod was averaged by hour (across 5-years of data) so that it could be loaded during gameplay. Taking a look at the MPAS cloud cover data it appears that a full year (2557 hours) of data at 1 x 1 deg resolution (~24 km on Kerbin) is around 633 MB. That said, there are ways the data could be compressed. The horizontal resolution could be halved and the time-series could be sliced to retrieve cloud cover data over a smaller chunk of the year. Regarding the simulation. MPAS is a state of the art global climate model for Earth! It was developed by scientists at Los Alamos National Laboratory (COSIM) and the National Center for Atmospheric Research. I got MPAS to work for Kerbin because Kerbin is actually quite similar to earth in terms of atmospheric composition and solar irradiance. Modelling planets whose atmospheric composition differs significantly from Earth's (e.g. Mars, Venus, etc.) is quite tricky because a lot of the assumptions that are made in Earth-based climate models break down big-time! NASA does have a model for simulating the climate of exoplanets and other Solar System terrestrial planets. In my experience, their model is quite difficult to customize. To simulate custom KSP planets there would have to be an easy way to modify the surface terrain within the model. With respect to model performance, I ran MPAS with half precision. I also choose to output only variables which I found necessary for understanding Kerbin's climate. I used 55 vertical levels to ensure model stability. When your running a numerical weather model with a vertical top of 70-km you need to have quite a few layers to adequately resolve vertical motions and vertically propagating waves. For the MPAS models runs, perhaps around 1/4 - 1/3 of the RAM was used. This is because numerical weather prediction at coarse resolution (1 x 1 degree) is largely constrained by computation limits (CPU clock speed). When you increase the horizontal resolution of the model that's when your RAM usage goes up! It'd be nice if one could run numerical weather models on a high-end GPUs. Nevertheless, porting millions of lines FORTRAN code to run on modern GPUs remains an ongoing and challenging process. There are a few industry leaders (Nividia/IBM) and quite a few Ph.D. students working on this very problem. Unfortunately, MPAS does not yet have the capability to utilize GPUs. As an aside, I think the real power of KWP is the framework it provides for incorporating meteorological data into gameplay. One could produce a climatological (4D) dataset for their planet and use KWP's framework to implement that data into the game. The challenge is how to produce that climatology. Modders could design their own or modify existing data from real terrestrial planets. Either way it's not all about realism. For me its really all about having fun with meteorology and KSP!
  3. @RocketRyleigh The full MPAS simulation with 5-years of data is on the order of ~0.5 TB. Obviously we can't load all this data into the game! So, as a compromise I compressed the simulation data into two datasets: point weather data (1) and climatological data (2). The point weather data was drawn from the MPAS simulation at the latitude/longitude of each launch site. Thus, at each launch site, the dataset has two dimensions: height and time. This means that if you were to load the KSC launch site and fly around the planet you wouldn't notice a big surface temperature drop as you headed toward the poles since the point weather data was extracted from an equatorial site! The point of including point weather data was to allow for a more dynamic simulation of weather at a single point. When you use the point weather data, the weather will be different every day at the launch site! This is great for roleplaying rocket launches since, when you launch a rocket equatorially, most of your time in the atmosphere is spent relatively close (latitudinally) to the KSC. Climatological data was drawn from the MPAS simulation at all latitude and longitudes across Kerbin. However, the climatological data was averaged along the hourly dimension over a period of 5-years. The result is a dataset that has the following dimensions: height, latitude, longitude, hour. Consequently, the climatological data provides data that will be the same day every day but that will vary by hour (simulating a diurnal cycle) and by location! So, the climatological data isn't the best for roleplaying rocket launches since the temperature, pressure, etc. will repeat each day. However, it is quite nice for atmospheric flight! If you like flying around Kerbin then climatological data is for you! When using climatological data you can actually experience the jet stream as you fly at altitude across the mid-latitudes. If you fly from the KSC to the poles you'll find the air density and surface temperature changes quite a bit! In addition, if you launch a satellite orbiting Kerbin you can use climatological data to remotely sense atmospheric conditions at the point below you. TLDR: The point weather dataset was designed for roleplaying rocket launches from fixed sites. The climatological dataset was designed for atmospheric flight and passive remote sensing (i.e. when in space). When you run KWP both the point and climatological weather data are loaded. Thus the performance impact between the two should be negligible. Calculations performed in KWP related to meteorological data are mostly limited to linear interpolations.
  4. KWP has been updated to version 1.0.7 Compatibility update. Updated static file paths to platform-independent file paths. Updated KSP compatibility version to 1.12.3 Thanks to @CraigCottingham for pointing out hardcoded file paths which compromised compatibility on Unix systems.
  5. @blackrack Your correct. The addition of forces to individual parts results in greater performance impacts when part counts are high. In the initial release there was a bug wherein forces were applied to occluded parts. This bug was fixed in a previous release (1.0.5). To examine the latest performance stats I unlocked the framerate and tested three KSP crafts from KerbalX: A-6E-Intruder A-10A A7100-100 Below are my results with and without KWP for each craft (links show screenshots): 1. A-6E-Intruder (127 parts) Stock: 61 FPS KWP: 60 FPS For the A-6E craft the difference in framerate was negligible. 2. A-10A (267 parts) Stock: 33 FPS KWP: 22 FPS For the A-10A craft the difference in framerate was more notable. In the stock playthrough framerates hovered around 30 FPS whereas in the KWP playthrough framerates were in the low 20s. On average, I'd say framerates were reduced by about 10 FPS (~33%) between stock and KWP. 3. A7100-100 (639parts) Stock: 9 FPS KWP: 7 FPS For the A7100-100 craft the difference in framerate wasn't terribly noticeable as the game ran quite slowly regardless of whether KWP was installed or not. Stock framerates were around 8-9 FPS while KWP framerates averaged out at ~7 FPS. I haven't tested the performance with the "Lite" version of the mod. I suspect the only difference observed would be in the MEM and/or RAM usage. During testing the following mods were used in each playthrough. The game version was KSP 1.12.2. KWP Playthrough: Click Through Blocker Toolbar Controller Zero MiniAVC AtmosphereAutopilot (Fly-By-Wire) Kerbal Weather Project (KWP) MechJeb2 ModularFlightIntegrator Module Manager Stock Playthrough: AtmosphereAutopilot (Fly-By-Wire) MechJeb2 Module Manager
  6. @charliepryor This is correct. Wind direction is displayed in the meteorological sense, that is in the direction the wind is coming from. So, if you launch a balloon when the winds are out of the west you should expect it to drift downrange, in the opposite direction, toward the east. When the climate tab is selected KWP will use climatological data which varies geographically, vertically, and diurnally. When the weather tab is selected KWP will use weather data that varies with height and time and is only valid for a fixed location (i.e. the launch site). The difference between the two datasets is further elucidated below and on the mod webpage. Climate Data Atmospheric fields (e.g. temperature, humidity, pressure, etc.) from the MPAS simulation were interpolated to a 1 x 1-degree rectangular grid. A five-year, hourly, climatology of Kerbin was produced by averaging this gridded weather data over time. Since the data is averaged by the hour the climatology captures the diurnal (daily) cycle of weather at every point on Kerbin. Weather Data At select Kerbal launch sites, weather time series were extracted from the 1x1 degree gridded weather dataset. These year-long time series allow players to experience dynamic weather that changes each day. Since these time series were retrieved from point locations, the weather varies temporally but not spatially. This is in contrast to the climatology discussed above, wherein the weather varies spatially but does not change from day to day.
  7. I should note that there have been several performance improvements to KWP since its initial release. Also, there is a "Lite" version of the mod that should have minimal impact on framerates. After its initial release I did some performance testing on a desktop and laptop computer. I posted my results in an earlier comment within this forum topic. . FYI: KWP has a built-in API for modders: https://kerbalweatherproject.readthedocs.io/en/latest/index.html If there are folks out there who interested in creating visual addons for KWP the API linked above may be helpful.
  8. KWP has been updated to version 1.0.6 Bugfix to address toolbar and GUI scaling. Modified texture icons for blizzy toolbar compatibility. KWP GUI will now scale with stock UI. Thanks to @charliepryor for pointing out the issue with Blizzy's toolbar and the UI interface. Note: If running KSP at 4K you can adjust the stock UI scale in the game settings (the KWP GUI will scale accordingly). The mod will still run, even if a modified version of Kerbin is present in the game. I just tested KWP with JNSQ installed. The mod executes fine. In JNSQ the atmosphere has a depth of 85 km. Above 70-km the default JNSQ atmosphere is used. Below 70-km the KWP atmosphere is used and weather, wind, etc. will affect flight. Interestingly, when I tested the mod with JNSQ, I didn't real detect any sort of obvious boundary at 70-km where the transition between the KWP atmosphere and JNSQ atmosphere occurs. That said, KWP's weather simulation is wholly inaccurate in JNSQ as the topography and geography of JNSQ's Kerbin is markedly different from stock Kerbin. If you don't care much about accuracy/realism and just want wind effects in your non-stock Kerbin playthrough than you shouldn't have a problem running KWP for any version of Kerbin.
  9. @OHara Sounds good to me! Feel free to fork the repo on GitHub. In designing the mod my original goal was simply to make weather have an influence on flight and reentry. I acknowledge that the implementation of wind in the game is far from perfect (especially on the ground). The game physics are a little finicky, which is part of the reason why I think there are so few wind mods in existence! That said, If you have any ideas on how to improve realism I'm all ears! KWP has been updated to version 1.0.5 Update for KSP 1.12 Fixed issue that prevented fairings from occluding drag. Updated DLL references. Thanks to @Infinite_Maelstrom for pointing out the fairing occlusion bug.
  10. @OHara So the way the wind simulation works, is that it performs vector addition twice. First the total velocity of the vehicle in the absence of wind is calculated (this is the stock velocity). Next the wind velocity vector is subtracted from the stock velocity vector to get an estimate of the true velocity of the vehicle. Now, this calculation alone does nothing. To actually make wind have an impact in the game, forces are applied to the vehicle. In-game forces (e.g. lift and drag) are calculated using the stock velocity estimate and then again using the true velocity estimate. Forces are calculated twice since lift/drag depends upon the velocity of the vehicle. Finally, the difference in the calculated forces, between the stock velocity and true velocity, is computed. This difference in magnitude, representing the force of the wind, is then applied to each part. Note that forces are calculated separately for individual parts. The code for this is available here and is present between lines 190 - 300. Even if you're not familiar with C# I've commented the lines to specify what they do. The ground speed is calculated by the stock game. KWP calculates the true airspeed by subtracting the wind speed from the ground speed. In this convention a negative windspeed (i.e., a headwind) results in a higher airspeed. Relative winds are calculated using vector projection. The code for this is fairly straightforward and is available here (between lines: 387-396)
  11. @SpeacXPersonally, I haven't tried it with RSS. I would give it a try and see what happens! One issue you may run into is that the atmospheric boundary in RSS is higher than in stock KSP. The MPAS data KWP uses is valid up to 70 km ASL. So, if your altitude is above 70-km ASL (and your in the atmosphere) KWP will retrieve weather/climate data from the highest model level (i.e. 70-km). That is there would be no vertical changes in weather/climate data above 70-km. Oddly enough KWP's atmosphere is more similar to Earth's than stock KSP since the scale height in MPAS simulations matches that of Earth (8.5 km) not Kerbin (5.6 km). @traisjames Thanks for sharing your issues. I've yet to re-create this issue myself but when I do hopefully I'll find a fix for it! @Dman979 Pretty well! My university seminar was great. I got a lot of good questions and had a fruitful discussion about global circulation and heat-transport! By the way, I've shared my presentations (poster and seminar slides) on the KWP website where they're available to download.
  12. @ItsJustLuci So precipitation information is included with the mod, and is available to fellow modders via the API. In space, KWP provides information on precipitation rate. That said, there are no visual effects added by this mod. Rain, snow, etc. won't affect your launches. Precipitation, cloud cover, and visibility are provided via the KWP API mainly so that other modders could utilize the data to design visual effects or incorporate it into their mods.
  13. @loki130 So you can run a numerical weather model on your laptop. I've run the Weather Research and Forecasting (WRF) model from my own laptop in the past. However, doing so comes with significant limitations. The main constraint is memory. Memory constraints severely constrain your domain size and model resolution. Swapping out terrain is challenging because it involves not just changing the terrain but a slew of other variables such as land use, vegetation type, green fraction, etc. Alternatively, its feasible to run simpler models on a laptop. For example, a simple two-layer quasi-geostrophic (QG) model or barotropic model (see here). Unfortunately, these simple models don't typically consider the effects of terrain.
  14. @ss8913 Thanks for posting. I caught this issue myself last weekend and just now had time to fix it. This problem with the wind GUI has been resolved in the latest update for KWP (version 1.0.4)
  15. @FleshJeb Thanks! That's an excellent point you make regarding CO2 concentrations. Looking through the MPAS code it appears that the shortwave and longwave radiation schemes use CO2 concentration values from 2005, citing the 2007 IPCC report. In the code the CO2 concentration is set to 379 ppm. Unlike CO2, Ozone (O3 ) is provided from the GFS initialization data, which was retrieved for the year 2017. Since the O3 concentrations in the MPAS Kerbin simulation are derived from Earth data there is actually a minimum in ozone concentration over the southern polar region of Kerbin. This actually results in lower stratospheric temperatures, on Kerbin, being cooler over the south pole than the north pole.
  16. @harbingerdawn thanks for sharing your log. I've been unable to reproduce this issue with just Scatter and KWP (v. 1.0.3) installed. I haven't tested scatter and KWP with all of Nertea's mods yet. Do you have all of Nertea's mods installed or just the near future mods? Screenshot from KSP 1.11 running KWP 1.0.3 and Scatterer v0.0723 (Default Config + Sunflare)
  17. @Fixsme and @WarriorSabe it might be possible to simulate a Laythe like atmosphere using NASA's ROCKE-3D model which can be used for simulations of Titan's atmosphere. Alternatively, you could attempt to re-create conditions one might expect on Laythe by modifying MPAS orbital and planetary parameters until you end up with a climate congruent with the observed biomes. That said, somethings would be difficult to accurately simulate: like atmospheric tides which would be significant on a moon like Laythe! @Cochise Thanks for sharing the log file and mod list. It appears as if the path to the KWP binary weather/climate data was invalid. This should be corrected in the latest release of KWP (v. 1.0.3). If you still run into this issue let me know and I'll see if I can re-create the problem myself.
  18. KWP has been updated to version 1.0.3. Performance Improvements: Removed repetitive/unnecessary OnGUI() calls. Modified WxUnityGui.FixedUpdate() so that data retrieval is only performed when the GUI is active (shown) Bug Fixes: Added SetDifficultyPreset methods eliminating startup errors in log file. Solved issue with OnGUI errors when selecting main UI buttons Fixed issue with FARAtmosphere delegates Modified ModularFlightIntegrator to ensure aero override is not called when FAR is installed. Corrected typo in file path for binary weather and climate data. Thanks to @Gotmachine for cataloging error messages and pointing out performance issues associated with updating the KWP in-game GUI. Also, thanks to @dkavolis for adapting FAR to accommodate third party pressure and temperature values through the FARAtmosphere.
  19. KWP has been updated to version 1.0.2. What is new? Climate and Weather API for modders (see API documentation). Improved compatibility with FAR and other mods using Modular Flight Integrator KWP will now affect pressure and temperature when used with FAR. Fixed Issues: Performance improvements Fixed log spamming when leaving Kerbin SOI Resolved weather toggling issue when FAR is installed. Removed unnecessary calls to FI.BaseFIUpdateThermodynamics(). Deleted unused classes. Corrected calculation of external shock temperature
  20. @Maple Kerman I checked out Gaseous Giganticus (GG) and was able to extract the velocity fields. It appears that with the aid of python it should be possible to project a velocity field on a cubemap to an equirectangular grid. If this was accomplished such a velocity field could be incorporated into a mod like KWP that just focused on adding wind. While @WarriorSabe is correct that the velocity fields generated by GG are probably not realistic, they appear to match the visuals pretty well.
  21. @ballisticfox0 and @eberkain . I think it would be neat to get KWP to the point where it could read in files of a fixed format. If this could be accomplished creators could generate 3-D cliamatologies for their planet of choice which KWP could read and apply to the game's aerodynamic and thermodynamic models. Now, the hard part is actually making those climatologies for planets that aren't Earth like! I mentioned the ROCKE-3D model from NASA which a is an actual GCM used for exoplanet simulations. @Shawn Kerman like MPAS, ROCKE-3D is a fairly complex model and requires some knowledge of FORTRAN and geophysics. Unfortunately, its not straightforward to compile and get up and running. Its mostly Ph.D.'s that are running these sorts of models. That said, you don't have to use a full general circulation model. If someone wanted to make a simple atmospheric model like a batrotropic vorticity model they could do so, even though it might be not be very realistic. KWP's biggest advancement is providing a framework for incorporating atmospheric data into KSP in a way that influences gameplay. So a simple atmospheric model for say Eve could be generated (e.g. a super-rotating atmosphere like Eve's would likely have a single equatorial jet stream, with light winds near the surface increasing with height to around 100-200 m/s winds between 30-50 km). Perhaps this summer, if I have the time, I may look into running ROCKE-3D again. Its actually easier to do on planets without oceans like Duna. Its possible I could use MPAS to simulate Laythe's atmosphere as well.
  22. @FreeThinkerThanks for the information. Getting a working, easily accessible API, is a goal for KWP. I imagine, precipitable water estimates in particular would be a good way of estimating the amount of beamed power making it through the atmosphere. In meteorology, we actually use the occultation of radio signals from GPS satellites to measure the temperature and moisture content of the air. @dkavolis I think that would work. KWP currently uses FARWind as an interface to FAR. When FAR is installed KWP does not register modular fight integrator allowing FAR to handle changes to KSP's aerodynamic and thermodynamic models. @Drew Kerman You make a great a point about weather delays. In the coming weeks I plan on releasing the actual weather data in NetCDF format, which is easily readable using python. By making this data open source you could actually look at years of cloud cover data from the KSC and figure out the percentage of days when its cloudy etc. This could be of use for modders seeking to create realistic weather delays etc. Spoiler: the KSC is actually a pretty good place for a launch site. Its located on the equator so no hurricanes! The woomerang launch site... not so much.. It's pretty stormy that far north and its often cloudy!
  23. @linuxgurugamer there shouldn't be much impact on the CPU. Since the weather simulation is offline and pre-calculated the most complex calculations performed by KWP are trilinear and bilinear interpolation. I've performed some preliminary performance testing on my desktop PC with the following specs: CPU: Intel Core i5 7600K GPU: GeForce GTX 1060 6GB RAM: 16GB DDR4 Storage: Kingston 240 GB SSD For performance testing I setup a repeat scenario wherein I took the Aeris 3A up to 1 km ASL and set atmospheric autopilot to fly east at a fixed speed of 330 m/s. I repeated this scenario with and without KWP. Modlist without KWP: Atmospheric Autopilot Module Manager Modlist with KWP: Atmospheric Autopilot Module Manager Zero MiniAVC Click Through Blocker Kerbal Weather Project ModularFlightIntegrator Toolbar Controller The results were as follows: No KWP: With KWP: At the point where there is a dip in GPU and CPU usage I swapped KWP from climatology to point weather. I found little difference in CPU and GPU usage between each mode. *Note that the CPU and GPU % values don't match the screenshot from in-game as the tool used in game shows the total usage for all processes not just KSP. Ignoring the noisy instantaneous values (under the bars on the left) and looking at the average position of the line on the filled charts, the results suggest that the impact of KWP on the CPU and GPU are not significant. Just to be sure, I also tested KWP on my Acer Aspire A515 Laptop: i5-1035G1 CPU @ 1.00 GHz 8GB DDR3 RAM Intel UHD Graphics G1 240GB SSD No KWP: KWP: On my laptop and on my desktop there appeared to be, at most, an increase in CPU usage by 1-2%. On my desktop there was a slight increase in GPU usage with KWP. On my laptop the GPU was overwhelmed regardless of whether KWP was installed or not (it struggles even with the stock game). All said, KWP shouldn't be a significant burden on any computer that has no problem running stock KSP.
  24. As a newbie, I didn't do my homework to ensure KerBalloons was no longer being maintained. That's completely my fault and I apologize for the duplicate mod release. I've updated my original post for KerBalloons, as well as all references to KerBalloons on KWP pages to point towards @linuxgurugamer update of KerBalloons. His work is a significant improvement over previous iterations of the mod and should be the go to release for users looking to add balloons to KSP. Also, thank you for pointing out the missing dependency! I've since added Click Through Blocker to the list of required mods.
  25. @linuxgurugamer my sincere apologizes. I didn't do my homework to check to see if someone had taken up KerBalloons. I've since followed you so I won't miss future updates and make the same mistake again! By the way, I've updated my original post for KerBalloons to point towards this forum page. Your work is a significant improvement over previous iterations of the mod and should be the go to release for users looking to add balloons to KSP.
×
×
  • Create New...