Auorora (KP-index) file missing ** Updated **

The pop-up for “Visual Aurora Borealis/Northern Lights and VHF Radio Aurora Indicators” used in the sun-block is missing the essential file to do all the calculations.

There seems to be no replacement for that file yet.
https://services.swpc.noaa.gov/products/geospace/planetary-k-index-dst.json
I browsed the file-tree but did not find a file yet at https://services.swpc.noaa.gov/

Those who are using the status pop-up will get a red exclamation mark for an outdated file.

@ALL => block the download of the file
=> PWS_load_files.php around line 257, set the line with fnctn_load_file (‘Aurora-kindex’); to comment with a #

#
#  load k-index, can always be loaded, just check age
$filename       = $fl_folder.$kndx_fl;
$allowed_age    = $kindexRefresh*$times;
$url            = 'https://services.swpc.noaa.gov/products/geospace/planetary-k-index-dst.json'; 
#fnctn_load_file ('Aurora-kindex'); 

@those who use the stauts checking => remove the . . ./pwsWD/_my-settings/status.arr file.
It will be rebuilt in 24 hours max.

@ALL if you do not want the incomplete/old aurora pop-up
add the following lines to your . . ./pwsWD/_my_settings/extra-bloks.txt

script     = sun_c_block.php
popup_not1 = not
end

or change the PWS_blocks.php script around line 386 by changing
array (‘show’ => true, ‘popup’ => ‘aurora_popup.php’, to
array (‘show’ => false ‘popup’ => ‘aurora_popup.php’,

$script = 'sun_c_block.php';
$blck_ttls[$script]     = $head_sun;
$blck_rfrs[$script]     = $rfrsh_sun_moon; 
$blck_ppp [$script][]   = array ('show' => true,      'popup' => 'moon_popup.php',              'chartinfo' => 'popup',  'text' => $moon_txt  );
$blck_ppp [$script][]   = array ('show' => false,      'popup' => 'aurora_popup.php',            'chartinfo' => 'popup',  'text' => $aurora_txt  );
$blck_ppp [$script][]   = array ('show' => true,      'popup' => 'meteors_popup.php',           'chartinfo' => 'popup',  'text' => $meteors_txt  );

Wim


The json file we were using ,was updated frequently and contained detailed time-series of information up until a few minutes ago.

"time_tag","planetary_k_index","dst"
"2021-01-27 00:00:00","4.00","-26.2444992"

It only contained the kp-index. The A-index as calculated.

The I file I found so far is a plain-text file with a 27 day forecast, no idea yet when it is refreshed every Tuesday, usually by 2230UTC.
https://www.swpc.noaa.gov/products/27-day-outlook-107-cm-radio-flux-and-geomagnetic-indices

#   UTC      Radio Flux   Planetary   Largest
#  Date       10.7 cm      A Index    Kp Index
2021 May 31      72           5          2
2021 Jun 01      72          18          4
2021 Jun 02      72          15          4
2021 Jun 03      72           8          3
2021 Jun 04      72           8          3
2021 Jun 05      72           5          2
2021 Jun 06      72           5          2

Wim

Hi Wim
I take it none of these are of any use
https://services.swpc.noaa.gov/json/planetary_k_index_1m.json
https://services.swpc.noaa.gov/products/noaa-planetary-k-index.json
https://services.swpc.noaa.gov/products/noaa-planetary-k-index-forecast.json

Harold

$hcorrin :smiley: Thanks, I used the first one of the list, seems to be updated most frequently.

@ALL Attached updated versions of the two scripts which use aurora data.
And the PWS_load_files.php with the new URL to load the new file.

Have fun with testing,
Wim


aurora.zip (16.7 KB)

Hi Wim
updated scripts on this Isle of Man Home Weather Station (wd version)

Installed and all appears to be working well.

-Chris

Hi Wim I take it none of these are of any use https://services.swpc.noaa.gov/json/planetary_k_index_1m.json https://services.swpc.noaa.gov/products/noaa-planetary-k-index.json https://services.swpc.noaa.gov/products/noaa-planetary-k-index-forecast.json

Harold

$hcorrin :D Thanks, I used the first one of the list, seems to be updated most frequently.

Its actually the second one that has the correct information. As i write this the A index is 5 and the k index is 1.

From the second file:

["2021-11-25 00:00:00.000","2","1.67","6","8"],["2021-11-25 03:00:00.000","2","2.33","9","8"],["2021-11-25 06:00:00.000","1","1.33","5","8"]]

These updates come out every 3 hours, so you have date and time, then 2d element is the k index and the 4th element is the A index.

Regards,

Jim
altlaw.com/pwsWD

Not sure about that. The 2nd element is indeed the Kp-index, but the 4th element is labelled “a_running” and could be the equivalent 3-hourly a-index? Then the A-index (which is a DAILY index) is calculated as the average of the day’s eight a-indexes. (QUESTION: does “the day” always run 0000-2400 UTC or is “the day” just the last eight 3-hourly periods?)

BTW I’m no expert, I’m just looking at Wikipedia :slight_smile:

LATER EDIT: It appears that the answer to the QUESTION posed above is that the A-index is calculated for a complete UT day.

Will take a closer look, and will also take some time to rewrite and test the script.

Wim

The file i have pointed you to actually does not have the current a-index, but its closer. The best numbers come from a text file, but that would be much harder to parse. Let me try to put some of this in context. The k-index is an average level of disruption to the geomagnetic field over a 3 hour period. It is a scale of 0-9. The geomagnetic field is disrupted by the effects of the solar wind from coronal holes and the matter ejected by coronal mass ejections. The a-index is the average level of disruption over the last 3 8 hour periods. Thus, when a ‘bad’ solar wind hits the earth the k-index will shoot up. The a-index takes much longer to rise. So a high K with a low A indicates you are on the leading edge of an event. Conversely, a low K with a high (but dropping) A index means you are on the trailing edge of an event. Aurora starts to appear at mid-latitudes around 5- or 6 on the K index.

These events get followed by ham radio operators (of which i are one and many of my weather station observers are too) because these events disrupt communications. If the event is cause by a flare and coronal mass ejection, it will be followed by a spike in the solar flux, which is really good for communications. Thus, after the bad-ness is over, the good-ness will begin and you will talk all over the world with utter impunity.

Regards,

Jim
altlaw.com/pwsWD

IMHO I think it has the a-index (lower-case a) equivalent to the K-index, but not the daily A-index (capital A). So i suppose it is closer.

The k-index is an average level of disruption to the geomagnetic field over a 3 hour period. It is a scale of 0-9.

Agreed - K-index (capital K) is published every three hours and can be converted directly to the “equivalent three-hourly range” a-index.

The a-index is the average level of disruption over the last 3 8 hour periods.

That’s the A-index, which is the average of the last 8 three-hourly a-indexes.

While I’m not into ham radio I would expect to be able to see the Northern Lights from here at 56°N, especially as the north magnetic pole has been getting closer recently, but I live on the southern fringe of Edinburgh and all I get is street light pollution!

10 paces and a 12 gauge will take care of those street lights. :roll: i live in the middle of a national forest and it is so dark here i can routinely see the milky way.

Regards,

Jim

@jaltman
I have modified my (very old) aurora_popup.php to use this file for Kp and to calculate an A-index from the last 8 a-indexes, so I’ll be interested to see how it compares with your solar-terrestrial data module over time. . .

N.B. The A-index calculation is very crudely done, I need to learn a bit more about handling arrays in PHP :wink:

Care to share and i will check it out from here… Too bad its inconveient to parse form the text email, its the best:

:Product: Geophysical Alert Message wwv.txt
:Issued: 2021 Nov 26 1800 UTC

Prepared by the US Dept. of Commerce, NOAA, Space Weather Prediction Center

Geophysical Alert Message

Solar-terrestrial indices for 25 November follow.
Solar flux 94 and estimated planetary A-index 4.
The estimated planetary K-index at 1800 UTC on 26 November was 2.

No space weather storms were observed for the past 24 hours.

No space weather storms are predicted for the next 24 hours.

Regards,

Jim

You can see my page using the globe under my avatar, and check the PHP by using …/pws/aurora_popup.php?sce=view

I have your site bookmarked!

Next Kp update 21:00 UTC :slight_smile:

Nice page! is there a filename to download change somewhere else, or perhaps i just need to wait for the next update…

Regards,

Jim

Thanks :slight_smile:

The kindex.txt file can be downloaded from noaa.gov (by selecting the aurora popup) any time, allowed age is only 5 minutes. . . even though Kp is only updated every 3 hours! I don’t know exactly when the NOAA page is updated.

@ALL

If I understand this discussion correctly:

[ol]
[li]File to use should be https://services.swpc.noaa.gov/products/noaa-planetary-k-index.json[/li]
[li]K-index should be the last value[/li]
[li]A-index should be the the average of the last 8 values[/li]
[li]File reload should be reset to 1 hour [/li][/ol]

If correct, I can change the script that way.
But it will show “very” different values compared to the current version.
Currently the A-index is calculated from the Kp-index.

I will add a link to the WiKipedia article at the bottom.

Wim

Yes, I think so.

If correct, I can change the script that way. But it will show "very" different values compared to the current version. Currently the A-index is calculated from the Kp-index.

Currently the index calculated is the a-index, which changes at the same rate as the K-index. As @jaltman says:

So the new A-index values should be very different to the current values.

I think that the A-index will be the earliest maximum value of the last seven a-running entries. Seven, because that file is three hours behind. See https://www.ngdc.noaa.gov/stp/GEOMAG/kp_ap.html. But that results in the wrong number as the the highest number in the last seven entries is 6, but the A index is now at 4. Perhaps the a-running is the maximum value already calculated. I am so confused. In spite of my confusion the Solar Flux is up to 108 and A and K are nice and low, a good day for radio. File reload at 1 hour is fine, but will find a new entry after 3 hours, so it needs a long time out.

BTW, i can’t get your aurora_popup.php to load. The little cylon-eye just keeps cycling back and forth.

Regards,

Jim