Quick Start


This section aims to give a quick insight into the SEA code and how it can be used. It is strongly recommended to anyone that has not previously used the SEA model. Using a worked example, an initial sequential run of a pseudo global model will be completed and the resulting restart file archived ready for analysis.


When the source code is initially downloaded, the default Makefile settings are configured to select the simple_world domain. This automatically generates a pseudo global model, with an idealised topography, extending from 70°S to 70°N. The spatial grid is defined with a two degree horizontal resolution in both the longitude and latitude directions and 15 vertical depth levels (which vary from 30m at the ocean surface to 800m at the ocean floor). All that is required to generate the sea executable, is to proceed through the make procedure, as detailed below, from within the SEA directory.

Note: It may be necessary to adjust some environment variables to correctly describe your architecture, as detailed in the User Guide.

The following screen dump is what to expect when the default make sequence is executed: make clean; make config; config; make sea

The config part of this procedure results in the generation of three files. The header file, include/gridres.h is later used in the compilation of the main SEA code (make sea). The other two files (read in at run-time) are processor map map.in and a topography file data/model/topog.0. The necessity of these files becomes more apparent when running in parallel mode and is explained fully in the user guide.

Having completed the make procedure, the sea program is ready to run. At run time (in addition to the two files above) the model will read in the file ocean.in, which is used to specify a number of variable run time parameters. Assuming the downloaded copy has not been changed, the model will run for one model day (first_day = 0.0, last_day = 1.0), from an initial state (init = .true). During the run a diagnostic line will be output every 0.2 days (tsi = 0.2) and a restart file will be output at the end of the run (restrt = .true.). (The meaning of the parameters and others is explained in full in the model user guide).

To briefly explain the screen output, the header part is displayed at the start of the run, displaying some of the model configuration details. The diagnostic lines show details of the current timestep (DTemp and DSalt are the current rate of change of Temperature and Salinity in the model, whilst KE is the total Kinetic Energy). The exact values may vary slightly, depending on machine precision (also when run in parallel mode, truncation errors mean that the order of the summing is important and will also vary for different configurations), but provided they are correct to a few decimal places then the model should have run okay. The CPU values indicate the CPU time required to complete the current timestep and the total CPU time since the start of the run. These will almost certainly differ from one machine to another.

The resultant restart file is a direct access file that is written to the restarts/model directory, and will be named r000001.0 - the ".0" suffix indicates the process number that created the file (only truly relevant when running in parallel mode). To further manipulate the data contained within this file, or visualise it using the OCCAM plotting routines, it is possible to post-process the restart file and convert it to either an HDF file (r000001.hdf), or an unformatted sequential file (r000001.ufm), which will be stored in the restarts directory. For HDF to be used, the software must have been installed and the environment variables HDF_INC and HDF_LIB must be set correctly (as described in the Installation section). The Makefile must also indicate that HDF may be used by the SEA post-processing utility, using the following variables (if they are not set only unformatted sequential file options will be offered):

Having indicated the required archive format, the post-sea program may be compiled and run:

From this example, a file restarts/r000001.hdf has been created and is ready for analysis. The file restarts/r000001.0 has been removed (to save filestore), but would have been kept had the response been "y" to the "Keep sub-files after merging ?" question. It is only worth keeping the unprocessed ".#" files if you wish to restart a run from that point, rather than from the beginning. If you delete them and later decide you need to restart from them, they can be re-created from the HDF (or unformatted) archive using the pre-sea utility. This is compiled and run in similar fashion to the post-sea utility.

If the OCCAM plotting routines have been installed, the archive file can be analysed visually, with a routine such as mplot. An example plot from this package, of the free surface height after one day, for this simple_world can be seen here.