Jump to content

0.90 Kerbal Weather Systems! Alpha 0.5.3 WIP! (Jan 2)


silverfox8124

Recommended Posts

hmm the ground is purple in itself so it might not be the atmosphere itself that has the purple shade BUUUUUT if you can calculate the atmospheric composition of an atmosphere of one that diffuses mostly purple light at 380-420nm using Rayleigh scattering formula is a close enough approximation OR you could go for spectral lines (molecular emission lines at high energy like getting hit by photons) hydrogen is a strong contender in that category but might be a bit too light but other ones will be better for sure (also take into account that higher energy photons will be emitted more often then lower ones due to the nature of photon emission in atoms so they will be more vibrant) gallium is also a strong contender in this category and is just at the upper bound of your hypothetical eve molar mass at 69.7 and also iron, titanium and phosphorus but again those are only acting as emissive atoms and molecules are much more complicated to find data for. in all honesty a multi layered atmosphere might get the most realistic results but would be much harder to code and implement with all the math involved (please take into account that i am hardly familiar with these matters and just throwing ideas that SEEM plausible but might not actually be realistic in any way)

Well, some good thinking and this is exactly what I needed. Must say I never considered the purple tint to come from specific spectral lines, seems a valid alternative. Indeed a reason why I had already considered I2 was its colour. You correctly mentioned it requires some concentration, I believe a few meters of almost pure gaseous I2 are more than enough to give that shade, and even if the remaining atmosphere was colourless, it would diffuse the same colour. Can't however tell what paints purple the ground, iodine would have a strong role making solid compounds but none I found has the right colour: therefore Eve would appear clearly purple where I2 pools (just over the seas probably made of liquid Iodine), but in different colour above the I2 layer. True that good data is scarce, some of the atoms you suggested are certainly good candidates themselves, have to find compounds still showing the correct colour and credible to make Eve's soil.

Indeed the multi-layered atmosphere is currently my best bet, it should add some complication to the model but nothing too hard (just one more layer with very specific characteristics, but also clearly separate from both light gas above and liquid/soil below. What is still missing about Eve, in terms of weather model, is the "regulator" stabilizing its atmosphere (above the bottom layer), but isn't definitely clear if any should exist.

Link to comment
Share on other sites

Vanadium trichloride and Potassium permanganate(although it contain oxygen which maybe a problem or a solution to the question of presence of O2 in the atmo depends on how you look at it) maybe 2 other options to the color of the soil(although really it's a fainter purple and might just be a combination of the purple I2 crystals and a white material that could be a part of the atmosphere that crystallized as well as a kind of salt[most salts contain oxygen molecules too so it's be really hard to avoid that pesky element]) now for the color of the atmosphere those 2 might pose a problem because O2 will not be a part of the atmosphere and Cl2 is greenish yellow and not colorless like we'd like to. now if we want to make it colorless we might want to go with N2 and some noble gases for the lower parts of the atmosphere and He2 and H2 as emissive gases at the higher parts of it for a more vibrant purple effect(also collaborating with planet modders to have the right looks might be a nice idea to throw around for a more holistic looks and feel and make it more visibly closer to the actual composition of the atmospheres and also some special science reports like surface samples and such) but the upper layers can be completly seperate from any calculations for the atmosphere outside maybe some pressure and mass gradient but that's your area of expertise .

Also Argon which is noble and should be a nice candidate as it's colourless while inactive but when electricity or radiation comes through it, it emits purple light-quite a candidate for purple lightning and it's molar mass is about 44-45 which is also quite nice. all quite cool and might be the element we are looking for (and making eve a bit eccentric just for coolness)

Edited by EladDv
Link to comment
Share on other sites

All excellent suggestions. That's really great help to make things right :). Have those substances marked, will follow with more research about their properties. Of course N2, O2, Argon are already known (being major components with Earth's atmosphere) and I believe both N2 and Argon really fit with Eve too, molar mass makes them right. He2, H2 are really too light, indeed they may be at the atmosphere top, altitude too high to be considered for weather effects and therefore without a significant role for KWS (but certainly of interest should Eve's ionosphere be studied).

Link to comment
Share on other sites

  • 3 weeks later...

IMPORTANT DEV NOTE!! To all of those die hard KWS fans(and the not so die hard), we are nearing the completion of the on-paper model(all that remains are optimizations and documenting formulas so I can easily implement them into KWS code). WIth that being said, it is a *very* complex model, we will be hard at work with optimizations and such, but there is only so much we can do. One possibility is that I could have a central server for KWS to run from, and all your KWS clients just grab weather data from there, it would be "easy" to accomplish, however there are costs to paying for a monthly server, which would mean that it has to come out of someone's pocket, and that would very likely be mine. As I am in college right now, money can be a bit tight, so this is where I extend out to my fans and eager beavers for help.

Having it run on a server would allow for even more accuracy to be done and wouldn't cause bog downs for your system at home, your system at home could better focus on other mods that require CPU time and even running ksp better as well.

The downside to a main server would be that timewarp would be restricted, as I have yet to figure out a way of doing such effectively with the model.

So I'd love to hear your guy's input; would you be willing to pay a small fee for KWS to achieve it's goals?

~SilverFox8124

Link to comment
Share on other sites

Options are:

1) Yes, take my money! and

2) How about a distributed set of voluntary servers, accessible in a similar way to NTP servers? I'm sure there are those happy to do it. I'd do it on my server (probably on a VM) if I knew how to do so securely.

Also, this is such an incredible project, that there may be value in publishing the results in academia. There's sure to be meteorology journals who'd give it consideration.

Link to comment
Share on other sites

@colmo, im considering having a special distribution for people who want to run their own servers. However as incredible as the results may be, and the concept of all this weather simulation in game aside, academia wouldn't be too particularly interested in this, as 1)they already do what we do, but infinitely better, and with more accuracy 2)We aren't offering much special that they don't already have. In terms of something meteorologists could study when they're in school and see how the whole weather thing works may be a useful thing, but aside from that I don't see what academia would be interested in from a "We gotta have this" standpoint.

If someone wants to run a server dedicated to Duna weather then that's great and I'd love to know so that I can make the server's planet dependant and such so that you can run individual planets instead of all of the planets in a cyclic manner.

Any other ideas please let me know, feedback is greatly encouraged

~SilverFox8124

PS. capi3101: Message me in irc and we'll talk more on the subject.

PPS. To run a KWS server would take incredible CPU power, rather than RAM, so that's one thing everyone needs to keep in mind.

Edited by silverfox8124
Link to comment
Share on other sites

I would say, no, don't use a centralized weather server outside of something like KMP.

Biggest issue that comes to mind is that the server would lock the individuality of client systems out. I know its efficient, but if I have the same weather at KSC at noon as another player at KSC 3 years in the game future at night, that's kind of odd in my mind. I don't know how the model works, but if its taking anything like ocean layouts and where the sun is hitting the planet into account, then unless the player's kerbin is in sync you will have things like monsoons over the desert and other such oddities.

Plus there's no telling how nasty the up and downstream connections are going to end up being at scale.

In a situation like this. My thought would be that if the model is so complex that it's killing the PC just to run it, then it's time to start cutting fat and simplifying. Not optimizing, but actually going in and stripping down the model. Really, what are the benefits when considering that the average environment is one player viewpoint at a time? How small are the weather 'cells'? Do we need that kind of resolution to be enjoyable? Do we NEED to have hyper-realistic accuracy in the weather simulation?

I can see the comment back to cell size in discussion. But really, the question of the hour is, do the benefits to gameplay outperform the cost in system resources to apply? Is accuracy REALLY that important for a fake planet smaller than the moon, but massing equal to that of Earth?

I have on idea that could cover all the bases.

1: Make the KSW server into a client stand-alone program that can be either run directly, or on a server. Much like REX from FSX.

2: Make the weather model parameters of the server customizable so the player setting up the server can determine how 'accurate' they want their weather to be. Like, slider settings for cell size and number so they can 'simplify' the model to reduce processing load, or if they've got beastly systems, get their hyper-real on. And perhaps an option to just freerun a weather model that doesn't care what the client model looks like. Along with things like time resolution (how often the model updates).

In this manner, you get the advantage of being able to use a master client for those who want to sync to a big weather processor. And you get something that clients can run alone.

This will frontload a lot of additional work into adjusting the model to be modified easily, a GUI to manipulate the program, and properly building network capability. But it should allow flexibility.

Link to comment
Share on other sites

@AdmiralTigerclaw, I know all of that sounds fine and dandy to you, but it's a big hassle on my end to try and figure all this .... out. One point is I'm not aiming for "hyper-realistic" as that is handled by government + science agency super computers, not run on the average desktop. Second point is that there is only optimization I can do to the model, not much simplification, as I have stated previously, there are basics to weather that need to be accounted for regardless.

Third point is that timewarp is an issue here, I have not figured out a good way to do such and have the model retain itself. It's 1000% not as easy as you think it is, and if you think it's so easy, then I suggest you take on this challenge yourself and see just how hard it can be. The main premise behind KWS is predictable weather, and weather that happens for the reason it should, not because it can.

Fourth point is the master server situation, yes I have contemplated doing what DMP does and having a server application which can be ran, but it's still up in the air for me until I can get some benchmarking done to get the specs on such.

Fifth point is the accuracy. Accuracy in cell size is needed because the weather effects are applied not locally, but across the entire cell. This is just how it is. Any interpolation will take up both memory, CPU time and extra processing and data storage.

Sixth point is on accuracy and speed of the model, which can more or less already be changed with the "n cells per tick" option. I plan on having other adjustable settings as well, but again, there is only so much I can do.

Seventh point on the uplink and downlink, seriously the server wouldn't care less about if you're connected or not, it will continue running the simulation.

Eighth point is an elaboration on how I can't just simplify. Let's say weather just happens because it can. Well rainstorms aren't often seen over deserts, so I'd have to put a condition there to check for that, oh also over the arctics as well. I'd have to make sure that evaporation can only happen over bodies of water and not deserts, so I'd have to have a condition to check for that too. Also tornados don't happen over water, hurricanes do, so there's a condition check for that. To make sure that everything spins the right way according to the spin of the body, there needs to be something for that. It not snowing in the desert there needs to be a check for that. If there is light cloud cover then you shouldn't see massive downpours, in which I'd need a check for that. All of these checks would be done naturally by the model currently in implementation, and so much more natural occurrences as well. You can't just simplify into a whimsical weather model without basically having the same thing as an optimized weather model, but with more potential for bugs.

Ninth point on the enjoyability of the accuracy of the model, Yes you do. Without the accuracy, weather just won't happen. Your CPU will be taking up resources to give you .... all in terms of weather action, and it will be wrong as well because the cells cover so much area at that point.

Weather is hard to do right, I am doing my best and I need you all to understand that. KWS stands behind predictable weather that happens because it should, not because it can. That is that and that is what I stand by.

~SilverFox8124

Link to comment
Share on other sites

@AdmiralTigerclaw, I know all of that sounds fine and dandy to you, but it's a big hassle on my end to try and figure all this .... out. One point is I'm not aiming for "hyper-realistic" as that is handled by government + science agency super computers, not run on the average desktop. Second point is that there is only optimization I can do to the model, not much simplification, as I have stated previously, there are basics to weather that need to be accounted for regardless.

Third point is that timewarp is an issue here, I have not figured out a good way to do such and have the model retain itself. It's 1000% not as easy as you think it is, and if you think it's so easy, then I suggest you take on this challenge yourself and see just how hard it can be. The main premise behind KWS is predictable weather, and weather that happens for the reason it should, not because it can.

Fourth point is the master server situation, yes I have contemplated doing what DMP does and having a server application which can be ran, but it's still up in the air for me until I can get some benchmarking done to get the specs on such.

Fifth point is the accuracy. Accuracy in cell size is needed because the weather effects are applied not locally, but across the entire cell. This is just how it is. Any interpolation will take up both memory, CPU time and extra processing and data storage.

Sixth point is on accuracy and speed of the model, which can more or less already be changed with the "n cells per tick" option. I plan on having other adjustable settings as well, but again, there is only so much I can do.

Seventh point on the uplink and downlink, seriously the server wouldn't care less about if you're connected or not, it will continue running the simulation.

Eighth point is an elaboration on how I can't just simplify. Let's say weather just happens because it can. Well rainstorms aren't often seen over deserts, so I'd have to put a condition there to check for that, oh also over the arctics as well. I'd have to make sure that evaporation can only happen over bodies of water and not deserts, so I'd have to have a condition to check for that too. Also tornados don't happen over water, hurricanes do, so there's a condition check for that. To make sure that everything spins the right way according to the spin of the body, there needs to be something for that. It not snowing in the desert there needs to be a check for that. If there is light cloud cover then you shouldn't see massive downpours, in which I'd need a check for that. All of these checks would be done naturally by the model currently in implementation, and so much more natural occurrences as well. You can't just simplify into a whimsical weather model without basically having the same thing as an optimized weather model, but with more potential for bugs.

Ninth point on the enjoyability of the accuracy of the model, Yes you do. Without the accuracy, weather just won't happen. Your CPU will be taking up resources to give you .... all in terms of weather action, and it will be wrong as well because the cells cover so much area at that point.

Weather is hard to do right, I am doing my best and I need you all to understand that. KWS stands behind predictable weather that happens because it should, not because it can. That is that and that is what I stand by.

~SilverFox8124

I had a whole play-by-play written up for your points, but that all got dumped when one thing stuck out in point four:

You say you haven't benchmarked it yet. Is that to say that you haven't actually tested this running with KSP?

Link to comment
Share on other sites

@AdmiralTigerclaw, No, I haven't transferred all of the code from the paper model to a code model, I'm still doing some final prep before that happens. But I can make rough estimates from what I'm seeing and the basics of weather knowledge I have.

One thing I do know is that KSP can be CPU intensive on some machines, I find AMD processors to be more susceptible to it.

I *am* seriously considering a standalone server that is run alongside KSP, and the client and server will talk.

One thing I know, and is changing because of the upcoming 64bit KSP, but there are memory limits currently, and that was one of the main things that restricted my mod, the other being CPU intensity.

I have not run benchmarks on how the current model will run, but I will when I get the chance, and I will definitely give you all an update when that occurs. However for the time being I'm giving it an over-estimation in that I would definitely not want it running inside KSP.

I am currently going over things as I put them in and working on optimizing and thinning things out to make them run more smoothly. (Mainly thinning out struct size and such to reduce the CPU time taken to do those hard copies)

If you have any other questions please let me know.

~SilverFox8124

Link to comment
Share on other sites

*Nod*

Okay, so we don't actually know what the thing is going to do.

Also, question on the time-acceleration problem:

Have you thought about prebuffering the weather ahead of real-time? I don't know how much data you're looking at in terms of what values are going to be sitting on the back end. But the easiest thing that comes to my mind to work around the time warp issue, at least partially... Is to front-end some of the work, and have the weather actually processed for a period of time out ahead of what a player encounters. Hours, days, maybe weeks (or years) depending on what ends up being feasible for the weather pattern cache.

Then, when the player 'catches up' using a time warp, force it to halt that time warp while it re-buffers the weather data on a FIFO schedule. Yes, it would bring a start-stop pattern to time warp, but I believe that would be better than 'no timewarp'.

Essentially, a built in "7 day forecast" of sorts... Though, in behavior, not literal function.

Link to comment
Share on other sites

@AdmiralTigerclaw, I was thinking that as well, it is so far the best idea I have come up with, and has arised, but then comes the whole memory thing again. Because I'm storing not just live weather and the buffered(to be updated copy of the live map) but also several live maps which span every minute up to 7 days, which is ALOT OF MEMORY, even for a standalone application. Not to mention I must run the model quite fast to go faster than 1 second/s. I also need a way to predict where things will be in terms of orientation of the planets, the sun angle and position, things like that, and that needs to run live alongside the 1:1 model. If I could get a way to interpolate the weather conditions between somewhat large gaps in time, then I could "Easily" do timewarping. It is however our best shot.

I said this wasn't as easy as you may have thought, and hopefully you're starting to see why.

~SilverFox8124

Link to comment
Share on other sites

Dev Update! I have stumbled across a quite pleasant idea for solving a few problems with the way the system is set up. KWS simulations will be run client-side(optionally*) and will be individual to the user, and if attached to a DMP network, they can sync up weather states and times. Players could theoretically fast forward, slow down time, have their own progression and such, but they also have the option of syncing to other players.

What this also allows is CPU-forgiveness, which releases the strain of the simulation from the CPU by acting like a server-client operation. Where you are time-locked with another player, and you grab data from them instead of simulating it yourself. With a DMP like situation there will also be a server admin, ops, and other sorts of admin stuff which have access to server side functions and methods and ways of changing how the server is.

The only problem left to figure out would be how to go about time-warp efficiently.

~SilverFox8124

Link to comment
Share on other sites

Hi Silverfox,

Is your weather system a simulation that will always give you the same result if you feed it the same data? I am asking because if it is, there should be nothing you can do as part of gameplay that would have any influence on how the weather will develop over the course of a game and solely depend on the starting value, when you begin it.

So what I am getting at, is that instead of running during the game, where it will be a big strain on ram and processor you could let people pick a starting value and generate a weather pattern for how many years they want for all the planets outside of KSP (maybe letting it run overnight) and then just load it up when they start a new game. It would still need some testing to see if it makes sense (nobody would want to let his computer running for 1 month to generate a 100 GB weather pattern before starting a game), but it could be a solution to having a realistic simulation without making the game unplayable under the load of it.

Link to comment
Share on other sites

@mysteriosmind, Yes, the system should give you the same results given the same situations, it's simulatory instead of predictive. However, there are inaccuracies to the model as I've been simplifying it and going over other things. These errors will accumulate and produce different results. I don't know much the player could do to influence the weather, as irl it's taken the globe many years to have an impact on it. Leaving it up to the player to run their computer overnight isn't something I'd like to do, as users can be unreliable and the comps could shutdown or the program could be closed. I can assure you that I am working on solutions to get this done.

~SilverFox8124

Link to comment
Share on other sites

@mysteriosmind, Yes, the system should give you the same results given the same situations, it's simulatory instead of predictive. However, there are inaccuracies to the model as I've been simplifying it and going over other things. These errors will accumulate and produce different results. I don't know much the player could do to influence the weather, as irl it's taken the globe many years to have an impact on it. Leaving it up to the player to run their computer overnight isn't something I'd like to do, as users can be unreliable and the comps could shutdown or the program could be closed. I can assure you that I am working on solutions to get this done.

~SilverFox8124

if you make 2 systems- one more detailed to run while the player is in real time or has a certain amount of future data calculated and a faster one which will run when you are on high time warp and just cant keep up with the first model you could solve the issue of slowing down the player too much and retain data for years at the same time

Link to comment
Share on other sites

@EladDv, it is indeed an idea, but not one I would employ. If I can have the accuracy I want and maintain so during timewarp, then I'll just have that model in use, not two different models. There are a few suggested and thought of methods of going about this, and I will explore them more deeply when the time comes. However right now I am focusing on my college work, and getting this paper model into code and making that work.

~SilverFox8124

- - - Updated - - -

Also, on the note of people being slightly uneasy about weather situations always being the same given the same conditions; there isn't much I can do about that. The only thing I *could* do is do a seed thing, in which I could vary the initial conditions of the system(sun position when starting, slightly altering the cell temps around, wind speeds). But that's about all I could do in that department.

~SilverFox8124

Link to comment
Share on other sites

  • 1 month later...
Seriously cool mod, Always thought it quite off at how the air In KSP was so still and lifeless...

How well can you use it for sailing? Anyone have a good vido link of it being used for sailing? My god "Kerbal space" program is becomming "Kerbal everything in physics program"

Such an awesome educational tool too, with FAR, Real solar system, real rocket engines and fuels ect...
Link to comment
Share on other sites

@GorillaZilla, the previous versions of KWS that have had wind in it had used the structural parts to makeshift sails, it was alright, but the hydro-dynamics in KSP weren't all that good at the time, and prevented sailing from really being a thing without high winds. However, sailing should come naturally when KWS has it's stuff together.
Link to comment
Share on other sites

  • 2 months later...
  • 1 month later...
17 hours ago, silverfox8124 said:

Dev Update! I've picked up KWS again recently and its starting to come along. I've gotten the basics down and am slowly pecking away at the errors that come up. Testing is coming along well though.

 

@RYU AZUKU99 The mod does not work at all with 1.0.5. So expect it to just straight up fail.

Cant wait for the new update!

Link to comment
Share on other sites

Dev Update! As I've been chugging on it all day, venturing through NaNLand and Infinity cave, I've come to a crossing in which I cannot for the life of me cross on my own. With such, I'm going to wrap it up for today and resume progress when my team returns.

Link to comment
Share on other sites

This thread is quite old. Please consider starting a new thread rather than reviving this one.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...