Linuxuser1234 1 Posted November 20, 2022 How can i make a pas file to visualize GRIB2 Files i cant find any references anywhere Share this post Link to post
ptlycldy 1 Posted November 26, 2022 Are you trying to decode GRIB2 files, or display the point data of decoded GRIB2 files? ptlycldy Share this post Link to post
Linuxuser1234 1 Posted November 27, 2022 @ptlycldy im trying download the GRIB2 Data and then display the data onto the sphere something like this Share this post Link to post
ptlycldy 1 Posted November 27, 2022 The GRIB2 data is highly compressed data that effectively is a giant matrix. GRIB2 is a compression format just like *.ZIP or *.TAR files are compressed files. GRIB2 files are massive files and are compressed to make transmission faster. There are decompression programs that you can find free on the internet that will read them and create a gridded data file (matrix is a better description.) And I'd suggest using those programs to extract the data rather than writing your own. The next step is to select what data you wish to plot. For example, the GFS model covers the entire world, and I believe the spacing is a value every one degree of lat and Long. That is 129,699 values for every parameter, for every level -- surface to 10mb -- for every time period for 16 days. To plot a map, you have to go into this immense file and pick out those points that you want to display on the projected area of the map. To complicate it, some values are actually pairs of data, one on one grid, and one on another. Wind data is one such set. To evaluate the wind at one point, you have to get the correct value from the correct point in two 129,699 point grids. Finally, once you have your array of data that you want to plot, you have to plot it on to a map projection. Unless you commit to using a simple Mercator projection, and your background bitmap is also a measurable Mercator projection, Overlaying the weather data onto an existing map on the screen will not be trivial either. If you can find out exactly what projection your bitmap image was created with, you job will be much easier. Without that, I would recommend you create your own background map in a projection that you have the equations for and like. Then comes the job of converting every data point (lat/long) into the X/Y coordinates of the screen. This is all do-able--I've done it for creating trajectory forecasts for objects at about 100,000 ft ASL. Just want to let you know that this is not a "beginner's" project and it will take a lot of time. In another post, you were asking about plotting fronts and pressure centers on a bitmap image. I'd suggest knocking that project out first. That has all the challenges of putting data out onto a map projection, but using simplified data values: lat/long points for fronts, and a couple of numerical values for the Highs and Lows. The advantage of doing that smaller project is I think those weather messages come out 4 times a day (or at least twice a day) and you can go on-line to check your plot against the "official" plot presumably where NWS took the data from. Just be sure to check the product issue dates and times--that you don't have an outdated map to compare against. It is essential that you always verify that you are plotting is what you think you are plotting. That the data are in the right place and have the correct values. Good luck on this project. Creating the program to plot fronts from the text message is a good one, and it will give you a working sub-routine that you can fold into later software you develop that also plots data onto maps. Handy to keep in your bag of tricks. Once you get the method of plotting data onto map projections down, then you might try getting into working with the GRIB2 data. Be sure you are solid on pointers and seek() commands, etc. Have fun, and let me know when you get results. Love to see them. ptlycldy 1 Share this post Link to post