As mentioned previously, script run_mom is a UNIX C shell script which executes the MOM four test cases (#0, #1, #2, and #3) on the CRAY T90 at GFDL. Questions regarding the extension of this script or developing scripts for other platform architectures cannot be answered by GFDL. All extensions or alterations are left to the researcher. The following is a description of how script run_mom works: Near the beginning of script run_mom, pathnames point to where all required directories are located at GFDL. They will have to be changed at each installation. Control for which test case executes is given by C shell variable CASE. CASE=0 is for test case 0 and so forth.
When run_mom executes, it copies all Fortran code from directory MOM_3 into a working directory followed by all code from either MOM_3/SBC/TIME_MEAN (if CASE = 1), MOM_3/SBC/MONTHLY (if CASE = 2), or MOM_3/SBC/ATMOS (if CASE = 3). If any NetCDF option is on, all files from MOM_3/NETCDF3.10 are also copied. Lastly, it copies all Fortran code from the EXP/TEST_CASE/MOM_UPDATES directory thereby installing all changes necessary (if any) to build the particular model.
Various ways of configuring MOM are controlled by options in Part XIV. Diagnostics options are enabled as described in Chapter 38 . Options are set within the script using cpp preprocessor commands of the form -Doption1, -Doption2 and so forth. These options eliminate or include various portions of code to construct a model having the desired components. They are also used to enable diagnostics and whether output is in NetCDF format or not. Note also, that the computer platform is specified within run_mom. Currently, the list includes -Dcray_ymp, -Dcray_c90, -Dcray_t90, and -Dsgi. Based on which setting is chosen, appropriate platform options are added for routines in MOM_3/NETCDF3.11.
There is no makefile supplied for compiling MOM. If compile time is an issue, then one can be constructed by the researcher. In the compiling section of the script, there is provision for enabling a bounds checker. This is strongly recommended as standard operating practice for verifying that subscripts do not exceed array bounds in newly developed code. Afterwards, the bounds checker should not be used since it significantly slows execution.
The compiling and linking to an executable is done in one step under Fortran 90. After compiling, separate namelist files are constructed which contain specifications to reset various defaulted quantities. Refer to Section 14.4 for a list. These namelist files are read by subroutine setocn and other initialization subroutines specific to individual parameterizations which have been enabled.
At this point, the executable is executed and output is redirected to file results which is later copied to the appropriate printout file. Except for the printout file which is ASCII, all diagnostic data is written to separate files as either IEEE 32 bit data (having a ``.yyyyyy.mm.dd.dta'' suffix) or NetCDF formatted data (having a ``.nc'' suffix) as described in Chapter 38. The ``yyyyyy.mm.dd'' is a place holder for year, month, and day and this naming convention is explained further in Section 38.2.
There are some additional files. The files document.dta
and restart.yyyyyy.mm.dd.dta also have a ``.dta'' suffix but are
not diagnostic files. The ``yyyyyy.mm.dd'' is a place holder for
year, month, and day and this naming convention is explained further in
Section 38.2. File document.dta is a
formatted file containing all namelist settings plus some additional
information. File restart.yyyyyy.mm.dd.dta contains data needed
to restart the integration from the point where it last ended. To write
a restart, variable restrt must be set to true in the
namelist. Within an actual integration, pathnames would be changed so
that these files would be copied to the experiment directory
(e.g. cp
.nc EXP/ATLANTIC) on the supercomputer archive.
Refer to Section 38.3 for post processing the
results.
The script run_mom is set to execute CASE=0. All test cases have a heavy load of diagnostics enabled for demonstration purposes. Look at the timing estimates at the end of the printout to see what they cost. Turn off the ones not needed by removing them from the option list in script run_mom.