GS2 Documentation


GS2 is an initial value nonlinear code which solves the gyrokinetic equation. This is the source code documentation for GS2, and is aimed at developers.

This is the documentation for the development trunk. For documentation for specific releases please go to

User Documentation

For a general introduction and user documentation please go to the Gyrokinetics Wiki:

Some useful pages are:

Documentation Structure

Documentation is categorized by namespaces (i.e. modules), class (which in fortran means custom types), and files. Within each namespace the subroutines are documented in various ways, including developer comments and (very useful) a chart showing which other subroutines call the subroutine and which are called by it.

Starting Out

If you want to start at the beginning and work out what GS2 does, start at gs2.f90, and use the call graphs to follow the algorithm.

Updating this documentation.

Updating Source Code Comments

This documentation is generated from commments added to the source code; to add to it, add more comments to the trunk source. All documenting comments begin with !> and are continued with !!. For more help see the doxygen help:

DO NOT add comments in between ifdef/endif preprocessor blocks. Such comments will probably be ignored.

DO NOT add documentation for variables which also happen to be input parameters. Your changes will be ignored in favour of the automatically generated input parameter documentation. To edit this input parameter documentation, please go to the wiki page:

Updating this Documentation