// Sanitization $(function() { $('#container').html('
Date/Time | ';
var EngUnits = '|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
(L) | '; var stamps = ''; if (DATA.STATION[0].hasOwnProperty('OBSERVATIONS')) { stamps = DATA.STATION[0].OBSERVATIONS.date_time; var numObs = DATA.STATION[0].OBSERVATIONS.date_time.length; numObs = numObs - 1; var tableData = ''; // Loop through each observation var METARString = '
Temp. | ';
EngUnits += '(°F) | '; } if (DATA.STATION[0].OBSERVATIONS.air_temp_set_1[j] !== null) { var TEMP_F = ''+Math.round(DATA.STATION[0].OBSERVATIONS.air_temp_set_1[j])+' | '; } else { var TEMP_F = ''; } } else { var TEMP_F = ''; } // Dew Point if (DATA.STATION[0].OBSERVATIONS.hasOwnProperty('dew_point_temperature_set_1d')) { if (j == 0) { header1 += ' | Dew Point | ';
EngUnits += '(°F) | '; } if (DATA.STATION[0].OBSERVATIONS.dew_point_temperature_set_1d[j] !== null) { var DEWPOINT = ''+Math.round(DATA.STATION[0].OBSERVATIONS.dew_point_temperature_set_1d[j])+' | '; } else { var DEWPOINT = ''; } } else { var DEWPOINT = ''; } // Relative Humidity if (DATA.STATION[0].OBSERVATIONS.hasOwnProperty('relative_humidity_set_1')) { if (j == 0) { header1 += ' | Relative Humidity | ';
EngUnits += '(%) | '; } if (DATA.STATION[0].OBSERVATIONS.relative_humidity_set_1[j] !== null) { var RH_PCT = ''+Math.round(DATA.STATION[0].OBSERVATIONS.relative_humidity_set_1[j])+' | '; } else { var RH_PCT = ''; } } else { var RH_PCT = ''; } // Wind Chill if (DATA.STATION[0].OBSERVATIONS.hasOwnProperty('wind_chill_set_1d')) { if (j == 0) { header1 += ' | Wind Chill | ';
EngUnits += '(°F) | '; } if (DATA.STATION[0].OBSERVATIONS.wind_chill_set_1d[j] !== null) { var WC = ''+Math.round(DATA.STATION[0].OBSERVATIONS.wind_chill_set_1d[j])+' | '; } else { var WC = ''; } } else { var WC = ''; } // Wind Direction if (DATA.STATION[0].OBSERVATIONS.hasOwnProperty('wind_direction_set_1')) { if (j == 0) { header1 += ' | Wind Direction | ';
EngUnits += ''; } if (DATA.STATION[0].OBSERVATIONS.wind_cardinal_direction_set_1d[j] !== null) { var Wind_DIR = (DATA.STATION[0].OBSERVATIONS.wind_cardinal_direction_set_1d[j]); var WIND_DIR = ' | '+Wind_DIR+' | '; } else { var WIND_DIR = ''; } } else { var WIND_DIR = ''; } // Wind Speed & Gust if (DATA.STATION[0].OBSERVATIONS.hasOwnProperty('wind_speed_set_1')) { if (j == 0) { header1 += ' | Wind Speed | ';
EngUnits += '(mph) | '; } if (DATA.STATION[0].OBSERVATIONS.wind_speed_set_1[j] !== null) { var WIND_SPD = Math.round(DATA.STATION[0].OBSERVATIONS.wind_speed_set_1[j]); if (WIND_SPD < 20 ) { WIND_SPD = ''+WIND_SPD; } else if (WIND_SPD < 40 ) { WIND_SPD = ' | '+WIND_SPD+''; } else if (WIND_SPD < 58 ) { WIND_SPD = ' | '+WIND_SPD+''; } else { WIND_SPD = ' | '+WIND_SPD+''; } } else { var WIND_SPD = ' | 0'; } if (DATA.STATION[0].OBSERVATIONS.hasOwnProperty('wind_gust_set_1')) { if (DATA.STATION[0].OBSERVATIONS.wind_gust_set_1[j] !== null) { var WIND_GST =Math.round(DATA.STATION[0].OBSERVATIONS.wind_gust_set_1[j]); if (WIND_GST < 20 ) { WIND_SPD += 'G'+WIND_GST+' | '; } else if (WIND_GST < 40 ) { WIND_SPD += 'G'+WIND_GST+''; } else if (WIND_GST < 58 ) { WIND_SPD += 'G'+WIND_GST+''; } else { WIND_SPD += 'G'+WIND_GST+''; } } else { WIND_SPD += ''; } } } else { var WIND_SPD = ''; } // Fuel Temperature if (DATA.STATION[0].OBSERVATIONS.hasOwnProperty('fuel_temp_set_1')) { if (j == 0) { header1 += 'Fuel Temp. | ';
EngUnits += '(°F) | '; } if (DATA.STATION[0].OBSERVATIONS.fuel_temp_set_1[j] !== null) { var FUEL_T = ''+Math.round(DATA.STATION[0].OBSERVATIONS.fuel_temp_set_1[j])+' | '; } else { var FUEL_T = ''; } } else { var FUEL_T = ''; } // Fuel Moisture if (DATA.STATION[0].OBSERVATIONS.hasOwnProperty('fuel_moisture_set_1')) { if (j == 0) { header1 += ' | Fuel Moisture | ';
EngUnits += '(%) | '; } if (DATA.STATION[0].OBSERVATIONS.fuel_moisture_set_1[j] !== null) { var FUEL_PCT = ''+Math.round(DATA.STATION[0].OBSERVATIONS.fuel_moisture_set_1[j])+' | '; } else { var FUEL_PCT = ''; } } else { var FUEL_PCT = ''; } // Visibility if (DATA.STATION[0].OBSERVATIONS.hasOwnProperty('visibility_set_1')) { if (j == 0) { header1 += ' | Visibility | ';
EngUnits += '(miles) | '; } if (DATA.STATION[0].OBSERVATIONS.visibility_set_1[j] !== null) { var VISIBILITY =(DATA.STATION[0].OBSERVATIONS.visibility_set_1[j]).toFixed(2); if (VISIBILITY <= 1 ) { VISIBILITY = ''+VISIBILITY+' | '; } else if (VISIBILITY <= 3 ) { VISIBILITY = ''+VISIBILITY+' | '; } else if (VISIBILITY < 7) { VISIBILITY = ''+VISIBILITY+' | '; } else { VISIBILITY = ''+VISIBILITY+' | '; } } else { var VISIBILITY = ''; } } else { var VISIBILITY = ''; } // Present Weather if (DATA.STATION[0].OBSERVATIONS.hasOwnProperty('weather_cond_code_set_1')) { if (j == 0) { header1 += ' | Weather | ';
EngUnits += ''; } if (DATA.STATION[0].OBSERVATIONS.weather_cond_code_set_1[j] !== null) { if (network == 'NWS/FAA') { var WEATHER = parseInt(DATA.STATION[0].OBSERVATIONS.weather_cond_code_set_1[j]); if (WEATHER < 80) { // WX_ELEM1 = getWeatherCode(WEATHER); WX_ELEM2 = ''; WX_ELEM3 = ''; } else if (WEATHER < 6400) { WX1 = Math.floor (WEATHER / 80); WX_ELEM1 = getWeatherCode(WX1); WX2 = (WEATHER % 80); WX_ELEM2 = getWeatherCode(WX2)+','; WX_ELEM3 = ''; } else { WX1 = Math.floor (WEATHER / 6400); WX_ELEM1 = getWeatherCode(WX1); WX2 = Math.floor (WEATHER / 80); WX_ELEM2 = getWeatherCode(WX2)+','; WX3 = (WEATHER % 80); WX_ELEM1 = getWeatherCode(WX3)+','; } WEATHER = ' | '+WX_ELEM3+' '+WX_ELEM2+' '+WX_ELEM1+' | '; } else { WEATHER = ''+(DATA.STATION[0].OBSERVATIONS.weather_condition_set_1d[j])+' | '; } } else { var WEATHER = ''; } } else { var WEATHER = ''; } //Cloud Layers if (DATA.STATION[0].OBSERVATIONS.hasOwnProperty('cloud_layer_1_code_set_1')) { if (j == 0) { header1 += ' | Clouds | ';
EngUnits += '(x100 ft) | '; } if (DATA.STATION[0].OBSERVATIONS.cloud_layer_1_code_set_1[j] !== null) { var SKY1 =(DATA.STATION[0].OBSERVATIONS.cloud_layer_1_code_set_1[j]).toString(); var COVERAGE1 = SKY1.substr(SKY1.length -1); if (COVERAGE1 == "1") { SKY_COND1 = 'CLR'; } else if (COVERAGE1 == "2") { SKY_COND1 = 'SCT'; } else if (COVERAGE1 == "3") { SKY_COND1 = 'BKN'; } else if (COVERAGE1 == "4") { SKY_COND1 = 'OVC'; } else if (COVERAGE1 == "5") { SKY_COND1 = 'VV'; } else if (COVERAGE1 == "6") { SKY_COND1 = 'FEW'; } else { SKY_COND1 = ''; } var DECK1 = parseInt(SKY1.slice(0, -1)); if (isNaN(DECK1)) { DECK1 = ''; } else if (DECK1 < 10) { DECK1 = "00"+DECK1; } else if (DECK1 < 100) { DECK1 = "0"+DECK1; } else { DECK1 = DECK1; } } else { var SKY_COND1 = ''; var DECK1 = ''; } } else { var SKY_COND1 = ''; var DECK1 = ''; } if (DATA.STATION[0].OBSERVATIONS.hasOwnProperty('cloud_layer_2_code_set_1')) { if (DATA.STATION[0].OBSERVATIONS.cloud_layer_2_code_set_1[j] !== null) { var SKY2 =(DATA.STATION[0].OBSERVATIONS.cloud_layer_2_code_set_1[j]).toString(); var COVERAGE2 = SKY2.substr(SKY2.length -1); if (COVERAGE2 == "1") { SKY_COND2 = 'CLR'; } else if (COVERAGE2 == "2") { SKY_COND2 = 'SCT'; } else if (COVERAGE2 == "3") { SKY_COND2 = 'BKN'; } else if (COVERAGE2 == "4") { SKY_COND2 = 'OVC'; } else if (COVERAGE2 == "5") { SKY_COND2 = 'VV'; } else if (COVERAGE2 == "6") { SKY_COND2 = 'FEW'; } else { SKY_COND2 = ''; } var DECK2 = parseInt(SKY2.slice(0, -1)); if (isNaN(DECK2)) { DECK2 = ''; } else if (DECK2 < 10) { DECK2 = "00"+DECK2; } else if (DECK2 < 100) { DECK2 = "0"+DECK2; } else { DECK2 = DECK2; } } else { var SKY_COND2 = ''; var DECK2 = ''; } } else { var SKY_COND2 = ''; var DECK2 = ''; } if (DATA.STATION[0].OBSERVATIONS.hasOwnProperty('cloud_layer_3_code_set_1')) { if (DATA.STATION[0].OBSERVATIONS.cloud_layer_3_code_set_1[j] !== null) { var SKY3 =(DATA.STATION[0].OBSERVATIONS.cloud_layer_3_code_set_1[j]).toString(); var COVERAGE3 = SKY3.substr(SKY3.length -1); if (COVERAGE3 == "1") { SKY_COND3 = 'CLR'; } else if (COVERAGE3 == "2") { SKY_COND3 = 'SCT'; } else if (COVERAGE3 == "3") { SKY_COND3 = 'BKN'; } else if (COVERAGE3 == "4") { SKY_COND3 = 'OVC'; } else if (COVERAGE3 == "5") { SKY_COND3 = 'VV'; } else if (COVERAGE3 == "6") { SKY_COND3 = 'FEW'; } else { SKY_COND3 = ''; } var DECK3 = parseInt(SKY3.slice(0, -1)); if (isNaN(DECK3)) { DECK3 = ''; } else if (DECK3 < 10) { DECK3 = "00"+DECK3; } else if (DECK3 < 100) { DECK3 = "0"+DECK3; } else { DECK3 = DECK3; } } else { var SKY_COND3 = ''; var DECK3 = ''; } } else { var SKY_COND3 = ''; var DECK3 = ''; } var SKY_COND = ''; // If there was a cloud layer, THEN make the cloud cells if (DATA.STATION[0].OBSERVATIONS.hasOwnProperty('cloud_layer_1_code_set_1')) { if (SKY_COND1 == "CLR" || SKY_COND1 == "FEW" || SKY_COND1 == "SCT") { LAYER1 = SKY_COND1+DECK1; } else if (DECK1 < 10) { LAYER1 = ''+SKY_COND1+DECK1+''; } else if (DECK1 < 31) { LAYER1 = ''+SKY_COND1+DECK1+''; } else if (DECK1 < 81) { LAYER1 = ''+SKY_COND1+DECK1+''; } else { LAYER1 = SKY_COND1+DECK1; } if (SKY_COND2 == "CLR" || SKY_COND2 == "FEW" || SKY_COND2 == "SCT") { LAYER2 = SKY_COND2+DECK2; } else if (DECK2 < 10) { LAYER2 = ''+SKY_COND2+DECK2+''; } else if (DECK2 < 31) { LAYER2 = ''+SKY_COND2+DECK2+''; } else if (DECK2 < 81) { LAYER2 = ''+SKY_COND2+DECK2+''; } else { LAYER2 = SKY_COND2+DECK2; } if (SKY_COND3 == "CLR" || SKY_COND3 == "FEW" || SKY_COND3 == "SCT") { LAYER3 = SKY_COND3+DECK3; } else if (DECK3 < 10) { LAYER3 = ''+SKY_COND3+DECK3+''; } else if (DECK3 < 31) { LAYER3 = ''+SKY_COND3+DECK3+''; } else if (DECK3 < 81) { LAYER3 = ''+SKY_COND3+DECK3+''; } else { LAYER3 = SKY_COND3+DECK3; } var SKY_COND = ''+LAYER1+' '+LAYER2+' '+LAYER3+' | '; } // Station Pressure if (DATA.STATION[0].OBSERVATIONS.hasOwnProperty('pressure_set_1')) { if (j == 0) { header1 += 'Station Pressure | ';
EngUnits += '(in Hg) | '; } if (DATA.STATION[0].OBSERVATIONS.pressure_set_1[j] !== null) { var P = ''+(DATA.STATION[0].OBSERVATIONS.pressure_set_1[j]).toFixed(2)+' | '; } else { var P = ''; } } else { var P = ''; } // Sea Level Pressure if (DATA.STATION[0].OBSERVATIONS.hasOwnProperty('sea_level_pressure_set_1')) { if (j == 0) { header1 += ' | Sea Level Pressure | ';
EngUnits += '(mb) | '; } if (DATA.STATION[0].OBSERVATIONS.sea_level_pressure_set_1[j] !== null) { var SEALEVEL = ''+(DATA.STATION[0].OBSERVATIONS.sea_level_pressure_set_1[j]).toFixed(2)+' | '; } else { var SEALEVEL = ''; } } else { var SEALEVEL = ''; } // Altimeter Setting if (DATA.STATION[0].OBSERVATIONS.hasOwnProperty('altimeter_set_1')) { if (j == 0) { header1 += ' | Altimeter Setting | ';
EngUnits += '(in Hg) | '; } if (DATA.STATION[0].OBSERVATIONS.altimeter_set_1[j] !== null) { var ALTIMTER = ''+(DATA.STATION[0].OBSERVATIONS.altimeter_set_1[j]).toFixed(2)+' | '; } else { var ALTIMTER = ''; } } else { var ALTIMTER = ''; } // Station Pressure if (DATA.STATION[0].OBSERVATIONS.hasOwnProperty('station_pressure_set_1')) { if (j == 0) { header1 += ' | Station Pressure | ';
EngUnits += '(in Hg) | '; } if (DATA.STATION[0].OBSERVATIONS.station_pressure_set_1[j] !== null) { var STATION_P = ''+(DATA.STATION[0].OBSERVATIONS.station_pressure_set_1[j]).toFixed(2)+' | '; } else { var STATION_P = ''; } } else { var STATION_P = ''; } // Solar Radiation if (DATA.STATION[0].OBSERVATIONS.hasOwnProperty('solar_radiation_set_1')) { if (j == 0) { header1 += ' | Solar Radiation | Percent Possible | ';
EngUnits += '(W/m²) | (%) | '; } if (DATA.STATION[0].OBSERVATIONS.solar_radiation_set_1[j] !== null) { var RAW_SOLAR = (Math.round(DATA.STATION[0].OBSERVATIONS.solar_radiation_set_1[j])); var SOLAR_POSS = calcSolarPCT(MW_TIMESTAMP,stnLAT,stnLON); var PCT = Math.round (100 * RAW_SOLAR / SOLAR_POSS); if (PCT > 100) { PCT = 100; } if (RAW_SOLAR > 0 && SOLAR_POSS > 0) { var SOLAR = ''+RAW_SOLAR+' | '; var SOLAR_PCT = ''+PCT+' % | '; } else { var SOLAR = '0 | '; var SOLAR_PCT = '-- | '; } } else { var SOLAR = ''; var SOLAR_PCT = ' | '; } } else { var SOLAR = ''; var SOLAR_PCT = ''; } // Soil Temperature if (DATA.STATION[0].OBSERVATIONS.hasOwnProperty('soil_temp_set_1')) { if (j == 0) { header1 += ' | Soil Temp. | ';
EngUnits += '(°F) | '; } if (DATA.STATION[0].OBSERVATIONS.soil_temp_set_1[j] !== null) { var SOIL_T = ''+Math.round(DATA.STATION[0].OBSERVATIONS.soil_temp_set_1[j])+' | '; } else { var SOIL_T = ''; } } else { var SOIL_T = ''; } // Road Temperature if (DATA.STATION[0].OBSERVATIONS.hasOwnProperty('road_temp_set_2')) { if (j == 0) { header1 += ' | Road Temp. | ';
EngUnits += '(°F) | '; } if (DATA.STATION[0].OBSERVATIONS.road_temp_set_2[j] !== null) { var ROAD_T = ''+Math.round(DATA.STATION[0].OBSERVATIONS.road_temp_set_2[j])+' | '; } else { var ROAD_T = ''; } } else { var ROAD_T = ''; } // Road Sub-Surface Temp if (DATA.STATION[0].OBSERVATIONS.hasOwnProperty('road_subsurface_tmp_set_1')) { if (j == 0) { header1 += ' | Road Sub Temp. | ';
EngUnits += '(°F) | '; } if (DATA.STATION[0].OBSERVATIONS.road_subsurface_tmp_set_1[j] !== null) { var SROAD_T = ''+Math.round(DATA.STATION[0].OBSERVATIONS.road_subsurface_tmp_set_1[j])+' | '; } else { var SROAD_T = ''; } } else { var SROAD_T = ''; } // If Accumulated Precip or any increment of precip up to one hour is set, // we will calculate 1, 3, 6 and 24 hour precip values on our own. // Synoptic does not consistently return ihigher interval data for those fields // Even if we get those fields, we will disable any processing of that data down the line. // Accumulated Precip if (DATA.STATION[0].OBSERVATIONS.hasOwnProperty('precip_accum_set_1')) { if (j == 0) { header1 += ' | Accumulated Precip | ';
EngUnits += '(inches) | '; } if (DATA.STATION[0].OBSERVATIONS.precip_accum_set_1[j] !== null) { var ACC_Precip = (DATA.STATION[0].OBSERVATIONS.precip_accum_set_1[j]).toFixed(2); var ACC_PCPN = ''+ACC_Precip+' | '; } else { var ACC_PCPN = ''; } } else { var ACC_PCPN = ''; } // 1 Minute Precip if (DATA.STATION[0].OBSERVATIONS.hasOwnProperty('precip_accum_one_minute_set_1')) { if (j == 0) { header1 += ' | 1 Min.Precip | '; EngUnits += '(inches) | '; } if (DATA.STATION[0].OBSERVATIONS.precip_accum_one_minute_set_1[j] !== null) { var oneMINprecip = (DATA.STATION[0].OBSERVATIONS.precip_accum_one_minute_set_1[j]).toFixed(2); if (oneMINprecip == '0.001') { oneMINprecip = 'T'; } var MIN_1_PCPN = ''+oneMINprecip+' | '; } else { var MIN_1_PCPN = ''; } } else { var MIN_1_PCPN = ''; } // 5 Minute Precip if (DATA.STATION[0].OBSERVATIONS.hasOwnProperty('precip_accum_five_minute_set_1')) { if (j == 0) { header1 += ' | 5 Min.Precip | '; EngUnits += '(inches) | '; } if (DATA.STATION[0].OBSERVATIONS.precip_accum_five_minute_set_1[j] !== null) { var fiveMINprecip = (DATA.STATION[0].OBSERVATIONS.precip_accum_five_minute_set_1[j]).toFixed(2); if (fiveMINprecip == '0.001') { fiveMINprecip = 'T'; } var MIN_5_PCPN = ''+fiveMINprecip+' | '; } else { var MIN_5_PCPN = ''; } } else { var MIN_5_PCPN = ''; } // 10 Minute Precip if (DATA.STATION[0].OBSERVATIONS.hasOwnProperty('precip_accum_ten_minute_set_1')) { derived = 1; if (j == 0) { header1 += ' | 10 Min.Precip | '; EngUnits += '(inches) | '; } if (DATA.STATION[0].OBSERVATIONS.precip_accum_ten_minute_set_1[j] !== null) { var tenMINprecip = (DATA.STATION[0].OBSERVATIONS.precip_accum_ten_minute_set_1[j]).toFixed(2); var MIN_10_PCPN = ''+tenMINprecip+' | '; } else { var MIN_10_PCPN = ''; } } else { var MIN_10_PCPN = ''; } // 15 Minute Precip if (DATA.STATION[0].OBSERVATIONS.hasOwnProperty('precip_accum_fifteen_minute_set_1')) { derived = 1; if (j == 0) { header1 += ' | 15 Min.Precip | '; EngUnits += '(inches) | '; } if (DATA.STATION[0].OBSERVATIONS.precip_accum_fifteen_minute_set_1[j] !== null) { var fifteenMINprecip = (DATA.STATION[0].OBSERVATIONS.precip_accum_fifteen_minute_set_1[j]).toFixed(2); var MIN_15_PCPN = ''+fifteenMINprecip+' | '; } else { var MIN_15_PCPN = ''; } } else { var MIN_15_PCPN = ''; } // 30 Minute Precip if (DATA.STATION[0].OBSERVATIONS.hasOwnProperty('precip_accum_30_minute_set_1')) { derived = 1; if (j == 0) { header1 += ' | 30 Min.Precip | '; EngUnits += '(inches) | '; } if (DATA.STATION[0].OBSERVATIONS.precip_accum_30_minute_set_1[j] !== null) { var thirtyMINprecip = (DATA.STATION[0].OBSERVATIONS.precip_accum_30_minute_set_1[j]).toFixed(2); var MIN_30_PCPN = ''+thirtyMINprecip+' | '; } else { var MIN_30_PCPN = ''; } } else { var MIN_30_PCPN = ''; } // 1 Hour Precip if (DATA.STATION[0].OBSERVATIONS.hasOwnProperty('precip_accum_one_hour_set_1')) { if (j == 0) { header1 += ' | 1 Hour Precip | ';
EngUnits += '(inches) | '; } if (DATA.STATION[0].OBSERVATIONS.precip_accum_one_hour_set_1[j] !== null) { if (parseFloat(DATA.STATION[0].OBSERVATIONS.precip_accum_one_hour_set_1[j]) == '0.001') { var HR_1_PCPN = 'T | '; } else { var HR_1_PCPN = ''+(DATA.STATION[0].OBSERVATIONS.precip_accum_one_hour_set_1[j]).toFixed(2)+' | '; } } else { var HR_1_PCPN = ''; } } else { var HR_1_PCPN = ''; } // 3 Hour Precip if (DATA.STATION[0].OBSERVATIONS.hasOwnProperty('precip_accum_three_hour_set_1')) { if (j == 0) { header1 += ' | 3 HourPrecip | '; EngUnits += '(inches) | '; } if (DATA.STATION[0].OBSERVATIONS.precip_accum_three_hour_set_1[j] !== null) { if (parseFloat(DATA.STATION[0].OBSERVATIONS.precip_accum_three_hour_set_1[j]) == '0.001') { var HR_3_PCPN = 'T | '; } else { var HR_3_PCPN = ''+(DATA.STATION[0].OBSERVATIONS.precip_accum_three_hour_set_1[j]).toFixed(2)+' | '; } } else { var HR_3_PCPN = ''; } } else { var HR_3_PCPN = ''; } // 6 Hour Precip if (DATA.STATION[0].OBSERVATIONS.hasOwnProperty('precip_accum_six_hour_set_1')) { if (j == 0) { header1 += ' | 6 Hour Precip | ';
EngUnits += '(inches) | '; } if (DATA.STATION[0].OBSERVATIONS.precip_accum_six_hour_set_1[j] !== null) { if (parseFloat(DATA.STATION[0].OBSERVATIONS.precip_accum_six_hour_set_1[j]) == '0.001') { var HR_6_PCPN = 'T | '; } else { var HR_6_PCPN = ''+(DATA.STATION[0].OBSERVATIONS.precip_accum_six_hour_set_1[j]).toFixed(2)+' | '; } } else { var HR_6_PCPN = ''; } } else { var HR_6_PCPN = ''; } // 24 Hour Precip if (DATA.STATION[0].OBSERVATIONS.hasOwnProperty('precip_accum_24_hour_set_1')) { if (j == 0) { header1 += ' | 24 Hour Precip | ';
EngUnits += '(inches) | '; } if (DATA.STATION[0].OBSERVATIONS.precip_accum_24_hour_set_1[j] !== null) { if (parseFloat(DATA.STATION[0].OBSERVATIONS.precip_accum_24_hour_set_1[j]) == '0.001') { var HR_24_PCPN = 'T | '; } else { var HR_24_PCPN = ''+(DATA.STATION[0].OBSERVATIONS.precip_accum_24_hour_set_1[j]).toFixed(2)+' | '; } } else { var HR_24_PCPN = ''; } } else { var HR_24_PCPN = ''; } // Precip sine midnight if (DATA.STATION[0].OBSERVATIONS.hasOwnProperty('precip_accum_since_local_midnight_set_1')) { if (j == 0) { header1 += ' | Precip Since 12am | ';
EngUnits += '(°F) | '; } if (DATA.STATION[0].OBSERVATIONS.precip_accum_since_local_midnight_set_1[j] !== null) { var MIDNIGHT = ''+(DATA.STATION[0].OBSERVATIONS.precip_accum_since_local_midnight_set_1[j]).toFixed(2)+' | '; } else { var MIDNIGHT = ''; } } else { var MIDNIGHT = ''; } // Snow Depth if (DATA.STATION[0].OBSERVATIONS.hasOwnProperty('snow_depth_set_1')) { if (j == 0) { header1 += ' | Snow Depth | ';
EngUnits += '(inches) | '; } if (DATA.STATION[0].OBSERVATIONS.snow_depth_set_1[j] !== null) { var curSnow = (DATA.STATION[0].OBSERVATIONS.snow_depth_set_1[j]).toFixed(1); var SNOW_DEPTH = ''+curSnow+' | '; } else { var SNOW_DEPTH = ''; } } else { var SNOW_DEPTH = ''; } // Snow Interval if (DATA.STATION[0].OBSERVATIONS.hasOwnProperty('snow_interval_set_1')) { if (j == 0) { header1 += ' | Snow Interval | ';
EngUnits += '(inches) | '; } if (DATA.STATION[0].OBSERVATIONS.snow_interval_set_1[j] !== null) { var SNOW_INTERVAL = ''+(DATA.STATION[0].OBSERVATIONS.snow_interval_set_1[j]).toFixed(1)+' | '; } else { var SNOW_INTERVAL = ''; } } else { var SNOW_INTERVAL = ''; } // Snow Water Equivalent if (DATA.STATION[0].OBSERVATIONS.hasOwnProperty('snow_water_equiv_set_1')) { if (j == 0) { header1 += ' | Snow/Water Equivalent | ';
EngUnits += '(inches) | '; } if (DATA.STATION[0].OBSERVATIONS.snow_water_equiv_set_1[j] !== null) { var SWE = ''+(DATA.STATION[0].OBSERVATIONS.snow_water_equiv_set_1[j]).toFixed(2)+' | '; } else { var SWE = ''; } } else { var SWE = ''; } // 6 Hour Max T if (DATA.STATION[0].OBSERVATIONS.hasOwnProperty('air_temp_high_6_hour_set_1')) { if (j == 0) { header1 += ' | 6 Hr Max | ';
EngUnits += '(°F) | '; } if (DATA.STATION[0].OBSERVATIONS.air_temp_high_6_hour_set_1[j] !== null) { var HR6_MAXT = ''+Math.round(DATA.STATION[0].OBSERVATIONS.air_temp_high_6_hour_set_1[j])+' | '; } else { var HR6_MAXT = ''; } } else { var HR6_MAXT = ''; } // 6 Hour Min T if (DATA.STATION[0].OBSERVATIONS.hasOwnProperty('air_temp_low_6_hour_set_1')) { if (j == 0) { header1 += ' | 6 Hr Min | ';
EngUnits += '(°F) | '; } if (DATA.STATION[0].OBSERVATIONS.air_temp_low_6_hour_set_1[j] !== null) { var HR6_MINT = ''+Math.round(DATA.STATION[0].OBSERVATIONS.air_temp_low_6_hour_set_1[j])+' | '; } else { var HR6_MINT = ''; } } else { var HR6_MINT = ''; } // 24 Hour Max T if (DATA.STATION[0].OBSERVATIONS.hasOwnProperty('air_temp_high_24_hour_set_1')) { if (j == 0) { header1 += ' | 24 Hr Max | ';
EngUnits += '(°F) | '; } if (DATA.STATION[0].OBSERVATIONS.air_temp_high_24_hour_set_1[j] !== null) { var HR24_MAXT = ''+Math.round(DATA.STATION[0].OBSERVATIONS.air_temp_high_24_hour_set_1[j])+' | '; } else { var HR24_MAXT = ''; } } else { var HR24_MAXT = ''; } // 24 Hour Min T if (DATA.STATION[0].OBSERVATIONS.hasOwnProperty('air_temp_low_24_hour_set_1')) { if (j == 0) { header1 += ' | 24 Hr Min | ';
EngUnits += '(°F) | '; } if (DATA.STATION[0].OBSERVATIONS.air_temp_low_24_hour_set_1[j] !== null) { var HR24_MINT = ''+Math.round(DATA.STATION[0].OBSERVATIONS.air_temp_low_24_hour_set_1[j])+' | '; } else { var HR24_MINT = ''; } } else { var HR24_MINT = ''; } // Water Temperature if (DATA.STATION[0].OBSERVATIONS.hasOwnProperty('T_water_temp_set_1')) { if (j == 0) { header1 += ' | Water Temp. | ';
EngUnits += '(°F) | '; } if (DATA.STATION[0].OBSERVATIONS.T_water_temp_set_1[j] !== null) { var WATER_T = ''+Math.round(DATA.STATION[0].OBSERVATIONS.T_water_temp_set_1[j])+' | '; } else { var WATER_T = ''; } } else { var WATER_T = ''; } // Append one row of data to the stream tableData += ' |
'+month+' '+day+', '+hours+':'+minutes+' '+ampm+' | '+TEMP_F+DEWPOINT+RH_PCT+WC+WIND_DIR+WIND_SPD+FUEL_T+FUEL_PCT+VISIBILITY+WEATHER+SKY_COND+P+SEALEVEL+ALTIMTER+STATION_P+SOLAR+SOLAR_PCT+SOIL_T+ROAD_T+SROAD_T+ACC_PCPN+MIN_1_PCPN+MIN_5_PCPN+MIN_10_PCPN+MIN_15_PCPN+MIN_30_PCPN+HR_1_PCPN+HR_3_PCPN+HR_6_PCPN+HR_24_PCPN+MIDNIGHT+SNOW_DEPTH+SNOW_INTERVAL+SWE+HR6_MAXT+HR6_MINT+HR24_MAXT+HR24_MINT+WATER_T+'