Application Set-up

From WikiROMS
Jump to navigationJump to search
Application Set-up

New users to ROMS should read the Getting Started guide. For information on the ROMS algorithms and internal workings of the code see the Technical Reference.

Most users configuring a typical application of the forward simulation model will need to edit only the few files described below. For so-called realistic applications of particular coastal regions or open ocean basins, most of the work in configuring the model is actually in the creation of the various input netcdf files.

Case Name

The first thing you need to come up with when designing a new application is a name for that case. This name is provided via ROMS_APPLICATION, either via the makefile or the build Script. This name should be reasonably short, all uppercase, with spaces converted to underscores. For clarity, let's say we pick the name WIKI_TEST. The makefile will convert this to wiki_test.h for the ROMS_HEADER name.

cppdefs.h

Code options that must be set prior to compilation are listed in cppdefs.h. These include algorithm choices (e.g. advection and turbulence closure schemes), boundary conditions, output options (averages, diagnostics, stations, floats), and application modules (biology, sediments).

See C_Preprocessor for an overview on how the C-Preprocessor (cpp) interprets the syntax of your include file. A complete list of options is provided at Options.

Each application now has its own include file for setting these cpp options. The name of the file is the name of your application (UPWELLING, say) turned into lower case, with '.h' appended (upwelling.h). This name is either set in the makefile or in the build Script with the tag ROMS_APPLICATION, while the location is set by MY_HEADER_DIR, pointing to User/Include or some other location of your choosing.

Functionals

Some of the cpp Options have names beginning with ANA_. For each one of these, you will be expected to provide an analytic expression for the field in question in the corresponding include file. These files are listed in Functionals and their location is determined by MY_ANALYTICAL_DIR.

Input Parameter Files

ROMS reads several input parameter files at run time. File ocean.in controls the fundamental behavior of the forward model run, and directs ROMS to other input files such as stations.in, floats.in etc that may or may not be required depending on the options that are active.

ocean.in

The ocean.in file is used to set many parameter values that can be altered without recompiling. In serial execution, ocean.in is read from the UNIX standard input. In parallel execution using MPI, the ocean.in file is processed in parallel by all threads so the usage syntax is different. See for guidance.

Other input files read when certain application options are activated are:

stations.in

floats.in

biology.in

sediment.in

varinfo.dat

The varinfo.dat file manages features of input/output through netcdf files.

The most important function of varinfo.dat is to specify the netcdf variable name associated with the internal (to ROMS) index variable name. The index variable name is set in the code, but the name in the netcdf file can be changed by the user by editing varinfo.dat.

The units entry in varinfo.dat shows the default units assumed by ROMS but for input variables this can be changed this through an input scale factor.

These features are described in more detail at varinfo.dat.

Input Netcdf Files

Coordinates

Grid and bathymetry, and vertical s-coordinate stretching

Initial conditions

Initial conditions, restart, and using output files (history and averages) for input

Forcing files

Surface fluxes, atmospheric boundary layers, tides

Open boundary condition data

boundary file formats and conventions, tides

Climatology