Changeset 186
- Timestamp:
- 04/16/08 13:14:30
- Files:
-
- scout/trunk/cdl_fixed_point.pl (modified) (20 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
scout/trunk/cdl_fixed_point.pl
r183 r186 397 397 || die "ABORT! Invalid units for $time_var{'var_name'}.\n"; 398 398 399 my @KMLTimeStamp; 399 400 # format the time values for database insertion (no timezone right now) 400 401 for my $i (0..$#time_values) { … … 406 407 .sprintf("%02d",$base_month).'-' 407 408 .sprintf("%02d",$base_day).' ' 409 .sprintf("%02d",$base_hour).':' 410 .sprintf("%02d",$base_minute).':' 411 .sprintf("%02d",$base_second); 412 #DWR 4/16/2008 413 #KML tag <TimeStamp><when> requires the date to be formatted in a YYYY-MM-DDThh:mm:ss format 414 $KMLTimeStamp[$i] = $base_year.'-' 415 .sprintf("%02d",$base_month).'-' 416 .sprintf("%02d",$base_day).'T' 408 417 .sprintf("%02d",$base_hour).':' 409 418 .sprintf("%02d",$base_minute).':' … … 1493 1502 } 1494 1503 obsKMLSubRoutines::KMLAddObsToHash( 'water_level', 1495 $ time_formatted_values[$j],1504 $KMLTimeStamp[$j], 1496 1505 $MLLWDataVal, 1497 1506 1, … … 1501 1510 $rObsHash ); 1502 1511 obsKMLSubRoutines::KMLAddObsToHash( 'water_level', 1503 $ time_formatted_values[$j],1512 $KMLTimeStamp[$j], 1504 1513 $MSLDataVal, 1505 1514 2, … … 1509 1518 $rObsHash ); 1510 1519 obsKMLSubRoutines::KMLAddObsToHash( 'water_level', 1511 $ time_formatted_values[$j],1520 $KMLTimeStamp[$j], 1512 1521 $NavD88DataVal, 1513 1522 3, … … 1635 1644 } 1636 1645 obsKMLSubRoutines::KMLAddObsToHash( 'water_temperature', 1637 $ time_formatted_values[$j],1646 $KMLTimeStamp[$j], 1638 1647 $DataVal, 1639 1648 1, … … 1758 1767 } 1759 1768 obsKMLSubRoutines::KMLAddObsToHash( 'water_temperature', 1760 $ time_formatted_values[$j],1769 $KMLTimeStamp[$j], 1761 1770 $DataVal, 1762 1771 2, … … 1870 1879 } 1871 1880 obsKMLSubRoutines::KMLAddObsToHash( 'air_temperature', 1872 $ time_formatted_values[$j],1881 $KMLTimeStamp[$j], 1873 1882 $DataVal, 1874 1883 1, … … 2062 2071 2063 2072 obsKMLSubRoutines::KMLAddObsToHash( 'wind_speed', 2064 $ time_formatted_values[$j],2073 $KMLTimeStamp[$j], 2065 2074 $WindSpdDataVal, 2066 2075 1, … … 2076 2085 } 2077 2086 obsKMLSubRoutines::KMLAddObsToHash( 'wind_from_direction', 2078 $ time_formatted_values[$j],2087 $KMLTimeStamp[$j], 2079 2088 $WindDirDataVal, 2080 2089 1, … … 2090 2099 } 2091 2100 obsKMLSubRoutines::KMLAddObsToHash( 'wind_gust', 2092 $ time_formatted_values[$j],2101 $KMLTimeStamp[$j], 2093 2102 $WindGstDataVal, 2094 2103 1, … … 2202 2211 } 2203 2212 obsKMLSubRoutines::KMLAddObsToHash( 'air_pressure', 2204 $ time_formatted_values[$j],2213 $KMLTimeStamp[$j], 2205 2214 $DataVal, 2206 2215 1, … … 2317 2326 2318 2327 obsKMLSubRoutines::KMLAddObsToHash( 'salinity', 2319 $ time_formatted_values[$j],2328 $KMLTimeStamp[$j], 2320 2329 $DataVal, 2321 2330 1, … … 2467 2476 2468 2477 obsKMLSubRoutines::KMLAddObsToHash( 'eastward_current', 2469 $ time_formatted_values[$j],2478 $KMLTimeStamp[$j], 2470 2479 $ECurrentDataVal, 2471 2480 1, … … 2481 2490 } 2482 2491 obsKMLSubRoutines::KMLAddObsToHash( 'northward_current', 2483 $ time_formatted_values[$j],2492 $KMLTimeStamp[$j], 2484 2493 $NCurrentDataVal, 2485 2494 1, … … 2591 2600 2592 2601 obsKMLSubRoutines::KMLAddObsToHash( 'dominant_wave_period', 2593 $ time_formatted_values[$j],2602 $KMLTimeStamp[$j], 2594 2603 $DomWaveDataVal, 2595 2604 1, … … 2605 2614 } 2606 2615 obsKMLSubRoutines::KMLAddObsToHash( 'significant_wave_height', 2607 $ time_formatted_values[$j],2616 $KMLTimeStamp[$j], 2608 2617 $SigWaveHgtDataVal, 2609 2618 1, … … 2664 2673 2665 2674 obsKMLSubRoutines::KMLAddObsToHash( 'dominant_wave_period', 2666 $ time_formatted_values[$j],2675 $KMLTimeStamp[$j], 2667 2676 $DomWaveDataVal, 2668 2677 1, … … 2678 2687 } 2679 2688 obsKMLSubRoutines::KMLAddObsToHash( 'significant_wave_height', 2680 $ time_formatted_values[$j],2689 $KMLTimeStamp[$j], 2681 2690 $SigWaveHgtDataVal, 2682 2691 1, … … 2697 2706 #$strXMLPath = "../sql/$strPlatformID-$strDate.kml"; 2698 2707 $strXMLPath = "$strObsKMLFilePath/$strPlatformID-$strDate.kml"; 2699 #print( "$strXMLPath\n" );2708 print( "XMLFilePath: $strXMLPath\n" ); 2700 2709 obsKMLSubRoutines::BuildKMLFile( \%ObsHash, $strXMLPath ); 2701 2710 }
