"; echo "Satellite: "; echo " GOES-West "; echo " GOES-East "; echo "
"; echo "Forecast: "; echo " Issued at "; echo " Valid at "; echo "
"; echo "Product: "; echo " TCDC "; echo " HCDC "; echo " 11um "; echo "
"; date_default_timezone_set('UTC'); $now= date('U'); echo ""; echo ""; #echo ""; for ($xx = 1; $xx <= 4; $xx++) { $hh=24-$xx*6; $hh=sprintf("%02d", $hh); $dt2= mktime("$hh", 0, 0, date("m") , date("d")-$x, date("Y")); $ts="${yy}${mm}${dd}${hh}"; $ts2=""; $ck=""; if ( "$img" == "stats") { $imagename="${sat}.${yy}${mm}${dd}${hh}.${yy}${mm}${dd}${hh}.00.${product}.png"; } elseif ( "$img" == "218" || "$img" == "227" || "$img" == "025" ) { $imagename="${yy}${mm}${dd}${hh}.${img}.00.${product}.bin.${sat}.png"; } elseif ( "$img" == "${sat}:227" || "$img" == "${sat}:218" || "$img" == "${sat}:025" ) { $tst=str_replace(":",".","$img"); $imagename="${tst}.${yy}${mm}${dd}${hh}.${yy}${mm}${dd}${hh}.00.${product}.png"; } elseif ( "$img" == "218:227" || "$img" == "227:025" || "$img" == "218:025" ) { $tst=str_replace(":",".","$img"); $imagename="${sat}.${tst}.${yy}${mm}${dd}${hh}.${yy}${mm}${dd}${hh}.00.${product}.png"; } elseif ( "$img" == "${sat}" ) { $imagename="${yy}${mm}${dd}${hh}.${sat}.hdf.${product}.png"; } if (${datelist} == "${ts}"){ $ck="checked"; } #echo "
${local_dir}${imagename}
"; if (file_exists("${local_dir}${imagename}")){ $ts2=" "; } #if ($dt2 < $now ) { # $ts2=" "; #} echo ""; } echo ""; } echo "
Image time:18 UTC12 UTC06 UTC00 UTC
${mm}/${dd}/${yy}
$ts2

"; echo "
"; echo ""; echo ""; $com1=""; $com2=""; if ( "$ck11um" == "checked") { $com1=""; } echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo ""; echo "$com1 "; echo " $com2 "; echo "
Image type:$Satellite [4km]NAM227 [4km]NAM218 [12km]GFS [0.25°]
$Satellite [4km]
$com1 $com2
$com1 $com2
$com1 $com2
NAM227 [4km]
$com1 $com2
$com1 $com2
$com1 $com2
NAM218 [12km]
$com1 $com2
$com1 $com2
GFS [0.25°]
$com1 $com2
Skill

"; echo ""; if ( $sat == "" || $forecast == "" || $img == "" || $datelist == "") { echo "

Please make selections






"; } else { # echo "http://cimss.ssec.wisc.edu/clavrx/geo_ground_model/model.cfg.php?Name=${sat}.${product}.${forecast}.${img}.${datelist} "; $test = "${sat}.${product}.${forecast}.${img}.${datelist}"; $xsize="990"; $ysize="1100"; #---- #$test=$_GET["Name"]; #$test="g15.tcdc.issue.g15.2015102918"; $vars = explode(".", $test); $sat=$vars[0]; $product=$vars[1]; $forecast=$vars[2]; $type=$vars[3]; $tstamp=$vars[4]; $syy=substr("$tstamp",0,4); $smm=substr("$tstamp",4,2); $sdd=substr("$tstamp",6,2); $shh=substr("$tstamp",8,2); $startdate=date_create("$starty-$startm-$startd ${starth}:00:00"); $date=date_create("$starty-$startm-$startd ${starth}:00:00"); $satdate=date_create("$starty-$startm-$startd ${starth}:00:00"); $local_dir="/home/jhoffman/public_html/model/images/"; $image_dir="http://cimss.ssec.wisc.edu/clavrx/geo_ground_model/images/"; $blk="http://cimss.ssec.wisc.edu/clavrx/geo_ground_model/blank3.png"; for ($x=0; $x < 7; $x++){ $fhr=$x*6; $fhr=sprintf("%02d", $fhr); if ( "$forecast" == "valid") { $thh=$shh-$fhr; $itime=mktime($thh, 0, 0, $smm , $sdd, $syy); $vtime=mktime($shh, 0, 0, $smm , $sdd, $syy); } elseif ( "$forecast" == "issue"){ $thh=$shh+$fhr; $itime=mktime($shh, 0, 0, $smm , $sdd, $syy); $vtime=mktime($thh, 0, 0, $smm , $sdd, $syy); } $iyy= date('Y', $itime); $imm= date('m', $itime); $idd= date('d', $itime); $ijj= date('z', $itime); $ihh= date('H', $itime); $vyy= date('Y', $vtime); $vmm= date('m', $vtime); $vdd= date('d', $vtime); $Vjj= date('z', $vtime); $vhh= date('H', $vtime); if ( "$type" == "stats") { $imagename="${sat}.${vyy}${vmm}${vdd}${vhh}.${iyy}${imm}${idd}${ihh}.${fhr}.${product}.png"; } elseif ( "$type" == "218" || "$type" == "227" || "$type" == "025" ) { $imagename="${iyy}${imm}${idd}${ihh}.${type}.${fhr}.${product}.bin.${sat}.png"; } elseif ( "$type" == "${sat}:227" || "$type" == "${sat}:218" || "$type" == "${sat}:025" ) { $type=str_replace(":",".","$type"); $imagename="${type}.${vyy}${vmm}${vdd}${vhh}.${iyy}${imm}${idd}${ihh}.${fhr}.${product}.png"; } elseif ( "$type" == "${sat}.227" || "$type" == "${sat}.218" || "$type" == "${sat}.025" ) { $imagename="${type}.${vyy}${vmm}${vdd}${vhh}.${iyy}${imm}${idd}${ihh}.${fhr}.${product}.png"; } elseif ( "$type" == "218:227" || "$type" == "227:025" || "$type" == "218:025" ) { $type=str_replace(":",".","$type"); $imagename="${sat}.${type}.${vyy}${vmm}${vdd}${vhh}.${iyy}${imm}${idd}${ihh}.${fhr}.${product}.png"; } elseif ( "$type" == "218.227" || "$type" == "227.025" || "$type" == "218.025" ) { $imagename="${sat}.${type}.${vyy}${vmm}${vdd}${vhh}.${iyy}${imm}${idd}${ihh}.${fhr}.${product}.png"; } elseif ( "$type" == "${sat}" ) { $imagename="${vyy}${vmm}${vdd}${vhh}.${sat}.hdf.${product}.png"; } if (file_exists("${local_dir}${imagename}")){ $imagename="${image_dir}${imagename}"; } else { $imagename=$blk; } if ( "$type" == "${sat}" ) { $fn[$x] = "$imagename"; $lab[$x] = "image valid:${vhh} UTC on ${vmm}/${vdd}/${vyy}"; } else { $fn[$x] = "$imagename"; $lab[$x] = "image valid:${vhh} UTC on ${vmm}/${vdd}/${vyy}, issued:${ihh} UTC on ${imm}/${idd}/${iyy}, ${fhr}hr forcast"; } } $n='n'; $s="\\"; echo ""; echo " "; #---- $statsimg="${sat}.${forecast}.${datelist}.${product}.stats.png"; #echo "
${statsimg}
"; if (file_exists("${local_dir}${statsimg}")){ echo "

\"stats


"; } else { echo "



stats image not (yet) available


"; } } ?>