Board index FlightGear Development Weather

A local weather system (v1.4 available)

Everything related to weather simulation, visuals should be discussed in the shader subforum.

Re: A local weather system (v1.15 available)

Postby erik » Sat Jun 25, 2011 1:23 pm

I highly suspect this line is the cause:

Nasal runtime error: non-objects have no members
at /export/fgfs/fgdata/Nasal/local_weather/local_weather.nas, line 4063
called from: /export/fgfs/fgdata/Nasal/local_weather/local_weather.nas, line 4628

I tried to hunt it down but am too unfamiliar with Nasal to solve it quickly.

Erik
erik
 
Posts: 487
Joined: Thu Nov 01, 2007 1:41 pm

Re: A local weather system (v1.15 available)

Postby mifi » Sat Jun 25, 2011 1:35 pm

Other than that, what a wonderful job did you do!
I almost never use global weather anymore.... Local weather is so much nicer, these days. Well done.

m
mifi
 
Posts: 229
Joined: Mon Jul 23, 2007 3:24 pm

Re: A local weather system (v1.15 available)

Postby mifi » Sat Jun 25, 2011 2:03 pm

erik wrote on Sat Jun 25, 2011 1:23 pm:I highly suspect this line is the cause:
Nasal runtime error: non-objects have no members
at /export/fgfs/fgdata/Nasal/local_weather/local_weather.nas, line 4063
called from: /export/fgfs/fgdata/Nasal/local_weather/local_weather.nas, line 4628


hmmm perhaps not. I started a completely fresh tree of sources this morning, including a fresh tree of fgdata. Local weather refused to use METAR.
When I installed the add-ons from the tar into fgdata/Nasal, the local weather system was fine, but the error message you quoted remained. So it seems that local weather can function despite the error message.

m
mifi
 
Posts: 229
Joined: Mon Jul 23, 2007 3:24 pm

Re: A local weather system (v1.15 available)

Postby Sealbhach » Sun Jun 26, 2011 7:06 am

My local weather is working fine now, after manually copying in the addon. The only thing now is that I don't get the darker objects (like hills) in the distance as you showed in your screenshot. Distant hills still look white and unrealistic. Is there some setting I have to change?

.
Sealbhach
 
Posts: 942
Joined: Wed Jun 30, 2010 9:17 am

Re: A local weather system (v1.15 available)

Postby Thorsten » Mon Jun 27, 2011 6:56 am

Nasal runtime error: non-objects have no members
at /export/fgfs/fgdata/Nasal/local_weather/local_weather.nas, line 4063
called from: /export/fgfs/fgdata/Nasal/local_weather/local_weather.nas, line 4628


This has been pointed out by ThorstenB to me already and is an order of module loading problem - local_weather.nas tries to use a variable defined in weather_tiles.nas, but since the second module is loaded later, this doesn't work, although it worked before Local Weather was a run-time loadable submodule. It means that a variable isn't initialized with a random number but with zero - should otherwise be harmless and is not related to any problems you see.

I still suspect that the problems you see are an issue of conflicting installations (default loaded Nasal vs. runtime loadable submodule), but since I don't know anything about your setup and have no error logs, I have no way to be sure.

I've done substantial tests with METAR mode on the weekend, and it works just fine for me, I've asked on the devel list if anyone has problems with METAR mode and the answer was negative - so as far as I am concerned the code is okay, and if you expect me to do anything more than stating this, you'll need post a decent bug report, i.e. what you have installed where, what options you select from the menu in what order and what happens, including a status log and an error message. I can't debug some issue that doesn't exist on my machine without any information.
Thorsten
 
Posts: 2868
Joined: Mon Nov 02, 2009 8:33 am

Re: A local weather system (v1.15 available)

Postby erik » Mon Jun 27, 2011 10:14 am

I think you're right, I tried 1.5 which solved the problem and then reverted back and it still works.

Erik
erik
 
Posts: 487
Joined: Thu Nov 01, 2007 1:41 pm

Re: A local weather system (v1.15 available)

Postby Sealbhach » Mon Jun 27, 2011 1:37 pm

Don't worry about my issues Thorsten, I will do a fresh install when 2.4 is released. I probably have got my git setup in a bit of a mess. I don't want to distract you from all the great things you are doing, Oh Great Cloudmaster. :)
.
Sealbhach
 
Posts: 942
Joined: Wed Jun 30, 2010 9:17 am

Re: A local weather system (v1.15 available)

Postby Thorsten » Mon Jun 27, 2011 3:36 pm

Okay, I think I understand the issue now: Line 4063 in local_weather.nas can make trouble dependent on in what order the modules are loaded, that's why some systems see an issue, others don't. If the error is triggered, the rest of the function isn't executed, and that means practically no listeners are set, which screws the whole chain of events which is governed by the listeners.

As a quick fix, simply comment out the line and see if that solves the problems. The next release will have this issue fixed (moved the initialization to weather_tiles.nas where it belongs).
Thorsten
 
Posts: 2868
Joined: Mon Nov 02, 2009 8:33 am

Re: A local weather system (v1.15 available)

Postby someguy » Mon Jun 27, 2011 11:53 pm

According to my editor, which counts comments and blank lines, line 4063 is:

Code: Select all
setprop(lw~"interpolation/thermal-lift",0.0);


Is that correct? If not, what's the code to comment out?
User avatar
someguy
 
Posts: 1084
Joined: Tue Nov 25, 2008 5:54 am
Version: 3.0
OS: OS X 10.9.2

Re: A local weather system (v1.15 available)

Postby Thorsten » Tue Jun 28, 2011 5:59 am

Then either you don't have the most recent version or your editor counts different from the Nasal parser (which isn't very useful for debugging...). The line is

Code: Select all
weather_tiles.rnd_store = rand();


(or something very similar to that - I'm not on my own computer right now where I could check), and the problem is that it references a Nasal module not yet loaded at this point.
Thorsten
 
Posts: 2868
Joined: Mon Nov 02, 2009 8:33 am

Re: A local weather system (v1.18 available)

Postby Thorsten » Thu Jun 30, 2011 12:10 pm

I've just placed the most recent version (v1.18) online as addon. This version is not compatible with 2.0.0 - while I see compatibility with stable releases as a high goal, with the release of 2.4 imminent I hope that this will soon be realized again. The package assumes that the Local Weather Nasal code is implemented as runtime loadable submodule, so only use it with a recent GIT pull.

The package includes various fixes for various odds and ends which bothered me, but no dramatically new features:

* the timing problem having to do with the initialization of weather_tiles.rnd_store which caused trouble before has been fixed

* the sharp transitions in visibility and light saturation driven by effect volumes have been replaced by more natural rapid but smooth transitions

* some of the light scattering parameters have been tuned a bit

* Stratus and Nimbus textures have been modified in hue and alpha for less contrast with other textures (since clouds seen from below are automatically shown with less light and appear darker, the texture itself can be lighter which improves the effect when seen from above).

* Cirrus skies have been much improved. I've added 3 new textures to lessen the repetition problem, changed some of the models in size and thickness, changed hue and alpha for better harmony between the individual clouds and changed the placement algorithms. Personally I'm much happier with the new version.

* Some cloud configurations in the offline weather system have been updated and extended.

* The documentation is now updated.

I've done fairly extensive tests over the last days with many different options (METAR, offline weather, dynamics on or off, ...) but as usual (and possibly more important than usual) - please let me know if there are serious issues.

Enjoy! I plan to release a full package 1.2 after Flightgear 2.4 is out - with some more textures and visual goodies, after which I plan to work on using Stuart's cloud-generating interface.
Thorsten
 
Posts: 2868
Joined: Mon Nov 02, 2009 8:33 am

Re: A local weather system (v1.18 available)

Postby Thorsten » Sat Jul 09, 2011 11:27 am

Currently working on a 3rd generation cloud-terrain interaction model...

Aerial view of Haleakala, Hawaii. A low convective layer, winds from north (left), first 0 kt (all winds are aloft winds - winds on the ground are perhaps half of that due to the boundary layer effect):

Image

The layer pretty much rims the mountain, the lava flows to the south heat up better and give more pronounced clouds than the forests to the north. Now we turn on 5 kt of winds:

Image

Immediately, activity in the north is increased, clouds start being pushed to higher elevations, whereas the activity in the south (in the lee of the mountain) decreases. Same scene at 10 kt:

Image

And at 20 kt - cloud now reach all the way up to the summit (as they have to in order to water the vegetation belt) although the layer latitude itself is very small:

Image

Finally at 30 kt:

Image

Activity in the south is basically gone, strong cloud cover in the north, being pushed even over the summit.

Another test case which I wanted to get right: Geneva and the Jura mountains. Usually, the convective weather is such that clouds develop over the Jura whereas the valley remains pretty clear and then push into the valley only in the late afternoon.

Image

It's not perfect, but at least the cloud density over Geneva is significantly decreased and over the Jura strong Cb towers develop.

Right now the whole setup is startup only, i.e. it is not used or preserved when clouds are allowed to drift - I'll work on a dynamical variant which has the same cloud population in the steady-state long-term limit next. And, sadly, it asks for a factor 2 more terrain elevation than the 2nd generation model that is implemented right now - which is not pleasant (there's no way to get around this since I need the terrain gradient upwind of the cloud, which means sampling at least 2 points instead of one). So, presumably the 3rd generation placement model will be optional, since it doesn't do anything new if the terrain is reasonably level.
Thorsten
 
Posts: 2868
Joined: Mon Nov 02, 2009 8:33 am

Re: A local weather system (v1.18 available)

Postby Gijs » Sun Jul 10, 2011 12:40 pm

This is one of those posts that needs just one word: "wow"!
Airports: EHAM, EHLE, KSFO
Aircraft: 747-400, DC-2, F-117, Jetman, L1011-500
FlightGear Liveries
User avatar
Gijs
Moderator
 
Posts: 8473
Joined: Tue Jul 03, 2007 2:55 pm
Location: Amsterdam/Delft, the Netherlands
Callsign: PH-GYS
Version: Git
OS: Windows 7

Re: A local weather system (v1.18 available)

Postby Johan G » Sun Jul 10, 2011 1:04 pm

+1 on that! :D
Low-level flying — It's all fun and games till someone looses an engine. (Paraphrased from a YouTube Video)
Johan G
 
Posts: 2600
Joined: Fri Aug 06, 2010 5:33 pm
Location: Sweden
Callsign: SE-JG
IRC name: Johan_G
Version: 3.0.0
OS: Windows 7, 32 bit

Re: A local weather system (v1.18 available)

Postby ot-666 » Sun Jul 10, 2011 6:32 pm

Stunning… :shock:
Callsign: ot-666
Working on LOWI and other stuff - Custom Scenery Overlay Repo: http://gitorious.org/fgfs-custom-scenery/custom-scenery-overlay/
VMX22 - Osprey... sometimes in 2014
ot-666
 
Posts: 743
Joined: Sun Nov 08, 2009 5:14 pm
Location: Germany, Konstanz
Callsign: ot-666
IRC name: ot666
Version: GIT
OS: win7 64bit

PreviousNext

Return to Weather

Who is online

Users browsing this forum: No registered users and 0 guests