Ho provato a mettere a confronto le previsioni meteo dei servizi NOAA GFS ed Arpege visti nei precedenti post per una localita' italiana confrontando i dati con dati di verita' a terra dati da stazione meteo. Per rendere piu' agevole l'analisi il download ed il pretrattamento dei dati in CSV e' stato automatizzato
Script per NOAA GFS
-----------------------------------------------------------------------------------
dove="/home/luca/gfs/"
rm $dove*.grib > /dev/null 2>&1
rm $dove*.csv > /dev/null 2>&1
rm /var/www/html/luca/gfs/completo.csv > /dev/null 2>&1
mv $dove*.txt ${dove}backup/ > /dev/null 2>&1
today=`date +%Y%m%d`
echo $today
# 11.8537, 46.4297
llon="11.75"
llat="46.25"
ulon="11.99"
ulat="46.49"
for i in $(seq -f "%03g" 0 120)
do
echo $i
wget -q -O ${dove}f${i}.grib "https://nomads.ncep.noaa.gov/cgi-bin/filter_gfs_0p25.pl?file=gfs.t00z.pgrb2.0p25.f$i&lev_2_m_above_ground=on&var_TMP=on&subregion=&leftlon=${llon}&rightlon=${ulon}&toplat=${ulat}&bottomlat=${llat}&dir=%2Fgfs.$today%2F00%2Fatmos"
done
for i in $(seq -f "%03g" 123 3 384) #123 126 129
do
echo $i
wget -q -O ${dove}f${i}.grib "https://nomads.ncep.noaa.gov/cgi-bin/filter_gfs_0p25.pl?file=gfs.t00z.pgrb2.0p25.f$i&lev_2_m_above_ground=on&var_TMP=on&subregion=&leftlon=${llon}&rightlon=${ulon}&toplat=${ulat}&bottomlat=${llat}&dir=%2Fgfs.$today%2F00%2Fatmos"
done
for i in $(seq -f "%03g" 0 120)
do
echo "Conversione grib${i}"
${dove}wgrib2 ${dove}f${i}.grib -csv ${dove}f${i}.csv
done
for i in $(seq -f "%03g" 123 3 384)
do
echo "Conversione grib${i}"
${dove}wgrib2 ${dove}f${i}.grib -csv ${dove}f${i}.csv
done
for i in $(seq -f "%03g" 0 120)
do
cat ${dove}f${i}.csv >> ${dove}${today}_completo.txt
done
for i in $(seq -f "%03g" 123 3 384)
do
cat ${dove}f${i}.csv >> ${dove}${today}_completo.txt
done
#aggiunge l'intestazione al csv
sed '1 s/^/data1,data2,variabile,unita,lon,lat,valore\n/' ${dove}${today}_completo.txt > ${dove}${today}_completo_1.txt
cp ${dove}${today}_completo_1.txt /var/www/html/luca/gfs/completo.csv
---------------------------------------------------------------------------------
Script per Arpege (il servizio necessita di una API Key nel campo Token della URL ...ho modificato per non renderla utilizzabile la mia)
---------------------------------------------------------------------------------
lon="11.8"
lat="46.4"
wget -O ${dove}00_12.grib2 "http://dcpc-nwp.meteo.fr/services/PS_GetCache_DCPCPreviNum?token=__5yLVTdr-sGeHoPitnFc7TZ6MhBcJxuxxxxxxxxxxxxxxx&model=ARPEGE&grid=0.1&package=SP1&time=00H12H&referencetime=${today}T00:00:00Z&format=grib2"
wget -O ${dove}13_24.grib2 "http://dcpc-nwp.meteo.fr/services/PS_GetCache_DCPCPreviNum?token=__5yLVTdr-sGeHoPitnFc7TZ6MhBcxxxxxxxxxxxxxxxxxx&model=ARPEGE&grid=0.1&package=SP1&time=13H24H&referencetime=${today}T00:00:00Z&format=grib2"
wget -O ${dove}25_36.grib2 "http://dcpc-nwp.meteo.fr/services/PS_GetCache_DCPCPreviNum?token=__5yLVTdr-sGeHoPitnFc7TZ6MhBcxxxxxxxxxxxxxxxxxx&model=ARPEGE&grid=0.1&package=SP1&time=25H36H&referencetime=${today}T00:00:00Z&format=grib2"
wget -O ${dove}37_48.grib2 "http://dcpc-nwp.meteo.fr/services/PS_GetCache_DCPCPreviNum?token=__5yLVTdr-sGeHoPitnFc7TZ6MhBcJxuSsoZxxxxxxxxxxxxxxx&model=ARPEGE&grid=0.1&package=SP1&time=37H48H&referencetime=${today}T00:00:00Z&format=grib2"
wget -O ${dove}49_60.grib2 "http://dcpc-nwp.meteo.fr/services/PS_GetCache_DCPCPreviNum?token=__5yLVTdr-sGeHoPitnFc7TZ6MhBcJxuSsoxxxxxxxxxxxxxxxxx&model=ARPEGE&grid=0.1&package=SP1&time=49H60H&referencetime=${today}T00:00:00Z&format=grib2"
wget -O ${dove}61_72.grib2 "http://dcpc-nwp.meteo.fr/services/PS_GetCache_DCPCPreviNum?token=__5yLVTdr-sGeHoPitnFc7TZ6MhBcJxuxxxxxxxxxxxxxxxxxxxx&model=ARPEGE&grid=0.1&package=SP1&time=61H72H&referencetime=${today}T00:00:00Z&format=grib2"
wget -O ${dove}73_84.grib2 "http://dcpc-nwp.meteo.fr/services/PS_GetCache_DCPCPreviNum?token=__5yLVTdr-sGeHoPitnFc7TZ6MhBxxxxxxxxxxxxxxxxxxxxxxx&model=ARPEGE&grid=0.1&package=SP1&time=73H84H&referencetime=${today}T00:00:00Z&format=grib2"
wget -O ${dove}85_96.grib2 "http://dcpc-nwp.meteo.fr/services/PS_GetCache_DCPCPreviNum?token=__5yLVTdr-sGeHoPitnFc7TZ6MhBcJxxxxxxxxxxxxxxxxxxxxxx&model=ARPEGE&grid=0.1&package=SP1&time=85H96H&referencetime=${today}T00:00:00Z&format=grib2"
wget -O ${dove}97_102.grib2 "http://dcpc-nwp.meteo.fr/services/PS_GetCache_DCPCPreviNum?token=__5yLVTdr-sGeHoPitnFc7TZ6MhBcJxxxxxxxxxxxxxxxxxxxxxxxx&model=ARPEGE&grid=0.1&package=SP1&time=97H102H&referencetime=${today}T00:00:00Z&format=grib2"
${dove}wgrib2 -for 102:114 -s -lon ${lon} ${lat} ${dove}00_12.grib2 > ${dove}dati.csv
${dove}wgrib2 -for 97:108 -s -lon ${lon} ${lat} ${dove}13_24.grib2 >> ${dove}dati.csv
${dove}wgrib2 -for 97:108 -s -lon ${lon} ${lat} ${dove}25_36.grib2 >> ${dove}dati.csv
${dove}wgrib2 -for 97:108 -s -lon ${lon} ${lat} ${dove}37_48.grib2 >> ${dove}dati.csv
${dove}wgrib2 -for 97:108 -s -lon ${lon} ${lat} ${dove}49_60.grib2 >> ${dove}dati.csv
${dove}wgrib2 -for 97:108 -s -lon ${lon} ${lat} ${dove}61_72.grib2 >> ${dove}dati.csv
${dove}wgrib2 -for 97:108 -s -lon ${lon} ${lat} ${dove}73_84.grib2 >> ${dove}dati.csv
${dove}wgrib2 -for 97:108 -s -lon ${lon} ${lat} ${dove}85_96.grib2 >> ${dove}dati.csv
${dove}wgrib2 -for 97:108 -s -lon ${lon} ${lat} ${dove}97_102.grib2 >> ${dove}dati.csv
cut -d, -f1 --complement ${dove}dati.csv > ${dove}dati2.csv
cut -d, -f1 --complement ${dove}dati2.csv > ${dove}temp.csv
sed -i -e 's/val=//g' ${dove}temp.csv
go run ${dove}arpege.go > /var/www/html/luca/gfs/arpege.csv
---------------------------------------------------------------------------------
Confronto tra GFS NOAA e stazione meteo a terra
Confronto tra Arpege e stazione meteo a terra
Come si vede in valore assoluto i dati sono differenti ma e' comunque possibile creare una retta di correlazione tra i dati di previsione da terra ed i dati misurati dalla stazione meteo. Considerando che il primo dato e' un dato di previsione il coefficiente di correlazione non e' pessimo