OUTAGE NOTICE: Areas of the CSL website and data access are unavailable during critical maintenance.
 

E&E - UBWOS 2012 Data Download

Other data sources:

Field campaign: 15 January - 1 March 2012

0, so it gets into the 'else' below. } if (($pos === false) * (substr($file, 0, 1)!=".")) { // starting string might be same as another filename (ie A24-PALMS, and A24-PALMSpartType) $skipIt=1; } else { $wholePrefix = substr($file, 0, $pos); //now seach on the whole prefix of filename, not part of it. } // if ((preg_match($strToFind, $wholePrefix)) * ($skipIt==0)) { //find items starting with dataID if (($strToFind == $wholePrefix) * ($skipIt==0)) { //find matching string (won't find partial match with substr) if ($ftype =="ibw") { //if searching ibw files (want to find zip files, not folders with same prefix). $fname=$file; // it's a match. ibw folder = dataID break; } else { //finds ict files here if there's a match $fname=$file; //found one break; // done searching this folder } } // endif } // endwhile closedir($open); return $fname; } // Reads last line of icartt file starting at end function readlastline($fileName) { $fp = @fopen($fileName, "r"); $pos = -1; $t = " "; while ($t != "\n") { fseek($fp, $pos, SEEK_END); $t = fgetc($fp); $pos = $pos - 1; if (($pos==-2)*($t == "\n")) { $t=" "; //reset so it doesn't find very first /n if that is the last char in file. } } $t = fgets($fp); fclose($fp); return $t; } function writeTableRow($dataGroup, $dataID, $dataArr) { //ie pass in "Chem", "ARNOLD", "O3_ppbv","NO3_pptv" echo "\n"; //new row echo "  $dataID\n"; //first col has file prefix (dataID) echo " \n"; //2nd col has icartt, ibw file icons if data exists // IBW FILES $IBWFilePathAndName = "../../data/Ground/ibw/All/$dataGroup/$dataID"; if (file_exists($IBWFilePathAndName)) { $phpPath = "datafunction.php?mission=2012ubwos&platform=Ground&filetype=ibw&fldate=All&datagroup=".$dataGroup."&dataid=".$dataID; echo " "; //link for IBW folder. echo "\"Igor"; } // ICARTT FILES $foundit=0; //init variable $vrsn = array('RA','RB', 'RC', 'RD', 'RE', 'R0', 'R1', 'R2', 'R3', 'R4', 'R5'); $i=0; if ($dataID == "Met-PSD") { $fdate = "20120112"; } elseif ($dataID == "Rad-PSD") { $fdate = "20120113"; } else { $fdate = "20120115"; } while($foundit==0 && $i<10) { $ICTFilePathAndName = "../../data/Ground/ict/All/$dataGroup/".$dataID."_UBWOS_".$fdate."_".$vrsn[$i].".ict"; if (file_exists($ICTFilePathAndName)) { $foundit=1; echo "\n"; // make link echo "\"ICARTT"; echo "\n"; } else { $i+=1; } //end if exists } //end while $fname = $dataID."_UBWOS_".$fdate."_".$vrsn[$i].".ict"; if ($foundit==1) { //found a file that matches file prefix that was passed in. $rev = substr($fname, strlen($fname)-6, 2); // icartt file revision from filename // $modDate = date("Ymd, H, T", filemtime("../../data/Atlantis/ict/AllCrz/$dataGroup/$fname")); //file modification in yyyymmdd, hh, MDT //NEED TO DO THIS TO FIND TIME OF LAST UPDATE IN FILE. $lastLine = readlastline("../../data/Ground/ict/All/$dataGroup/$fname"); // returns entire last line of text from file $lastTimeArr = sscanf($lastLine, "%d"); // extracts the first number (don't know how many there will be, so do it this way) $lastTime = $lastTimeArr[0]; // get the first number in the array which is the 1st number in the line of data. $pos = strpos($fname, "_", 0); // position of first _ in filename $pos = strpos($fname, "_", $pos+1); // position of second _ $fileDate = substr($fname, $pos+1, 8); //get the date from the filename // print "Extracted date: $fileDate\n"; //Now do date arithmetic with # of secs from date in icartt filename. // print "lasttime in file = $lastTime\n"; $n = sscanf($fileDate, "%4d%2d%2d", $year, $month, $day); //read 4 digit year 2 digit month 2 digit day from file date // prints yyyymmdd of file start+lastTime $endData = date("Ymd H:i:s\n", mktime(0,0,0, $month, $day, $year)+$lastTime); //end date of data. echo " \n"; // close 2nd col tag echo "  $rev\n "; // 3rd col has file revision. echo "  $endData\n "; // 4th col has date/time of last data in file. Useful to know if it has been updated since last download. echo " "; //5th col has links to graphs foreach($dataArr as $item) { //write out the links to png files echo "  $item
"; } echo "\n "; // 5th row has data plots. } else { //foundit=0 // no IBW folder found echo "  \n "; // close 2nd col echo "  \n "; // empty 3rd col echo "  \n "; // empty 4th col echo "  \n "; // empty 5th col } echo "\n"; // close row tag } //end of functions if (!isset($_COOKIE["DataAgreement"])) { $requestedpageGET = strip_tags($_GET["page"]); $pos = strpos($requestedpageGET, "/groups/csl7/measurements/2012ubwos/"); if ($pos === false) { die("Error in requested URL\n"); } echo "

Data policy

"; echo "
"; echo "

\n"; include "../../../incs/datapolicy.inc"; echo "\n"; echo "\n"; echo "\n"; echo "


\n"; echo "\n"; echo "

\n"; } else { print <<All times are MST. Each file contains data for entire measurement period. Click an icon to download that file.
Data revision is indicated by R followed by a letter (preliminary) or a number (final data).
A ICARTT file indicates files in ICARTT ascii format.
A Igor file indicates files in Igor binary format (zipped file containing folder of Igor files).

HTMLBLOCK; //has to be flush left, or block doesn't work. echo "
\n"; echo "
"; echo "
"; echo "\n"; echo "\n"; echo "\n"; echo " \n"; echo " \n"; echo " \n"; echo " \n"; echo "\n"; writeTableRow("Met", "MetData", array("Temp_C_19m_1min","Temp_C_13m_1min","RH_pct_19m_1min","RH_pct_13m_1min","Prs_mB_van_1min","Prs_mB_13m_1min","WD_deg_19m_1min","WS_mps_19m_1min")); writeTableRow("Met", "Met-PSD", array("NetRadiation_W_m2_20m","Precipitation_mm","Pressure_mb","Rel_Humidity_pct_10m","ScalarWindSpeed_m_s_10m","SnowDepth_m","Temperature_C_10m","VectorWindSpeed_m_s_10m","WindDir_deg_10m","WindDir_StDev_deg_10m")); echo "
MetRevData in file ends on:Display selected graphs
"; echo ""; echo ""; echo " "; echo " "; echo " "; echo " "; echo ""; writeTableRow("Chem", "acidsCIMS", array("HNCO","formic","HONO","HNO3","butyric_pyruvic")); writeTableRow("Chem", "ARNOLD", array("NO2_ppbv","NO_ppbv","O3_ppbv","NO3_pptv","N2O5_pptv")); writeTableRow("Chem", "CO", array("CO_ppbv")); writeTableRow("Chem", "CO2CH4", array("CO2_ppmv", "CH4_ppbv")); writeTableRow("Chem", "LIF-UCB", array("AN_PN_ppbv","NO2_ppbv","pAN_PN_ppbv")); writeTableRow("Chem", "LIF2-UCB", array("AN_ppbv","NO2_ppbv","PN_ppbv")); writeTableRow("Chem", "LPDOASLowerPath", array("NO2_LowerPath","HONO_LowerPath","HCHO_LowerPath","O3_LowerPath","SO2_LowerPath")); writeTableRow("Chem", "LPDOASMiddlePath", array("NO2_LowerPath","HONO_LowerPath","HCHO_LowerPath","O3_LowerPath","SO2_LowerPath")); writeTableRow("Chem", "LPDOASUpperPath", array("NO2_LowerPath","HONO_LowerPath","HCHO_LowerPath","O3_LowerPath","SO2_LowerPath")); writeTableRow("Chem", "NO", array("NO_ppbv")); writeTableRow("Chem", "NO2", array("NO2_ppbv")); writeTableRow("Chem", "NOy", array("NOy_ppb_1min")); writeTableRow("Chem", "O3", array("O3_ppbv")); writeTableRow("Chem", "SO2", array("SO2_ppb_1min")); writeTableRow("Chem", "PANs", array("PAN_GC_ppbv", "ClNO2_ppbv")); writeTableRow("Chem", "VOCsGCMS", array("Ethane","Ethene","Ethyne","Propane","Propene","Butane_iso","Butane_n","Cyclohexane","Cyclohexane_1methyl","Benzene","Toluene","Acetal","Acetone","Nitrate_1methyl","Nitrate_1ethyl","Nitrate_iPropyl","Nitrate_nPropyl")); writeTableRow("Chem", "VOCsPTRMS", array("methanol","acetaldehyde","acetone","MEK","benzene","toluene","C8_aromatics","C9_aromatics","C10_aromatics","C11_aromatics","naphthalene", "formaldehyde")); writeTableRow("Chem", "massesPTRMS", array("m43", "m47", "m97")); echo "
ChemRevData in file ends on:Display selected graphs
"; echo ""; echo ""; echo " "; echo " "; echo " "; echo " "; echo ""; writeTableRow("Radiation", "Jvalues", array("jNO2_Hz_1min","jNO3_Hz_1min","jO3_Hz_1min")); writeTableRow("Radiation", "CalcJvalues", array("jHCHO_Hz_1min","jHNO3_Hz_1min","jHONO_Hz_1min", "jPAN_Hz_1min")); writeTableRow("Radiation", "Rad-PSD", array("Downwelling_IR_Rad","Upwelling_IR_Rad","Downwelling_solar_Rad","Upwelling_solar_Rad","Net_Rad","Solar_albedo","Solar_zenith_angle")); echo "
RadiationRevData in file ends on:Display selected graphs
"; echo "
"; echo "
"; echo "
"; } ?>