Local Time:
GMT Time:
This project is supported by MIT Sea Grant
// This is to get sea lelve from nan and nau GM Feb 2009
function getSeaLevel_m()
{
$gmt=(date("O")*-1)/100;
$day=date("d");
$dd=$day+1;
$h=date("H");
$hh=24-$gmt;
$hora1=($h+$gmt);
$hora2=($h+$gmt)-24;
$month=date("m");
$ano=date("Y");
if ($h >= $hh)
{
$day=$dd;
$hora=$hora2;
}
else{
$hora=$hora1;
}
$arqsenha = file ("../Tides/2010/5_const_2010.txt");
// finding the respective sea level
$cont=1;
for ($l = 0; $l < sizeof ($arqsenha) ; $l++) {
list ($nan,$nau,$a,$m,$d,$hr,$min) = split (";", $arqsenha[$l], 7 );
//
if ( trim($m) == trim($month) && trim($a) == trim($ano)){
$hour[$cont]=$hr;
$mm[$cont]=$min;
$s_nan[$cont]=$nan;
$s_nau[$cont]=$nau;
$s_yr[$cont]=$a;
$s_mon[$cont]=$m;
$s_day[$cont]=$d;
$cont=$cont+1;
}
}
$n=$cont-1;
?>
unset($day, $month, $ano,$s_nan,$s_nau,$mm,$hour,$n,$cont);
} ?>