First, we discuss that changes made to the model that modify the actual fortran code and hence require compilation.
1. Give the name for the test case in the file MAIN/ AN_ID.h This must be the same name given in the file PREP/ AN_ID.h Comment out all other define statements with an initial C.
2. If required, alter main.F to override information supplied by prep routine. The user must be careful not to introduce any inconsistencies, but some settings can obviously be modified without any ill effects. For example, the wind stress ( TAUX, TAUY) could be modified. (Remember that the model assumes that TAUX and TAUY are given in dynes cm2.)
3. Set the desired output. In the file MAIN/ Output.h set the data statements according to instructions. To save data for a variable, put a 1 in the column determining the X,Y, or Z space. If two different sections are required, enter a 2 instead of a 1. On the line below this, write in the I,J, or K index for the data slice in the Y-Z, X-Z, or X-Y plane. The third row identifies the section(s) for the second plot if one is requested. The variables used to define section plots are:
For example, to make three temperature plots, for slices in the planes at I = 50, J = 50, K = 6, set the data statement
data iplt / 1, 1, 1,
& 50, 50, 6,
& 0, 0, 0 /
When the model is run, these output files are put in the subdirectory created with the name tag for the present model run. For example, if the name tag for the present model run given in file main.in is NA1.0, then the data is written to subdirectory OUTPUT.NA1/NA1.0.
The file Output.h can also be edited to request plots of surface pressure ( IETAOUT = 1), zonal overturning stream function ( IXIXYOUT = 1), meridional overturning stream function ( IXIYZOUT = 1), or to dump 3D information for P, T, S, RHO, U, V, and/or W (e.g., IPXYZOUT = 1).
4. Modify the file MAIN/ Define.h by setting the choices PARTIAL_CELLS, Free_Surf, Rigid_Lid, BBL, LEVITUS, etc. This is done in an #ifdef block of code for the case name set in files AN_ID.h, just as was done for the file PREP/ Def_prep.h. Be sure that the choices made in MAIN/ Define.h do not conflict with those made in PREP/ Def_prep.h. For example, if PARTIAL_CELLS is defined in Def_prep.h, then PARTIAL_CELLS must also be defined in Define.h. Also, not all these choices can be set simultaneously for the same case. A list of the choices that can be made through the Define.h file is shown below:
Note that in the diagnostic mode the temperature, salinity and density fields never change.
The last part of the file Define.h specifies additional default conditions set by the user. For example, if Richardson number mixing is used, then large vertical diffusivities are possible and hence one should use an implicit procedure to accound for the vertical mixing. To make this the default, we include the code:
#endif /* VMix_RICH */
5. If you need any new arrays in the program, dimension them in the file MAIN/SUBS/ Local_Arrays.h, in an #ifdef block for your case. You may also want to add the new arrays to a common block in Local_Arrays.h so that they will be passed to the various subroutines called by main.
6. Make any necessary changes to the file MAIN/SUBS/ initfs.F. As an example, the time step acceleration parameters ALPHA_ACC and GAMMA_ACC(K) and parameters such as OT_RESTORE that control the surface temperature restoring time are set in this file.
7. Compile the main.F program. In the MAIN subdirectory compile the program with the makefile MAIN/ Makefile with the command ``make", or to send the output to a file
make >& Makefile.out
This produces the executable file main. Again, we emphasize that if any changes are made to files ending in .f, .F, or .h, in MAIN or its subdirectories, a new executable main must be created by typing ``make" to recompile the Makefile. If any new files are created to be included in any of the files in MAIN, these files should be added to the target list of the Makefile. The files in directories PREP and MAIN can be changed independently of eachother,unless the array dimensions are changed. As a debugging technique, it is sometimes useful to use the command
f77 -F main.F (on SUN workstations)
f77 -P main.F (on SGI workstations)
which invokes the source file macro preprocessor but does not compile. A file is created that gives a listing of the code in the main.F file with all the code inserted from the INCLUDE statements for the #ifdef options selected.