Recent

Author Topic: Weather forecasting in Pascal  (Read 3093 times)

SymbolicFrank

  • Hero Member
  • *****
  • Posts: 1313
Re: Weather forecasting in Pascal
« Reply #15 on: April 11, 2022, 01:19:06 pm »
With wind turbines the power is the cube of the wind speed, so with twice the speed, you have eight times the energy. Which is probably what you are interested in with a simulation.

MarkMLl

  • Hero Member
  • *****
  • Posts: 6686
Re: Weather forecasting in Pascal
« Reply #16 on: April 11, 2022, 01:46:44 pm »
All /I/ want (as per OP at start of thread) is a globe with defensible fronts drawn in.

OK, I'd quite like to also be able to take a slice through a weather system and show layers of air moving over/under each other, but that's a detail.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

MarkMLl

  • Hero Member
  • *****
  • Posts: 6686
Re: Weather forecasting in Pascal
« Reply #17 on: April 11, 2022, 09:19:50 pm »
And we do have an OpenGL subforum, if you want animation ;)

Does that help for getting a GPU to do interpolation etc.?

I'm obviously familiar with the basic concept but not how it can be implemented.

As it is, I'm not setting my sights too high since I'm keenly aware of the limited resolution: colouring by temperature or pressure will probably be OK, but landmass outlines and frontal overlay might be a problem.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

winni

  • Hero Member
  • *****
  • Posts: 3197
Re: Weather forecasting in Pascal
« Reply #18 on: April 11, 2022, 11:14:32 pm »
Hi!

I think: Make the first step before the next. I surfed a little bit around and I think it will be a problem to find a site to download the worldwide isobaric or temperature data. Everybody makes a secret of that and presents only their maps with low, high and the fronts.

One the other hand: To get data about the worlds landmass, coastline, river, lakes .... is not a big trick. There are a lot of sites for downloading multi-polygon-files. One source with 3 different resolutions is

https://www.naturalearthdata.com/downloads/

And obvious they are public domain. Maybe the last one  ...

Winni

« Last Edit: April 11, 2022, 11:23:04 pm by winni »

mas steindorff

  • Hero Member
  • *****
  • Posts: 532
Re: Weather forecasting in Pascal
« Reply #19 on: April 12, 2022, 01:13:56 am »
With wind turbines the power is the cube of the wind speed, so with twice the speed, you have eight times the energy. Which is probably what you are interested in with a simulation.
unless you are at higher altitudes, where the air has less mass.   
windows 10 &11, Ubuntu 21+ - fpc 3.0.4, IDE 2.0 general releases

SymbolicFrank

  • Hero Member
  • *****
  • Posts: 1313
Re: Weather forecasting in Pascal
« Reply #20 on: April 12, 2022, 09:44:20 am »
And we do have an OpenGL subforum, if you want animation ;)

Does that help for getting a GPU to do interpolation etc.?

I'm obviously familiar with the basic concept but not how it can be implemented.

As it is, I'm not setting my sights too high since I'm keenly aware of the limited resolution: colouring by temperature or pressure will probably be OK, but landmass outlines and frontal overlay might be a problem.

MarkMLl

After setting up OpenGL (dropping an TOpenGLControl on a form), you have to create a scene and a viewport. The scene (model) can be a flat surface, but also a sphere. And the viewport is how you look at it. The OpenGL tutorial explains it all (but you only need the first part). You can color the surface and you can add textures (like the landmass). After that, you need a shader, which is basically a small C program that is executed for each pixel, to color it.

For the fronts, vectors and text on top, you make a second surface, that hovers on top of the first one. You can draw on that.


MarkMLl

  • Hero Member
  • *****
  • Posts: 6686
Re: Weather forecasting in Pascal
« Reply #21 on: April 12, 2022, 10:39:08 am »
I think: Make the first step before the next. I surfed a little bit around and I think it will be a problem to find a site to download the worldwide isobaric or temperature data. Everybody makes a secret of that and presents only their maps with low, high and the fronts.

As per my OP https://github.com/cambecc/earth See "Getting weather data".

That's described as being of the order of 300 records, and obviously it needs a lot of interpolation.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

MathMan

  • Sr. Member
  • ****
  • Posts: 325
Re: Weather forecasting in Pascal
« Reply #22 on: April 12, 2022, 03:52:20 pm »
Allowing for the ready availability of the station data that underpins e.g. https://earth.nullschool.net/#current/wind/isobaric/850hPa/orthographic and the limited availability of analysis charts that overlay fronts onto observations e.g. https://www.met.ie/latest-reports/surface-analysis , has anybody ever come across Pascal code which attempts to locate the major frontal systems and describes them as e.g. Beziers?

MarkMLl

I tried to follow what is presented under the links you gave and what you might be looking for. To answer your question - no, I have not come across Pascal code doing what you seem to be looking for. But from the outset this looks like it might be solvable with contouring algorithms (considering how it is described under your second link). There is even one implemented in TAChart afaik. But there are several types of these and the final translation to e.g. Beziers would still reside with you I think.

Cheers,
MathMan

MarkMLl

  • Hero Member
  • *****
  • Posts: 6686
Re: Weather forecasting in Pascal
« Reply #23 on: April 12, 2022, 06:14:00 pm »
...the final translation to e.g. Beziers would still reside with you I think.

In any event, it's likely to be "interesting" on lots of fronts: irregular data which needs interpolating, contour approximation, feature extraction following contours, and a display device where (I suspect) the pixel size varies depending on the coordinates.

MarkMLl
MT+86 & Turbo Pascal v1 on CCP/M-86, multitasking with LAN & graphics in 128Kb.
Pet hate: people who boast about the size and sophistication of their computer.
GitHub repositories: https://github.com/MarkMLl?tab=repositories

 

TinyPortal © 2005-2018