If the software was obtained from the git repository then it will be located in the directory where it was put by git clone and should contain the following directory structure

/some/path/doc -- this documentation
          /bin -- binary/executable/script files
          /octave -- Octave source files
          /nec-patch -- patch for Debian/Ubuntu nec package
where /some/path is the directory it was cloned into.

In the bin directory is a shell script, , which is used to start the software. You should create a symbolic link to this file somewhere on your shell's search path, e.g. /usr/local/bin/erpmodel. The software can then be started simply by typing erpmodel at the shell prompt.

NEC installation

The software is designed to work with the version of NEC from the Debian/ Ubuntu nec package. Unfortunately the standard version of this package does not permit enough sources to be applied to the antenna structure to model the HF heating arrays. A patch is supplied in the nec-patch subdirectory of the ERP model installation.

If you are running Debian or Ubuntu, first install the nec source package into a location of your choice by doing

cd /path/of/your/choice
apt-get source nec
This will install the NEC source in the directory /path/of/your/choice. You may need to install some other packages so that apt-get can correctly set up the source (you should receive a warning message if this is the case).

You can now apply the patch in the following way

cd /path/of/your/choice/nec-2
patch -p1 < /some/path/nec-patch/NEC-PATCH
where /some/path is the path where the ERP model software was installed above. Finally, the NEC software should be built using
You may have to install the f2c package in order to build the NEC code.


After installation, the first time a user runs the software, they will be prompted to configure it by specifying the location of various files such as the transmitter logs, the antenna array model files, where plots and results should be stored and the path to the NEC executable. These settings are stored individually for each user.

If you installed the NEC software according to the instructions above, the path to the NEC excutable will be /path/of/your/choice/nec-2/nec/nec2

Manual Configuration

If you made a mistake during the setup process or you later need to change the location where the software stores results, you can edit the configuration file. The file is $HOME/.config/heatererp/conf.m where $HOME is your home directory. The file is actually an Octave script that sets the values of certain variables to indicate the path to the NEC executable, where to find and store files, etc. For example, to change the path to the NEC executable, edit the definition of the variable nec2_bin.


To check that your installation is working, a sample log file containing a synthetic test case is provided. This is located in the testing subdirectory of the directory where you installed the model. The file is called 1970-01-01_tx.log.

Copy this file to (or make a symlink to it in) your log file directory which you configured during the setup process. Then start the model by giving the erpmodel command at the shell prompt (assuming you installed it as described above). Then at the Octave prompt, give this command

erpmodel('01-Jan-1970 00:00:00')
This will run the model for a hypothetical case where all the transmitters are used with identical power and perfect phasing to generate a vertical beam on 5.423 MHz using Array 1.

A number of messages will appear in the Octave terminal window, the most important being *** running NEC2 ***. This message should be followed some time later by the message *** NEC2 completed successfully ***. This may take several minutes depending on the speed of your computer. If you see an error message instead then this probably means that something is wrong with your NEC installation. Make sure that you set the correct path to the NEC executable during the setup process. If necessary, edit the configuration file to change the path.

When the modelling is complete, a plot will appear on the screen. A PDF file of the plot will be created in your "plots" directory and a ZIP file containing the full NEC-2 model output will be created in your "results" directory.