METEOSAT / METAR composition

Hey all PHP experts.
Have anyone seen this page beforehttp://ogimet.com/cgi-bin/gmsat2?lang=en?
It looks very interesting and shows A LOT of info in one picture.
And of course - I would like to put it on my site. 8)

I have written them, asking permission to use their collation of others data, hoping to get a positive responce.

Flemming

It’s very interesting!
Finally a serious rainfall radar in Italy!
Thanks Flemming :smiley: :smiley:
Regards,

Alessandro

Alessandro,

If you want to use the map then you can donwload it from here:
http://oiswww.eumetsat.org/IPPS/html/latestImages.html

Look under Visualised Products > MPE > Western Europe > prod.

You could even download it hourly and create your own animated map (see FAQ section). :wink:

Martin

What I found to be particularly interesting was the combination of a weathersatellite picture AND the METAR’s.
How do you go about doing that?

Flemming

It looks like some sort of map overlay, similar to what we use for the Weather Networks.
How they get the METAR data into a file and then overlay that on to the latest satellite image, I’m not sure. My PHP/Java skills are not up to that. :wink:

If they are willing for you to use their map & data or willing to share the scripts then it will save someone a lot of work.

Martin I’ve read your FAQ with great interest.
Is there an easy way to create the animation on the server instead of downloading/uploading to/from my poor little Atom PC?

Flemming

Hi Martin,
thanks for the link…it’s fantastic!!!
i’ve just set wd to download and upload the images every 15 min.
Once again thanks,

Alessandro

I’ve only done it using the facility within WD. If you have WD on your server or can find some script that will make the animation and store the images, then there’s no reason why not.

Hi Martin,
i’ve just set it up here:
http://www.meteocarmignano.it/wxradarpioggia.php

Regards,

Alessandro

If you have ssh, cron, imagemagick on your server, you can try the folowing shell script.
To find out you have imagemagick on the server you can do ssh login and type the folowing: convert --version

#!/bin/sh
cd /path/to/some/folder/where/you/want/your/pictures/
wget -q "http://oiswww.eumetsat.org/IPPS/html/latestImages/EUMETSAT_MSG_IR039EColor-westernEurope.jpg" -O sat.jpg
convert -resize 320 -colors 32 sat.jpg sat.gif
mv sat2.gif sat1.gif
mv sat3.gif sat2.gif
mv sat4.gif sat3.gif
mv sat5.gif sat4.gif
mv sat6.gif sat5.gif
mv sat7.gif sat6.gif
mv sat8.gif sat7.gif
mv sat9.gif sat8.gif
mv sat10.gif sat9.gif
mv sat11.gif sat10.gif
mv sat12.gif sat11.gif
mv sat13.gif sat12.gif
mv sat14.gif sat13.gif
mv sat15.gif sat14.gif
mv sat16.gif sat15.gif
mv sat17.gif sat16.gif
mv sat18.gif sat17.gif
mv sat19.gif sat18.gif
mv sat20.gif sat19.gif
mv sat21.gif sat20.gif
mv sat22.gif sat21.gif
mv sat23.gif sat22.gif
mv sat24.gif sat23.gif
mv sat.gif sat24.gif
convert -delay 20 sat1.gif sat2.gif sat3.gif sat4.gif sat5.gif sat6.gif sat7.gif sat8.gif sat9.gif sat10.gif sat11.gif sat12.gif sat13.gif sat14.gif sat15.gif sat16.gif sat17.gif sat18.gif sat19.gif sat20.gif sat21.gif sat22.gif sat23.gif sat24.gif -loop 0 animation.gif


run it every hour with cron

this is making the right top image on my radar-satellite page

EDIT:the first 24 hours you will have errors about not finding satxx.gif because they don’t exist yet

Pinto
Compared to most of you specialists, I’m a novice with regards to servers and whatnot.

  1. What type of file should I use on my server? I can easily copy your script into a file.
  2. Where should I put it? In the root or…?
run it every hour with cron
3. How do I do that?

Flemming

If you can’t login using ssh (secure shell), I’m afraid you can’t use it.
If you don’t know how to run a script using cron, I’m afraid you don’t have the possibility to do it, as it should be on the controll panel for your website.

Sorry about that. :frowning:

EDIT: the script is in fact a very simple shell script for linux.

Hi, I think you should try the FAQ.
I have wd running on an acer netbook with an atom 270 and 1gig ram together with WeatherLink and VVP.
Most of the time it is only sitting there doing nothing, and just waiting until wd or weatherlink want it to do something.

Your fit-pc should handle that little extra without a problem, that is, if you are not using it for someting i cant see on your website

I’ve looked on my control panel with my host. Cron is an option. Now I just have to learn how to use it.

Do I just copy your text into Notepad++ and save as xxx.script.php??

My FitPC is setup in our living room also running as a wireless media server. It is used to play music and movies around the house.

Flemming

Ok, I will try to help with this.

1.his script is a BASH script, it is something like a BATCH script on Windows, but this is for Linux.
I hope you are on a linux server.
It is a command-line script, and it should have a name like xxx.sh (extention = .sh)
2.create a folder on your server, and put it in there. Use your ftp client to make it executable (chmod +x or chmod 755)
the folder must also be writable (chmod 755)
you have to change the line


cd /path/to/some/folder/where/you/want/your/pictures/

so it points to that folder

3.go to the control panel and set cron to run the script once an hour

it should be

1 * * * * /path/to/the/script/xxx.sh

1 is the minute when you want the script to run, you can change that if you want.

where you change the path and the xxx.sh to the actual path and actual name of the script.

after an hour or two you shoul have some pictures inside the folder, and an animation.gif
If it is working you have to wait 24 hours before the animation is complete, and you can use it on your website.

an easy way to find the path to a folder is:
create a php page and put the folowing inside:


<?php
echo getcwd()."/";
?>

put it in the folder you want to use, and use your browser to see what it is reporting