Updated GetKP script with current NOAA URLs +other bug fixes

This commit is contained in:
Michael Shriver 2019-07-17 08:26:29 -04:00 committed by Carlos R. Mafra
parent 2ec13c2f6f
commit 005d0a491d

View file

@ -5,7 +5,7 @@
#
require "ctime.pl";
use POSIX;
($Year, $Month, $Day) = &year_month_day();
@ -19,7 +19,7 @@
}
$grabcmd = "cd /tmp; wget --passive-ftp --tries 2 -q ftp://www.sec.noaa.gov/pub/indices/DGD.txt";
$grabcmd = "cd /tmp; wget --passive-ftp --tries 2 -q ftp://ftp.swpc.noaa.gov/pub/latest/DGD.txt";
system "$grabcmd";
@ -68,7 +68,7 @@
#
# Add in very latest stuff
#
$grabcmd = "cd /tmp; wget --passive-ftp --tries 2 -q ftp://www.sec.noaa.gov/pub/latest/curind.txt";
$grabcmd = "cd /tmp; wget --passive-ftp --tries 2 -q ftp://ftp.swpc.noaa.gov/pub/latest/curind.txt";
system "$grabcmd";
%lmonstr = ( "Jan", 1, "Feb", 2, "Mar", 3, "Apr", 4, "May", 5, "Jun", 6, "Jul", 7, "Aug", 8, "Sep", 9, "Oct", 10, "Nov", 11, "Dec", 12);
@ -90,7 +90,7 @@
$Line = $_;
}
if ($_ =~ /^\s{1,}[0-9e\.\+\-]{2,}\s{1,}[0-9e\.\+\-]{2,}\s{1,}[0-9e\.\+\-]{2,}\s{1,}[0-9e\.\+\-]{2,}\s{1,}[0-9e\.\+\-]{2,}\s{1,}[BCMX]{1,}[0-9\.]{1,}\s{1,}[0-9-]{1,}/){
if ($_ =~ /^\s{1,}[0-9e\.\+\-]{2,}\s{1,}[0-9e\.\+\-]{2,}\s{1,}[0-9e\.\+\-]{2,}\s{1,}[0-9e\.\+\-]{2,}\s{1,}[0-9e\.\+\-]{2,}\s{1,}[ABCMX]{1,}[0-9\.]{1,}\s{1,}[0-9-]{1,}/){
$FluxLine = $_;