<<

JULY 2001 NOTES AND CORRESPONDENCE 1915

Reduction of Density and Gradient Errors in Ocean Simulations

JOHN K. DUKOWICZ Theoretical Division, Los Alamos National Laboratory, Los Alamos, New Mexico

23 October 2000 and 30 January 2001

ABSTRACT Existing ocean models often contain errors associated with the computation of the density and the associated Ϫ1 Ϫ1 ١p, where ␳0 is a ١p, by ␳ 0 pressure gradient. Boussinesq models approximate the pressure gradient force, ␳ constant reference density. The error associated with this approximation can be as large as 5%. In addition, Cartesian and sigma-coordinate models usually compute density from an equation of state where its pressure dependence is replaced by a depth dependence through an approximate conversion of depth to pressure to avoid the solution of a nonlinear hydrostatic equation. The dynamic consequences of this approximation and the associated errors can be signi®cant. Here it is shown that it is possible to derive an equivalent but ``stiffer'' equation of state by the use of modi®ed density and pressure, ␳* and p*, obtained by eliminating the contribution of the pressure-dependent part of the adiabatic compressibility (about 90% of the total). By doing this, the errors associated with both approximations are reduced by an order of magnitude, while changes to the code or to the code structure are minimal.

1. Introduction approximation to (3) in ®xed vertical coordinate models is Consider the horizontal pressure force in ocean mod- els: ␳ ഠ ␳(S, ␪,p0(z)), (5) 1 where p (z) is a speci®ed depth-to-pressure conversion ١p, (1) 0 PGF ϭ ␳ function such as that proposed by Fofonoff and Millard (1983), for example. This is done in order to avoid a where the pressure is obtained from the hydrostatic nonlinear solution procedure for density and pressure. equation There are three types of error associated with these ap- p proximations. The ®rst error, the one connected with theץ ϭϪ␳g, (2) .z approximation in (4), we will call the Boussinesq errorץ Ϫ3 Assuming that ␳ 0 ϭ 1gcm as in many codes derived and the density from an equation of state from the original Bryan model (Cox 1984; Semtner ␳ ϭ ␳(S, ␪,p), (3) 1986; Dukowicz and Smith 1994), the Boussinesq error can be as large as 5% based on the typical range of such as the Jackett and McDougall (1995, hereafter densities present in the ocean. The second type of error JMcD) equation, which is a ®t of the commonly ac- is the error in the calculation of density due to the ap- cepted international UNESCO equation of state in terms proximation (5); we will call this the density error. As- of potential ␪ rather than in situ temperature suming a baroclinic displacement of 50 m relative to

T. Boussinesq models approximate (1) by the mean represented by p 0(z), the density error is es- Ϫ4 Ϫ3 1 timated to be of order 2 ϫ 10 gcm , which is quite -١p, (4) small when compared to a typical in situ density de PGF ഠ ␳ 0 Ϫ2 Ϫ3 viation, ␳ Ϫ ␳ 0 ഠ 3.5 ϫ 10 gcm . However, this where ␳ 0 is a constant reference density. A common can have signi®cant dynamic consequences because the density error implies a corresponding pressure gradient error, which we will call the dynamic error. Dewar et Corresponding author address: Dr. John K. Dukowicz, Los Alamos National Laboratory, Theoretical Division, T-3 Fluid Dynamics, MS al. (1998) have analyzed this error in detail and they B216, Los Alamos, NM 87545. concluded that it can lead to spurious transports of sev- E-mail: [email protected] eral Sverdrups (Sv ϵ 106 m3 sϪ1) and associated ve-

Unauthenticated | Downloaded 09/29/21 03:38 PM UTC 1916 JOURNAL OF PHYSICAL VOLUME 31

locities of several centimeters per second. They there- and the last term dominates for a density difference over fore recommend against the use of approximation (5). the entire column. Therefore, since these errors are di- However, this considerably complicates the computation rectly related to the compressibility, the lower the com- of the baroclinic pressure gradient and entails substantial pressibility (i.e., the ``stiffer'' the equation of state) the code modi®cations. smaller the errors. Let us assume that (2) and (3) may be simultaneously In the following we will show how to transform Eqs. integrated so that the solution for the pressure may be (1)±(3) into equivalent forms that effectively make use formally expressed as of a much stiffer equation of state before making the approximations (4)±(5), thereby resulting in much p ϭ F[␳(S, ␪,p), z], (6a) smaller errors. and therefore the corresponding approximate pressure is 2. Modi®ed density, pressure, and equation of state pЈϭF[␳(S, ␪,p0(z)), z], (6b) where all variables are functions of (x, y, z, t) unless Following Sun et al. (1999), we observe that com- explicitly indicated. The errors in the above approxi- pressibility may be split into two terms: mations may now be evaluated as follows. The pressure ␬ ϭ ␬ (p) ϩ ␦␬, (13) gradient error is where ␬ (p) is dependent on pressure only and ␦␬ is the 11 ١pЈ residual, termed the thermobaric compressibility. As ١p Ϫ ΉΉ␳␳0 seen in Sun et al. (1999), ␦␬ is at least an order of (p) EPGFϭϭE 1ϩ E 3, (7) magnitude smaller than ␬ or ␬. There is some arbi- ࿣PGF࿣ trariness in choosing ␬ (p), however. In view of (11) and where (13), the density may be written as

p 11 ␳ ϭ ␳(S, ␪, p ) exp ␬ dpЈ ͵ ١p r Ϫ Ή΂΃␳␳0 Ή ␳ pr E1 ϭ ഠ 1 Ϫ (8) pp ࿣PGF࿣ ΉΉ␳ 0 ϭ ␳(S, ␪, p ) exp ␬(p) dpЈ exp ␦␬ dpЈ r ͵͵ is the Boussinesq error, and pprr

(␳ ϭ r(p)␳*(S, ␪, p), (14ץ Fץ ((p Ϫ p (z) ١ 0 where p is an arbitrary reference pressure, and p Ή rץ ␳ץp Ϫ pЈ)࿣ Ή ΂΃)࿣١ 1 E ϭ ഠ (9) p ␳ ࿣PGF࿣࿣١pЈ࿣ 3 0 r(p) ϭ A exp͵ ␬(p) dpЈ, (15a) is the dynamic error considered by Dewar et al. (1998). pr

The density error is simply p ␳*(S, ␪, p) ϭ AϪ1␳(S, ␪, p ) exp ␦␬ dpЈ, (15b) ͵ ␳ rץ (p Ϫ p0(z)) pr pץ࿣␳ Ϫ ␳Ј࿣ ΉΉ E2 ϭ ഠ . (10) where A(p) is a function of pressure only, which we ࿣␳࿣࿣␳࿣ will subsequently use to appropriately modify the factor Noting that r(p). Thus, the density may be expressed as the product of two factors, a factor r(p) that contains most of the ␳ 1 pressure dependence and a factor ␳* that is only weaklyץ ϭ ␳␬ ϭ , (11) 2 dependent on pressure. As a result, ␳* will be very pc,Sץ΂΃ ␪ nearly independent of depth, much more so than the where ␬ is the adiabatic compressibility and c is the density ␳ itself. In Sun et al. (1999), ␳* is called the speed of sound in seawater, we observe that the errors ``virtual potential density,'' although here we prefer to E 2 and E3 are directly related to the compressibility (or, call it the thermobaric density due to its direct depen- alternatively, to the sound speed). Similarly, the Bous- dence on the thermobaric compressibility ␦␬. sinesq error E1 is largely associated with compressibil- We now de®ne an associated quantity, called the ther- ity, since any vertical density difference in the water mobaric pressure p*, through the relationship column may be written as p dpЈ p*(p) ϭ , (16a) (␳ ͵ r(pЈץ ␳ץ ⌬␳ ϭ⌬S ϩ⌬␪ ϩ ␳␬⌬p, (12) 0 pץ pץ ΂΃␪,pS,p ΂΃ which results from integrating

Unauthenticated | Downloaded 09/29/21 03:38 PM UTC JULY 2001 NOTES AND CORRESPONDENCE 1917

FIG. 1. Global mean in situ temperature and from the Levitus et al. (1994a,b) climatology, and the associated from the Bryden (1973) algorithm.

dp*1 The approximations corresponding to (4) and (5) may ϭ . (16b) dp r(p) now be introduced to obtain We may expect that the pressure function p*(p) is in- 1 (١p* (20 vertible in general so that we can alternatively write p PGF ഠ ␳ 0 ϭ p(p*). Given (14) and (16), an ocean model may alternatively be expressed in terms of ␳* and p*, rather and than ␳ and p. Equations (1)±(3) then become ␳* ഠ ␳*(S, ␪,p*(0 z)). (21) 1 -١p*, (17) We have already shown that the error due to these ap PGF ϭ ␳* proximations is directly related to the magnitude of the p* adiabatic compressibility. The effective compressibilityץ ϭϪ␳*g, (18) associated with the equation of state (19) is zץ ␳␳dr dpץ␳*1ץ and ␳*␬* ϭϭ Ϫ *p r2 dp dpץ p* rץ ␳* ϭ ␳(S, ␪, p(p*))/r(p*) ϭ ␳*(S, ␪, p*), (19) ΂΃␪,S [] ΂΃␪,S where this is the modi®ed equation of state. Note that d lnA these equations retain their original form, although the ϭ ␳␦␬Ϫ Յ ␳␦␬, (22) dp functional relationship of the equation of state is mod- ΂΃ i®ed. In fact, as we will see, this modi®cation serves to where we have made use of (11) and (15a). Noting that ``stiffen'' the equation of state. The equations are exact ␦␬ is at least an order of magnitude smaller than ␬, the at this point; there is no approximation. modi®ed equation of state (19) is at least an order of

Unauthenticated | Downloaded 09/29/21 03:38 PM UTC 1918 JOURNAL OF PHYSICAL OCEANOGRAPHY VOLUME 31

FIG. 2. The self-consistent density and pressure associated with the global mean Levitus et al. (1994a,b) climatology, obtained using the Jackett and McDougall equation of state and the Bryden algorithm.

magnitude stiffer with respect to changes in thermobaric sinesq code, then it is a simple matter to make the con- density than is the original equation of state (3) with version using (14) and (16a). respect to changes in in situ density. Therefore, the error associated with the above approximations will also be at least an order of magnitude smaller. Also, note that 3. Speci®c example we can use the degree of freedom provided by A to We will now describe the implementation of these make ␬* vanish along some curve in the ``phase space'' ideas in the Parallel Ocean Program (POP), a Boussi- of S, ␪, and p, thereby further reducing the compress- nesq, z-coordinate code based on the Bryan±Cox model ibility in some desired region of phase space. We will (Dukowicz and Smith 1994; further information avail- make good use of this possibility in what follows. able online at http://www.acl.lan.gov/climate/models/ How feasible is it to make such a change in variables? pop). We will optimize the transformation described pre- Most ocean codes make use of the Boussinesq approx- viously around the global mean climatology of Levitus imation. A Boussinesq code is particularly simple be- et al. (1994a,b). Figures 1a,b show the vertical pro®les cause it is unchanged if ␳ is replaced by ␳* and p by of global mean in situ temperature and salinity from this p*, except for the equation of state (and possibly in climatology, as a function of depth in the depth range some of the parameterizations where in situ density or from 0 to 5500 m. These pro®les (or a ``cast'') are pressure may be required, but notably not in the con- de®ned as T(z) and S(z), respectively. Because in situ vective adjustment parameterization). The equation of temperature is provided, we use the Bryden (1973) al- state must be changed from (3) or (5) to (19) or (21). gorithm to convert to potential temperature. The cor- However, this is a very minor change that entails no responding potential temperature is shown in Fig. 1a. change in the structure of the code. If the in situ density Given these pro®les, self-consistent density and pressure or pressure is required for diagnostic or parameterization as a function of depth were obtained by integrating the purposes, or in the continuity equation of a non-Bous- hydrostatic equation (2) using Mathematica. The inte-

Unauthenticated | Downloaded 09/29/21 03:38 PM UTC JULY 2001 NOTES AND CORRESPONDENCE 1919

Ideally, we would like to choose r(p) so that ␬*is as small as possible in order to minimize the approxi- mation errors, as discussed previously. One way of do- ing this is to enforce ␬* ϭ 0 along the global mean cast since then departures will be minimized. According to (22), this will be true if

␳ץ d 1 1 r(p) ϭ (24) p ,Sץr(p) dp ␳΂΃ ␪ along the cast, or where S ϭ S(p) and ␪ ϭ ␪(p). This is an ordinary differential equation that is easily inte- grated using Mathematica and the JMcD equation of state. Since r(p) is undetermined to within a constant factor, we have chosen to normalize it so that r(z ϭ Ϫ3 3000) ϭ ␳(z ϭ 3000)/␳ 0, where ␳ 0 ϭ 1gmcm ,in order that the thermobaric density be equal to ␳ 0 at a depth of 3 km. The scaling factor r(p) is plotted in Fig. 3, but as a function of depth instead of pressure for convenience in comparing it with density. It is apparent that it effectively captures the bulk of the effect of com- pressibility on the density. The scaling factor may be ®tted by

Ϫ4 rF(p) ϭ 1.02819 Ϫ 2.93161 ϫ 10 exp(Ϫ0.05p) ϩ 4.4004 ϫ 10Ϫ5p, (25) where the pressure p is in bars, with an error in the range {Ϫ1 ϫ 10Ϫ4 ↔ 2 ϫ 10Ϫ4} over the pressure range from 0 to 560 bars. Note that both ®ts, (23) and (25), were chosen so that the error is constrained not to grow excessively outside the ®tted range. Equations (23) and (25) are all that we need to implement both the transformation and the approximate conversion of pres- sure to depth. FIG. 3. The density scaling factor r(p) plotted as a function of depth, and the in situ density, overlaid for comparison. In order to get a feel for the error resulting from the spread of ocean states around the ®tted mean, we make

Ϫ2 use of the data from Levitus et al. (1994a,b) for the gration is carried out with g ϭ 9.806 m s , the JMcD mean temperature and salinity in the North and South equation of state, the Bryden (1973) algorithm, and as- Paci®c, the North and South Atlantic, and the North and suming that pressure equals zero at the surface. The South Indian Oceans, for a total of six representative resulting pro®les are denoted by (z) and p(z), and are ␳ datasets. The corresponding self-consistent density, plotted in Figs. 2a,b respectively. We note that the pres- pressure, and potential temperature were obtained as sure is nearly proportional to the depth so that it is described previously for the global mean dataset. In Fig. always possible to invert this functional relationship and 4a we plot the thermobaric density, obtained from (19), express depth as a function of pressure; that is, z ϭ z(p). for each of the datasets. We observe that thermobaric This means that we may alternatively express any quan- density may be approximated by ␳ ϭ 1gmcmϪ3 with tity along the cast as a function of pressure rather than 0 an error of about 0.5%, about an order of magnitude depth, that is, T(p), S(p), ␳(p), ␪(p). Because the cast smaller than previously. The error is largely concen- is representative of the entire ocean, it is convenient to trated within the thermocline, that is, within the upper take p (z) ϭ p(z) as the depth-to-pressure conversion 0 one or two kilometers. Figure 4b shows the thermobaric function. A simple ®t to this function is density error, calculated as p0(z) ϭ 0.059808[exp(Ϫ0.025z) Ϫ 1] ␳JMcD(S, ␪B(S, T, p), p) Ϫ72 ϩ 0.100766z ϩ 2.28405 ϫ 10 z , (23) E2 ϭ r(p) where the pressure is in bars and depth is in meters. ␳ (S, ␪ (S, T, p (z)), p (z)) The error of the ®t is in the range {Ϫ0.03 ↔ 0.02} bars Ϫ JMcD B 00. (26) over the depth range from 0 to 5500 m. rF(p0(z))

Unauthenticated | Downloaded 09/29/21 03:38 PM UTC 1920 JOURNAL OF PHYSICAL OCEANOGRAPHY VOLUME 31

FIG. 4. Thermobaric density as a function of depth, and the associated density error due to the use of the approximate depth-to-pressure conversion function, for six representative temperature and salinity pro®les from the Levitus (1994) climatology.

where ␳JMcD represents the density calculated with the being equal. It is to be expected, therefore, that if the JMcD equation of state and ␪B represents the potential density error is reduced because compressibility is made temperature calculated from the Bryden conversion al- smaller, then the dynamic error will be correspondingly gorithm. We note that the maximum error is less than reduced. about 3 ϫ 10Ϫ7 gm cmϪ3. This is more than an order The implementation of this method in the POP code of magnitude smaller than the rms error in the inter- is straightforward. The equation of state routine is called national equation of state or the maximum error of the to obtain the in situ density, ␳ ϭ ␳(S, ␪,p0(z)), rather JMcD ®t (5 ϫ 10Ϫ6 and 6.7 ϫ 10Ϫ6 gm cmϪ3, respec- than the thermobaric density. Thus, this routine is un- tively, according to JMcD). It is also about three orders changed except for the use of (23) to convert depth to of magnitude smaller than the density error in current pressure. This is done to minimize changes in the code models estimated in the introduction. and also in case the in situ density is required for other Unfortunately, it is not possible to easily evaluate the purposes. The biggest change is to the hydrostatic equa- improvement in the dynamic error, E3, which is problem tion, which is solved in the form dependent. However, as is obvious from the de®nitions p* ␳gץ in the introduction, both the dynamic and the density ϭϪ (27) ((zr(p (zץ errors are directly related to the magnitude of the density perturbation and, therefore, if the density error vanishes 0 then so does the dynamic error. Furthermore, since both to compute the thermobaric pressure in place of the true these errors are directly related to the magnitude of the pressure. The momentum equation is left unchanged and adiabatic compressibility, it is clear that if the com- it thus effectively computes the pressure gradient as pressibility is reduced by a constant factor then both given by (20). The true pressure p is never calculated errors are reduced by the same factor, all other things because it is not used elsewhere in the code.

Unauthenticated | Downloaded 09/29/21 03:38 PM UTC JULY 2001 NOTES AND CORRESPONDENCE 1921

4. Summary REFERENCES

Bryden, H. L., 1973: New polynomials for thermal expansion, adi- Many existing ocean codes make certain simplifying abatic temperature gradient and potential temperature of sea- approximations based on the fact that the adiabatic com- water. Deap-Sea Res., 20, 401±408. pressibility of seawater is rather low. However, the error Cox, M. D., 1984: A primitive equation three-dimensional model of associated with these approximations is not negligible the ocean. GFDL Ocean Group Tech. Rep. No. 1, NOAA/GFDL, Princeton University, 250 pp. and can have signi®cant dynamic consequences, as de- Dewar, W. K., Y. Hsueh, T. J. McDougall, and D. Yuan, 1998: Cal- tailed in Dewar et al. (1998). We demonstrate that it is culation of pressure in ocean simulations. J. Phys. Oceanogr., possible to greatly reduce the error by transforming to 28, 577±588. an equation of state with a much smaller compressibility, Dukowicz, J. K., and R. D. Smith, 1994: Implicit free-surface method for the Bryan±Cox±Semtner ocean model. J. Geophys. Res., 99, expressed in terms of new state variables termed the 7991±8014. thermobaric density and pressure, before making these Fofonoff, N. P., and R. C. Millard Jr., 1983: Algorithms for com- approximations. The error in the thermobaric density putation of fundamental properties of seawater. UNESCO Marine obtained from the transformed equation of state due to Science Tech. Paper 44, 55 pp. Jackett, D. R., and T. J. McDougall, 1995: Minimal adjustment of these approximations is within the uncertainties in the hydrographic pro®les to achieve static stability. J. Atmos. Oce- equation of state itself. The dynamic error studied by anic Technol., 12, 381±389. Dewar et al. (1998) is directly related to the density Levitus, S. and T. P. Boyer, 1994b: World Ocean Atlas 1994, Vol. 4: error, and it should be reduced by at least an order of Temperature, NOAA Atlas NESDIS 4, U.S. Dept. of Commerce, magnitude by means of the present method. The present 117 pp. ÐÐ, R. Burgett, and T. P. Boyer, 1994a: World Ocean Atlas 1994, method is particularly simple for a Boussinesq model Vol. 3: Salinity, NOAA Atlas NESDIS 3, U.S. Dept. of Com- and the resulting code changes are minimal. merce, 99 pp. Semtner, A. J., Jr., 1986: Finite-difference formulation of a World Ocean model. Advanced Physical Oceanographic Numerical Modelling, J. J. O'Brien, Ed., D. Reidel, 187±202. Acknowledgments. This work was made possible by Sun, S., R. Bleck, C. Rooth, J. Dukowicz, E. Chassignet, and P. the support of the DOE CCPP (Climate Change Pre- Killworth, 1999: Inclusion of thermobaricity in isopycnic-co- diction Program) program. ordinate ocean models. J. Phys. Oceanogr., 29, 2719±2729.

Unauthenticated | Downloaded 09/29/21 03:38 PM UTC