Application Set-up: Difference between revisions

From WikiROMS
Jump to navigationJump to search
No edit summary   (change visibility)
Line 28: Line 28:
== cppdefs.h ==
== cppdefs.h ==


Code options that must be set prior to compilation are set 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).  
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 interprets the syntax of cppdefs.h file. A complete list of options is provided at [[Options]].
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 [[build.sh]] 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.


== Input Parameter Files ==
== Input Parameter Files ==

Revision as of 17:13, 3 July 2007

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.

makefile

The makefile is altered only occasionally when the user wishes to change from serial to parallel execution, or change the default compiler option.

The two most common changes a user might make to the makefile are:


(1) Compile for parallel execution (the default is serial execution) by entering either:

   MPI := on

or

   OPENMP := on


(2) Change the compiler name (the default is the Portland Group compiler pgi). For example:

   FORT ?= g95

would direct make to use the Gnu Fortran compiler on a PC with Cygwin.

See Compiling and Linking for detailed help. If you have a non-standard UNIX, Fortran and/or netcdf library installation and you encounter problems post a message to ROMS User Forum to seek assistance.

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 build.sh 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.

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

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