Go to the bottom of this page. See the search engine and sub-section links.
Go to previous page Go to top page Go to table of contents

Previous Section Headers

User's Guide to NCAR CAM2.0 Search Page



Appendix B: Details of the configuration files


`

The configure utility creates the header files misc.h, params.h, and preproc.h and the directory search path file Filepath. These files are written to the directory given by the -cam_bld argument of configure (the default is the directory from which configure is executed). It is not necessary to edit these files to produce supported CAM configurations as that can be easily accomplished by the configure utility. However, a user experimenting with non-standard configurations may need to edit these files directly. Thus, the file contents are summarized below. The use of these files by gmake is also discussed below in the section "Details of gmake procedure".

Details of gmake procedure

cpp directives of the form #include, #if defined, etc., are used to enhance portability, and allow for the implementation of distinct blocks of platform-specific code within a single file. Header files, such as misc.h, are included with #include statements within the source code. When gmake is invoked, the C preprocessor includes or excludes blocks of code depending on which cpp tokens have been defined. cpp directives are also used to perform textual substitution for resolution-specific parameters in the code. The format of these cpp tokens follows standard cpp protocol in that they are all uppercase versions of the Fortran variables, which they define. Thus, a code statement like

    parameter(plat = PLAT)

will result in the following processed line (for standard T42 resolution).

     parameter(plat = 64)

gmake invokes the utility mkSrcfiles to generate a list of source files (written to the file Srcfiles) using each directory listed in Filepath. gmake then invokes the utility mkDepends to create a dependency file (written to the file Depends) in the CAM build directory. If a file listed as a dependency does not exist in the CAM build directory, gmake searches the directories contained in Filepath, in the order given, for a file with that name. The first file found satisfies the dependency. If user-modified code is to be introduced, Filepath should contain, as the first entry (or entries), the directory containing the user code. User code directories are specified with the -usr_src option to configure.

A parallel gmake is achieved in the build scripts by using gmake with the -j option, which specifies the number of jobs (commands) to run simultaneously.


 Go to the top of this page. See links to previous section headers.
Go to previous page Go to top page Go to table of contents

 Search for keywords in the CAM2.0 Users GuideSearch page

Questions on these pages can be sent to... erik@ucar.edu .


$Name: $ $Revision: 1.1 $ $Date: 2004/06/08 02:57:23 $ $Author: jmccaa $