Petite aide pour template_noaa_m.txt

Forum destiné aux problèmes de Tags, recherche d’une fonction, d’un calcul, Tag qui parait ne pas fonctionner, du Tag et rien que du Tag !
Répondre
weather2607
Participation 0
Participation 0
Messages : 13
Enregistré le : 14 déc. 2011, 14:09

Petite aide pour template_noaa_m.txt

Message par weather2607 » 19 déc. 2011, 20:31

Bonsoir,
après l'achat de wswin (cette semaine) et le tour du logiciel est il ya de quoi faire...
ce forum et bien utile, pour entrevoir les possibilités.
donc mon fichier template mois joint ci dessous me donne ce résultat(voir image) ou il manque entouré en mauve la température Max du mois.
Je ne suis pas encore assez costaud pour savoir quel tag modifier,c'est pour cela que je demande de l'aide sur le forum de manière à pouvoir afficher la température Max

Image

<!-- %customfile=% -->
Climatologie mensuelle pour %monthtxt% %ws_year%
%alwaysseppoint_on%
LIEU:%ws_location% ALT: %ws_altitude% LAT: %ws_latitude% %ws_latitudetxt% LONG: %ws_longitude% %ws_longitudetxt%

TEMPERATURE (%unitname[2]%), BAROMETRE (%unitname[33]%), PLUIE (%unitname[34]%), VENT (%unitname[35]%)

TEMP TEMPERATURE VENT VENT ENSOLEILLEMENT
J MOY MAX HEURE MIN HEURE HUM Baro Pluie VITESSE MAX HEURE DOM-
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
%templatebegin%%justify_on%%unit_off% %ws_day%%curval[2]%%maxvalday[2]% %maxtimeday[2]%%minvalday[2]% %mintimeday[2]%%curval[18]% %curval[33]% %curval[34]% %curval[35]% %maxvalday[45]% %maxtimeday[45]% %wind_txt% %curval[37]% %ws_timetoval[%ws_daylength%]%
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
%unit_off%Avg:%avgval[2]%%maxval[2]% %maxdaydays[2]%%minval[2]% %mindaydays[2]%%avgval[18]% %avgval[33]% %rainmonth% %avgval[35]% %maxval[45]% %maxdaydays[45]% %domwind_txt%%sunmonth_s% %ws_avgmaxtemp% %ws_avgmintemp%
%unit_on%%justify_on%

Wind Run %windrun_month%
Valeurs vent calme %wind_calm%
Calme en % %wind_calmproz%

Valeurs vent %winddirproz_value%
Distribution WD N-NO %winddirproz_NNE%
Distribution WD NO %winddirproz_NE%
Distribution WD NO-O %winddirproz_NEE%
Distribution WD O %winddirproz_E%
Distribution WD O-SO %winddirproz_ESE%
Distribution WD SO %winddirproz_SE%
Distribution WD SO-S %winddirproz_SES%
Distribution WD S %winddirproz_S%
Distribution WD S-SW %winddirproz_SSW%
Distribution WD SW %winddirproz_SW%
Distribution WD SW-W %winddirproz_SWW%
Distribution WD W %winddirproz_W%
Distribution WD W-NW %winddirproz_WNW%
Distribution WD NW %winddirproz_NW%
Distribution WD NW-N %winddirproz_NWN%
Distribution WD N %winddirproz_N%
%unit_off%%justify_off%
Jours pluie >%rain0value% %unitname[34]% mois%justify_on% %rain0month%%justify_off%
Jours pluie >%rain2value% %unitname[34]% mois%justify_on% %rain2month%%justify_off%
Jours pluie >%rain20value% %unitname[34]% mois%justify_on% %rain20month%%justify_off%

%justify_on%
Jours glacés max < 0°C %ws_icedays_m%
Jours avec gelée min < 0°C %ws_colddays_m%
Jours froids max < 10°C %ws_cooldays_m%
Jours d'été max >=25°C %ws_warmdays_m%
Jours chauds max >=30°C %ws_hotdays_m%

AnnŽe dernière, même mois: Jours glacés max < 0°C %ws_ly_icedays_m%
AnnŽe dernière, même mois: Jours avec gelée min < 0°C %ws_ly_colddays_m%
AnnŽe dernière, même mois: Jours froids max < 10°C %ws_ly_cooldays_m%
AnnŽe dernière, même mois: Jours d'été max >=25°C %ws_ly_warmdays_m%
AnnŽe dernière, même mois: Jours chauds max >=30°C %ws_ly_hotdays_m%

%ws_copyright%%alwaysseppoint_off%

gégé
participation 3
participation 3
Messages : 286
Enregistré le : 16 déc. 2007, 09:28
Localisation : Baladou 46600
Contact :

Re: Petite aide pour template_noaa_m.txt

Message par gégé » 20 déc. 2011, 10:28

Bonjour
ce n'est pas le template_noaa_m.txt
fait nous voir la source du fichier climatom.php
Gérard
Cordialement Gérard
http://meteo-baladou.com

weather2607
Participation 0
Participation 0
Messages : 13
Enregistré le : 14 déc. 2011, 14:09

Re: Petite aide pour template_noaa_m.txt

Message par weather2607 » 20 déc. 2011, 12:51

voici mon fichier climatom.php.
Bon effectivement je partais sur une mauvaise route, merci Gérard.

<?php

################################################
#Variables dŽfinissant le mois et annŽe ˆ partir duquel les rapporst noaaAAAMM.txt sont disponibles
################################################
$moisdebut = 12;
$anneedebut = 2010;



$yearstr=$_GET['annee'];
$monthstr=$_GET['mois'];
$today = getdate();

$disablenext = '';
$disableprev = '';

if ($yearstr=='') {
$yearstr = str_pad($today[year], 4, "0", STR_PAD_LEFT);
;
}

if ($monthstr=='') {
$monthstr = str_pad($today[mon], 2, "0", STR_PAD_LEFT);
}

$nextmonth = $monthstr + 1;
$nextyear = $yearstr;

if ($nextmonth == 13) {
$nextmonth='01';
$nextyear= $yearstr + 1;
}
if (($nextyear>=$today[year]) && ($nextmonth > $today[mon])) {
$nextmonth = $today[mon];
$disablenext="disabled='disabled'";
}
$anproch = $today[year] + 1;
if ($nextyear == ($today[year] + 1)) {
$nextmonth = $today[mon];
$disablenext="disabled='disabled'";
}


$nextmonth = str_pad($nextmonth, 2, "0", STR_PAD_LEFT);

$prevmonth = $monthstr - 1;
$prevyear = $yearstr;

if ($prevmonth == 0) {
$prevmonth='12';
$prevyear= $yearstr - 1;
}

if (($prevyear==$anneedebut) && ($prevmonth < $moisdebut)) {
$prevmonth = $moisdebut;
$disableprev="disabled='disabled'";
}

$prevmonth = str_pad($prevmonth, 2, "0", STR_PAD_LEFT);

$fichier="noaa".$yearstr.$monthstr.".txt";
$title="Relevés du mois en cours";
echo"
<head>
<title>Climatologie mensuelle </title>

<script type='text/javascript'>

function donoaaprevmonth() {

var yearv='$prevyear'
var monthv='$prevmonth'

mypath='climatom.php?annee='+yearv+'&mois='+monthv

document.location.href=mypath
}

function donoaanextmonth() {
var yearv1='$nextyear'
var monthv1='$nextmonth'

mypath='climatom.php?annee='+yearv1+'&mois='+monthv1

document.location.href=mypath
}

function donoaayear() {

var yearv='$yearstr'


mypath='climatoa.php?annee='+yearv

document.location.href=mypath
}

</script>
</head>
"
;

$fp = fopen ("$fichier",'r');
$content = fread ($fp,filesize($fichier));

$separ_1 = explode("----------
",$content);
$separ_2 = explode("
----------",$separ_1[1]);
$table =$separ_2[0];
$total = $separ_1[2];
$linetitle= explode("
",$separ_1[0]);

$char = array (" ","W");
$newchar = array ("","O");

########################################
#Récupération des moyennes mensuelles ##
########################################
$title1=trim($linetitle[0]);
$title2=trim($linetitle[2]);
$meantemp_m = substr ($separ_1[2],7,5);
$highttemp_m = substr ($separ_1[2],15,5);
$hourhighttemp_m = substr ($separ_1[2],25,5);
$lowtemp_m = substr ($separ_1[2],30,5);
$hourlowtemp_m = substr ($separ_1[2],40,5);
$hum_m = substr ($separ_1[2],47,3);
$baro_m = substr ($separ_1[2],55,6);
$rain_m = substr ($separ_1[2],66,5);
$ventmoyen_m = substr ($separ_1[2],75,5);
$rafales_m = substr ($separ_1[2],85,5);
$hourrafales_m = substr ($separ_1[2],95,5);
$domdir_m = substr ($separ_1[2],103,5);
$domdir_m = trim($domdir_m);
$sunh_m = substr ($separ_1[2],113,7);
$moymin = substr ($separ_1[2],120,5);
$moymax = substr ($separ_1[2],125,5);

########################################
#Récupération des données journalieres##
########################################

$nb = substr_count ($table, "
");

$ligne ="";
$color = array('#ffffff','#ffff00','#ff00ff','#ffffff');
$gel=0;
$fortgel=0;
$sansdegel=0;
$chaleur=0;
$canicule=0;
$pluie=0;
$pluie_1=0;
$pluie_5=0;
$pluie_10=0;
$maxrain=0;
$replow=array(' ',' ');
$rephight=array(' ',' ');
$repmean=array(' ',' ');
$cinq=0;
$huit=0;
$neuf=0;



for ($i=0; $i<$nb+1; $i++)

{
#selection ligne
$line = explode("
",$table);
#séparation et classement des valeurs
$jour = substr ($line[$i],2,2);
$jour = trim($jour);
$day = str_pad($jour, 2, "0", STR_PAD_LEFT);
$meantemp = substr ($line[$i],7,5);
$highttemp = substr ($line[$i],15,5);
$hourhighttemp = substr ($line[$i],22,5);
$lowtemp = substr ($line[$i],30,5);
$hourlowtemp = substr ($line[$i],37,5);
$hum = substr ($line[$i],47,3);
$baro = substr ($line[$i],55,6);
$rain = substr ($line[$i],66,5);
$ventmoyen = substr ($line[$i],75,5);
$rafales = substr ($line[$i],85,5);
$hourrafales = substr ($line[$i],92,5);
$domdir = substr ($line[$i],103,4);
$domdir=trim($domdir);
$sunh = substr ($line[$i],112,5);
$sunmin = substr ($line[$i],115,2) ;
$sunminu = $sunmin * 60;
$sunminut = $sunminu / 100;
$sunminute = round ($sunminut);
$sunminutes = ($sunminute<10?'0':'').$sunminute;
$sunheures = substr ($line[$i],112,2);
$sunpour = substr ($line[$i],118,5);
$sunpou = 5 / 6;
$sunpourc = $sunpour - $sunpou;
$sunpource = $sunh / $sunpourc;
$sunpourcen = $sunpource * 1000;
$sunpourcent = round ($sunpourcen)/10;
if($sunpourcent > '100') {$sunpourcent= 100;}
if($sunpourcent > '95') {$neuf=$neuf+1;}
if($sunpourcent > '80') {$huit=$huit+1;}
if($sunpourcent > '50') {$cinq=$cinq+1;}

$tempe = array($meantemp,$highttemp,$lowtemp);
$color = array('#ff0000','#ffff00','#ff00ff','#ff00ff','#ffff00','#ffff00');
$white = array (0,0,0,0,0,0);
for ($c=0; $c<count($tempe); $c++)

{

#colorisation température
if($tempe[$c] <= '-25') {$color[$c]='#003366';}
elseif($tempe[$c] > '-25' && $tempe[$c] <= '-20') {$color[$c]='#003399'; $white[$c]=1;}
elseif($tempe[$c] > '-20' && $tempe[$c] <= '-15') {$color[$c]='#0000cc'; $white[$c]=1;}
elseif($tempe[$c] > '-15' && $tempe[$c] <= '-10') {$color[$c]='#0000ff'; $white[$c]=1;}
elseif($tempe[$c] > '-10' && $tempe[$c] <= '-5') {$color[$c]='#0099ff'; $white[$c]=0;}
elseif($tempe[$c] > '-5' && $tempe[$c] <= '0') {$color[$c]='#66ffff'; $white[$c]=0; }
elseif($tempe[$c] > '0' && $tempe[$c] <= '5') {$color[$c]='#66ff99'; $white[$c]=0; }
elseif($tempe[$c] > '5' && $tempe[$c] <= '10') {$color[$c]='#66ff00'; $white[$c]=0;}
elseif($tempe[$c] > '10' && $tempe[$c] <= '15') {$color[$c]='#ffff00'; $white[$c]=0; }
elseif($tempe[$c] > '15' && $tempe[$c] <= '20') {$color[$c]='#ffcc00'; $white[$c]=0; }
elseif($tempe[$c] > '20' && $tempe[$c] <= '25') {$color[$c]='#ff9900'; $white[$c]=0; }
elseif($tempe[$c] > '25' && $tempe[$c] <= '30') {$color[$c]='#ff6600'; $white[$c]=0; }
elseif($tempe[$c] > '30' && $tempe[$c] <= '35') {$color[$c]='#ff3300'; $white[$c]=0; }
elseif($tempe[$c] > '35' && $tempe[$c] <= '40') {$color[$c]='#cc0000'; $white[$c]=0;}
elseif($tempe[$c] > '40') {$color[$c]='#660000'; $white[$c]=0;}
else {$color[$c]='#ff00ff';}


}


#colorisation humidite
if($hum <= '10') {$color[7]='#FFFF99';}
elseif($hum > '10' && $hum <= '20') {$color[7]='#00ff80'; $white[7]=0; }
elseif($hum > '20' && $hum <= '30') {$color[7]='#00ffc0'; $white[7]=1; }
elseif($hum > '30' && $hum <= '40') {$color[7]='#00ffe0'; $white[7]=1; }
elseif($hum > '40' && $hum <= '50') {$color[7]='#00e0ff'; $white[7]=1; }
elseif($hum > '50' && $hum <= '60') {$color[7]='#00a0ff'; $white[7]=1; }
elseif($hum > '60' && $hum <= '70') {$color[7]='#0080ff'; $white[7]=1; }
elseif($hum > '70' && $hum <= '80') {$color[7]='#0060ff'; $white[7]=1; }
elseif($hum > '80' && $hum < '90') {$color[7]='#0040ff'; $white[7]=1; }
elseif($hum >= '90') {$color[7]='#0000c0'; $white[7]=1;}
else {$color[7]='#ffffff';}

#colorisation pluie
if($rain >= '0.2' && $rain <= '1') {$color[3]='#00fe96'; $white[3]=0;}
elseif($rain > '1' && $rain <= '2.5') {$color[3]='#00fefe'; $white[3]=0;}
elseif($rain > '2.5' && $rain <= '5') {$color[3]='#00c8fe'; $white[3]=0;}
elseif($rain > '5' && $rain <= '7.5') {$color[3]='#0096fe'; $white[3]=0; }
elseif($rain > '7.5' && $rain <= '10') {$color[3]='#0064fe'; $white[3]=1; }
elseif($rain > '10' && $rain <= '15') {$color[3]='#3200fe'; $white[3]=1; }
elseif($rain > '15' && $rain <= '30') {$color[3]='#6400fe'; $white[3]=1;}
elseif($rain > '30' && $rain <= '60') {$color[3]='#9600fe'; $white[3]=1; }
elseif($rain > '60' && $rain <= '100') {$color[3]='#c800fe'; $white[3]=1; }
elseif($rain > '100') {$color[]='#640064'; $white[3]=1;}
else {$color[3]='#ffffff';}

#colorisation vent
if($rafales < '10' ) {$color[4]='#ffffff';}
elseif($rafales >= '10' && $rafales < '20') {$color[4]='#ebebeb'; $white[4]=0;}
elseif($rafales >= '20' && $rafales < '30') {$color[4]='#d7d7d7'; $white[4]=0;}
elseif($rafales >= '30' && $rafales < '40') {$color[4]='#c4c4c4'; $white[4]=0; }
elseif($rafales >= '40' && $rafales < '50') {$color[4]='#afafaf'; $white[4]=0; }
elseif($rafales >= '50' && $rafales < '60') {$color[4]='#AB8787'; $white[4]=0; }
elseif($rafales >= '60' && $rafales < '70') {$color[4]='#D07676'; $white[4]=0;}
elseif($rafales >= '70' ) {$color[4]='#ff0000'; $white[4]=0; }
else {$color[4]='#222222';}

#colorisation pression
if($baro <= '990') {$color[5]='##0000ff';}
elseif($baro > '990' && $baro <= '995') {$color[5]='##0099ff'; $white[5]=0; }
elseif($baro > '995' && $baro <= '1000') {$color[5]='#66ffff'; $white[5]=0; }
elseif($baro > '1000' && $baro <= '1005') {$color[5]='#66ff99'; $white[5]=0; }
elseif($baro > '1005' && $baro <= '1010') {$color[5]='#66ff00'; $white[5]=0;}
elseif($baro > '1010' && $baro <= '1015') {$color[5]='#ffff00'; $white[5]=0; }
elseif($baro > '1015' && $baro <= '1020') {$color[5]='#ffcc00'; $white[5]=0; }
elseif($baro > '1020' && $baro <= '1025') {$color[5]='#ff9900'; $white[5]=0; }
elseif($baro > '1025' && $baro <= '1030') {$color[5]='#ff6600'; $white[5]=0; }
elseif($baro > '1030' && $baro <= '1035') {$color[5]='#ff3300'; $white[5]=0; }
elseif($baro > '1035' && $baro <= '1040') {$color[5]='#cc0000'; $white[5]=0;}
elseif($baro > '1040') {$color[5]='#660000'; $white[5]=0;}
else {$color[5]='#ff00ff';}

#colorisation ensoleillement
if($sunpourcent <= '5') {$color[6]='#FFFFFF';}
elseif($sunpourcent > '5' && $sunpourcent <= '10') {$color[6]='#FFFFCC'; $white[6]=0; }
elseif($sunpourcent > '10' && $sunpourcent <= '20') {$color[6]='#FFFF99'; $white[6]=0; }
elseif($sunpourcent > '20' && $sunpourcent <= '30') {$color[6]='#FFFF66'; $white[6]=0; }
elseif($sunpourcent > '30' && $sunpourcent <= '40') {$color[6]='#FFFF33'; $white[6]=0; }
elseif($sunpourcent > '40' && $sunpourcent <= '50') {$color[6]='#FFFF00'; $white[6]=0; }
elseif($sunpourcent > '50' && $sunpourcent <= '60') {$color[6]='#FFCC66'; $white[6]=0; }
elseif($sunpourcent > '60' && $sunpourcent <= '70') {$color[6]='#FFCC00'; $white[6]=0; }
elseif($sunpourcent > '70' && $sunpourcent <= '80') {$color[6]='#FF9900'; $white[6]=0;}
elseif($sunpourcent > '80' && $sunpourcent <= '90') {$color[6]='#FF6600'; $white[6]=0; }
elseif($sunpourcent > '90' && $sunpourcent <= '95') {$color[6]='#FF0000'; $white[6]=0; }
elseif($sunpourcent > '95') {$color[6]='#CC0000'; $white[6]=1; }
else {$color[6]='#ffffff';}



#repère des extremes
$replow=array('','');
$rephight=array('','');
$repmean=array('','');
$reprafales=array('','');
$colortext=array('','','','','','','');

for ($c=0; $c<8; $c++)
{
if ($white[$c]==1) {$colortext[$c]='color="white"';}
else {$colortext[$c]='';}
}

if ($lowtemp == $lowtemp_m) {$replow = array("<b>","</b></font>");}
if ($highttemp == $highttemp_m) {$rephight = array("<b>","</b></font>");}
if ($rafales == $rafales_m) {$reprafales = array("<b>","</b></font>");}

if ($lowtemp <='0' && $lowtemp !="") {$gel=$gel+1;} else {$gel=$gel;}
if ($lowtemp <='-5'&& $lowtemp !="") {$fortgel=$fortgel+1;} else {$fortgel=$fortgel;}
if ($lowtemp <='0' && $highttemp <='0' && $lowtemp !="") {$sansdegel=$sansdegel+1;} else {$sansdegel=$sansdegel;}
if ($highttemp >='30') {$chaleur=$chaleur+1;} else {$chaleur=$chaleur;}
if ($highttemp >='35') {$canicule=$canicule+1;} else {$canicule=$canicule;}

if ($rain >'0' && $rain !="") {$pluie=$pluie+1;} else {$pluie=$pluie;}
if ($rain >='1' && $rain !="") {$pluie_1=$pluie_1+1;} else {$pluie_1=$pluie_1;}
if ($rain >='5' && $rain !="") {$pluie_5=$pluie_5+1;} else {$pluie_5=$pluie_5;}
if ($rain >='10' && $rain !="") {$pluie_10=$pluie_10+1;} else {$pluie_10=$pluie_10;}
if ($rain > $maxrain && $rain !="") {$maxrain="$rain";} else {$maxrain=$maxrain;}
#incrémentation du tableau

if (intval($jour)==intval($today[mday]) && intval($monthstr) == intval($today[mon]) && intval($yearstr) == intval($today[year]))
{$dirvent = 'http://lacombe.dyndns.org/meteo/ddis_current.gif';}
else {$dirvent = "http://lacombe.dyndns.org/meteo/$yearst ... tr$day.gif";}
$ligne .= "<tr >
<td bgcolor='gray' align='center'><font color='white' >$jour</td>
<td bgcolor='$color[2]' width='110' align='center'><font $colortext[2] >$replow[0] $lowtemp °C à $hourlowtemp $replow[1]</td>
<td bgcolor='$color[0]' width='65' align='center'><font $colortext[0] >$repmean[0] $meantemp °C $rephight[1]</td>
<td bgcolor='$color[1]' width='110' align='center'><font $colortext[1] >$rephight[0] $highttemp °C à $hourhighttemp $rephight[1]</td>
<td bgcolor='$color[4]' width='230' align='center'><font $colortext[4] >$ventmoyen km/h ($reprafales[0] $rafales km/h à $hourrafales $reprafales[1])</td>
<td bgcolor='#ffffff' width='70' align='center'><font ><img src='pictos/$domdir.gif'/>$domdir</td>
<td bgcolor='$color[3]' width='80' align='center'><font $colortext[3] >$rain mm</td>
<td bgcolor='$color[7]' width='80' align='center'><font $colortext[7] >$hum %</td>
<td bgcolor='$color[5]' width='80' align='center'><font $colortext[5] >$baro hPa</td>
<td bgcolor='$color[6]' width='110' align='center'><font $colortext[6] >$sunheures:$sunminutes h &nbsp; $sunpourcent%</td>
</tr>
";}



#################
#affichage final#
#################
echo "
<body bgcolor='#D6D6D6' text='black' link='blue' vlink='purple' alink='red' background='../images/00_bg1.jpg'>
<p align='center'><span style='font-size:22pt'><font face='Comic Sans MS' color='#009900'><b>$title1</b></font></span></p>
<font >$title2</font><br><br>
<input onclick='donoaaprevmonth();' type='button' $disableprev name='nooaprev'id='nooaprev' value='Mois pr&eacute;c&eacute;dent' >
<input onclick='donoaanextmonth();' type='button' $disablenext name='nooanext'id='nooanext' value='Mois suivant' >
<input onclick='donoaayear();' type='button' name='nooayear' id='nooayear' value='Climatologie année' >
<form name='date' method='GET' action='redirclimatom.php'>
<font face='Comic Sans MS'>Recherche
d'un mois:</font> &nbsp;<select name='mois' size='1'>
<option>Mois</option>
<option value='01'>Janvier</option>
<option value='02'>Février</option>
<option value='03'>Mars</option>
<option value='04'>Avril</option>
<option value='05'>Mai</option>
<option value='06'>Juin</option>
<option value='07'>Juillet</option>
<option value='08'>Août</option>
<option value='09'>Septembre</option>
<option value='10'>Octobre</option>
<option value='11'>Novembre</option>
<option value='12'>Décembre</option>
</select> &nbsp;<select name='annee' size='1'>";
$today = getdate();
$year = $today[year];
echo" <option>Année</option>";
for ($i=$anneedebut;$i <= $year; $i=$i+1){echo "<option value='$i'>$i</option>";
}
echo"
</select>
<input type='submit' name='AFFICHER' value='Afficher'>
</form>
</p>

<table style='border-collapse: collapse' border='1' bordercolor='#000000'>

<tr bgcolor='gray'>
<td rowspan='2' align='center'><font color='white' ><b>Jour</b></font></td>
<td colspan='3' align='center'><font color='white' ><b>Température</b></font></td>
<td colspan='2' align='center'><font color='white' ><b>Vent</b></font></td>
<td rowspan='2' align='center'><font color='white' ><b>Pluie</b></font></td>
<td rowspan='2' align='center'><font color='white' ><b>Humidité</b></font></td>
<td rowspan='2' align='center'><font color='white' ><b>Pression</b></font></td>
<td rowspan='2' align='center'><font color='white' ><b>Soleil</b></font></td>
</tr>



<tr bgcolor='gray'>

<td align='center'><font color='white' >min</font></td>
<td align='center'><font color='white' >moy</font></td>
<td align='center'><font color='white' >max</font></td>
<td align='center'><font color='white' >Vent moyen (rafale max)</font></td>
<td align='center'><font color='white' >Secteur</font></td>
</tr>

$ligne



<tr bgcolor='gray'>
<td><font color='white' ><b> Moyennes </b></font></td>
<td align='center'><font color='white' >$moymax °C</font></td>
<td align='center'><font color='white' >$meantemp_m °C</font></td>
<td align='center'><font color='white' >$moymin °C</font></td>
<td align='center'><font color='white' >$ventmoyen_m km/h (max: $rafales_m km/h)</font></td>
<td align='center'><font color='white' ><img src='pictos/$domdir_m.gif'/>$domdir_m</font></td>
<td align='center'><font color='white' >Total: $rain_m mm</font></td>
<td align='center'><font color='white' >$hum_m %</font></td>
<td align='center'><font color='white' >$baro_m hPa</font></td>
<td align='center'><font color='white' >Total: $sunh_m h</font></td>
</tr>
</table>
<font >
<p>Température moyenne mensuelle : <b>$meantemp_m °C</b></b> <br>Tn mensuelle : <b>$lowtemp_m °C</b> <br>Tx mensuelle : <b>$highttemp_m °C</b></p>
<p>Vent moyen pour le mois : <b>$ventmoyen_m km/h</b> de secteur <b>$domdir_m </b><br>Rafale maxi : <b>$rafales_m km/h</b></p>
<p>Pluviometrie mensuelle : <b>$rain_m mm</b> avec un maximum journalier de <b>$maxrain mm</b></p>

<p>Nombre de jours :</p>
<ul>
<li>avec gelée : <b>$gel</b> </li>
<li>avec forte gelée (<=-5): <b>$fortgel</b> </li>
<li>sans dégel : <b>$sansdegel</b> </li>
<li>avec chaleur (>=30): <b>$chaleur</b> </li>
<li>avec canicule (>=35): <b>$canicule</b> </li>
</ul>
<ul>
<li>avec pluie : <b>$pluie</b></li>
<li>avec plus de 1mm : <b>$pluie_1</b></li>
<li>avec plus de 5mm : <b>$pluie_5</b></li>
<li>avec plus de 10mm : <b>$pluie_10</b></li>
</ul>
<ul>
<li>avec ensoleillement >50% : <b>$cinq</b></li>
<li>avec ensoleillement >80% : <b>$huit</b></li>
<li>avec ensoleillement >95% : <b>$neuf</b></li>
</ul>
</font>

</body>";



?>

gégé
participation 3
participation 3
Messages : 286
Enregistré le : 16 déc. 2007, 09:28
Localisation : Baladou 46600
Contact :

Re: Petite aide pour template_noaa_m.txt

Message par gégé » 20 déc. 2011, 14:19

dans le template il n'y à pas la moyenne mini maxi
Cordialement Gérard
http://meteo-baladou.com

weather2607
Participation 0
Participation 0
Messages : 13
Enregistré le : 14 déc. 2011, 14:09

Re: Petite aide pour template_noaa_m.txt

Message par weather2607 » 20 déc. 2011, 16:03

Vous posséder un template qui aurais cette fonction ?

gégé
participation 3
participation 3
Messages : 286
Enregistré le : 16 déc. 2007, 09:28
Localisation : Baladou 46600
Contact :

Re: Petite aide pour template_noaa_m.txt

Message par gégé » 20 déc. 2011, 17:07

non on peux mètre le mini et le maxi du mois a la place
$lowtemp_m =mini du mois
$highttemp_m =maxi du mois
comme ceci
<td><font color='white' ><b> Moyennes </b></font></td>
<td align='center'><font color='white' >$lowtemp_m °C</font></td>
<td align='center'><font color='white' >$meantemp_m °C</font></td>
<td align='center'><font color='white' >$highttemp_m °C</font></td>
<td align='center'><font color='white' >$ventmoyen_m km/h (max: $rafales_m km/h)</font></td>
<td align='center'><font color='white' ><img src='pictos/$domdir_m.gif'/>$domdir_m</font></td>
<td align='center'><font color='white' >Total: $rain_m mm</font></td>
<td align='center'><font color='white' >$hum_m %</font></td>
<td align='center'><font color='white' >$baro_m hPa</font></td>
<td align='center'><font color='white' >Total: $sunh_m h</font></td>
Gérard
Cordialement Gérard
http://meteo-baladou.com

weather2607
Participation 0
Participation 0
Messages : 13
Enregistré le : 14 déc. 2011, 14:09

Re: Petite aide pour template_noaa_m.txt

Message par weather2607 » 20 déc. 2011, 19:07

Je viens de tester cela fonctionne du premier coup, un grand merci Gérard pour m'avoir consacré un peu de temps, pour résoudre ce problème. :Panneau-Merci:

------------------------------
édit je rajoute un lien de vers ma station:
http://meteo-aouste.toile-libre.org/
climatologie:
http://meteo-aouste.toile-libre.org/noa ... 11&mois=01

Répondre