Next: , Previous: Purpose of the spa, Up: The SPA


2.3 Structure of the SPA

The SPA source is arranged in a set of subdirectories in this distribution. The naming of the source for the routines follows strict guidelines that are required for some of the automated build processes of the SPA. The routines are easily accessible through a series of developer's utilities described in See Developers interface, although most development work will occur in a local directory belonging to the developer (much like an RCS or CVS modification). The source subdirectories of the archive are:

`subroutines'
This subdirectory is the repository for most of the generic initialization and setup utilities in the archive. The subroutines contained in this directory are usually accessed near the beginning of an SPA interface or when file I/O is required. All subroutines in the archive begin with the sub_ prefix, followed by the name of the subroutine with a .f90 extension.
`functions'
The source in this directory primarily handles the calculations of the SPA. Functions are usually referenced either by control subroutines or by the developer in the “calculations” section of the code. All functions in the archive begin with the func_ prefix, followed by the name of the function with a .f90 extension.
`modules'
The modules contained in this directory contain interface blocks for the control routines of the SPA. The interfaces are grouped by type (i.e. “mod_FST_File_Utilities.f90” holds all of the interfaces for RPN Standard File-specific code). All modules in the archive (with one exception noted in the next item) begin with the mod_ prefix, followed by the name of the module with a .f90 extension.
`interfaces'
The interfaces for all of the calculation routines are contained in the interface file Interface_MRG.f90. This is the only source in the SPA whose name violates the rules described in the remainder of this table — and believe me I regret that every time I work with the code. A series of modules consisting of interface blocks are contained in the Mesoscale Research Group (MRG) primary interface, with subprogram access for each depends on broad groupings of functionality.
`std'
The data file format-specific I/O subroutines are held below this subdirectory, with individual folders for each. Users with installed RPN, GEMPAK, and NCAR Graphics libraries (see for a discussion of this graphics library utility) will have a fully-populated std subdirectory. Most of the files in this set of subdirectories are subroutines, although a few functions are also present for the GEMPAK interface.
`opt'
This subdirectory has further subdirectories which allow the SPA to handle missing libraries without exceptions. For example, a user who has no need for GEMPAK data file structures, and who has no GEMPAK libraries installed, will see an opt/gemlib subdirectory filled with stub routines which warn the user about the library's unavailability and exit smoothly. For users with the RPN, GEMPAK, and NCAR Graphics libraries installed see for a discussion of this graphics library utility will see no opt directory in their distribution since all of the necessary routines are held below the std subdirectory.
`templates'
The template files in this subdirectory are intended to ease mundane coding tasks for developers by providing easy access to initiation and control routines in a usable fashion. The template.f90 program is intended for standard development tasks, while the template_gui.f90 source allows for GUI driven development.
`settings'
This directory holds an example set of configurations, again in an effort to ease the development process to the point where everyone will enjoy it and participate in it.