View License

Download apps, toolboxes, and other File Exchange content using Add-On Explorer in MATLAB.

» Watch video

Highlights from
F10.7 Solar Flux & Ap Indices

5.0 | 2 ratings Rate this file 11 Downloads (last 30 days) File Size: 4.65 KB File ID: #35054 Version: 1.2
image thumbnail

F10.7 Solar Flux & Ap Indices


John Smith (view profile)


13 Feb 2012 (Updated )

Computes F10.7 solar flux and associated Ap magnetic indices for built-in function 'atmosnrlmsise00'

| Watch this File

File Information

Appreciable errors in MSIS00 modeled temperatures can occur for altitudes above 75 km if solar flux and magnetic indices deviate significantly from their default values. This routine automatically downloads needed solar flux and magnetic indices from and formats them for input to atmosnrlmsise00.


year = 2010;
doy = 216;
uts = 80000;

[x y z] = f107_aph(year,doy,uts);

alt = linspace(60000,105000,100);
lat = 40;
lon = -105;

[T rho] = atmosnrlmsise00(alt,lat,lon,year,doy,uts,x,y,z);


Day Of Year To Matlab Date and Passive Mode Ftp In Matlab inspired this file.

MATLAB release MATLAB 7.12 (R2011a)
Other requirements Internet connection required. If experiencing issues with ftp(), dir(), etc. see submission #6626 for comprehensive instructions.
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (7)
20 Sep 2013 bonfa87

20 Sep 2013 bonfa87

Hi John,

as Chad pointed out the ftp serve you were using is no longer available. I've found the same informations on still with .obs files.

I have a problem with your code: when I try to run it with a DoY = 1,2 or 3 it gives me this error:

??? Error using ==> ftp.mget at 106
File "/STP/GEOMAGNETIC_DATA/INDICES/KP_AP/1999 2000" not found on server.

Error in ==> f107_aph at 83
mget(f,remote{i}); % download dataset

Can you help me please?

Comment only
31 Jul 2013 Chad Taylor

Hey John,

I just wanted to make a quick comment about the FTP server you used. The file locations have changed for solar radio flux. They are now currently under the following directory:


The files are also now .txt vs. .obs

Comment only
16 Jun 2013 shuai

shuai (view profile)

11 Apr 2013 Nurul Shazana Abdul Hamid

Hi. I am using Matlab version R2008a.

Comment only
14 Mar 2013 John Smith

John Smith (view profile)

Hi Nurul,
I'm afraid I wasn't able to duplicate the error you saw. What version of MATLAB are you running?

Comment only
13 Mar 2013 Nurul Shazana Abdul Hamid

Hi. I have a question. I received this error when I run your example:
??? Error: File: f107_aph.m Line: 45 Column: 8
Expression or statement is incorrect--possibly unbalanced (, {, or [.

It is refer to this following command:
[YAp, ~, ~, ~, ~, ~] = datevec(daten-3);

Please advice..Thank you.

Comment only
04 Nov 2013 1.2

Updated the solar flux data ftp address (11/3/2013)

Contact us