File Exchange

image thumbnail

African GNSS TEC (AfriTEC) Model

version 2.3.1 (2.62 MB) by Daniel Okoh
The AfriTEC Model is a model of the Total Electron Content (TEC) over the African continent developed using neural networks


Updated 09 Aug 2020

View License

The AfriTEC model is a model of the ionospheric GNSS TEC over the entire African region (Longitudes 25 degree West to 60 degree East, Latitudes 40 degree South to 40 degree North).
The model can be used to obtain the ionospheric GNSS TEC at all locations over the African continent.
For this version of the model (version 2.3), usage is encouraged to be restricted between years 2000-2022. The model is updated biennially. The year span of encouraged usage will be expanded in subsequent versions of the model.
The model is developed by the method of artificial neural networks as detailed in the paper:, which is included in the model folder

• The program comes in a folder which contains all associating files
• The main program to run is named AfriTEC.m
• It generates a graphical user interface which is simple and easy to use
• Users can either produce diurnal profiles or spatial maps
• Users can also generate the diurnal profiles for all the days in a year by ticking the checkbox on the user interface
• When the program runs, it creates the figure for the user specified details, and stores the corresponding data in a folder named Output (which is created within the same folder where the AfriTEC program is located)

The deployed model contains text file named “Kp_Dst_F10p7.txt”. This is the primary file containing F10.7 values used by the model. At the time of writing this document, the file contains values of the F10.7 for the period starting from the end of year 1999 to 20 July 2020. Default data contained in the file is obtained from NASA’s OMNIWeb ( Data in the file is arranged in 6 columns. The first column is Year. The second column is Day of year. The third column is Hour (in UT). The fourth column is Kp index (multiplied by 10). The fifth column is Dst index (in nT). The sixth column is the F10.7 index.
Users can follow the above description to update the file, depending on their preferences, and according to the period of TEC data they desire from the model. This is the primary source of solar and geomagnetic storm indices for the model; the model looks elsewhere only if there is no data from this text file for the period in which TEC data is requested.

The internet is a secondary source of F10.7 data for the model; the model looks here only if it does not find values on the text file named “Kp_Dst_F10p7.txt”. The following are sources of web-based F10.7 data used by the model:

NOAA SWPC archive of solar and geomagnetic data
At the time of writing this document, the site contains F10.7 data from year 1994 to present. It is updated in near real time. The model looks here to fetch F10.7 data if data for the periods desired are not found within the text file named “Kp_Dst_F10p7.txt”.

NOAA SWPC 45-day forecasts of F10.7
The site is continually updated such that it contains a 45-day forecast of the F10.7 values. This is the third and last place the model looks to fetch F10.7 values from. This resource helps to make 45-day forecasts of TEC possible. It is recommended that the user understands this part, and so it may not be possible to forecast beyond the forecasted indices. Also the accuracies of the forecasted TEC values will be dependent on the accuracies of the forecasted indices.

If users update the text file named “Kp_Dst_F10p7.txt” with their values of F10.7, then there will be no need of internet to run the AfriTEC model. Users are encouraged to update the text file named “Kp_Dst_F10p7.txt” with observed values of F10.7 so as to increase speed and accuracy of the AfriTEC model.

The model is updated and implemented to produce TEC in real-time and future times using F10.7 data obtained from NOAA SWPC

This program is only open for applications in research and education. Other users should contact Dr Daniel Okoh (

Users must acknowledge the development of this program appropriately as stated below:
I (or We) acknowledge the developers of the AfriTEC model, the Centre for Atmospheric Research - National Space Research and Development Agency, the CV Raman International Fellowship Scheme, the Indian Institute of Geomagnetism, and the South African National Space Agency for making the AfriTEC model available.

Dr Daniel Okoh

Cite As

Daniel Okoh (2020). African GNSS TEC (AfriTEC) Model (, MATLAB Central File Exchange. Retrieved .

Comments and Ratings (2)

Daniel Okoh

Dear Amani,
Sorry about that, it appears you are using a version of MATLAB earlier than 2017b. The error says that the 'isfolder' function is missing in your MATLAB installation. The 'isfolder' function was introduced in 2017b.
I suggest you use 'isdir' in place of 'isfolder'. Find occurrences of 'isfolder' and replace them with 'isdir' (in the main program named AfriTEC.m), and the error should go.

Amani ou

Dear Daniel Okoh :
These are some mistakes when i run this model in matlab2016b, how can we deal with it?
Undefined function or variable 'isfolder'.

Error in AfriTEC>pushbutton4_Callback (line 199)
if ~isfolder('Outputs\Diurnal'); mkdir('Outputs\Diurnal'); end

Error in gui_mainfcn (line 95)

Error in AfriTEC (line 42)
gui_mainfcn(gui_State, varargin{:});

Error in>@(hObject,eventdata)AfriTEC('pushbutton4_Callback',hObject,eventdata,guidata(hObject))

Error while evaluating UIControl Callback



Corrected minor error in version naming


Updated model folder


Included research paper that details the model development.


The model is updated and implemented to produce TEC in real-time and future times using F10.7 data obtained from NOAA SWPC


TEC data obtained from COSMIC (Constellation Observing System for Meteorology, Ionosphere and Climate) integrated electron density profiles were included into the pool of data trained.


Changed number of hidden layer neurons in network from 8 to 23


Added screenshot

MATLAB Release Compatibility
Created with R2018a
Compatible with R2018a to R2020a
Platform Compatibility
Windows macOS Linux