Boulder Snow Experiment 2010 – Search Results

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){

$baseFilePath = “/home/atoc/friedrik/public_html/Experiments/2010_BoulderSnow”;
$baseURL = “http://atoc.colorado.edu/~friedrik/Experiments/2010_BoulderSnow/”;

// data file
if (file_exists($baseFilePath.$data1)) {
// 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 does not exist

“;
}

// Image exists
if (file_exists($baseFilePath.$image1)) {
// 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

“;
}

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

// ==========================================
//
// Rain Gauges data
//
// ==========================================

if ($instrument == “Gauge” ) {
//print “

Instrument= “.$instrument.”

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

}

// ==========================================
//
// We Love the MMRs !!!
//
// ==========================================

// MRR1
if ($instrument == “MRR1” ) {
$data = “/MRR/MRR1/mrr_avg_10_”.$monthDigit.”_”.$day.”.dat”;
$image= “/MRR/MRR1/mrr_avg_Z_10_”.$monthDigit.”_”.$day.”.png”;
checkFileExists($data,$image);
/*
print “

“.$instrument.”

“;
print $baseURL.$one;
print “
“;
print “
“;
print $baseURL.$two;
*/
}

// MRR2
if ($instrument == “MRR2”) {
$data = “/MRR/MRR2/”.$monthDigit.$day.”mrr”;
$image= “/MRR/MRR/2/10″.$monthDigit.$day.”_Z.gif”;
checkFileExists($data,$image);
}

// MRR3
if ($instrument == “MRR3”) {
$data = “/MRR/MRR3/”.$monthDigit.$day.”mrr”;
$image = “/MRR/MRR3/10″.$monthDigit.$day.”_Z.gif”;
checkFileExists($data,$image);
}

// ==========================================
//
// The lovely Disdrometers !!!
//
// ==========================================

// Disdrometer 1
if ($instrument == “Disdrometer1” ) {
$data = “/Disd/Disd1/disd_10_”.$monthDigit.”_”.$day.”.dat”;
$image= “/Disd/Disd1/disd_Nd_10_”.$monthDigit.”_”.$day.”.jpg”;
checkFileExists($data,$image);

/*print “

“.$instrument.”

“;
print $baseURL.”Disd/Disd1”.$data;
print “
“;
print “
“;
print $baseURL.”Disd/Disd1”.$image;
*/

}

// Disdrometer 2
if ($instrument == “Disdrometer2” ) {
$data = “/Disd/Disd1/2010″.$monthDigit.$day.”PA01.dat”;
//$image= “/Disd/Disd1/disd_Nd_10_”.$monthDigit.”_”.$day.”.jpg”;
checkFileExists($data,$image);
}

// Disdrometer 3

// Disdrometer 2
if ($instrument == “Disdrometer3” ) {
$data = “/Disd/Disd1/2010″.$monthDigit.$day.”PA02.dat”;
//$image= “/Disd/Disd1/disd_Nd_10_”.$monthDigit.”_”.$day.”.jpg”;
checkFileExists($data,$image);
}

// ==========================================
//
// Ceilometer
//
// ==========================================

if ($instrument == “Ceilometer” ){
$data = “/Celio/celio_10_”.$monthDigit.”_”.$day.”.dat”;
$image= “/Celio/celio_10_”.$monthDigit.”_”.$day.”.jpg”;
checkFileExists($data,$image);
/*print “

“.$instrument.”

“;
print $baseURL.”Celio”.$data;
print “
“;
print “
“;
print $baseURL.”Celio”.$image;
*/

}

// ==========================================
//
// Video
//
// ==========================================

if ($instrument == “Video” ){
$data = “/Video/vid2_10_”.$monthDigit.”_”.$day.”.avi”;
$image = “null”;
checkFileExists($data,$image);

/*
print “

“.$instrument.”

“;
print $baseURL.”Video”.$data;
print “
“;
*/
}

// ==========================================
//
// Wbobs wxobs20100308.txt png
//
// ==========================================

if ($instrument == “Wxobs” ){
$data = “/Wxobs/wxobs2010″.$monthDigit.$day.”.txt”;
$image = “/Wxobs/wxobs2010″.$monthDigit.$day.”.png”;
checkFileExists($data,$image);
/*print “

“.$instrument.”

“;
print $baseURL.”Wxobs”.$data;
print “
“;
print “
“;
print $baseURL.”Wxobs”.$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){

$baseFilePath = “/home/atoc/friedrik/public_html/Experiments/2010_BoulderSnow”;
$baseURL = “http://atoc.colorado.edu/~friedrik/Experiments/2010_BoulderSnow/”;

// data file
if (file_exists($baseFilePath.$data1)) {
// 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 does not exist

“;
}

// Image exists
if (file_exists($baseFilePath.$image1)) {
// 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

“;
}

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

// ==========================================
//
// Rain Gauges data
//
// ==========================================

if ($instrument == “Gauge” ) {
//print “

Instrument= “.$instrument.”

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

}

// ==========================================
//
// We Love the MMRs !!!
//
// ==========================================

// MRR1
if ($instrument == “MRR1” ) {
$data = “/MRR/MRR1/mrr_avg_10_”.$monthDigit.”_”.$day.”.dat”;
$image= “/MRR/MRR1/mrr_avg_Z_10_”.$monthDigit.”_”.$day.”.png”;
checkFileExists($data,$image);
/*
print “

“.$instrument.”

“;
print $baseURL.$one;
print “
“;
print “
“;
print $baseURL.$two;
*/
}

// MRR2
if ($instrument == “MRR2”) {
$data = “/MRR/MRR2/”.$monthDigit.$day.”mrr”;
$image= “/MRR/MRR/2/10″.$monthDigit.$day.”_Z.gif”;
checkFileExists($data,$image);
}

// MRR3
if ($instrument == “MRR3”) {
$data = “/MRR/MRR3/”.$monthDigit.$day.”mrr”;
$image = “/MRR/MRR3/10″.$monthDigit.$day.”_Z.gif”;
checkFileExists($data,$image);
}

// ==========================================
//
// The lovely Disdrometers !!!
//
// ==========================================

// Disdrometer 1
if ($instrument == “Disdrometer1” ) {
$data = “/Disd/Disd1/disd_10_”.$monthDigit.”_”.$day.”.dat”;
$image= “/Disd/Disd1/disd_Nd_10_”.$monthDigit.”_”.$day.”.jpg”;
checkFileExists($data,$image);

/*print “

“.$instrument.”

“;
print $baseURL.”Disd/Disd1”.$data;
print “
“;
print “
“;
print $baseURL.”Disd/Disd1”.$image;
*/

}

// Disdrometer 2
if ($instrument == “Disdrometer2” ) {
$data = “/Disd/Disd1/2010″.$monthDigit.$day.”PA01.dat”;
//$image= “/Disd/Disd1/disd_Nd_10_”.$monthDigit.”_”.$day.”.jpg”;
checkFileExists($data,$image);
}

// Disdrometer 3

// Disdrometer 2
if ($instrument == “Disdrometer3” ) {
$data = “/Disd/Disd1/2010″.$monthDigit.$day.”PA02.dat”;
//$image= “/Disd/Disd1/disd_Nd_10_”.$monthDigit.”_”.$day.”.jpg”;
checkFileExists($data,$image);
}

// ==========================================
//
// Ceilometer
//
// ==========================================

if ($instrument == “Ceilometer” ){
$data = “/Celio/celio_10_”.$monthDigit.”_”.$day.”.dat”;
$image= “/Celio/celio_10_”.$monthDigit.”_”.$day.”.jpg”;
checkFileExists($data,$image);
/*print “

“.$instrument.”

“;
print $baseURL.”Celio”.$data;
print “
“;
print “
“;
print $baseURL.”Celio”.$image;
*/

}

// ==========================================
//
// Video
//
// ==========================================

if ($instrument == “Video” ){
$data = “/Video/vid2_10_”.$monthDigit.”_”.$day.”.avi”;
$image = “null”;
checkFileExists($data,$image);

/*
print “

“.$instrument.”

“;
print $baseURL.”Video”.$data;
print “
“;
*/
}

// ==========================================
//
// Wbobs wxobs20100308.txt png
//
// ==========================================

if ($instrument == “Wxobs” ){
$data = “/Wxobs/wxobs2010″.$monthDigit.$day.”.txt”;
$image = “/Wxobs/wxobs2010″.$monthDigit.$day.”.png”;
checkFileExists($data,$image);
/*print “

“.$instrument.”

“;
print $baseURL.”Wxobs”.$data;
print “
“;
print “
“;
print $baseURL.”Wxobs”.$image;
*/

}

?>

Scroll to Top