dpaulat / supercell-wx

Supercell Wx is a free, open source advanced weather radar viewer.
https://supercell-wx.rtfd.io
MIT License
110 stars 15 forks source link

GL error #156

Closed acidhorse1972 closed 6 months ago

acidhorse1972 commented 6 months ago

In CMD.exe terminal window immediately on startup and when panning is being done it gives the error on the command line output: [2024-03-13 23:34:04.280] [28368] [error] [scwx::qt::map::overlay_layer] GL Error: 1282, D:\a\supercell-wx\supercell-wx\source\scwx-qt\source\scwx\qt\map\overlay_layer.cpp: 438 [2024-03-13 23:34:04.331] [28368] [error] [scwx::qt::map::overlay_product_layer] GL Error: 1282, D:\a\supercell-wx\supercell-wx\source\scwx-qt\source\scwx\qt\map\overlay_product_layer.cpp: 156

dpaulat commented 6 months ago

Thanks for the report!

I suspect there could be a compatibility issue between the driver and the OpenGL shaders used by the application. Supercell Wx requires a minimum of OpenGL 3.3. Could you provide the following for me?

  1. Open the Run dialog, Win+R
  2. In the Run dialog, enter "dxdiag"
  3. Post a screenshot of the Display or Display 1 tab

If you know the graphics driver version you have installed, that would be helpful as well.

Could you also provide the entire log file (at least up until the 1282 error that occurs while panning)? The GL Error: 1282 you post could be a symptom of something that occurred earlier. Based on your description, I expect "GL Error: 1282" to show up every time the map attempts to render itself. As an example, I injected an OpenGL error, and get the following fairly early on:

[2024-03-13 23:03:01.500] [65064] [debug] [scwx::qt::gl::shader_program] Load()
[2024-03-13 23:03:01.500] [65064] [debug] [scwx::qt::gl::shader_program] Loading vertex shader: :/gl/geo_texture2d.vert
[2024-03-13 23:03:01.501] [65064] [debug] [scwx::qt::gl::shader_program] Loading geometry shader: :/gl/threshold.geom
[2024-03-13 23:03:01.501] [65064] [debug] [scwx::qt::gl::shader_program] Loading fragment shader: :/gl/color.frag
[2024-03-13 23:03:01.526] [65064] [error] [scwx::qt::gl::shader_program] Shader compilation failed: 0(2) : error C0201: unsupported version 550
0(2) : warning C7532: global type vec4 requires "#version 100" or later
0(2) : warning C7022: unrecognized profile specifier "smooth"
0(2) : error C0502: syntax error at token "smooth"
0(4) : error C0000: syntax error, unexpected '(', expecting "::" at token "("
0(8) : warning C1503: undefined variable "fragColor"

[2024-03-13 23:03:01.527] [65064] [warning] [scwx::qt::gl::shader_program] Could not find uMVPMatrix
[2024-03-13 23:03:01.527] [65064] [warning] [scwx::qt::gl::shader_program] Could not find uMapMatrix
[2024-03-13 23:03:01.527] [65064] [warning] [scwx::qt::gl::shader_program] Could not find uMapScreenCoord
[2024-03-13 23:03:01.527] [65064] [warning] [scwx::qt::gl::shader_program] Could not find uMapDistance
[2024-03-13 23:03:01.527] [65064] [warning] [scwx::qt::gl::shader_program] Could not find uSelectedTime
[ WARNING ]  "{unknown}[OpenGL]: Error1282: host->initialize() - D:\\a\\supercell-wx\\supercell-wx\\source\\external\\maplibre-native\\src\\mbgl\\renderer\\layers\\render_custom_layer.cpp:47"
dpaulat commented 6 months ago

Most of my testing is done with an NVIDIA graphics card. I tested using an Intel HD Graphics 4000 and am seeing a bunch of OpenGL errors introduced with v0.4.2 - this was not intentional with the update.

[2024-03-13 23:47:46.456] [8028] [error] [scwx::qt::gl::shader_program] Shader compilation failed: ERROR: 0:28: 'varying' : cannot be bool
ERROR: 0:38: 'p' : undeclared identifier
ERROR: 0:38: 'xy' :  field selection requires structure, vector, or matrix on left hand side
ERROR: 0:38: 'assign' :  cannot convert from '2-component vector of float' to 'float'
ERROR: 0:46: 'vsOut' : undeclared identifier
ERROR: 0:46: 'displayed' :  field selection requires structure, vector, or matrix on left hand side
ERROR: 0:46: 'assign' :  cannot convert from 'const bool' to 'float'
ERROR: 0:49: 'threshold' :  fiel

Does v0.4.1 work?

dpaulat commented 6 months ago

I kicked off a release candidate build for v0.4.3 (build time is about an hour and a half), it now works on both my NVIDIA and Intel HD Graphics hardware. The error referenced in my previous comment has been resolved.

Let me know how it works for you.

https://github.com/dpaulat/supercell-wx/actions/runs/8275762298

acidhorse1972 commented 6 months ago

I'm using Intel UHD Graphics 620: OpenGL - Core GL ver 4.6 (build 30.0.100.9670) GL ES Version 3.1 DirectX 12 (11.1, 12.1) Vulkan Version 1.2.177 supercell-wx 0.4.1 does work and so does 0.4.2 0.4.2 is just putting out messages that there is an error even though the graphics are fine. I don't have any problems or crashes so that means something in your shader code isn't good with the shader language and GL is complaining to you about it but still allowing it to work. There is no *.LOG file that I know of and if it was secretly creating one then it didn't offer to tell me probably because I didn't offer to buy it a drink.

acidhorse1972 commented 6 months ago

0.4.3 runs fine with no error message in the cmd.exe terminal window. Even when panning.

Ok now I have some requests: -850mb or higher mb surface wind view -500mb jet stream view -850mb & 500 mb wind crossover & Most Unstable LI -Day 1,2,3 Convective and Tornadic Outlooks -Red Flag Warnings -Air Quality Index areas -Fronts -FIre Weather -- Relative Humidity <= 30%, 25%, 20%, 15%, 10% -Moisture -- 2m Dew Point >= 55F, 60F, 65F, 70F -NROT normalized rotational view -PTDS debris signature view -temperature view -circulation symbols -TVS symbols -Canadian stations -GOES satellite view

acidhorse1972 commented 6 months ago

AIRMET and SIGMET symbols

dpaulat commented 6 months ago

Excellent! Glad to hear it works!

0.4.2 is just putting out messages that there is an error even though the graphics are fine. I don't have any problems or crashes so that means something in your shader code isn't good with the shader language and GL is complaining to you about it but still allowing it to work.

Yep, that's exactly what the problem was. I did something non-standard in the shader, and it worked for me, and moved on. I suspect placefiles would have been broken, as well as a couple other things. The radar image should have looked fine.

There is no *.LOG file that I know of and if it was secretly creating one then it didn't offer to tell me probably because I didn't offer to buy it a drink.

Woops! I meant the terminal window. :smile: A rotating log file is planned for the future.

The following are currently in work, and I expect to have something in a development snapshot in the next week or two:

I will create a separate issue to add support for Canadian stations.

I believe the following are Gibson Ridge proprietary products, and won't be able to implement:

Many of the items you're looking for are supported with placefiles: https://supercell-wx.readthedocs.io/en/stable/user-guide/placefile-manager.html#free

I'm not aware of any existing placefiles for these (they might be out there), but I expect to be able to support the following with Shapefile, KML, and/or GRIB2 support (planned for later this year):

Below is not a comprehensive placefile list:

https://saratoga-weather.org/grlevelx-placefiles.php

https://placefiles.supercellwx.net/

http://www.redteamwx.com/grlevelx.html

http://www.blueskybust.com/placefiles/

Allison House (Paid):

acidhorse1972 commented 6 months ago

It was a tall order. LOL. I didn't know NROT and PTDS were commercial. I figured it was a pretty known mathematical calculation. However, I'd really like to see a wind visualization the same way that MyRadar does it but with a XOVER option for displaying surface and jet stream together to show locations of shear. WX by Joshua Tee pulls down the NWS SPC graphs for that in it's section for wind shear.

acidhorse1972 commented 6 months ago

Echo tops coloring isn't reaching the yellow for 30kft-40kft Its shows green when it should be in the yellows. That might be a color table issue?

dpaulat commented 6 months ago

I didn't know NROT and PTDS were commercial. I figured it was a pretty known mathematical calculation.

I might be wrong. I've been asked previously, and was unable to find additional information when searching. I have a separate request to add Vrot to the velocity view.

However, I'd really like to see a wind visualization the same way that MyRadar does it but with a XOVER option for displaying surface and jet stream together to show locations of shear. WX by Joshua Tee pulls down the NWS SPC graphs for that in it's section for wind shear.

This is a nifty shader effect. I've seen it in Windy too. It looks like wX just grabs the rendered images from the SPC website. I'd probably start with drawing wind barbs, and go from there. To render it on top of the map, I'd need to grab the raw HREF data in GRIB2 format (potentially other data as well):

Echo tops coloring isn't reaching the yellow for 30kft-40kft Its shows green when it should be in the yellows. That might be a color table issue?

The default color palette shows 30-40kft from blue to green. Yellow will display for 50-60kft. Other color tables may show something different. https://github.com/dpaulat/supercell-wx/blob/b155664a919f08453a7472c573898ba1ad8c08e2/scwx-qt/res/palettes/wct/ET.pal#L8

acidhorse1972 commented 6 months ago

And if you were to make a bounding box selection capability you could switch it over to OpenStorm for a 3D visualization. https://github.com/JordanSchlick/OpenStorm

acidhorse1972 commented 6 months ago

Here's a conversion to the WX version of EET palette:

; NEXRAD Level-3 palette for product code 135 - EET - Enhanced Echo Tops

Units: KFT Color: 70 255 255 255 Color: 64 255 255 255 Color: 61 255 192 255 Color: 57 255 0 255 Color: 52 128 0 0 Color: 48 255 0 0 Color: 44 208 80 0 Color: 39 255 128 16 Color: 34 224 176 16 Color: 30 255 224 32 Color: 24 16 112 16 Color: 20 96 192 48 Color: 16 0 0 128 Color: 12 21 80 165 Color: 8 42 160 202 Color: 4 64 240 240

dpaulat commented 6 months ago

And if you were to make a bounding box selection capability you could switch it over to OpenStorm for a 3D visualization. https://github.com/JordanSchlick/OpenStorm

This is an interesting idea. 🤔

Here's a conversion to the WX version of EET palette

Thanks! I'll figure out a place to host additional color palettes.

dpaulat commented 6 months ago

Unfortunately, the raw Canadian radar data is not free: https://www.nco.ncep.noaa.gov/pmb/docs/restricted_data/canrad/

acidhorse1972 commented 6 months ago

Unfortunately, the raw Canadian radar data is not free: https://www.nco.ncep.noaa.gov/pmb/docs/restricted_data/canrad/

hmmmm that's weird because I've seen some free and shareware software able to pull down Canadian station's data. Some site must be getting it at a cost or deal and then those clients are offering it for everyone else to view probably.

acidhorse1972 commented 6 months ago

NROT is derived from velocity data (i.e. base velocity), Doppler velocity determination using Doppler frequency shift in return signal, range and azimuth information, spatial relations, normalization and thresholding & filtering. I'm thinking that filtering the velocity data maybe the way to get NROT information. There are detection methods by subdivision and bifurcation that might be able to narrow things down. It might even be like motion detection in video frames too. I might be wrong. But anyway I was reading https://www.weather.gov/media/aly/LocalResearch/Online%20LocalResearch/Publications/Conference_Posters/2013/Abstract_Frugis_ExtendedAbstract_NWA2013.pdf and https://www.weather.gov/media/rlx/NROTpresentation.pdf

acidhorse1972 commented 6 months ago

https://arm-doe.github.io/pyart/ has functions for calculations for PTDS (Probabilistic Tornado Debris Signature)

acidhorse1972 commented 6 months ago

Also is it possible to load a range or selection of NEXRAD Level 2 files?

dpaulat commented 6 months ago

Unfortunately, the raw Canadian radar data is not free: https://www.nco.ncep.noaa.gov/pmb/docs/restricted_data/canrad/

hmmmm that's weird because I've seen some free and shareware software able to pull down Canadian station's data. Some site must be getting it at a cost or deal and then those clients are offering it for everyone else to view probably.

My understanding is that type of stuff is usually ad supported, or subsidized by paid tiers. The processed data is free, you can grab the GIFs from their server. I've been unable to find anything contrary to the above source, but I can reach out. Which free software have you seen support it?

NROT

That slide deck references NROT as a GR2AE product. I can't find the referenced source publicly available. However, it notes its similarity to NSSL Rotation Tracks in AWIPS II, which is in the public domain. There may be other algorithms available

PTDS

Excellent! I'll have to check this out. PyART is available under the BSD license, so this should be feasible.

Range of level 2 files

What are you looking for? The timeline view will load a loop into memory. I don't save any radar data to disk currently.

We also have a Discord server: https://discord.gg/vFMV76brwU

dpaulat commented 6 months ago

I think I've created separate issues for most everything at this point. The one item I haven't addressed:

https://arm-doe.github.io/pyart/ has functions for calculations for PTDS (Probabilistic Tornado Debris Signature)

I was unable to find this. The closest thing I found was dealiasing rotational velocities.

acidhorse1972 commented 6 months ago

I think I've created separate issues for most everything at this point. The one item I haven't addressed:

https://arm-doe.github.io/pyart/ has functions for calculations for PTDS (Probabilistic Tornado Debris Signature)

I was unable to find this. The closest thing I found was dealiasing rotational velocities.

Yeah I had used ChatGPT to try to locate some code on NROT. I'm sure that's some of it's darkside coming out. Anyway is there any possibility of getting a crosshair cross put at the center of horizontal and vertical pixel widths of the display panels? xres / 2 , yres / 2 and make it a toggle-able option in the menu?

dpaulat commented 6 months ago

Yep, I've got that one down!

144

dpaulat commented 6 months ago

GL error fixed in 15c0ddc