Install
=======

KMFR was originally written in Fortran targeting the Compaq Visual Fortran
compiler for Windows and relied on some of its non-standard extensions. Since
the CVF was last released in 1999 and is no longer supported, in 2019 the model
was ported to pure Fortran 2003. Testing has been performed using GFortran 10
but any recent compiler should work.

System requirements
===================

* Fortran 2003 compiler. GCC GFortran 10 and 13 tested.

* A Unix-like operating system. KMFR has minor dependencies on Unix conventions
such as directory path syntax and shell escape commands. Mac OS X and GNU/Linux
are known to work.

* GNU make.

* Previous versions of KMFR depended on CERNLIB, a mathematical library in
widespread use in 1980-1990s. However, CERNLIB is no longer included in popular
Linux distributions, so in this version the parts of CERNLIB which are needed
to compile KMFR are included in the source tree in the "minicl" directory.

Build instructions
==================

1. Uncompress the distribution file and cd to the kmfr-VERSION directory.
2. To compile the KMFR execute the command

    $ make

Note: certain edits to the makefile might be necessary to set up paths and
flags of the Fortran compiler if the default options don't work.

Usage
=====

Configuration parameters of the model are specified in a text configuration
file using the Fortran namelist format. A sample configuration file with
comments is provided (sample-kmfr.cfg). Refer to it for user-modifiable
settings.

The calculation is started by running either

$ /path/to/kmfr sample-kmfr.cfg

or

$ /path/to/kmfr < sample-kmfr.cfg

Calculation results can be found in the automatically created output
sub-directory "data".

Calculated cross sections can be found in the sct1.dat, sct2.dat,... files,
where the numeric index corresponds to the reaction code in the text file key.
For each reaction this file lists, respectively, the reaction code, its
integrated cross section, threshold, and the number of emitted neutrons and
protons. All energy values are specified in [MeV] and cross sections in [mb]
units. 

Description of files
====================

*.f90            Source code of the KMFR model.
*.dat            Read-only input files.
minicl/*         Numeric subroutines from the CERNLIB library.
sample-kmfr.cfg  Sample input file.
sample-output/*  Corresponding sample output files.
data             KMFR output directory.

