Changeset 255
- Timestamp:
- 09/22/09 13:45:05
- Files:
-
- scout/trunk/GetLatestData.pl (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
scout/trunk/GetLatestData.pl
r246 r255 32 32 "DirForObsKml:s", #Optional. If we want the script to convert the netcdfs to obskml, this is the directory we store the obskml. 33 33 "Delete:s", #Optional. If we are converting to obsKML and want to get rid of the netcdfs afterwards, set this to yes. 34 " DownloadDir:s",#Optional. Directory to store the downloaded netcdf files in. Default is ./latest_netcdf_files.34 "NetCDFDir:s", #Optional. Directory to store the downloaded netcdf files in. Default is ./latest_netcdf_files. 35 35 "FetchLogDir:s", #Optional. Directory for log files we use to determine what the new netcdf files are to download. Default is ./fetch_logs. 36 36 "UseLastNTimeStamps:s", #Optional. Integer representing the last N time entries to use when converting the data to obsKML. DWR v1.1.0.0 6/2/2008 … … 55 55 "--DirForObsKml provides the path to the store the ObsKML files created. This is an optional argument, if not provided no ObsKML files are written.\n". 56 56 "--Delete specifies we delete the netcdf files after we write the ObsKML files. This is an optional argument.\n". 57 "-- DownloadDir is the directory to store the downloaded files. Optional, default is ./latest_netcdf_files.\n".57 "--NetCDFDir is the directory to store the downloaded files. Optional, default is ./latest_netcdf_files.\n". 58 58 "--FetchLogDir is the directory were the file time stamps are stored. The script uses these files to determine which files are really the latest. Optional, default is ./fetch_logs.\n". 59 59 "--UseLastNTimeStamps Integer representing the last N time entries to use when converting the data to obsKML. Optional.\n". … … 125 125 #Remove the conversion log. We do this since the log gets concatenated every run, so it will get huge fast. 126 126 #We just keep the log of the last run. 127 if( !MICROSOFT_PLATFORM )128 {129 my $cmd = "rm /home/dramage/log/cdl_0master.log";130 print( "Remove Log: $cmd\n" );131 `$cmd`;132 #Open up a new log file.133 $cmd = "echo cdl_0master log opened >> /home/dramage/log/cdl_0master.log";134 `$cmd`;135 }127 #if( !MICROSOFT_PLATFORM ) 128 #{ 129 # my $cmd = "rm /home/dramage/log/cdl_0master.log"; 130 # print( "Remove Log: $cmd\n" ); 131 # `$cmd`; 132 # #Open up a new log file. 133 # $cmd = "echo cdl_0master log opened >> /home/dramage/log/cdl_0master.log"; 134 # `$cmd`; 135 #} 136 136 137 137 my $bProcessNetCDF = 0; … … 260 260 #DWR v1.1.0.0 6/2/2008 261 261 #Added the passing of $strLastNTimeStamps onto the command line. 262 $cmd = "cd /home/dramage/netcdf; /usr/bin/perl /home/dramage/netcdf/cdl_0master.pl $strDestFile 1 $strDirForObsKml $strLastNTimeStamps \"$strLastNTimeStampsPerOrg\" >> /home/dramage/log/cdl_0master.log 2>&1"; 262 #$cmd = "cd /home/dramage/netcdf; /usr/bin/perl /home/dramage/netcdf/cdl_0master.pl $strDestFile 1 $strDirForObsKml $strLastNTimeStamps \"$strLastNTimeStampsPerOrg\" >> /home/dramage/log/cdl_0master.log 2>&1"; 263 $cmd = "/usr/bin/perl cdl_0master.pl $strDestFile 1 $strDirForObsKml $strLastNTimeStamps \"$strLastNTimeStampsPerOrg\""; 263 264 print( "\tObsKML Script: $cmd\n" ); 264 265 `$cmd`; … … 353 354 # (0) Get html document 354 355 my $doc = get($path); 355 356 356 357 # (1) Screen scrape http for href lines 357 358 my @all_href = $doc =~ m{href\s*=[\s|"]*(.*?)[\s|"]*>}gi; 358 359 359 360 # (2) further limit with users pattern 360 361 my @matched = grep /$pattern$/, @all_href;
