VORTEX2 result 2009

Displaying data for $instrument on $month,$day

“;

// ==========================================
//
// This function test to see if the file exists
// If the file exists then spit out the URL
// If not then spit out an error message
//
// ==========================================

function checkFileExists($data1,$image1,$plot1){

//old pre jacana move — $baseFilePath = “/home/atoc/friedrik/public_html/Experiments/2009_VORTEX2/data/”;
$baseURL = “http://atoc.colorado.edu/~friedrik/Experiments/2009_VORTEX2/data/”;
$baseFilePath = “http://atoc.colorado.edu/~friedrik/Experiments/2009_VORTEX2/data/”;
$datafile = “$baseFilePath.$data1”;
$imagefile = “$baseFilePath.$image1”;
$plotfile= “$baseFilePath.$plot1” ;

// data file
//if (file_exists($baseFilePath.$data1)) {
if (@fopen($datafile,’r’)) {
// Data file exists
//echo “The file $baseFilePath$data1 exists

“;
print “
“;
print “Data file URL: Right click and save file“;
print “
“;
} else {
print (“
“.”NO DATA FILE FOUND” );
echo “The DATA file: $baseFilePath$data1 or $abc does not exist

“;
}

// Image exists
if (@fopen($imagefile,’r’)) {
// Image exists
//echo “

The file $baseFilePath$image1 exists

“;
print “
“;
print “Image file URL: Right click and save file“;
print “
“;
} else {
print (“
“.”NO IMAGE FOUND” );
//echo “The IMAGE file: $baseFilePath$image1 does not exist

“;
}

// Plot exists
if (@fopen($plotfile,’r’)) {
// Plot exists
//echo “

The file $baseFilePath$plot1 exists

“;
print “
“;
print “Plot file URL: Right click and save file“;
print “
“;
} else {
print (“
“.”NO PLOT FOUND” );
//echo “The PLOT file: $baseFilePath$plot1 does not exist

“;
}

// return ($n * $n);
}

// ==========================================
//
// Disdrometer data
//
// ==========================================

if ($instrument == “Disdrometer-CU#1” ) {
//print “

Instrument= “.$instrument.”

“;
$data = “/2009″.$monthDigit.$day.”/2009″.$monthDigit.$day.”_CU01.dat”;
$image = “/2009″.$monthDigit.$day.”/2009″.$monthDigit.$day.”_CU1.JPG”;
$plot = “/2009″.$monthDigit.$day.”/2009″.$monthDigit.$day.”_Concentrations_PA01.pdf”;
// call file exists function and print out result
checkFileExists($data,$image,$plot);

}

if ($instrument == “Disdrometer-CU#2” ) {
//print “

Instrument= “.$instrument.”

“;
$data = “/2009″.$monthDigit.$day.”/2009″.$monthDigit.$day.”_CU02.dat”;
$image = “/2009″.$monthDigit.$day.”/2009″.$monthDigit.$day.”_CU2.JPG”;
$plot = “/2009″.$monthDigit.$day.”/2009″.$monthDigit.$day.”_Concentrations_PA02.pdf”;
// call file exists function and print out result
checkFileExists($data,$image,$plot);

}

// ==========================================
//
// Tornado Pods !!!
//
// ==========================================

if ($instrument == “Tornado Pods-CU#1” ) {
//print “

Instrument= “.$instrument.”

“;
$data = “/2009″.$monthDigit.$day.”/2009″.$monthDigit.$day.”_CU1.dat”;
$image = “/Gauge/rain_10_”.$monthDigit.”_”.$day.”.gif”;
// call file exists function and print out result
checkFileExists($data,$image);

}

if ($instrument == “Tornado Pods-CU#2” ) {
//print “

Instrument= “.$instrument.”

“;
$data = “/2009″.$monthDigit.$day.”/2009″.$monthDigit.$day.”_CU2.dat”;
$image = “/Gauge/rain_10_”.$monthDigit.”_”.$day.”.gif”;
// call file exists function and print out result
checkFileExists($data,$image);

}

// ==========================================
//
// Mission Summary !!!
//
// ==========================================

if ($instrument == “Mission Summary” ) {
//print “

Instrument= “.$instrument.”

“;
$data = “/2009″.$monthDigit.$day.”/MissionSummary-2010″.$monthDigit.$day.”.txt”;
$image = “/Gauge/rain_10_”.$monthDigit.”_”.$day.”.gif”;
// call file exists function and print out result
checkFileExists($data,$image);

}

// ==========================================
//
// Instrument Status !!!
//
// ==========================================

if ($instrument == “Instrument Status CU” ) {
//print “

Instrument= “.$instrument.”

“;
$data = “/2009″.$monthDigit.$day.”/2009″.$monthDigit.$day.”dataquality_CU.txt”;
$image = “/Gauge/rain_10_”.$monthDigit.”_”.$day.”.gif”;
// call file exists function and print out result
checkFileExists($data,$image);

}

?>

Displaying data for $instrument on $month,$day

“;

// ==========================================
//
// This function test to see if the file exists
// If the file exists then spit out the URL
// If not then spit out an error message
//
// ==========================================

function checkFileExists($data1,$image1,$plot1){

//old pre jacana move — $baseFilePath = “/home/atoc/friedrik/public_html/Experiments/2009_VORTEX2/data/”;
$baseURL = “http://atoc.colorado.edu/~friedrik/Experiments/2009_VORTEX2/data/”;
$baseFilePath = “http://atoc.colorado.edu/~friedrik/Experiments/2009_VORTEX2/data/”;
$datafile = “$baseFilePath.$data1”;
$imagefile = “$baseFilePath.$image1”;
$plotfile= “$baseFilePath.$plot1” ;

// data file
//if (file_exists($baseFilePath.$data1)) {
if (@fopen($datafile,’r’)) {
// Data file exists
//echo “The file $baseFilePath$data1 exists

“;
print “
“;
print “Data file URL: Right click and save file“;
print “
“;
} else {
print (“
“.”NO DATA FILE FOUND” );
echo “The DATA file: $baseFilePath$data1 or $abc does not exist

“;
}

// Image exists
if (@fopen($imagefile,’r’)) {
// Image exists
//echo “

The file $baseFilePath$image1 exists

“;
print “
“;
print “Image file URL: Right click and save file“;
print “
“;
} else {
print (“
“.”NO IMAGE FOUND” );
//echo “The IMAGE file: $baseFilePath$image1 does not exist

“;
}

// Plot exists
if (@fopen($plotfile,’r’)) {
// Plot exists
//echo “

The file $baseFilePath$plot1 exists

“;
print “
“;
print “Plot file URL: Right click and save file“;
print “
“;
} else {
print (“
“.”NO PLOT FOUND” );
//echo “The PLOT file: $baseFilePath$plot1 does not exist

“;
}

// return ($n * $n);
}

// ==========================================
//
// Disdrometer data
//
// ==========================================

if ($instrument == “Disdrometer-CU#1” ) {
//print “

Instrument= “.$instrument.”

“;
$data = “/2009″.$monthDigit.$day.”/2009″.$monthDigit.$day.”_CU01.dat”;
$image = “/2009″.$monthDigit.$day.”/2009″.$monthDigit.$day.”_CU1.JPG”;
$plot = “/2009″.$monthDigit.$day.”/2009″.$monthDigit.$day.”_Concentrations_PA01.pdf”;
// call file exists function and print out result
checkFileExists($data,$image,$plot);

}

if ($instrument == “Disdrometer-CU#2” ) {
//print “

Instrument= “.$instrument.”

“;
$data = “/2009″.$monthDigit.$day.”/2009″.$monthDigit.$day.”_CU02.dat”;
$image = “/2009″.$monthDigit.$day.”/2009″.$monthDigit.$day.”_CU2.JPG”;
$plot = “/2009″.$monthDigit.$day.”/2009″.$monthDigit.$day.”_Concentrations_PA02.pdf”;
// call file exists function and print out result
checkFileExists($data,$image,$plot);

}

// ==========================================
//
// Tornado Pods !!!
//
// ==========================================

if ($instrument == “Tornado Pods-CU#1” ) {
//print “

Instrument= “.$instrument.”

“;
$data = “/2009″.$monthDigit.$day.”/2009″.$monthDigit.$day.”_CU1.dat”;
$image = “/Gauge/rain_10_”.$monthDigit.”_”.$day.”.gif”;
// call file exists function and print out result
checkFileExists($data,$image);

}

if ($instrument == “Tornado Pods-CU#2” ) {
//print “

Instrument= “.$instrument.”

“;
$data = “/2009″.$monthDigit.$day.”/2009″.$monthDigit.$day.”_CU2.dat”;
$image = “/Gauge/rain_10_”.$monthDigit.”_”.$day.”.gif”;
// call file exists function and print out result
checkFileExists($data,$image);

}

// ==========================================
//
// Mission Summary !!!
//
// ==========================================

if ($instrument == “Mission Summary” ) {
//print “

Instrument= “.$instrument.”

“;
$data = “/2009″.$monthDigit.$day.”/MissionSummary-2010″.$monthDigit.$day.”.txt”;
$image = “/Gauge/rain_10_”.$monthDigit.”_”.$day.”.gif”;
// call file exists function and print out result
checkFileExists($data,$image);

}

// ==========================================
//
// Instrument Status !!!
//
// ==========================================

if ($instrument == “Instrument Status CU” ) {
//print “

Instrument= “.$instrument.”

“;
$data = “/2009″.$monthDigit.$day.”/2009″.$monthDigit.$day.”dataquality_CU.txt”;
$image = “/Gauge/rain_10_”.$monthDigit.”_”.$day.”.gif”;
// call file exists function and print out result
checkFileExists($data,$image);

}

?>

Scroll to Top