## 1. Introduction

The Inverse Ocean Modeling (IOM) system is a modular system for constructing and running weak-constraint, four-dimensional variational data assimilation (W4DVAR) for any linear or nonlinear functionally smooth dynamical model and observing array. Details of the IOM are described in a companion paper (Bennett et al. 2008) and only briefly summarized here. The objective of this paper is to demonstrate the flexibility, power, and usefulness of the IOM.

Implementation of the IOM in conjunction with four ocean models is described: Primitive Equation Z-coordinate-Harmonic Analysis of Tides (PEZ-HAT), Regional Ocean Modeling System (ROMS), Advanced Circulation in 2D (ADCIRC-2D), and Spectral Element Ocean Model in 2D (SEOM-2D). These models are diverse in their character, formulation and scientific applications. Two of the models (PEZ-HAT and SEOM-2D) are new models; they have been developed simultaneously with the IOM and thus their structure was readily matched to the IOM interface. The other two models (ROMS and ADCIRC-2D) have been in widespread use long before the IOM came into existence. The IOM is flexible enough to interface with these models with only minor alterations to their structure.

The models also differ in their numerics, as detailed in Table 1. Both PEZ-HAT and ROMS are three-dimensional, primitive equation, finite-difference models. The numerics in PEZ-HAT are based on the 1991 Killworth free-surface version (Killworth et al. 1991) of the Bryan and Cox (1968) model, as recoded by Bennett and Chua (A. Bennett 2003, personal communication), and include modifications for extensive run-time (rather than compile time) model configuration, more accurate baroclinic–barotropic time stepping (utilizing a subset of the developments described in Shchepetkin and McWilliams 2005), partial cell bottom topography (Pacanowski and Gnanadesikan 1998), harmonic analysis, and open boundary conditions. ROMS is a free-surface, split-explicit, terrain-following primitive equations ocean model with several vertical mixing schemes, multiple levels of nesting, and composite grids and other advanced numerical features (Shchepetkin and McWilliams 2003, 2005).

Both ADCIRC-2D and SEOM-2D are shallow-water models belonging to the finite-element family. The use of unstructured grids permits a better geometric description of complex coastlines, accommodates spatially variable resolution for localized small-scale processes, and therefore allows multiscale simulations within the framework of a single model. ADCIRC-2D uses linear interpolation on triangular elements and a wave equation formulation of the shallow-water equations. SEOM-2D uses higher-order interpolation on quadrilateral elements in conjunction with the standard formulation of the shallow-water equations. It offers dual approaches to achieving convergence: algebraic (elemental grid refinement) and exponential (increase in the order of intraelement interpolation).

### a. The scientific applications of the models

The four models have a wide range of current and potential uses, including realistic simulation and prediction, as well as idealized process studies.

PEZ-HAT was developed to quantify and understand the impact of the tides on mixing in the abyssal ocean. It has been used to model the internal tides around the Hawaiian Ridge (Zaron and Egbert 2007) and is currently being used in conjunction with the IOM to globally map the energy flux out of the tidal internal wave field using observations from satellite altimetry.

ROMS is used for a wide range of applications from the basin to coastal and estuarine scales, and includes several coupled models for biogeochemical, bio-optical, sediment, and sea ice applications. W4DVAR studies using ROMS are currently being used for predictability studies on the East and West Coasts (United States), the Gulf of Mexico, the Caribbean Sea, and the east Australia Current. A detailed description of the W4DVAR version of ROMS appears in Di Lorenzo et al. (2007).

ADCIRC-2D is used to model tidal and wind-driven circulation, to forecast hurricane storm surge and flooding, to study larval transport, material disposal, and dredging feasibility. Recently, ADCIRC-2D has been used to successfully forecast the flooding of New Orleans during Hurricane Katrina (Travis 2005; Duffy 2005) and the Federal Emergency Management Agency is using ADCIRC-2D to regenerate its Flood Insurance Rate Maps (FIRMs).

SEOM-2D has been used for multiscale modeling of tidal and wind-driven flows (Wunsch et al. 1997; Levin et al. 1997); and for modeling of abyssal flows (Curchitser et al. 1998, 1999). SEOM-2D has been also used for highly accurate process studies (Haidvogel and Beckmann 1999).

### b. The hypotheses

*X*is the decorrelation length scale. Weaver and Courtier (2001) offer more complex spatial covariances; this will be included in future releases of the IOM. Temporal covariances have a Markovian form: where

*s*is the decorrelation time scale. In general, the IOM estimate of the dynamical error,

*λ*, is related to the corresponding adjoint variable, λ̂, by convolution with the appropriate error covariance,

*C:*where the “∘” indicates integration over the spatial domain. The convolutions in (3) can be extremely expensive to compute directly, but the IOM offers efficient alternatives (Chua and Bennett 2001). The IOM also allows the user to implement other error covariances through a user-supplied covariance kernel. For example, both the ROMS and PEZ-HAT applications described below have implemented non-bell-shaped, spatially inhomogeneous covariance functions along the lines of Weaver and Courtier (2001) and Purser et al. (2003), respectively.

Each model will be briefly described in the following sections; the reader is referred to other publications for more information. It is, of necessity, assumed that the reader is broadly familiar with variational assimilation and with the definition of an adjoint model (e.g., Bennett 2002). For each model, the governing equations, numerical formulation, penalty, and practical details of the IOM implementation will be described. In addition, some representative results obtained with the inversion of each model will be discussed.

## 2. PEZ-HAT

PEZ-HAT estimates the state of the ocean as a field over space at selected tidal frequencies. The forward model solves for these in two stages: a forward integration of the time-dependent governing equations from some initial condition and then harmonic analysis of those fields to yield the complex tidal amplitudes. The IOM can accept both time and frequency domain models; the domain of the fields is no limitation.

### a. PEZ-HAT: The governing equations

The governing equations are the primitive equations and conservation of potential temperature together with an equation of state. In these open-ocean tidal applications, the primitive equations are expressed in terms of complex tidal amplitudes and linearized around a motionless and laterally homogeneous background state. Kinematic boundary conditions are enforced at the material surface of the fluid and at the bottom. Turbulent mixing of momentum and the active tracer, potential temperature, are parameterized with down-gradient diffusion. Open boundary conditions are posed separately for the baroclinic and barotropic components of flow, as described by Zaron and Egbert (2006).

### b. PEZ-HAT: Defining a penalty

**u**is the horizontal velocity,

*w*is the vertical velocity,

*p*is the pressure,

*ρ*is the density,

*θ*is the potential temperature,

*λ*and

_{M}*λ*are residuals in the momentum and the potential temperature equations, respectively,

_{θ}**is the vector of measurement operators that are defined by integration kernels,**L

**d**is the vector of scalar observations, 𝗩 is a diagonal data error covariance matrix, and superscript T indicates Hermitian transpose. The adjoint variable λ̂ corresponds to

*λ*; the subscripts on these variables indicate the dynamical component. The domain of integration extends over the three-dimensional volume of the domain, and, in this context, the operator ∘ takes the complex conjugate of its first argument.

The adjoint code for PEZ-HAT utilizes both exact adjoints (i.e., finite-difference operators that are adjoint with respect to the Riemann sum approximation to the appropriate inner product) and approximate adjoints (i.e., finite-difference operators that converge to the exact operators in the limit of increasing model resolution). Experiments have shown that at the high resolution used in PEZ-HAT applications, the error in the representer functions computed using the approximate adjoints is comparable to the truncation error in the time-stepping/harmonic analysis, and it may be neglected.

### c. PEZ-HAT: Details of IOM implementation

Several decisions were made during the development of PEZ-HAT that were influenced by its intended role as an IOM client. The architecture of the IOM dictates that each component for the variational assimilation be implemented as a separate command-line executable command, so PEZ-HAT was built this way. The IOM utilizes Network Common Data Form (NetCDF) (Davis and Rew 1990) as its native file type, and this was utilized by PEZ-HAT. The default IOM implementation of (1) and (3) involves time stepping a pseudodiffusion equation, which does not scale well as the resolution increases, so a custom routine (a command-line executable) was written for this purpose.

The “-meas” and “-comb” generation features of the IOM (Bennett et al. 2007) are tied to a specific design for the representation of measurement functionals; PEZ-HAT already had a similar infrastructure for model–data comparisons, and it was simple to adapt this to the separate executable model. Other features of the IOM (e.g., the solvers to obtain the optimal solution, the conditioning, and the error analysis algorithms) were used directly through the separate executable architecture.

There are some trade offs in the IOM design. The separate executable architecture may prove a limitation for modeling systems that are severely Input/Output (I/O) bound. For PEZ-HAT this was not an issue, since the computation time is much larger than the I/O time on current hardware. Another issue is the complexity of managing the “IOM runtime.” When a user executes a data-assimilation task via the IOM, the controlling process is a perl script that runs sequentially on a master computer. For PEZ-HAT, the separate executable modules consist of shell scripts that submit the appropriate programs for execution on a variety of hardware architectures, including clusters of parallel processing computers. Managing the individual IOM runtime configurations among different hardware and job submission architectures proved a challenging task; however, this issue would likely have been even more problematic with the custom code. The IOM has the great benefit of declaring a relatively simple interface, and letting the user adopt as much or as little as necessary to accomplish their task. The nature of the interface does not change among underlying hardware platforms, only the detailed implementations of the separate executables.

During times of active code development, the PEZ-HAT code base expands at a rate of around 1000 noncomment lines per month. Furthermore, periods of significant code generation are always followed by periods of code changes, keeping the number of lines relatively constant (i.e., debugging). The IOM functionality used by PEZ-HAT (which excludes most of the parametric FORTRAN program generation features) is encoded in roughly 23 000 lines of FORTRAN 90, which easily represents a savings of 2+ yr of PEZ-HAT developer time. In fact, interfacing and testing PEZ-HAT with the IOM was accomplished in approximately 2 months.

### d. PEZ-HAT: Assimilation of HF radar data at Kaena Ridge, Hawaii

Surface velocity data obtained from a high-frequency phased-array radar system (as described in C. Chavanne et al. 2007, unpublished manuscript) have been assimilated to infer the unobserved subsurface fields and investigate mesoscale tidal interactions. Two radars were deployed on the west side of the island of Oahu, Hawaii, from September 2002 to May 2003 overlooking the Kauai Channel (C. Chavanne et al. 2006, unpublished manuscript). This site is unique among the many that have been observed with coastal radars because of the large range of bottom depth (from 0 to nearly 5000 m) and strong cross-isobath tidal flows that occur in the observation area. Together, these characteristics cause Kauai Channel to be a site of intense barotropic to baroclinic kinetic energy conversion, with conversion rates in excess of 1 W m^{−2}. Figure 1b shows the domain of PEZ-HAT, which is nested within a larger domain for context (Fig. 1a). The resolution of the numerical grid is 2 km in the central portion of the domain, stretching to 10 km in the region within 1° of the domain boundary. There are 60 vertical levels, logarithmically stretched from 30 m at the ocean surface to 500 m at depth.

Each radar measures the ocean surface velocity component in the direction of the antenna array within an area of roughly 100 km in diameter, as shown in Fig. 2. The spatial resolution of the data (approximately 2 km) is shown by the red dots (Kaena Point antenna array) and the blue dots (Ko’Olina antenna array) in the figure. Signals in the radar data represent a range of phenomena at different time and space scales, but in this application they have been harmonically analyzed and only the amplitude and phase of the dominant M_{2} semidiurnal tidal component is assimilated. The nominal measurement error is between l and 5 cm s^{−1}, varying spatially, which is estimated from the residual in the harmonic analysis of radial velocity time series.

The measurement functional associated with each datum consists of a weighted average of the velocity components of the harmonically analyzed velocity field at the ocean surface. The coefficients in the weighted average are obtained by projecting the velocity at the model grid nodes into the local radial direction, and bilinear interpolation is used to compute the measurement at the actual measurement site (which normally falls between computational grid nodes).

To conduct the inversion, it is necessary to specify the second moments of the model forcing errors. It is assumed that the error is dominated by neglected advection and convection terms in the momentum and tracer conservation equations, respectively, and that the tidal fields are passively advected by an unknown mesoscale flow field that decays downward from the ocean surface like *N*, the background buoyancy frequency, that is correlated in scales of 50 km and 250 m in the horizontal and vertical, respectively. For simplicity, the errors in the momentum and tracer equations are assumed to be uncorrelated. The spatial correlations are parameterized by correlation length scales and spectral roll-off rates and implemented using dimensional splitting with tridiagonal operators (Zaron 2006).

The indirect representer method, as implemented by the IOM, is used because of the large number of observations (5442) and the computational demands of PEZ-HAT. The optimal solution is computed with just 30 adjoint/forward model integrations.

Figures 3a–c compare the radial velocity from the prior model solution, the observed data, and the optimal solution, respectively, for the Ko’Olina antenna array. The prior solution has larger amplitude and sharper gradients than the observed data. The southward phase propagation and location of maximum amplitude are somewhat different as well, and the quantitative agreement between the prior solution and data is not good. In contrast, there is excellent agreement between the optimal estimate and the data, with the discrepancy being about 2 times the assumed measurement error. The results for the Kaena Point array are similar (not shown).

The generally weaker gradients in the data, as compared with the prior, point to deficiencies in PEZ-HAT, specifically the neglect of nonlinearity. A detailed study of the optimal model forcing (which is an estimate of these nonlinearities) suggests that it is compatible with the assumed level of mesoscale–tidal interactions. Mesoscale and tidal self-interactions do influence the time-averaged barotropic tidal conversion, and partitioning the energy into locally dissipated and propagating components remains the subject of ongoing research.

## 3. ROMS

ROMS is a hydrostatic, Boussinesq, free-surface primitive equations model that incorporates state-of-the-art physics and numerical algorithms (Shchepetkin and McWilliams 2003, 2005; Warner et al. 2005). ROMS is modular and uses C preprocessing to activate the various physical, numerical, and open boundary condition options. The parallel framework is coarse grained with both shared-memory (OpenMP) and distributed-memory (MPI) paradigms coexisting in the same code. The parallelization of the adjoint model is only available for MPI.

### a. ROMS: Defining a penalty

_{2}norm following Giering and Kaminski (1998). The implied penalty functional is where

**Φ**= (

**u**,

*θ*,

*S*,

*ζ*)

^{T},

**u**is horizontal velocity,

*θ*is potential temperature,

*S*is salinity, and

*ζ*is the free-surface elevation.

### b. ROMS: Details of IOM implementation

The single executable framework of the IOM initially caused some difficulties because of the sophisticated I/O data structure of ROMS. For this reason the early version linked ROMS to the IOM core programs using MATLAB scripts rather than the IOM graphical user interface (GUI). The MATLAB scripts enabled NetCDF data exchange between ROMS and IOM without restructuring the ROMS I/O. This step proved not only to be successful for obtaining the first inversion of the representer matrix (Di Lorenzo et al. 2007), but it also allowed the use of IOM symmetry checks to perform a more thorough debugging of the ROMS adjoint and tangent linear components.

The I/O of the ROMS submodels has now been restructured to be compatible with the I/O requirements of the IOM. An important advantage of this compatibility is the ease with which the user can build new assimilation configurations from existing ROMS applications. The user needs only to compile the ROMS single executables and provide the IOM with the observations to assimilate. Given that IOM allows the assimilation of a wide range of observation types and that ROMS is widely used in coastal application, this IOM–ROMS framework could have a strong impact on the modeling components of the regional coastal observing systems initiatives, which is a component of the Integrated Ocean Observing System (IOOS; http://www.ocean.us). There are still some pending issues associated with the convolution operations of the adjoint fields. Preliminary experiments that assimilate real California Cooperative Oceanic Fisheries Investigations (CalCOFI) observations in the Southern California Current show that such an assumption of bell-shaped covariance function limits the convergence of the inner loop and degrades the quality of the solution. An efficient, customized convolution routine will eventually be required if a different covariance is implemented.

### c. ROMS: Results

Preliminary assimilation experiments are conducted in the Southern California Bight (SCB), a region characterized by strong mesoscale eddy variability. Over the last 55 yr, the SCB has been extensively sampled by the CalCOFI program, which provides an unparalleled time series of physical, chemical, and biological data, well suited for data assimilation. The core physical observations consist of upper-ocean (0–500 m) CTD casts, collected 4 times per year over a 7–10-day period. The horizontal sampling array has a resolution of approximately 70 km, which is inadequate to fully resolve the mesoscale eddy field, as confirmed by recent higher-resolution observations of sea surface temperature and height (SST and SSH) from satellites and acoustic Doppler current profiler measurements between CalCOFI stations. Therefore, the assimilation of CalCOFI observations in ROMS using IOM may provide a means to better resolve and diagnose the ocean mesoscale. To test this hypothesis, the IOM is used to assimilate synthetic CalCOFI-like observations (Fig. 4a) in a model twin experiment. The accuracy with which the IOM is able to reconstruct the ocean mesoscale from spatially and temporally aliased observations is examined. The goal is not to reconstruct the ocean state between the four ocean surveys, which are clearly too far apart in time, but rather to provide ocean state estimates during the surveys themselves since the spatial resolution of the surveys is not sufficient to resolve the ocean mesoscale. In this context, the assimilation is performed to initialize the ocean model over the 7–15-day data collection period. After the ocean model has been initialized using the individual surveys, it can be used to diagnose the dynamical balances and perhaps exploit (in future studies) the predictability associated with the slow-evolving component of the coastal ocean (e.g., large eddies).

The synthetic observations are generated with a forward integration of nonlinear ROMS using a high-resolution grid of the SCB. The model domain is constructed using real coastlines and a smooth version of satellite bottom topography (Sandwell and Smith 1997). The model is forced with the National Centers for Environmental Prediction (NCEP) heat and freshwater fluxes and high-resolution wind stresses from a downscaled version of the NCEP winds obtained with a regional spectral atmospheric model. At the three open boundaries, a clamped open boundary condition is specified using the output of a coarse-resolution California Current ROMS configuration. It takes approximately 2 weeks for an oceanographic cruise to cover the CalCOFI sampling grid. To generate the synthetic observations, nonlinear ROMS is integrated for 10 yr and sampled 1–14 January of Year 11 using a CalCOFI-like sampling array. The observations are collected in the south 1–5 January, in the center of the domain 6–9 January, and in the north 10–14 January. Observations consist of temperature and salinity from 0 to 500 m. A snapshot of the true model fields on 14 January of Year 11, for SSH and SST, reveals the typical meandering pattern of the California Current and its mesoscale structure (Fig. 4, row 1).

Prior to the assimilation, the ocean fields were generated by integrating the nonlinear ROMS initialized with the January climatological conditions. A comparison of the first guess with the true fields on 14 January (Fig. 4, row 2) shows an overall agreement in the mean SSH and surface velocity. However, the first guess fails to capture some of the eddy scale structures in the north and close to the coast and leads to an overall weaker SST gradient. Then, two assimilation experiments are performed. In the first experiment, adjustments are allowed only in the initial conditions; this is the strong-constraint case. In the second experiment, adjustments are also allowed in the forcing on the right-hand side of the dynamical equations; this is the weak-constraint case. The evolution of the mesoscale flow over a period of 10 days in January is primarily sensitive to errors in initial conditions rather than surface forcing. For this reason, surface forcing is not used as a control variable.

Both assimilation experiments lead to a substantial improvement when compared to the first guess (Fig. 4). The strong-constraint experiment successfully reduces the initial model–observation misfit by 75% (Fig. 5) and improves the model fields at locations where observations are not assimilated. In the weak-constraint experiment the initial model–observation is reduced by 89%. To verify the quality of the assimilation solution the model was run beyond the assimilation window for an additional 7 days to measure its predictive skill against independent observations. Both the strong and weak-constraint case show forecast skill greater than persistence and climatology for SST. However, SSH, velocities, and subsurface data do not show real forecast skill. Factors that limit forecast skill are linear instabilities that develop in the tangent linear model (Di Lorenzo et al. 2007) and the choice of Gaussian background covariance. Future assimilation experiments are planned to address both these factors.

A more in-depth study of the SCB assimilation case using real observations is currently being performed. These preliminary experiments suggest that the IOM is capable of extracting dynamical information from the spatially and temporally aliased CalCOFI observations and improving our diagnosis of the mesoscale ocean circulation in the Southern California coastal ocean.

## 4. ADCIRC-2D

ADCIRC-2D is a finite-element circulation model for shelves, coasts, and estuaries (Kolar et al. 1994; Luettich et al. 1991; Luettich and Westerink 2000) that is used extensively by Naval Oceanographic Office (NAVOCEANO), the Office of Naval Research (ONR), the U.S. Army Corps of Engineers, the National Oceanic and Atmospheric Administration (NOAA), the U.S. Geological Survey (USGS), and a wide range of academic researchers. The extensive use of ADCIRC-2D, operational and otherwise, together with the derived nature of the governing equations, lends a particular challenge to working with the IOM as will be described in the following sections.

### a. ADCIRC-2D: Governing equations

The governing equations are the two-dimensional continuity and conservation of momentum equations, including advection, constant Coriolis, eddy viscosity, and nonlinear bottom friction. The momentum equation is forced by surface gradients, atmospheric pressure gradients, tidal potentials, and surface stresses. Lateral boundary conditions are either specified flow, specified elevation, or some combination. The solution to these equations using finite elements on linear triangular elements leads to an anomalous, folded dispersion relationship (i.e., for at least one wave of low frequency, there is another of high frequency with the same phase speed; the latter is a numerical artifact that causes spurious oscillations in the solution). These equations can be reformulated by subtracting the divergence of the momentum equation from the time derivative of the continuity equation. The result is the well-known second-order wave continuity equation (WCE) with the attractive feature that it “unfolds” the dispersion relationship (Lynch and Gray 1979; Kinnmark 1986).

### b. ADCIRC-2D: Defining a penalty

*λ*

^{k}

_{C}is the residual in the continuity equation,

*i*is the residual in the initial condition,

*b*is the residual in the boundary conditions, Γ

^{k}_{o}is the open ocean boundary,

**Φ**= (

**u**,

*ζ*), Δ

*t*is the time step, and the superscript

*k*indicates the time steps. The ellipsis in (6) represents terms arising from the “startup” equations required for the multilevel time-stepping scheme. Closed boundaries are imposed as strong constraints. Note that the penalty is discrete in time, but continuous in space.

### c. ADCIRC-2D: Details of IOM implementation

Because the ADCIRC I/O structure is relatively simple, the IOM requirement that the various components be separate executables was easy to accomplish. The tangent-linear model was developed first (Muccino and Luo 2005). Developing the adjoint model was the most difficult task of the IOM implementation. As will be described in the next section, the derivation of the adjoint was not straightforward. It is important to emphasize here that these difficulties are a result of the derived nature of the ADCIRC-2D governing equations and not of the representer method or the IOM.

The convolutions were computed by direct summation. The ocean observing system here is simply a collection of point measurements of surface elevation and velocity; this simplest of measurement kernels was supplied to the IOM.

The IOM facilitated the ADCIRC study not only by generating the infrastructure for effecting the “data space” search, but also by generating scripts to run the assimilation, to perform adjoint symmetry checks and other algebraic consistency checks, and to generate the error fields required to generate the synthetic data described below. Each of these tasks would otherwise have required extensive, intricate coding.

### d. ADCIRC-2D: Quantifying suboptimality

The disadvantage of the formulation in (6) is that the resulting adjoint system has the same folded dispersion relationship as the forward system; it must therefore be reformulated into an adjoint wave equation. This apparently benign step is the root of several difficulties, each of which causes the adjoint to be inconsistent with the forward equations, leading ultimately to suboptimality of the inverse solution.

Ideally, the penalty should be defined using discretized governing equations; if the continuous form of the governing equation is used, some of the adjoint boundary conditions will be incorrect. However, the penalty functional used here is continuous in space because it is algebraically impossible to develop the adjoint wave equation from an adjoint system that is already discretized in space. The spatial discretization is therefore performed after the adjoint wave equation is derived. If the resolution is sufficiently fine, the resulting suboptimality is small, but present nonetheless.

The WCE is a reformulation of the continuity and conservation of momentum equations. Thus, many of the terms in the WCE have their origins in conservation of momentum equation. ADCIRC-2D uses different time-stepping schemes for the terms in the WCE (three level) and terms in the momentum equation (Crank–Nicolson), resulting in a numerical inconsistency. If the time step is sufficiently small, the resulting suboptimality should be inconsequential in any practical sense. Although the time-stepping scheme could have been made consistent for this work, given the widespread operational use of ADCIRC-2D and the minor impact of the time-stepping inconsistency on the forward model solutions, the original formulation was maintained.

ADCIRC-2D solves the full WCE system of equations, but lumps the mass matrix of the discrete momentum equations.^{1} Levin et al. (2006) have shown that to maintain adjoint consistency with lumping schemes, the mass matrix of the discrete adjoint continuity equation should be lumped and the mass matrix of the discrete adjoint momentum equation should not. However, since the wave equation is solved here, the approach of Levin et al. (2006) cannot be used. Based upon heuristic reasoning and experimentation, the best option from both an accuracy and efficiency perspective is to lump the mass matrix of both the discrete adjoint WCE and momentum equations.

As stated before, these difficulties manifest themselves in an adjoint wave equation that is not consistent with the forward wave equation. Any data assimilation algorithm that relies on the adjoint, such as the popular gradient search algorithm (e.g., Stammer et al. 2003), will yield a suboptimal solution. There are many instances in the literature that use adjoint models that are inconsistent with the forward models. For example, to reduce strong sensitivities in the adjoint model, Marotzke et al. (1999) and Stammer et al. (2003) often turn off mixing schemes such as *K*-profile parameterization (KPP) (Large et al. 1994) or Gent–McWilliams (Gent and McWilliams 1990) in the adjoint model. Some of the European Centre for Medium-Range Weather Forecasts (ECMWF) 4DVAR implementations have run the adjoint at lower resolution than the forward run, also with the goal of suppressing strong sensitivities arising from nonlinearities (Leidner et al. 2003). In these cases the descent methods used in strong-constraint 4DVAR produced improved solutions for the unaltered forward model, and so the inconsistency between the adjoint model and the forward model was deemed inconsequential. In all of these cases, the adjoint inconsistencies are introduced by a conscious choice of the modeler; in the case of ADCIRC, however, the inconsistencies are born of the governing equations themselves and cannot be avoided.

While disturbing from a theoretical and programming perspective (perfect adjoint symmetry provides valuable debugging tools), the difficulties described above do not necessarily diminish the value of the assimilation algorithm in a practical sense. One approach for quantifying the impact is a statistical hypothesis test. When the null hypothesis is correct (i.e., the errors in the model and data are hypothesized correctly) and the adjoint and forward models are consistent, the minimum value of the penalty, *Ĵ*, has a chi-square distribution, *χ*^{2}_{M}, where *M* is the number of scalar data (Bennett 2002; Muccino et al. 2004). The IOM can synthesize data with prescribed moments; when the same statistical hypothesis is used to synthesize and to assimilate the data, the hypothesis test will only fail if there is an inconsistency between the adjoint and forward models. Numerical experiments on several domains show that the internal inconsistencies described above do not impact the *Ĵ* distribution if the spatial and temporal domains are sufficiently resolved.

### e. ADCIRC-2D: Results

The Bight of Abaco is characterized by highly nonlinear dynamics (Muccino and Luo 2005). The shallow domain is bounded by islands of the Bahamas except along the southwest open boundary (Fig. 6), where the tide is driven by *O*_{1}, *K*_{1}, *N*_{2}, *M*_{2}, and *S*_{2} tidal constituents.

The purpose of the assimilation is to test the internal consistency of the algorithm. The simulation is spun up from rest for one day to avoid excitation of resonant frequencies and then the simulations are run for another day. The parameters related to the hypothesis are estimated from the scales of the dynamics. However, the actual values are insignificant because the purpose of the test is to examine the consistency of the algorithm. The important point is that the parameters in the hypothesis used to synthesize the data are the same as the parameters in the hypothesis used by the assimilation. One hundred datasets, each with 54 synthesized data (16 elevation data and 32 scalar velocity data), are assimilated; each dataset yields one value of *Ĵ*.

According to theory, the mean value of *Ĵ* should be *M* = 54 and the standard deviation should be *M**Ĵ* values was 55.2 (reduced from *J*_{prior} = 4.8 × 10^{4}), just 0.1 standard deviation from the theoretical value. Although the adjoint is not consistent with the forward model, that inconsistency is not statistically significant here. However, if the forward model has insufficient resolution in space or time, the inverse solution is quite suboptimal (not shown); of course, in such a case even the forward model solution will be meaningless. The resolution requirements of the assimilation algorithm appear to be no more stringent than those for the forward model. Figures 7a–c show the prior elevation solution, the true solution, and the optimal solution, respectively, for one of the synthetic datasets. Throughout the domain, the optimal solution is much closer to the true solution than the prior solution is.

## 5. SEOM-2D

The governing equations are the two-dimensional continuity and conservation of momentum with Coriolis acceleration approximated on a beta-plane, reduced-gravity, and linear bottom friction representation. The discretization is based on a Galerkin formulation, where the basis functions and test functions are Legendre Cardinal functions defined locally within each element. The sole global requirement is that the interpolation be continuous across element boundaries. The continuity of the normal derivative is enforced weakly by the variational formulation, that is, the jump between two different representations of the normal derivative, arising from two neighboring elements, is allowed on an elemental interface. The jump is accounted for through Galerkin integration. More detail on the spectral element discretization and the choice of basis functions is given in Iskandarani et al. (1995). SEOM-2D is used as a “barotropic” engine in SEOM-3D (Iskandarani et al. 2003).

The tangent-linear and adjoint versions of SEOM, together with the convolution and interpolation operators, are incorporated into the IOM as separate executables. Both of the latter had already been developed for other purposes, thus their implementation did not impose an additional coding burden. The adjoint code was obtained by differentiating the discrete cost function, following procedures described in Bennett (2002).

### a. SEOM-2D: Defining a penalty

**Φ**= (

**u**,

*ζ*). The boundary conditions are no-flow and are imposed as strong constraints.

Derivation of the discrete adjoint system is given in Levin et al. (2006), where it is shown that it is possible to obtain an exact discrete adjoint system from a continuous adjoint system by interchanging the two different forms of spatial derivatives that are allowed in Galerkin formulation. In a Galerkin integral, a spatial derivative can be applied using one of two different approaches. The first involves application of the derivative to the field itself (i.e., to each of the basis functions used in its discrete representation); this is known as the “strong” form of Galerkin derivative. The second involves application of the derivative to the test function instead, and the Galerkin integral is obtained by integration by parts; this is known as the “weak” form.^{2} If a weak form of the horizontal velocity divergence operator is used in the Galerkin formulation of the forward system, then a strong form of the pressure gradient operator must be used in the Galerkin formulation of the adjoint system, and vice versa: the strong form of the divergence operator in the forward system leads to a weak form of the gradient operator in the adjoint system. Similarly, the strong form of the gradient operator in the forward system leads to a weak form of the divergence in the adjoint system. And finally, the strong form of the advection operator in the forward system leads to a weak form of the advection operator in the adjoint system.

### b. SEOM-2D: Results

The inversion has been tested using the canonical problem of a wind-driven, double-gyre circulation in a midlatitude ocean as described in Haidvogel et al. (1992), Holland (1978), and McCalpin and Haidvogel (1996). The goal is to study the impact of the quantity and quality of data on the optimal solution. Synthetic observations of interface displacement are computed from a twin experiment. The dynamics and the initial condition are imposed as weak constraints, and the former are uncorrelated in time. Spatial convolutions are computed using the default IOM implementation in conjunction with the SEOM diffusion operator.

The linearization error is small, so only one outer iteration is performed; the background state for the first iteration of the tangent linearization is the field computed by the nonlinear forward model, and the indirect representer algorithm is used. The indirect representer algorithm, together with prior and posterior error analysis, is supplied by the IOM. The solution is obtained with nine inner iterations when assimilating 7081 data and with eleven inner iterations when assimilating 14 162 data. In all experiments, the interface displacement and velocity fields are significantly closer to the true solution after the assimilation of data. A better fit is obtained with either more or better quality data. More detail on the twin experiment results can be found in Levin et al. (2006).

## 6. Conclusions

Four ocean models, PEZ-HAT, ROMS, ADCIRC-2D, and SEOM-2D have been used successfully in conjunction with the new Inverse Ocean Modeling system (Bennett et al. 2006). These models are very different in maturity, physics, numerics, and structure and have been used to investigate a wide variety of scientific phenomena. While the implementation of the IOM in conjunction with these models is important, even more important is the demonstration of the flexibility, power, and usefulness of the IOM; the goal of the project has been to enable the IOM to interface with *any* numerical model and observation system. Indeed, the model need not even be an ocean model, or even a fluid dynamical model. Other types of models, such as the Geophysical Finite Element Simulation Tool (GeoFEST), a crustal geodynamics model (Lyzenga and Parker 2006), are currently also being interfaced with IOM, enabling the assimilation of new data sources [e.g., GPS and Interferometric Synthetic Aperture Radar (InSAR)]. Given the drive toward integrating a wide variety of observations into numerical models, the development of a model-independent, modular assimilation system such as the IOM is particularly timely for the broader geoscience community.

## Acknowledgments

Lana Erofeeva, Bill Knight, and Rich Loft made substantial contributions to the development of PEZ-HAT. Mohamed Iskandarani made substantial contributions to the development of SEOM-2D. This material is based on work supported by NSF Grants OCE-0121176, 0121315, 0121332, 0121506, and 0121542; ONR Grants N00014010209, N000140410439, N00014050277, N000140510365, and N000140510366; and NASA Grant NNH04ZYS008N.

## REFERENCES

Bennett, A. F., 2002:

*Inverse Modeling of the Ocean and Atmosphere*. Cambridge University Press, 234 pp.Bennett, A. F., , Chua B. S. , , Pflaum B. L. , , Erwig M. , , Fu Z. , , Loft R. D. , , and Muccino J. C. , 2006: Inverse Ocean Modeling System user manual. IOM Tech. Doc. 6, 221 pp. [Available online at ftp://ftp.coas.oregonstate.edu/dist/chua/iom/tech_doc/IOM_TD6.pdf.].

Bennett, A. F., , Chua B. , , Pflaum B. , , Erwig M. , , Fu Z. , , Loft R. , , and Muccino J. , 2008: The Inverse Ocean Modeling System. Part I: Implementation.

,*J. Atmos. Oceanic Technol.***25****,**1608–1622.Bryan, K., , and Cox M. D. , 1968: A nonlinear model of an ocean driven by wind and differential heating. Part I: Description of the three-dimensional velocity and density fields.

,*J. Atmos. Sci.***25****,**945–967.Chua, B. S., , and Bennett A. F. , 2001: An inverse ocean modeling system.

,*Ocean Modell.***3****,**137–165.Curchitser, E. N., , Iskandarani M. , , and Haidvogel D. B. , 1998: A spectral element solution of the shallow water equations on multiprocessor computers.

,*J. Atmos. Oceanic Technol.***15****,**510–521.Curchitser, E. N., , Haidvogel D. , , and Iskandarani M. , 1999: On the transient adjustment of a mid-latitude abyssal ocean basin with realistic geometry: The constant depth limit.

,*Dyn. Atmos. Oceans***29****,**147–188.Davis, G., , and Rew R. , 1990: NetCDF: An interface for scientific data access.

,*IEEE Comput. Graph. Appl.***10****,**76–82.Di Lorenzo, E., , Moore A. M. , , Arango H. G. , , Cornuelle B. D. , , Miller A. J. , , Powell B. , , Chua B. S. , , and Bennett A. F. , 2007: Weak and strong constraint data assimilation in the inverse Regional Ocean Modeling System (ROMS): Development and application for a baroclinic coastal upwelling system.

,*Ocean Modell.***16****,**160–187.Duffy, B., 2005: Anatomy of a disaster: 5 days that changed a nation. Saturday, August 27.

,*US News World Rep.***139****,**24–43.Gent, P. R., , and McWilliams J. C. , 1990: Isopycnal mixing in ocean circulation models.

,*J. Phys. Oceanogr.***20****,**150–155.Giering, R., , and Kaminski T. , 1998: Recipes for adjoint code construction.

,*ACM Trans. Math. Software***24****,**437–474.Haidvogel, D. B., , and Beckmann A. , 1999:

*Numerical Ocean Circulation Modeling*. Imperial College Press, 300 pp.Haidvogel, D. B., , McWilliams J. C. , , and Gent P. R. , 1992: Boundary current separation in a quasigeostrophic, eddy-resolving ocean circulation model.

,*J. Phys. Oceanogr.***22****,**882–902.Holland, W. R., 1978: The role of mesoscale eddies in the general circulation of the ocean—Numerical experiments using a wind-driven quasi-geostrophic model.

,*J. Phys. Oceanogr.***8****,**363–392.Iskandarani, M., , Haidvogel D. B. , , and Boyd J. P. , 1995: A staggered spectral element model with application to the oceanic shallow water equations.

,*Int. J. Numer. Methods Fluids***20****,**393–414.Iskandarani, M., , Haidvogel D. B. , , and Levin J. G. , 2003: A three-dimentional spectral element model for the solution of hydrostatic primitive equations.

,*J. Comput. Phys.***186****,**397–425.Killworth, P. D., , Stainforth D. , , Webb D. J. , , and Paterson S. M. , 1991: The development of a free-surface Bryan–Cox–Semtner ocean model.

,*J. Phys. Oceanogr.***21****,**1333–1348.Kinnmark, I., 1986:

*The Shallow Water Wave Equations: Formulation, Analysis and Application*. Vol. 15,*Lecture Notes in Engineering,*Springer-Verlag, 187 pp.Kolar, R. L., , Gray W. G. , , Westerink J. J. , , and Luettich R. A. , 1994: Shallow water modeling in spherical coordinates: Equation formulation, numerical implementation, and application.

,*J. Hydraul. Res.***32****,**3–24.Large, W. G., , McWilliams J. C. , , and Doney S. , 1994: Oceanic vertical mixing: A review and a model with a nonlocal boundary layer parameterization.

,*Rev. Geophys.***32****,**363–403.Leidner, S. M., , Isaksen L. , , and Hoffman R. N. , 2003: Impact of NSCAT winds on tropical cyclones in the ECMWF 4DVAR assimilation system.

,*Mon. Wea. Rev.***131****,**3–26.Levin, J. C., , Iskandarani M. , , and Haidvogel D. B. , 1997: A spectral filtering procedure for eddy-resolving simulations with a spectral element ocean model.

,*J. Comput. Phys.***137****,**130–154.Levin, J. C., , Haidvogel D. B. , , Chua B. , , Bennett A. F. , , and Iskandarani M. , 2006: Euler–Lagrange equations for the spectral element shallow water system.

,*Ocean Modell.***12****,**348–377.Luettich, R. A., , and Westerink J. J. , 2000: ADCIRC: A (parallel) advanced circulation model for oceanic, coastal, and estuarine waters: Consolidated and updated theory and users manual. [Available online at http://adcirc.org/.].

Luettich, R. A., , Westerink J. J. , , and Scheffner N. W. , 1991: ADCIRC: An advanced three-dimensional circulation model for shelves, coasts, and estuaries. Report 1: Theory and methodology of ADCIRC-2DDI and ADCIRC-3DL. Dredging Research Program Tech. Rep. DRP-92–6, 143 pp.

Lynch, D. R., , and Gray W. G. , 1979: A wave equation model for finite element tidal computations.

,*Comput. Fluids***7****,**207–228.Lyzenga, G., , and Parker J. , 2006: GeoFEST: Geophysical finite element simulation tool. Caltech/Jet Propulsion Laboratory. [Available online at http://www.openchannelfoundation.org/projects/GeoFEST.].

Marotzke, J., , Giering R. , , Zhang K. Q. , , Stammer D. , , Hill C. , , and Lee T. , 1999: Construction of the adjoint MIT ocean general circulation model and application to Atlantic heat transport sensitivity.

,*J. Geophys. Res.***104****,**29529–29547.McCalpin, J. D., , and Haidvogel D. B. , 1996: Phenomenology of the low-frequency variability in a reduced-gravity, quasigeostrophic double-gyre model.

,*J. Phys. Oceanogr.***26****,**739–752.Moore, A. M., , Arango H. G. , , Di Lorenzo E. , , Cornuelle B. D. , , Miller A. J. , , and Neilson D. J. , 2004: A comprehensive ocean prediction and analysis system based on the tangent linear and adjoint of a regional ocean model.

,*Ocean Modell.***7****,**227–258.Muccino, J. C., , and Luo H. , 2005: Picard iterations for a finite element shallow water equation model.

,*Ocean Modell.***10****,**316–341.Muccino, J. C., , Bennett A. F. , , and Hubele N. F. , 2004: Significance testing for variational assimilation.

,*Quart. J. Roy. Meteor. Soc.***130****,**1815–1838.Pacanowski, R. C., , and Gnanadesikan A. , 1998: Transient response in a

*z*-level ocean model that resolves topography with partial cells.,*Mon. Wea. Rev.***126****,**3248–3270.Purser, R. J., , Wu W-S. , , Parrish D. F. , , and Roberts N. M. , 2003: Numerical aspects of the application of recursive filters to variational statistical analysis. Part II: Spatially inhomogeneous and anisotropic general covariances.

,*Mon. Wea. Rev.***131****,**1536–1548.Sandwell, D. T., , and Smith W. H. F. , 1997: Marine gravity anomaly from Geosat and ERS 1 satellite altimetry.

,*J. Geophys. Res.***102****,**10039–10054.Shchepetkin, A. F., , and McWilliams J. C. , 2003: A method for computing horizontal pressure-gradient force in an oceanic model with a nonaligned vertical coordinate.

,*J. Geophys. Res.***108****.**3090, doi:10.1029/2001JC001047.Shchepetkin, A. F., , and McWilliams J. C. , 2005: The regional oceanic modeling system (ROMS): A split-explicit, free-surface, topography-following coordinate oceanic model.

,*Ocean Modell.***9****,**347–404.Stammer, D., and Coauthors, 2003: Volume, heat, and freshwater transports of the global ocean circulation 1993–2000, estimated from a general circulation model constrained by World Ocean Circulation Experiment (WOCE) data.

,*J. Geophys. Res.***108****.**3007, doi:10.1029/2001JC001115.Travis, J., 2005: Scientists’ fears come true as hurricane floods New Orleans.

,*Science***309****,**1656–1658.Warner, J. C., , Sherwood C. R. , , Arango H. G. , , Signell R. P. , , and Butman B. , 2005: Performance of four turbulence closure models implemented using a generic length scale method.

,*Ocean Modell.***8****,**81–113.Weaver, A., , and Courtier P. , 2001: Correlation modelling on the sphere using a generalized diffusion equation.

,*Quart. J. Roy. Meteor. Soc.***127****,**1815–1846.Wunsch, C., , Haidvogel D. B. , , Iskandarani M. , , and Hughes R. , 1997: Dynamics of the long-period tides.

,*Prog. Oceanogr.***40****,**81–108.Zaron, E. D., 2006: A comparison of data assimilation methods using a planetary geostrophic model.

,*Mon. Wea. Rev.***134****,**1316–1328.Zaron, E. D., , and Egbert G. D. , 2006: Verification studies for a

*z*-coordinate primitive-equation model: Tidal conversion at a mid-ocean ridge.,*Ocean Modell.***14****,**257–278.Zaron, E. D., , and Egbert G. D. , 2007: The impact of the M2 internal tide on data-assimilative model estimates of the surface tide.

,*Ocean Modell.***18****,**210–216. doi:10.1016/j.ocemod.2007.05.001.

Numerical models.

^{1}

Sum each row of the matrix, zero the row, and place the sum on the diagonal, thus eliminating the need to solve a 2*N* × 2*N* system of equations.

^{2}

Use of “strong” and “weak” here should not to be confused with strong and weak forms in variational assimilation used elsewhere, including in this paper.