The Hallberg Isopycnal Model (HIM)

by Robert Hallberg

Introduction

This program (HIM) simulates the ocean by numerically solving the Boussinesq primitive equations in isopycnal vertical coordinates and general orthogonal horizontal coordinates. These equations are horizontally discretized on an Arakawa C-grid. There are a range of options for the physical parameterizations, from those most appropriate to highly idealized models for studies of geophysical fluid dynamics to a rich suite of processes appropriate for realistic ocean simulations. The thermodynamic options range from an adiabatic model with fixed density layers to a model with temperature and salinity as state variables and using a full nonlinear equation of state. The uppermost few layers may be used to describe a bulk mixed layer, including the effects of penetrating shortwave radiation. Either a split- explicit time stepping scheme or a non-split scheme may be used for the dynamics, while the time stepping may be split (and use different numbers of steps to cover the same interval) for the forcing, the thermodynamics, and for the dynamics. Most of the numerics are second order accurate in space. HIM can run with an absurdly thin minimum layer thickness.

Details of the numerics and physical parameterizations are provided in the appropriate source files. Most of the available options are selected by the settings in init.h, although some (such as the equation of state) are selected by specifying which file to use in the make file (Makefile).

The file HIM.c contains the main time stepping loops. One time integration option for the dynamics uses a split explicit time stepping scheme to rapidly step the barotropic pressure and velocity fields. The barotropic velocities are averaged over the baroclinic time step before they are used to advect thickness and determine the baroclinic accelerations. At the end of every time step, the free surface height perturbation is determining by adding up the layer thicknesses; this perturbation is used to drive the free surface heights from the barotropic calculation and from the sum of the layer thicknesses toward each other over subsequent time steps. The barotropic and baroclinic velocities are synchronized as part of the vertical viscosity algorithm and be recalculating. the barotropic velocities from the baroclinic velocities each time step. This scheme is described in Hallberg, 1997, J. Comp. Phys. 135, 54-65.

The other time integration option uses a non-split time stepping scheme based on the 3-step third order Runge-Kutta scheme described in Matsuno, 1966, J. Met. Soc. Japan, 44, 85-88. For problems with more than a very few layers, this non-split scheme is much less efficient than the split scheme, but because it is much simpler and formally more accurate, it is useful to have to verify that temporal truncation errors are not significant.

There are a range of closure options available in HIM. Horizontal velocities are subject to a combination of horizontal biharmonic and Laplacian friction (based on a stress tensor formalism) and a vertical Fickian viscosity (perhaps using the kinematic viscosity of water). The horizontal viscosities may be constant, spatially varying or may be dynamically calculated using Smagorinsky's approach. A diapycnal diffusion of density and thermodynamic quantities is also allowed, but not required, as is horizontal diffusion of interface heights (akin to the Gent-McWilliams closure of geopotential coordinate models). The diapycnal mixing may use a fixed diffusivity or it may use the shear Richardson number dependent closure described in Hallberg (MWR, 2000). When there is diapycnal diffusion, it applies to momentum as well. As this is in addition to the vertical viscosity, the vertical Prandtl always exceeds 1.

HIM has a number of noteworthy debugging capabilities. Excessively large velocities are truncated and HIM will stop itself after a number of such instances to keep the model from crashing altogether, and the model state is output with a reported time of 9.9e9. This is useful in diagnosing failures, or (by accepting some truncations) it may be useful for getting the model past the adjustment from an ill-balanced initial condition. In addition, all of the accelerations in the columns with excessively large velocities may be directed to a text file. Parallelization errors may be diagnosed with the CHECK_PARALLEL option, whereby ostensibly identical model incarnations are run simultaneously on one and multiple processors and any differences are reported.

About 35 other files of source code and 6 header files must be used to make HIM work. A makefile is included to make compiling easy. Type "make HIM" to compile. Some run time input is required, but this is prompted for. It may be convenient to direct a small file containing the needed information to standard input, and direct the output to another file.



Source File Subroutines

      The ~35 source files contain the following subroutines:



Initial Condition, Forcing, and Domain Specification Routines



Principal Dynamic Routines



Thermodynamic Routines



Infrastructural Routines



Purely Diagnostic Routines


     

Header Files

In addition there are 5 header files:


Most simulations can be set up by modifying only the files init.h, initialize.c, and surface_forcing.c. In addition, the file initialize_output.c will commonly be modified to tailor the output to the needs of the question at hand. These altered files and the makefile might reside in the same directory as the executable file. All of the other (unaltered) source code should probably remain in some central directory. The makefile will, of course, need to reflect the locations of the desired source files.




Last update:  2002/06/26 20:19
Send comments/suggestions to Lori Thompson