4      Program Organization


All of the source code is located within a single directory which we will refer to as the project directory. One would normally have a separate project directory for each model application. This upper level directory can be called anything you like, but it should probably indicate the nature of the runs within the directory. The project directory name is not referred to directly by the code in the subdirectories. Within the project directory, the source code is arranged into several separate subdirectories.

The subdirectories within the source directory are PREP, MAIN, MOVIE, PLOTS and DATA. Subdirectory PREP (short for PREParation) contains programs that are used to set up the grid domain and do preliminary calculations prior to model simulations. DATA contains input data that is unique to the project; typically this data is accessed by the routines in PREP. Subdirectory MAIN contains the programs used to actually do a model run. Subdirectory MOVIE contains routines that can be used to very rapidly view a movie of how the model fields are evolving with time. PLOTS includes a variety of routines to plot snapshots of model conditions.

There are separate makefiles for the preparation PREP/ Makefile and simulation MAIN/ Makefile programs. Files with names ending in .h, .f, or .F are header files that are included in prep.F or main.F at the time of compilation. If you change a file ending in .h, .f, or .F the program will have to be recompiled with the Makefile by typing ``make" in the appropriate subdirectory. The files in subdirectories PREP and MAIN can be changed independently of each other, unless the array dimensions are changed.

The routines within PREP will create another subdirectory within the project directory called OUTPUT.tag_root, where tag_root is an identifier of 20 characters or less supplied by the user. The routines in PREP write information to OUTPUT.tag_root that will be required by the MAIN routines and the MAIN routines create their own subdirectory within OUTPUT.tag_root where their output will be stored (an exception is that the data required for movies is stored in the MOVIE subdirectory). The files within these subdirectories are briefly described below.




CANDIE Home User Guide Contents Previous Section Top of Page Next Section