On the formulation of sea-ice models. Part 2: Lessons from multi-year adjoint sea ice export sensitivities through the Canadian Arctic Archipelago. Patick Heimbach a,1, Dimitris Menemenlis b, Martin Losch c, Jean-Michel Campin a and Chris Hill a a Department of Earth, Atmospheric, and Planetary Sciences, Massachusetts Institute of Technology, 77 Massachusetts Avenue, Cambridge, MA 02139, USA b Jet Propulsion Laboratory, California Institute of Technology, 4800 Oak Grove Drive, Pasadena, CA 91109, USA c Alfred-Wegener-Institut für Polar- und Meeresforschung, Postfach 120161, 27515 Bremerhaven, Germany Abstract The adjoint of an ocean general circulation model is at the heart of the ocean state estimation system of the Estimating the Circulation and Climate of the Ocean (ECCO) project. As part of an ongoing effort to extend ECCO to a coupled ocean/seaice estimation system, a dynamic and thermodynamic sea-ice model has been developed for the Massachusetts Institute of Technology general circulation model (MITgcm). One key requirement is the ability to generate, by means of automatic differentiation (AD), tangent linear (TLM) and adjoint (ADM) model code for the coupled MITgcm ocean/sea-ice system. This second part of a two-part paper de- Preprint submitted to Elsevier 19 January 2010 scribes aspects of the adjoint model. The adjoint ocean and sea ice model is used to calculate transient sensitivities of solid (ice & snow) freshwater export through Lancaster Sound in the Canadian Arctic Archipelago (CAA). The adjoint state provides a complementary view of the dynamics. In particular, the transient, multi-year sensitivity patterns reflect dominant pathways and propagation timescales through the CAA as resolved by the model, thus shedding light on causal relationships, in the model, across the Archipelago. The computational cost of inferring such causal relationships from forward model diagnostics alone would be prohibitive. The role of the exact model trajectory around which the adjoint is calculated (and therefore of the exactness of the adjoint) is exposed through calculations using free-slip vs noslip lateral boundary conditions. Effective ice thickness, sea surface temperature, and precipitation sensitivities, are discussed in detail as examples of the coupled sea-ice/ocean and atmospheric forcing control space. To test the reliability of the adjoint, finite-difference perturbation experiments were performed for each of these elements and the cost perturbations were compared to those “predicted” by the adjoint. Overall, remarkable qualitative and quantitative agreement is found. In particular, the adjoint correctly “predicts” a seasonal sign change in precipitation sensitivities. A physical mechanism for this sign change is presented. The availability of the coupled adjoint opens up the prospect for adjoint-based coupled ocean/sea-ice state estimation. Key words: NUMERICAL SEA ICE MODELING, VISCOUS-PLASTIC RHEOLOGY, COUPLED OCEAN AND SEA ICE MODEL, STATE ESTIMATION, ADJOINT MODELING, CANADIAN ARCTIC ARCHIPELAGO, SEA-ICE EXPORT, SENSITIVITIES 1 corresponding author, email: [email protected], ph: +1-617-253-5259, fax: +1-617-253-4464 2 1 1 Introduction 2 This is the second part of a two-part paper (see Losch et al., 2010, for part 1) 3 describing the development of a sea-ice model for use in adjoint-based regional 4 and global coupled ocean/sea-ice state estimation and sensitivity studies. It 5 has been shown (e.g., Marotzke et al., 1999, Galanti et al., 2002, Galanti and 6 Tziperman, 2003, Köhl, 2005, Bugnion et al., 2006a,b, Losch and Heimbach, 7 2007, Moore et al., 2009, Veneziani et al., 2009) that adjoints are very valuable 8 research tools to investigate sensitivities of key model diagnostics with respect 9 to a wide variety of model inputs. Furthermore, increasing sophistication of 10 global-scale as well as regional, polar state estimation systems, which attempt 11 to synthesize observations and models (e.g., Miller et al., 2006, Duliere and 12 Fichefet, 2007, Lisaæter et al., 2007, Stark et al., 2008, Stoessel, 2008, Pan- 13 teleev et al., 2010) call for adequate representation of sea-ice in the model 14 so as to represent relevant processes and to incorporate sea-ice observations 15 in constraining the coupled system. The estimation system developed within 16 the Estimating the Circulation and Climate of the Ocean (ECCO) consortium 17 is based on the adjoint or Lagrange multiplier method (LMM) (e.g., Wun- 18 sch, 2006). It thus relies heavily on the availability of an adjoint model of 19 the underlying general circulation model (Stammer et al., 2002a, Wunsch and 20 Heimbach, 2007, Heimbach and Wunsch, 2007, and references therein). 21 Collectively, the lack, until recently, of an interactive sea-ice component in the 22 ECCO approach, the experience gained (and the success) with the ocean-only 23 problem, the importance of representing polar-subpolar interactions in ECCO- 24 type calculations, and the need to incorporate sea-ice observations, make a 25 compelling case for the development of a new sea-ice model. While many of 3 26 its features are “conventional” (yet for the most part state-of-the-art), the 27 ability to generate efficient adjoint code for coupled ocean/sea-ice simulations 28 by means of automatic (or algorithmic) differentiation (AD: Griewank and 29 Walther, 2008) sets this model apart from existing models. Whereas a few 30 existing models (Kim et al., 2006a,b) allow for the generation of tangent linear 31 code for sea-ice-only model configurations by means of the so-called forward- 32 mode AD, until very recently none of these were capable of producing efficient 33 adjoint code by means of reverse-mode AD, let alone in a coupled ocean/sea- 34 ice configuration, which can propagate sensitivities back and forth between the 35 two components. Such coupled sensitivity propagation is highly desirable as it 36 permits sea-ice and ocean observations to be used as simultaneous constraints 37 on each other, yielding a truly coupled estimation problem. 38 In addition to the coupled ocean and sea ice system described here, one other 39 coupled adjoint system has recently become available for an Arctic configu- 40 ration and was used to isolate dominant mechanisms responsible for the 2007 41 Arctic sea-ice minimum (Kauker et al., 2009). The availability of two adjoint 42 modeling systems holds the prospect (for the first time) to compare adjoint 43 calculations for a specific regional setup using different models. This is a pro- 44 posed future objective within the Arctic Ocean Model Intercomparison Project 45 (AOMIP). 46 The MITgcm sea ice model was described in detail in Part 1. It borrows 47 many components from current-generation sea ice models, but these compo- 48 nents were reformulated on an Arakawa C grid in order to match the MITgcm 49 oceanic grid, and they were modified in many ways to permit efficient and 50 accurate automatic differentiation. Part 1 provided a detailed discussion of 51 the effect on the solution of various choices in the numerical implementation, 4 52 in particular related to sea-ice dynamics. Such sensitivities are structural or 53 configuration-based, rather than exploring a continuous space of control vari- 54 ables, and are best assessed in separate forward calculations. Special emphasis 55 was put on aspects of the sea-ice dynamics, such as the use of different solvers 56 for sea-ice rheology, the formulation of these solvers on an Arakawa B vs C 57 grid, and the use of free-slip vs no-slip lateral boundary conditions. These 58 scenarios provide important baseline trajectories for the adjoint calculations 59 presented here, as they underscore the importance of the underlying state, 60 around which the model is linearized. 61 Part 2 focusses on the adjoint component, its generation by means of AD, 62 its reliability, and on the interpretability of adjoint variables. We investigate 63 sensitivities of sea-ice transport through narrow straits, for which rheology 64 configurations become crucial, and the dependence of adjoint sensitivities on 65 the choices of configuration elements described in Part 1. The power of the 66 adjoint is demonstrated through a case study of sea-ice transport through the 67 Canadian Arctic Archipelago (CAA) measured in terms of its export through 68 Lancaster Sound. Thereby we complement a recent study by Lietaer et al. 69 (2008) that focused on the role of narrow straits in this region in setting the 70 sea-ice mass balance in the Arctic. While Part 1 of the present paper showed 71 that different grids, different rheologies, and different lateral boundary con- 72 ditions lead to considerable differences in the computed sea-ice state, here 73 we show that adjoint sensitivities may differ substantially depending on the 74 baseline trajectory, around which the model is linearized. The present analysis 75 provides important complementary information to the configuration sensitiv- 76 ities of Part 1: it enables us to extend analysis to continuous parameters, it 77 demonstrates the degree of detail the adjoint variables contain, and it exposes 5 78 causal relationships. 79 The remainder of Part 2 is organized as follows: Section 2 provides some details 80 of the adjoint code generation by means of AD. Multi-year transient sensitiv- 81 ities of sea-ice export through the Canadian Arctic Archipelago are presented 82 in Section 3. Extending the analysis of Part 1, we assess the consequences of 83 the choices of lateral boundary conditions on the ensuing model sensitivities 84 for various control variables. Discussion and conclusions are in Section 4. 85 2 86 There is now a growing body of literature on adjoint applications in oceanog- 87 raphy and adjoint code generation via AD. We therefore limit the description 88 of the method to a brief summary. For discrete problems as considered here, 89 the adjoint model operator (ADM) is the transpose of the Jacobian or tangent 90 linear model operator (TLM) of the full (in general nonlinear) forward model 91 (NLM), in this case, the MITgcm coupled ocean and sea ice model. Consider 92 a scalar-valued model diagnostics, referred to as objective function, and an 93 m-dimensional control space (referred to as space of independent variables) 94 whose elements we may wish to perturb to assess their impact on the objective 95 function. In the context of data assimilation the objective function may be the 96 least-square model vs. data misfit, whereas here, we may choose almost any 97 function that is (at least piece-wise) differentiable with respect to the control 98 variables. Here, we shall be focusing on the solid freshwater export through 99 Lancaster Sound. 100 MITgcm adjoint code generation Two- and three-dimensional control variables used in the present study are 6 Table 1 List of control variables used. The controls are either part of the oceanic (O) or seaice (I) state, or time-varying elements of the atmospheric (A) boundary conditions. component variable dim. time O temperature 3-D init. O salinity 3-D init. O vertical diffusivity 3-D const. I concentration 2-D init. I thickness 2-D init. A air temperature 2-D 2-day A specific humidity 2-D 2-day A shortwave radiation 2-D 2-day A precipitation 2-D 2-day A zonal windspeed 2-D 2-day A merid. windspeed 2-D 2-day 101 listed in Table 1. They consist of two- or three-dimensional fields of initial 102 conditions of the ocean or sea-ice state, ocean vertical mixing coefficients, 103 and time-varying surface boundary conditions (surface air temperature, spe- 104 cific humidity, shortwave radiation, precipitation, zonal and meridional wind 105 speed). The TLM computes the objective functions’s directional derivatives 106 for a given perturbation direction. In contrast, the ADM computes the the full 107 gradient of the objective function with respect to all control variables. When 7 108 combined, the control variables may span a potentially high-dimensional, e.g., 109 O(108 ), control space. At this problem dimension, perturbing individual pa- 110 rameters to assess model sensitivities is prohibitive. By contrast, transient 111 sensitivities of the objective function to any element of the control and model 112 state space can be computed very efficiently in one single adjoint model inte- 113 gration, provided an adjoint model is available. 114 Conventionally, adjoint models are developed “by hand” through implement- 115 ing code which solves the adjoint equations (e.g., Marchuk, 1995, Wunsch, 116 1996) of the given forward equations. The burden of developing “by hand” an 117 adjoint model in general matches that of the forward model development. The 118 substantial extra investment often prevents serious attempts at making avail- 119 able adjoint components of sophisticated models. Furthermore, the work of 120 keeping the adjoint model up-to-date with its forward parent model matches 121 the work of forward model development. The alternative route of rigorous ap- 122 plication of AD tools has proven very successful in the context of MITgcm 123 ocean modeling applications. 124 Certain limitations regarding coding standards apply. Although they vary from 125 tool to tool, they are similar across various tools and are related to the abil- 126 ity to efficiently reverse the flow through the model. Work is thus required 127 initially to make the model amenable to efficient adjoint code generation for 128 a given AD tool. This part of the adjoint code generation is not automatic 129 (we sometimes refer to it as semi-automatic) and can be substantial for legacy 130 code, in particular if the code is badly modularized and contains many ir- 131 reducible control flows (e.g., GO TO statements, which are considered bad 132 coding practice anyways). 8 133 It is important to note, nevertheless, that once the tailoring of the model code 134 to the AD code is in place, any further forward model development can be 135 easily incorporated in the adjoint model via AD. Furthermore, the notion of 136 the adjoint is misleading, since the structure of the adjoint depends critically 137 on the control problem posed (a passive tracer sensitivity yields a very different 138 Jacobian to an active tracer sensitivity). A clear example of the dependence 139 of the structure of the adjoint model on the control problem is the extension 140 of the MITgcm adjoint model to a configuration that uses bottom topography 141 as a control variable (Losch and Heimbach, 2007). The AD approach enables 142 a much more thorough and smoother adjoint model extension than would be 143 possible via hand-coding. 144 The adjoint model of the MITgcm has become an invaluable tool for sensitivity 145 analysis as well as for state estimation (for a recent overview and summary, see 146 Heimbach, 2008). AD also enables a large variety of configurations and studies 147 to be conducted with adjoint methods without the onerous task of modifying 148 the adjoint of each new configuration by hand. Giering and Kaminski (1998) 149 discuss in detail the advantages of AD. 150 The AD route was also taken in developing and adapting the sea-ice compo- 151 nent of the MITgcm, so that tangent linear and adjoint components can be ob- 152 tained and kept up to date without excessive effort. As for the TLM and ADM 153 components of the MITgcm ocean model, we rely on the AD tool “Transfor- 154 mation of Algorithms in Fortran” (TAF) developed by Fastopt (Giering and 155 Kaminski, 1998) to generate TLM and ADM code of the MITgcm sea ice 156 model (for details see Marotzke et al., 1999, Heimbach et al., 2005). Note that 157 for the ocean component, we are now also able to generate efficient derivative 158 code using the new open-source tool OpenAD (Utke et al., 2008). Appendix 9 159 A provides details of adjoint code generation for the coupled ocean and sea 160 ice MITgcm configuration. 161 Since conducting this study, further changes to the thermodynamic formula- 162 tion have been implemented, which improve certain aspects of forward and 163 adjoint model behavior. These changes are discussed in detail in Fenty (2010) 164 along with application of the coupled ocean and sea ice MITgcm adjoint to 165 estimating the state of the Labrador Sea during 1996–1997. 166 To conclude this section, we emphasize the coupled nature of the MITgcm 167 ocean and sea ice adjoint. Figure 1 illustrates the relationship between control 168 variables and the objective function J when using the tangent linear model 169 (TLM, left diagram), or the adjoint model (ADM, right diagram). The control 170 space consists of atmospheric perturbations (e.g., surface air temperature δTa 171 and precipitation δp), sea-ice perturbations (e.g., ice concentration δc and ice 172 thickness δh), and oceanic perturbations (e.g., potential temperature δΘ and 173 salinity δS). The left diagram depicts how each perturbation of an element of 174 the control space leads to a perturbed objective function δJ via the TLM. In 175 contrast, the right diagram shows the reverse propagation of adjoint variables 176 or sensitivities labeled with an asterisk (∗ ). The notation reflects the fact that 177 adjoint variables are formally Lagrange multipliers or elements of the model’s 178 co-tangent space (as opposed to perturbations which are formally elements of 179 the model’s tangent space). For example, δ ∗ c refers to the gradient ∂J/∂c. The 180 aim of the diagram is to show (in a very simplified way) two things. First, it 181 depicts how sensitivities of an objective function (e.g., sea ice export as will be 182 defined later) to changes in, e.g., ice concentration ∂J/∂c is affected by changes 183 in, e.g., ocean temperature via the chain rule ∂J/∂Θ = ∂J/∂c · ∂c/∂Θ. The 184 adjoint model thus maps the adjoint objective function state to the adjoint 10 185 sea-ice state, and from there to the coupled adjoint oceanic and surface atmo- 186 spheric state. Second, it can be seen that the ADM maps from a 1-dimensional 187 state (δ ∗ J) to a multi-dimensional state (δ ∗ c, δ ∗ h, δ ∗ Ta , δ ∗ p, δ ∗ Θ, δ ∗ S) whereas 188 the TLM maps from a multi-dimensional state (δc, δh, δTa , δp, δΘ, δS) to a 189 1-dimensional state (δJ). This is the reason why only one adjoint integration 190 is needed to assemble all the gradients of the objective function while one 191 tangent linear integrations per dimension of the control space is needed to as- 192 semble the same gradient. Rigorous derivations can be found in, for example, 193 Chapter 5 of the MITgcm documentation (Adcroft et al., 2002), in Wunsch 194 (2006), or in Giering and Kaminski (1998). 195 3 196 A case study: Sensitivities of sea-ice export through Lancaster Sound 197 We demonstrate the power of the adjoint method in the context of investigat- 198 ing sea-ice export sensitivities through Lancaster Sound (LS). The rationale 199 for this choice is to complement the analysis of sea-ice dynamics in the pres- 200 ence of narrow straits of Part 1. LS is one of the main paths of sea ice export 201 through the Canadian Arctic Archipelago (CAA) (Melling, 2002, Prinsenberg 202 and Hamilton, 2005, Michel et al., 2006, Münchow et al., 2006, Kwok, 2006). 203 Figure 2 shows the intricate local geography of CAA straits, sounds, and 204 islands. Export sensitivities reflect dominant pathways through the CAA, as 205 resolved by the model. Sensitivity maps provide a very detailed view of various 206 quantities affecting the sea-ice export (and thus the underlying propagation 207 pathways). A caveat of this study is the limited resolution, which is not ad- 208 equate to realistically simulate the CAA. For example, while the dominant 11 δTa δ ∗ Ta δp δ∗p atmosphere atmosphere δc δΘ δh δJ δ∗c δ∗h δ∗J sea−ice sea−ice ocean ocean δS δ∗Θ δ∗S Fig. 1. This diagram illustrates how the tangent linear model (TLM, left panel) maps perturbations in the oceanic, atmospheric, or sea-ice state into a perturbation of the objective function δJ, whereas the adjoint model (ADM, right panel) maps the adjoint objective function δ∗ J (seeded to unity) into the adjoint sea-ice state, which is a sensitivity or gradient, e.g., δ∗ c = ∂J/∂c, and into the coupled ocean and atmospheric adjoint states. The TLM computes how a perturbation in one input affects all outputs whereas the adjoint model computes how one particular output is affected by all inputs. 209 circulation through LS is toward the East, there is a small Westward flow to 210 the North, hugging the coast of Devon Island, which is not resolved in our 211 simulation. Nevertheless, the focus here is on elucidating model sensitivities 212 in a general way. For any given simulation, whether deemed “realistic” or 213 not, the adjoint provides exact model sensitivities, which help inform whether 214 hypothesized processes are actually borne out by the model dynamics. Note 215 that the resolution used in this study is at least as good as or better than the 216 resolution used for IPCC-type calculations. 12 84 N N rro Str ait Na res d re Isla n sm e h. nC mM Ba Elle o 72 Penny Strait W Bya o 0 arti ure M'Cl Strait 12 ille Massey Sound Ballantyne Str ait o oN oN 81 78 oN 75 Vis co So unt un Me d lv o 60 W Prince Gustaf Adolf Sea w S Devo nI tra sla it Lan nd cas ter S oun d Baffin Bay 10 0o W 80 oW Fig. 2. Map of the Canadian Arctic Archipelago with model coastlines and grid (filled grey boxes are land). The black contours are the true coastlines as taken from the GSHHS data base (Wessel and Smith, 1996). The gate at 82◦ W across which the solid freshwater export is computed is indicated as black line. 217 3.1 The model configuration 218 The model domain is similar to the one described in Part 1. It is carved 219 out from the Arctic face of a global, eddy-admitting, cubed-sphere simulation 220 (Menemenlis et al., 2005) but with 36-km instead of 18-km grid cell width, 221 i.e., coarsened horizontal resolution compared to the configuration described 222 in Part 1. The vertical discretization is the same as in Part 1, i.e. the model 223 has 50 vertical depth levels, which are unevenly spaced, ranging from 10 m 224 layer thicknesses in the top 100 m to a maximum of 456 m layer thickness 13 225 at depth. The adjoint model for this configuration runs efficiently on 80 pro- 226 cessors, inferred from benchmarks on both an SGI Altix and on an IBM SP5 227 at NASA/ARC and at NCAR/CSL, respectively. Following a 4-year spinup 228 (1985 to 1988), the model is integrated for an additional four years and nine 229 months between January 1, 1989 and September 30, 1993. It is forced at the 230 surface using realistic 6-hourly NCEP/NCAR atmospheric state variables. The 231 objective function J is chosen as the “solid” freshwater export through LS, 232 at approximately 74◦ N, 82◦ W in Fig. 2, integrated over the final 12-month 233 period, i.e., October 1, 1992 to September 30, 1993. That is, 234 235 J = 1 ρf resh Z Sep 93 Oct 92 Z LS (ρ h c + ρs hs c) u ds dt, (1) 236 is the mass export of ice and snow converted to units of freshwater. Further- 237 more, for each grid cell (i, j) of the section, along which the integral 238 is taken, c(i, j) is the fractional ice cover, u(i, j) is the along-channel ice drift 239 velocity, h(i, j) and hs (i, j) are the ice and snow thicknesses, and ρ, ρs , and 240 ρf resh are the ice, snow and freshwater densities, respectively. At the given 241 resolution, the section amounts to three grid points. The forward trajectory of 242 the model integration resembles broadly that of the model in Part 1 but some 243 details are different due to the different resolution and integration period. 244 For example, the differences in annual solid freshwater export through LS as 245 defined in eqn. (1) are smaller between no-slip and free-slip lateral boundary 246 conditions at higher resolution, as shown in Part 1, Section 4.3 (91±85 km3 y−1 247 and 77 ± 110 km3 y−1 for free-slip and no-slip, respectively, and for the C-grid 248 LSR solver; ± values refer to standard deviations of the annual mean) than 249 at lower resolution (116 ± 101 km3 y−1 and 39 ± 64 km3 y−1 for free-slip and 14 R . . . ds 250 no-slip, respectively). The large range of these estimates emphasizes the need 251 to better understand the model sensitivities to lateral boundary conditions 252 and to different configuration details. We aim to explore these sensitivities 253 across the entire model state space in a comprehensive manner by means of 254 the adjoint model. 255 The adjoint model is the transpose of the tangent linear model operator. It 256 thus runs backwards in time from September 1993 to January 1989. During 257 this integration period, the Lagrange multipliers of the model subject to ob- 258 jective function (1) are accumulated. These Langrange multipliers are the 259 sensitivities, or derivatives, of the objective function with respect to each con- 260 trol variable and to each element of the intermediate coupled ocean and sea 261 ice model state variables. Thus, all sensitivity elements of the model state 262 and of the surface atmospheric state are available for analysis of the tran- 263 sient sensitivity behavior. Over the open ocean, the adjoint of the Large and 264 Yeager (2004) bulk formula scheme computes sensitivities to the time-varying 265 atmospheric state. Specifically, ocean sensitivities propagate to air-sea flux 266 sensitivities, which are mapped to atmospheric state sensitivities via the bulk 267 formula adjoint. Similarly, over ice-covered areas, the sea-ice model adjoint 268 (rather than the bulk formula adjoint) converts surface ocean sensitivities to 269 atmospheric sensitivities. 270 3.2 Adjoint sensitivities 271 The most readily interpretable ice-export sensitivity is that to ice thickness, 272 ∂J/∂(hc). Maps of transient sensitivities ∂J/∂(hc) are shown for free-slip 273 (Fig. 3) and for no-slip (Fig. 4) boundary conditions. Each figure depicts four 15 01−Oct−1992 80 75 70 02−Oct−1991 80 o N 75 o N 70 o N 12 o 0 oW 60 o N o N o N 12 W 0 oW o 80 W 100 oW 75 70 80 N 75 o N 70 o N 12 o 0 oW −0.2 60 −0.15 W o N o N o N 12 W 0 oW 60 o o 100 oW 80 W −0.1 o 02−Oct−1989 o 100 oW W o 80 W 100 oW 02−Oct−1990 80 o 60 −0.05 0 0.05 80 W 0.1 0.15 0.2 Fig. 3. Sensitivity ∂J/∂(hc) in m3 s−1 /m for four different times using free-slip lateral sea ice boundary conditions. The color scale is chosen to illustrate the patterns of the sensitivities. The objective function (1) was evaluated between October 1992 and September 1993. Sensitivity patterns extend backward in time upstream of the LS section. 274 sensitivity snapshots of the objective function J, starting October 1, 1992, 275 i.e., at the beginning of the 12-month averaging period, and going back in 276 time to October 2, 1989. As a reminder, the full period over which the adjoint 277 sensitivities are calculated is (backward in time) between September 30, 1993 278 and January 1, 1989. 279 The sensitivity patterns for ice thickness are predominantly positive. The in- 280 terpretation is that an increase in ice volume in most places west, i.e., “up- 281 stream”, of LS increases the solid freshwater export at the exit section. The 16 01−Oct−1992 80 75 70 02−Oct−1991 80 o N 75 o N 70 o N 12 o 0 oW 60 o N o N o N 12 W 0 oW o 80 W 100 oW 75 70 80 N 75 o N 70 o N 12 o 0 oW −0.2 60 −0.15 W o N o N o N 12 W 0 oW 60 o o 100 oW 80 W −0.1 o 02−Oct−1989 o 100 oW W o 80 W 100 oW 02−Oct−1990 80 o 60 −0.05 0 0.05 80 W 0.1 0.15 0.2 Fig. 4. Same as in Fig. 3 but for no-slip lateral sea ice boundary conditions. 282 transient nature of the sensitivity patterns is evident: the area upstream of 283 LS that contributes to the export sensitivity is larger in the earlier snapshot. 284 In the free-slip case, the sensivity follows (backwards in time) the dominant 285 pathway through Barrow Strait into Viscount Melville Sound, and from there 286 trough M’Clure Strait into the Arctic Ocean 287 ward from Viscount Melville Sound through Byam Martin Channel into Prince 288 Gustav Adolf Sea and through Penny Strait into MacLean Strait. 289 There are large differences between the free-slip and no-slip solutions. By 290 the end of the adjoint integration in January 1989, the no-slip sensitivities 2 2 . Secondary paths are north- (the branch of the “Northwest Passage” apparently discovered by Robert McClure during his 1850 to 1854 expedition; McClure lost his vessel in the Viscount Melville Sound) 17 291 (Fig. 4) are generally weaker than the free slip sensitivities and hardly reach 292 beyond the western end of Barrow Strait. In contrast, the free-slip sensitivities 293 (Fig. 3) extend through most of the CAA and into the Arctic interior, both to 294 the West (M’Clure Strait) and to the North (Ballantyne Strait, Prince Gustav 295 Adolf Sea, Massey Sound). In this case the ice can drift more easily through 296 narrow straits and a positive ice volume anomaly anywhere upstream in the 297 CAA increases ice export through LS within the simulated 4-year period. 298 One peculiar feature in the October 1992 sensitivity maps are the negative 299 sensivities to the East and, albeit much weaker, to the West of LS. The former 300 can be explained by indirect effects: less ice eastward of LS results in less 301 resistance to eastward drift and thus more export. A similar mechanism might 302 account for the latter, albeit more speculative: less ice to the West means that 303 more ice can be moved eastward from Barrow Strait into LS leading to more 304 ice export. 305 The temporal evolution of several ice export sensitivities along a zonal axis 306 through LS, Barrow Strait, and Melville Sound (115◦ W to 80◦ W, averaged 307 across the passages) are depicted in Fig. 5 as Hovmoeller-type diagrams, that 308 is, as two-dimensional plots of sensitivities as a function of longitude and time. 309 Serving as examples for the ocean, sea-ice, and atmospheric forcing compo- 310 nents of the model, we depict, from top to bottom, the sensitivities to ice 311 thickness (hc), to ice and ocean surface temperature (SST), and to precipi- 312 tation (p) for free-slip (left column) and for no-slip (right column) ice drift 313 boundary conditions. The green line marks the starting time (1 Oct. 1992) 314 of the 12-month ice export objective function integration (Eqn. 1). Also in- 315 dicated are times when a perturbation in precipitation leads to a positive 316 (Apr. 1991) or to a negative (Nov. 1991) ice export anomaly (see also Fig. 18 free slip no slip Jul 3 93 Jan 2 ∂J/∂(hc) [m2 s−1/m] Jul 92 Jan Jul 91 Jan Jul 1 0 −1 −2 90 Jan Jul −3 89 Jan Jul 0.3 93 Jan 0.2 ∂J/∂SST [m2 s−1/K] Jul 92 Jan Jul 91 Jan Jul 0.1 0 −0.1 −0.2 90 Jan Jul 89 Jan Jul 3 ∂J/∂p [103 m2 s−1/ (m s−1)] 93 Jan Jul 92 Jan Jul 91 Jan Jul 90 Jan Jul 89 Jan 2 1 0 −1 −2 −3 o 110 W o 100 W o 90 W o 110 W o 100 W o 90 W Fig. 5. Time vs. longitude diagrams along the axis of Viscount Melville Sound, Barrow Strait, and LS. The diagrams show the sensitivities (derivatives) of the solid freshwater export J through LS (Fig. 2) with respect to ice thickness (hc, top), to ice and ocean surface temperature (SST, middle), and to precipitation (p, bottom) for free-slip (left) and for no-slip (right) boundary conditions. J was integrated over the last year (period above green line). A precipitation perturbation during Apr. 1st. 1991 (dash-dottel line) or Nov. 1st 1991 (dashed line) leads to a positive or negative export anomaly, respectively. Contours are of the normalized ice strength 19 P/P ∗ . Bars in the longitude axis indicates the flux gate at 82◦ W. 317 8). Each plot is overlaid with contours 1 and 3 of the normalized ice strength 318 P/P ∗ = (hc) exp[−C (1 − c)]. 319 The Hovmoeller-type diagrams of ice thickness (top row) and SST (second 320 row) sensitivities are coherent: more ice in LS leads to more export and one 321 way to form more ice is by colder surface temperatures. In the free-slip case 322 the sensitivities spread out in “pulses” following a seasonal cycle: ice can prop- 323 agate eastward (forward in time) and thus sensitivities propagate westward 324 (backwards in time) when the ice strength is low in late summer to early au- 325 tumn (Fig. 6, bottom panels). In contrast, during winter, the sensitivities show 326 little to no westward propagation as the ice is frozen solid and does not move. 327 In the no-slip case the normalized ice strength does not fall below 1 during 328 the winters of 1991 to 1993 (mainly because the ice concentrations remain 329 near 100%, not shown). Ice is therefore blocked and cannot drift eastwards 330 (forward in time) through the Viscount Melville Sound, Barrow Strait, and 331 LS channel system. Consequently, the sensitivities do not propagate westward 332 (backwards in time) and the export through LS is only affected by local ice 333 formation and melting for the entire integration period. 334 It is worth contrasting the sensitivity diagrams of Fig. 5 with the Hovmoeller- 335 type diagrams of the corresponding state variables (Figs. 6 and 7). The sensi- 336 tivities show clear causal connections of ice motion over the years, that is, they 337 expose the winter arrest and the summer evolution of the ice. These causal 338 connections cannot easily be inferred from the Hovmoeller-type diagrams of 339 ice and snow thickness. This example illustrates the usefulness and comple- 340 mentary nature of the adjoint variables for investigating dynamical linkages 341 in the ocean/sea-ice system. 20 free slip no slip Jul 4.5 93 Jan 4 Jul 3.5 92 Jan hc [m] 3 Jul 91 Jan 2.5 2 1.5 Jul 1 90 Jan 0.5 Jul 0 89 Jan Jul 0.4 93 Jan 0.35 Jul 0.3 h c [m] 92 Jan s Jul 91 Jan 0.25 0.2 0.15 Jul 0.1 90 Jan 0.05 Jul 0 89 Jan Jul 4.5 93 Jan 4 normalized ice strength Jul 92 Jan Jul 91 Jan Jul 90 Jan 3 2.5 2 1.5 1 0.5 Jul 89 Jan 3.5 0 o 110 W o 100 W o 90 W o 110 W o 100 W o 90 W Fig. 6. Hovmoeller-type diagrams along the axis of Viscount Melville Sound, Barrow Strait, and LS. The diagrams show ice thickness (hc, top), snow thickness (hs c, middle), and normalized ice strength (P/P ∗ , bottom) for free-slip (left) and for no-slip (right) sea ice boundary conditions. For orientation, each plot is overlaid with contours 1 and 3 of the normalized ice strength. Green line is as in Fig. 5. 21 free slip no slip Jul −1.72 93 Jan −1.725 Jul −1.73 −1.735 o SST [ C] 92 Jan Jul 91 Jan Jul −1.74 −1.745 −1.75 90 Jan −1.755 Jul −1.76 89 Jan Jul 32 93 Jan 31.5 Jul SSS [ppt] 92 Jan Jul 91 Jan 31 30.5 30 Jul 29.5 90 Jan Jul 29 89 Jan −3 Jul x 10 5 93 Jan P−E+R [g/m /s] Jul 2 92 Jan Jul 91 Jan Jul 0 90 Jan Jul 89 Jan −5 o 110 W o 100 W o 90 W o 110 W o 100 W o 90 W Fig. 7. Same as in Fig. 6 but for SST (top panels), SSS (middle panels), and precipitation minus evaporation plus runoff, P − E + R (bottom panels). 22 342 The sensitivities to precipitation are more complex. To first order, they have 343 an oscillatory pattern with negative sensitivity (more precipitation leads to 344 less export) between roughly September and December and mostly positive 345 sensitivity from January through June (sensitivities are negligible during the 346 summer). Times of positive sensitivities coincide with times of normalized 347 ice strengths exceeding values of 3. This pattern is broken only immediatly 348 preceding the evaluation period of the ice export objective function in 1992. 349 In contrast to previous years, the sensitivity is negative between January and 350 August 1992 and east of 95◦ W. 351 We attempt to elucidate the mechanisms underlying these precipitation sen- 352 sitivities in Section 3.4 in the context of forward perturbation experiments. 353 3.3 Forward perturbation experiments 354 Applying an automatically generated adjoint model under potentially highly 355 nonlinear conditions incites the question to what extent the adjoint sensi- 356 tivities are “reliable” in the sense of accurately representing forward model 357 sensitivities. Adjoint sensitivities that are physically interpretable provide a 358 partial answer but an independent, quantitative test is needed to gain confi- 359 dence in the calculations. Such a verification can be achieved by comparing 360 adjoint-derived gradients with ones obtained from finite-difference perturba- 361 tion experiments. Specifically, for a control variable u of interest, we can read- 362 ily calculate an expected change δJ in the objective function for an applied 363 perturbation δu over domain A based on adjoint sensitivities ∂J/∂u: 23 364 365 δJ = Z A ∂J δu dA ∂u (2) 366 Alternatively, we can infer the magnitude of the objective perturbation δJ 367 without use of the adjoint. Instead we apply the same perturbation δu to the 368 control space over the same domain A and integrate the forward model. The 369 perturbed objective function is 370 371 δJ = J(u + δu) − J(u). 372 The degree to which Eqns. (2) and (3) agree depends both on the magnitude 373 of perturbation δu and on the length of the integration period. 374 We distinguish two types of adjoint-model tests. First there are finite differ- 375 ence tests performed over short time intervals, over which the assumption of 376 linearity is expected to hold, and where individual elements of the control vec- 377 tor are perturbed. We refer to these tests as gradient checks. Gradient checks 378 are performed on a routine, automated basis for various MITgcm verifica- 379 tion setups, including verification setups that exercise coupled ocean and sea 380 ice model configurations. These automated tests insure that updates to the 381 MITgcm repository do not break the differentiability of the code. 382 A second type of adjoint-model tests is finite difference tests performed over 383 longer time intervals and where a whole area is perturbed, guided by the ad- 384 joint sensitivity maps, in order to investigate physical mechanisms. The exam- 385 ples discussed herein and summarized in Table 2 are of this second type of sen- 386 sitivity experiments. For nonlinear models, the deviations between Eqns. (2) 387 and (3) are expected to increase both with perturbation magnitude as well as 24 (3) Table 2 Summary of forward perturbation experiments and comparison of adjoint-based and finite-difference-based objective function sensitivities. All perturbations were applied to a region centered at 101.24◦ W, 75.76◦ N. The reference value for ice and snow export through LS is J0 = 69.6 km3 /yr. For perturbations to the time-varying precipitation p the perturbation interval is indicated by ∆t. δJ(adj.) km3 /yr δJ(f wd.) km3 /yr % diff. 0.5 m 0.98 1.1 11 0.5◦ C -0.125 -0.108 16 1-Apr-91 10 dy 1.6·10−7 m/s 0.185 0.191 3 p 1-Nov-91 10 dy 1.6·10−7 m/s -0.435 -1.016 57 ATM3 p 1-Apr-91 10 dy -1.6·10−7 m/s -0.185 -0.071 62 ATM4 p 1-Nov-91 10 dy -1.6·10−7 m/s 0.435 0.259 40 exp. variable time ∆t δu ICE1 hc 1-Jan-89 init. OCE1 SST 1-Jan-89 init. ATM1 p ATM2 388 with integration time. 389 Comparison between finite-difference and adjoint-derived ice-export perturba- 390 tions show remarkable agreement for initial value perturbations of ice thick- 391 ness (ICE1) or sea surface temperature (OCE1). Deviations between perturbed 392 objective function values remain below 16% (see Table 2). Figure 8 depicts 393 the temporal evolution of perturbed minus unperturbed monthly ice export 394 through LS for initial ice thickness (top panel) and SST (middle panel) pertur- 395 bations. In both cases, differences are confined to the melting season, during 396 which the ice unlocks and which can lead to significant export. Large differ- 397 ences are seen during (but are not confined to) the period during which the 398 ice export objective function J is integrated (grey box). As “predicted” by 25 0.2 0.15 0.1 0.05 0 −0.05 Jan−92 Apr Jul Oct Jan−93 Apr Jul Oct Jan−94 Apr Jul Oct Jan−93 Apr Jul Oct Jan−94 0.01 0 −0.01 −0.02 −0.03 −0.04 Jan−92 0.06 1−Nov−1991 perturbation 1−Apr−1991 perturbation 3 Difference in freshwater export [km /y] 3 Difference in freshwater export [km /y] 3 Difference in freshwater export [km /y] 0.3 0.25 0.04 0.02 0 −0.02 −0.04 −0.06 Jan−92 Apr Jul Oct Jan−93 Apr Jul Oct Jan−94 Fig. 8. Difference in monthly solid freshwater export at 82◦ W between perturbed and unperturbed forward integrations. From top to bottom, perturbations are initial ice thickness (ICE1 in Table 2), initial sea-surface temperature (OCE1), and precipitation (ATM1 and ATM2). The grey box indicates the period during which the ice export objective function J is integrated, and reflects the integrated anomalies in Table 2. 399 the adjoint, the two curves are of opposite sign and scales differ by almost an 400 order of magnitude. 401 3.4 Sign change of precipitation sensitivities 402 Our next goal is to explain the sign and magnitude changes through time of 403 the transient precipitation sensitivities. To investigate this, we have carried 26 404 out the following two perturbation experiments: (i) an experiment labeled 405 ATM1, in which we perturb precipitation over a 10-day period between April 406 1 and 10, 1991, coincident with a period of positive adjoint sensitivities, and 407 (ii) an experiment labeled ATM2, in which we apply the same perturbation 408 over a 10-day period between November 1 and 10, 1991, coincident with a 409 period of negative adjoint sensitivities. The perturbation magnitude chosen 410 is δu = 1.6 × 10−7 m/s, which is of comparable magnitude with the stan- 411 dard deviation of precipitation. The perturbation experiments confirm the 412 sign change when perturbing in different seasons. We observe good quantita- 413 tive agreement for the April 1991 case and a 50% deviation for the November 414 1991 case. The discrepancy between the finite-difference and adjoint-based 415 sensitivity estimates results from model nonlinearities and from the multi- 416 year integration period. To support this statement, we repeated perturba- 417 tion experiments ATM1 and ATM2 but applied a perturbation with opposite 418 sign, i.e., δu = −1.6 × 10−7 m/s (experiments ATM3 and ATM4 in Table 419 2). For negative δu, both perturbation periods lead to about 50% discrepan- 420 cies between finite-difference and adjoint-derived ice export sensitivities. The 421 finite-difference export changes are different in amplitude for positive and for 422 negative perturbations, confirming that model nonlinearities start to impact 423 these calculations. 424 These experiments constitute severe tests of the adjoint model in the sense 425 that they push the limit of the linearity assumption. Nevertheless, the results 426 confirm that adjoint sensitivities provide useful qualitative, and, within cer- 427 tain limits, quantitative information of comprehensive model sensitivities that 428 cannot realistically be computed otherwise. 429 To investigate in more detail the oscillatory behavior of precipitation sen27 perturbation on 1991/11/01 perturbation on 1991/04/01 Jul 0.1 (hc) (m) 1993 Jan Jul 1992 Jan Jul 0 −0.1 1991 Jan (hsnowc) (m) Jul 1993 Jan Jul 1992 Jan Jul 0.01 0 −0.01 1991 Jan SST (10−6ϒC) Jul 1993 Jan Jul 1992 Jan Jul 1 0 −1 shortwave (W/m2) 1991 Jan Jul 1993 Jan Jul 1992 Jan Jul 1991 Jan o 110 W o 100 W o o 90 W 110 W o 100 W 0.5 0 −0.5 o 90 W Fig. 9. Same as in Fig. 6 but restricted to the period 1991–1993 and for the differences in (from top to bottom) ice thickness (hc), snow thickness (hsnow c), sea– surface temperature (SST), and shortwave radiation (for completeness) between a perturbed and unperturbed run in precipitation of 1.6 × 10−1 m s−1 on November 1, 1991 (left panels) and on April 1, 1991 (right panels). The vertical line marks the position where the perturbation was applied. 430 sitivities we have plotted differences in ice thickness, snow thicknesses, and 431 SST, between perturbed and unperturbed simulations along the LS axis as a 432 function of time. Figure 9 shows how the small localized perturbations of pre- 433 cipitation are propagated, depending on whether applied during early winter 434 (November, left column) or late winter (April, right column). More precipation 435 leads to more snow on the ice in all cases. However, the same perturbation in 436 different seasons has an opposite effect on the solid freshwater export through 437 LS. Both the adjoint and the perturbation results suggest the following mech28 438 anism to be at play: 439 • More snow in November (on thin ice) insulates the ice by reducing the 440 effective conductivity and thus the heat flux through the ice. This insulating 441 effect slows down the cooling of the surface water underneath the ice. In 442 summary, more snow early in the winter limits the ice growth from above 443 and below (negative sensitivity). 444 • More snow in April (on thick ice) insulates the ice against melting. Short- 445 wave radiation cannot penetrate the snow cover and snow has a higher 446 albedo than ice (0.85 for dry snow and 0.75 for dry ice in our simulations); 447 thus it protects the ice against melting in the spring, more specifically, after 448 January, and it may lead to more ice in the following growing season. 449 A secondary effect is the accumulation of snow, which increases the exported 450 volume. The feedback from SST appears to be negligible because there is little 451 connection of anomalies beyond a full seasonal cycle. 452 We note that the effect of snow vs rain seems to be irrelevant in explaining 453 positive vs negative sensitivity patterns. In the current implementation, the 454 model differentiates between snow and rain depending on the thermodynamic 455 growth rate of sea ice; when it is cold enough for ice to grow, all precipitation 456 is assumed to be snow. The surface atmospheric conditions most of the year in 457 the Lancaster Sound region are such that almost all precipitation is treated as 458 snow, except for a short period in July and August; even then, air temperatures 459 are only slightly above freezing. 460 Finally, the negative sensitivities to precipitation between 95◦ W and 85◦ W 461 during the spring of 1992, which break the oscillatory pattern, may also be 462 explained by the presence of snow: in an area of large snow accumulation 29 463 (almost 50 cm: see Fig. 6, middle panel), ice cannot melt and it tends to block 464 the channel so that ice coming from the West cannot pass, thus leading to less 465 ice export in the next season. The reason why this is true for the spring of 466 1992 but not for the spring of 1991 is that by then the high sensitivites have 467 propagated westward out of the area of thick snow and ice around 90◦ W. 468 4 469 In this study we have extended the MITgcm adjoint modeling capabilities to 470 a coupled ocean and sea-ice configuration. The key development is a dynamic 471 and thermodynamic sea-ice model akin to most state-of-the-art models but 472 that is amenable to efficient, exact, parallel adjoint code generation via au- 473 tomatic differentiation. At least two natural lines of applications are made 474 possible by the availability of the adjoint model: (i) use of the coupled ad- 475 joint modeling capabilities for comprehensive sensitivity calculations of the 476 ocean/sea-ice system at high Northern and Southern latitudes and (ii) exten- 477 sion of the ECCO state estimation infrastructure to derive estimates that are 478 constrained both by ocean and by sea-ice observations. 479 The power of the adjoint method was demonstrated through a multi-year 480 sensitivity calculation of solid freshwater (sea-ice and snow) export through 481 Lancaster Sound in the Canadian Arctic Archipelago (CAA). The region was 482 chosen so as to complement the forward-model study presented in Part 1, 483 which examined the impact of rheology and dynamics on sea-ice drift through 484 narrow straits. The transient adjoint sensitivities reveal dominant pathways of 485 sea-ice propagation through the CAA. They clearly expose causal, time-lagged 486 relationships between ice export and various ocean, sea-ice, and atmospheric Discussion and conclusion 30 487 variables of the coupled system. The computational cost of establishing all 488 these relationships through pure forward calculations would be prohibitive. 489 The sensitivity patterns (and thus causal relationships) differ substantially, 490 depending on which lateral ice drift boundary condition (free-slip or no-slip) is 491 imposed. Our results indicate that for the coarse-resolution configuration used 492 here the free-slip boundary condition results in swifter ice movement and in a 493 much larger region of influence than does the no-slip boundary condition. Note 494 though that this statement may not hold for simulations at higher resolution. 495 The present calculations confirm some expected responses, for example, the in- 496 crease in ice export with increasing ice thickness and the decrease in ice export 497 with increasing sea surface temperature. They also reveal mechanisms which, 498 although plausible, cannot be readily anticipated. As an example we presented 499 precipitation sensitivities, which exhibit an annual oscillatory behavior, with 500 negative sensitivities prevailing throughout the fall and early winter and pos- 501 itive sensitivities from late winter though spring. This behavior can be traced 502 to the different impact of snow accumulation over ice, depending on the stage 503 of ice evolution. For growing ice, snow accumulation suppresses ice growth 504 (negative sensitivity) whereas for melting ice, snow accumulation suppresses 505 ice melt (positive sensitivity). A secondary effect is the snow accumulation 506 on downstream ice export (positive sensitivity). Differences between snow and 507 rain seem negligible in our case study, since precipitation is in the form of 508 snow for an overwhelming part of the year. 509 Given the automated nature of adjoint code generation and the nonlinearity 510 of the problem when considered over sufficiently long time scales, indepen- 511 dent tests are needed to gain confidence in the adjoint solutions. We have 512 presented such tests in the form of finite difference experiments, guided by 31 513 the adjoint solution, and we compared objective function differences inferred 514 from forward perturbation experiments with differences inferred from adjoint 515 sensitivity information. We found very good quantitative agreement for initial 516 ice thickness and for sea surface temperature perturbations. 517 As described above, sensitivities to precipitation show an annual oscillatory 518 behavior, which is confirmed by forward perturbation experiments. In terms 519 of amplitude, precipitation shows a larger deviation (order of 50%) between 520 adjoint-based and finite-difference-based estimates of ice and snow transport 521 sensitivity through Lancaster Sound. Furthermore, finite difference perturba- 522 tions exhibit an asymmetry between positive and negative perturbations of 523 equal size. This points to the fact that, on multi-year time scales, nonlinear 524 effects can no longer be ignored and it indicates a limit to the usefulness of 525 the adjoint sensitivity information. 526 Given the urgency of understanding cryospheric changes, adjoint applications 527 are emerging as powerful research tools, e.g., the study of Kauker et al. (2009) 528 who attempt to isolate dominant mechanisms responsible for the 2007 Arctic 529 sea-ice minimum, and the study of Heimbach and Bugnion (2009) who demon- 530 strate how to infer Greenland ice sheet volume sensitivities from a large-scale 531 ice sheet adjoint model. The results of the present study encourage application 532 of the MITgcm coupled ocean/sea-ice adjoint system to a variety of sensitivity 533 studies of Arctic and Southern Ocean climate variability. The system has ma- 534 tured to a stage where coupled ocean/sea-ice estimation becomes feasible. For 535 the limited domain of the the Labrador Sea, single-year estimates have indeed 536 successfully been produced by Fenty (2010) for the mid-1990s and mid-2000s, 537 and will be reported elsewhere. Steps both toward a full Arctic and a global 538 system are now within reach. The prospect of using observations of one com32 539 ponent (e.g., daily sea-ice concentration) to constrain the other component 540 (near-surface ocean properties) through the information propagation of the 541 adjoint holds promise in deriving better, dynamically consistent estimates of 542 the polar environments. 543 A 544 TAF (Giering and Kaminski, 1998) and OpenAD (Utke et al., 2008) are source- 545 to-source transformation tools, which take the Fortran source code of the 546 nonlinear parent model (NLM) and generate Fortran code for the derivative 547 model once the control space and objective function have been specified. The 548 specification is an important step. It determines, in part, the structure of the 549 TLM and ADM. For different control problems the TLM and ADM may be 550 different, underlining the advantage of AD over hand-coding. At a basic level, 551 the AD tool knows the derivative expression for all intrinsic Fortran functions 552 (+,-,*,/,SQRT,SIN, etc.) and it readily produces line-by-line tangent linear 553 code. The full tangent linear model is assembled by rigorous application of the 554 chain rule (and the product rule) to the derivative line expressions. The adjoint 555 code can be derived from the line-by-line TLM code, formulated in matrix 556 form, by taking the matrix transpose and putting the resulting equations in 557 code form. Issues of AD-based adjoint code generation An example Consider as a simple example the line of code for calculating the nonlinear bulk viscosity ζ from the shear viscosity η and from the ratio e 33 of the major to minor axis of the elliptical yield curve (Hibler, 1979): ζ . e2 η = (A.1) The total derivative is ∂η ∂η δζ + δe ∂ζ ∂e 1 2ζ = 2 δζ − 3 δe. e e δη = (A.2) The variables δη, δe, and δζ are perturbations to the NLM state variables and may be viewed as elements of the TLM state space. Rewriting this in matrix form, l+1 δζ δe = δη l 1 δζ 0 0 0 1 1 −2ζ e2 e3 δe 0 , (A.3) , (A.4) δη 0 enables easy access to the transpose l ∗ δ ζ ∗ δ e ∗ = δ η 0 1 e2 1 −2ζ e3 00 0 1 0 l+1 ∗ δ ζ ∗ δ e ∗ δ η where δ ∗ η, δ ∗ e, and δ ∗ ζ are sensitivities, i.e., elements of the ADM state space or elements of the dual space to the TLM space. From this the adjoint code can easily be read-off as follows: 1 ∗ δ η, e2 2ζ δ ∗ e = δ ∗ e − 3 δ ∗ η, e δ∗ζ = δ∗ζ + δ ∗ η = 0. 34 (A.5) 558 Note that: 559 • the TLM propagates the impact of perturbing one input component (δη) 560 on all output variables (a directional derivative), here just one scalar-valued 561 objective function, 562 • the ADM accumulates the sensitivities of one output variable (here scalar- 563 valued) to all input components (a gradient), 564 • the required variables are elements of the model state, which are needed 565 to evaluate the derivative expression, including nonlinear functions and con- 566 ditional statements, and for the ADM they need to be available in reverse 567 order, 568 • Eqn. (A.5) states that the shear viscosity sensitivity δ ∗ η impacts the bulk 569 viscosity sensitivity δ ∗ ζ in a linear fashion, whereas it affects the ratio of the 570 elliptic yield curve δ ∗ e nonlinearly. 571 Required variables and checkpointing An important issue is the evalu- 572 ation of nonlinear or conditional expressions. In Eqn. (A.5) the values of e and 573 ζ are required to evaluate the derivative. AD tools solve this problem for TLM 574 generation by interlacing the TLM calculation with the NLM calculation. In 575 this way, the state of e and ζ is known just when it is needed by the TLM. 576 For the ADM the solution is significantly harder since the state of e and ζ are 577 required in reverse order of the NLM execution. Overcoming this discrepancy 578 is at the heart of implementing efficient adjoint code. The approach taken is 579 a blend of two extremes, which are (i) recomputing the required state, or (ii) 580 storing the whole state. For complex models, such as the MITgcm, neither of 35 581 these in their pure form is feasible but an optimal blend, known as adjoint 582 multi-level checkpointing, enables the generation of efficient and exact adjoint 583 code. For TAF, which implements a recompute-all behavior as default, the task 584 consists of targeting active variables in relevant, e.g., nonlinear or conditional, 585 code expressions, whose storing will avoid excessive required recomputations. 586 TAF directives enable the modeler to support TAF, alter its default behavior, 587 and render the adjoint more efficient. A detailed description in the context 588 of the MITgcm is given in Heimbach et al. (2005). Alternative approaches of 589 store-all by default are implemented in other tools (e.g., OpenAD, see Utke 590 et al., 2008). 591 Hand-coded adjoint models are sometimes considered as more efficient and 592 faster in view of the ability of the code developer to explicitly optimize the 593 code. This view needs to be formulated in more detail since it may be mislead- 594 ing in its general form. Significant code optimization can be obtained through 595 relaxing the requirement of provision of the exact model forward state at the 596 time of derivative evaluation. A code developer may decide that certain vari- 597 ables vary sufficiently slowly such that a time-mean (or, in certain applications, 598 an equilibrium state) constitute an appropriate substitute. While this substi- 599 tution leads indeed to significant adjoint model speed-up and/or memory re- 600 duction (omission of required recomputations) the comparison in performance 601 is no longer warranted. This is because similar interventions are possible for 602 AD generated code, in which recomputation or STORE/RESTORE opera- 603 tions may very well be replaced by similar approximations after the adjoint 604 code has been generated. Code efficiently is thus not primarily an AD issue, 605 but an issue of deciding which approximations to the exact linearizations are 606 permissible. These decisions are either made at the outset (for hand-coding), 36 607 or after the fact (for AD). Which of the routes of either simplifying an AD- 608 generated adjoint or extending an approximate hand-coded adjoint is simpler 609 and leads to more efficient adjoint models remains subject to research. Clearly, 610 providing means (e.g. through directives) of prescribing approximation levels 611 to AD tools would be an attractive feature of AD tools, and very useful for 612 large-scale applications. 613 Retaining scalability of the coupled ocean/sea-ice adjoint Another 614 aspect is ensuring scalability of the adjoint code on high performance computer 615 systems. Here again, automatic differentiation provides adjoint code, which 616 implements the same domain decomposition strategy adopted in the forward 617 model. It thus inherits the same parallel modeling approach, and therefore 618 essentially the same scalable code efficiency as the parent model. In terms of 619 across-processor operations, such as exchanging information between processor 620 tiles, global sums, etc., the same set of adjoint primitives can be used that have 621 been developed for the MITgcm ocean component (Heimbach et al., 2005). 622 The main parallel operations are exchanges between processors (send/receive, 623 gather/scatter), as well as global sums (reduce). All of these are linear opera- 624 tions in nature. Therefore there are no fundamental hurdles to parallel adjoint 625 model execution. Adjoint primitives of the parallel support package have been 626 written by hand since no adjoint support of the Message Passing Interface 627 (MPI) is currently available (Heimbach et al., 2005). Nevertheless, efforts are 628 currently under way to extend MPI libraries to include support for adjoint 629 model generation (Utke et al., 2009). 37 630 Iterative solvers and their adjoint Next, we briefly describe the treat- 631 ment of the sea-ice rheology solver. The solver used here is an adaptation 632 of the line successive over-relaxation (LSOR) method of Zhang and Hibler 633 III (1997) to an Arakawa C grid (see Part 1). At the heart of this method 634 is an iterative approach used to solve the momentum equations for ice drift 635 velocities, based on a tridiagonal matrix solver. A challenge is to generate 636 the adjoint of the iterative procedure. A similar issue was encountered in the 637 context of adding bottom topography as a control variable to the MITgcm, 638 which breaks the self-adjoint property of the elliptic pressure solver and which 639 required adjoint code generation for this routine (Losch and Heimbach, 2007). 640 The approach taken here consists of invoking the implicit function theorem 641 in order to simplify the reverse accumulation of sensitivities in terms of re- 642 quired variables during the (reverse) iteration, e.g., Christianson (1998) and 643 Griewank and Walther (2008), chapter 15. Essentially this theorem states that 644 only the variable at the fixed point is required, thus avoiding the potentially 645 memory-intensive storing of the entire intermediate state of the iteration. TAF 646 accommodates this feature via directives that identify a loop in the code as 647 fixed-point iteration (Giering and Kaminski, 1998), and which we use here. We 648 note that caveats exist between analytical derivation of the adjoint equations 649 for implicit functions and its validity for numerical implementation (Giles, 650 2001). Deciding whether the generated code is reliable has to be based, some- 651 what heuristically, on detailed gradient checks, as was done in this study. 652 A note on recent developments in the use of fully implicit method in ocean, 653 sea-ice and land-ice modeling seems warranted. Methods such as Jacobi-free 654 Newton-Krylov (JFNK) methods enable very efficient model integrations us- 655 ing rather long time steps and showing very favorable convergence behavior. 38 656 Most implementations (in particular those aimed at scalable applications) take 657 advantage of black-box solvers such as GMRES, Trilinos or PETSc. In such 658 cases, differentiation through the solvers is either not possible (black-box) 659 or very difficult and not recommended. Instead, use of the knowledge of the 660 solver for the adjoint system of differential equations and implementation of 661 the adjoint solver (usually part of the same black-box package) is preferable. 662 Approximating the adjoint of mixing parameterization schemes 663 Mixing schemes introduce additional nonlinear behavior on various time scales 664 that may cause problems for the adjoint. Generating exact adjoint for most 665 schemes does not per se present a fundamental problem. For example, Marotzke 666 et al. (1999) describe in some detail the adjoint of the convective adjustment 667 scheme. Ferreira et al. (2005) take advantage of the adjoint to estimate eddy- 668 induced stresses in the ocean interior as a way to estimate parameters relevant 669 for eddy-induced mixing. 670 However, with increasing time scales, resolution, nonlinearity of the scheme, 671 or a combination thereof, the use of the adjoint will be prevented due to 672 exponential growth of sensitivities. Approximating the adjoint under such cir- 673 cumstances has been found to be necessary to retain a stable solution. In the 674 present calculation the approximation was made by excluding the adjoint of 675 the non-local K-profile parameterization (KPP) scheme for vertical mixing 676 (Large et al., 1994). 677 Some modifications have recently been made to the sea-ice thermodynamics, 678 in particular to the treatment of sea-ice growth, in order to improve both 679 certain forward model features as well as the adjoint model behavior. These 39 680 changes will be discussed in detail elsewhere (Fenty, 2010). 681 Concluding remarks Many issues of generating efficient exact adjoint 682 sea-ice code are similar to those for the ocean model’s adjoint. Linearizing 683 the model around the exact nonlinear model trajectory is a crucial aspect in 684 the presence of different regimes. For example, is the thermodynamic growth 685 term for sea-ice evaluated near or far away from the freezing point of the ocean 686 surface? Adapting the (parent) model code to support the AD tool in providing 687 exact and efficient adjoint code represents the main workload, initially. For 688 legacy code, this task may become substantial but it is fairly straightforward 689 when writing new code with an AD tool in mind. Once this initial task is 690 completed, generating the adjoint code of a new model configuration takes 691 about 10 minutes. 692 693 Acknowledgements 694 This work is a contribution to the ECCO2 project sponsored by the NASA 695 Modeling Analysis and Prediction (MAP) program and to the ECCO-GODAE 696 project sponsored by the National Oceanographic Partnership Program (NOPP). 697 DM carried out this work at JPL/Caltech under contract with NASA. Com- 698 puting resources were provided by NASA/ARC, NCAR/CSL, and JPL/SVF. 699 Careful reviews by the two anonymous reviewers significantly improved the 700 readability of the paper and are gratefully acknowledged. 40 701 References 702 Adcroft, A., Campin, J.-M., Heimbach, P., Hill, C., Marshall, J., 703 2002. Mitgcm release1 manual. (online documentation) 704 EAPS, Cambridge, MA 02139, USA, http://mitgcm.org/sealion/ 705 online documents/manual.html. 706 707 , MIT / Bugnion, V., Hill, C., Stone, P., 2006a. An adjoint analysis of the meridional overturning circulation in an ocean model. J. Clim. 19(15), 3732–3750. 708 Bugnion, V., Hill, C., Stone, P., 2006b. An adjoint analysis of the meridional 709 overturning circulation in a hybrid coupled model. J. Clim. 19(15), 3751– 710 3767. 711 712 713 714 Christianson, B., 1998. Reverse accumulation and implicit functions. Optimisation Methods and Software 9 (4), 307–322. Duliere, V., Fichefet, T., 2007. On the assimilation of ice velocity and concentration data into large-scale sea ice models. Ocean Science 3, 321–335. 715 Fenty, I., 2010. State estimation of the Labrador Sea with a coupled ocean/sea- 716 ice adjoint model. Ph.D. thesis, MIT, Program in Atmosphere, Ocean and 717 Climate (PAOC), Cambridge (MA), USA. 718 Ferreira, D., Marshall, J., Heimbach, P., 2005. Estimating eddy stresses by 719 fitting dynamics to observations using a residual-mean ocean circulation 720 model and its adjoint. J. Phys. Oceanogr. 35(10), 1891–1910. 721 Galanti, E., Tziperman, E., 2003. A midlatitude–ENSO teleconnection mech- 722 anism via baroclinically unstable long Rossby waves. J. Phys. Oceanogr. 33, 723 1877–1887. 724 Galanti, E., Tziperman, E., Harrison, M., Rosati, A., Giering, R., Sirkes, Z., 725 2002. The equatorial thermocline outcropping - a seasonal control on the 726 tropical Pacific ocean-atmosphere instability. J. Clim. 15, 2721–2739. 41 727 728 Giering, R., Kaminski, T., 1998. Recipes for adjoint code construction. ACM Transactions on Mathematical Software 24, 437–474. 729 Giles, M., 2001. On the iterative solution of adjoint equations. In: Corliss, 730 C., Faure, C., Griewank, A., Hascoet, L., Naumann, U. (Eds.), Automatic 731 Differentiation: From Simulation to Optimization. Springer-Verlag, pp. 145– 732 152. 733 Griewank, A., Walther, A., 2008. Evaluating Derivatives. Principles and Tech- 734 niques of Algorithmic Differentiation, 2nd Edition. Vol. 19 of Frontiers in 735 Applied Mathematics. SIAM, Philadelphia. 736 737 Heimbach, P., January 2008. The MITgcm/ECCO adjoint modelling infrastructure. CLIVAR Exchanges 44 (Volume 13, No. 1), 13–17. 738 Heimbach, P., Bugnion, V., 2009. Greenland ice sheet volume sensitivity to 739 basal, surface, and initial conditions, derived from an adjoint model. Annals 740 Glaciol. 52, in press. 741 Heimbach, P., Hill, C., Giering, R., 2005. An efficient exact adjoint of the par- 742 allel MIT general circulation model, generated via automatic differentiation. 743 Future Generation Computer Systems 21(8), 1356–1371. 744 745 746 747 Heimbach, P., Wunsch, C., 2007. Estimating the Circulation and Climate of the Ocean – The ECCO Consortia. U.S. CLIVAR Variations V5N3, . Hibler, III, W. D., 1979. A dynamic thermodynamic sea ice model. J. Phys. Oceanogr. 9 (4), 815–846. 748 Kauker, F., Kaminski, T., Karcher, M., Giering, R., Gerdes, R., Vosbeck, 749 M., 2009. Adjoint analysis of the 2007 all time arctic sea-ice minimum. 750 Geophys. Res. Lett. submitted. 751 Kim, J., Hunke, E., Lipscomb, W., 2006a. Sensitivity analysis and parameter 752 tuning scheme for global sea-ice modeling. Ocean Modelling 14 (1-2), 61–80. 753 Kim, J., Hunke, E., Lipscomb, W., 2006b. A sensitivity-enhanced simulation 42 754 approach for community climate system model. In: Alexandrov, V., van 755 Albada, G., Sloot, P., Dongarra, J. (Eds.), Computational Science – ICCS 756 2006. Vol. 3994, Part IV of Lecture Notes in Computer Science. Springer 757 Verlag, pp. 533–540. 758 759 760 761 Köhl, A., 2005. Anomalies of meridional overturning: Mechanisms in the North Atlantic. J. Phys. Oceanogr. 35(8), 1455–1472. Kwok, R., 2006. Exchange of sea ice between the Arctic Ocean and the Canadian Arctic Archipelago. Geophys. Res. Lett. 33, L16501. 762 Large, W., McWilliams, J., Doney, S., 1994. Oceanic vertical mixing: A review 763 and a model with nonlocal boundary layer parameterization. Rev. Geophys. 764 32, 363–403. 765 Large, W., Yeager, S., 2004. Diurnal to decadal global forcing for ocean 766 and sea-ice models: the data sets and flux climatologies. Technical Note 767 NCAR/TN-460+STR, NCAR, Boulder, CO. 768 Lietaer, O., Fichefet, T., Legat, V., 2008. The effects of resolving the Canadian 769 Arctic Archipelago in a finite element sea ice model. Ocean Modelling 24, 770 140–152. 771 Lisaæter, K., Evensen, G., Laxon, S., 2007. Assimilation of synthetic cryosat 772 sea ice thickness in a coupled ice-ocean model. J. Geophys. Res. 112, C07023. 773 Losch, M., Heimbach, P., 2007. Adjoint sensitivity of an ocean general circu- 774 lation model to bottom topography. J. Phys. Oceanogr. 37(2), 377–393. 775 Losch, M., Menemenlis, D., Campin, J., Heimbach, P., Hill, C., 2010. A 776 dynamic-thermodynamic sea ice model for ocean climate modeling on an 777 arakawa c-grid: Part 1: Forward model sensitivities. Ocean Modelling ac- 778 cepted, . 779 780 Marchuk, G., 1995. Adjoint equations and analysis of complex systems. Kluwer Academic Publishers. 43 781 Marotzke, J., Giering, R., Zhang, K., Stammer, D., Hill, C., Lee, T., 1999. 782 Construction of the adjoint MIT ocean general circulation model and ap- 783 plication to Atlantic heat transport variability. J. Geophys. Res. 104, C12, 784 29,529–29,547. 785 786 Melling, H., 2002. Sea ice of the Northern Canadian Arctic Archipelago. J. Geophys. Res. 107 (C11), 3181. 787 Menemenlis, D., Hill, C., Adcroft, A., Campin, J.-M., Cheng, B., Ciotti, B., 788 Fukumori, I., Koehl, A., Heimbach, P., Henze, C., Lee, T., Stammer, D., 789 Taft, J., Zhang, J., 2005. NASA supercomputer improves prospects for ocean 790 climate research. Eos Trans. AGU 86 (9), 89, 95–96. 791 Michel, C., Ingram, R., Harris, L., 2006. Variability in oceanographic and 792 ecological processes in the Canadian Arctic Archipelago. Prog. Oceanogr. 793 71, 379–401. 794 Miller, P., Laxon, S., Feltham, D., Cresswell, D., 2006. Optimization of a sea 795 ice model using basinwide observations of arctic sea ice thickness, extent, 796 and velocity. J. Clim. 19 (1089-1108). 797 Moore, A., Arango, H., Di Lorenzo, E., Miller, A., Cornuelle, B., 2009. An 798 adjoint sensitivity analysis of the Southern California Current circulation 799 and ecosystem. J. Phys. Oceanogr. 39 (3), 702–720. 800 Münchow, A., Melling, H., Falkner, K., 2006. An observational estimate of 801 volume and freshwater flux leaving the arctic ocean through Nares Strait. 802 J. Phys. Oceanogr. 36 (11), 2025–2041. 803 Panteleev, G., Nechaev, D., Proshutinsky, A., Woodgate, R., Zhang, J., 2010. 804 Reconstruction and analysis of the chukchi sea circulation in 1990-1991. 805 J. Geophys. Res. accepted, . 806 Prinsenberg, S., Hamilton, J., 2005. Monitoring the volume, freshwater 807 and heat fluxes passing though Lancaster Sound in the Canadian Arctic 44 808 Archipelago. Atmosphere-Ocean 43 (1), 1–22. 809 Stammer, D., Wunsch, C., Giering, R., Eckert, C., Heimbach, P., Marotzke, 810 J., Adcroft, A., Hill, C., Marshall, J., 2002a. The global ocean circulation 811 and transports during 1992 – 1997, estimated from ocean observations and 812 a general circulation model. J. Geophys. Res. 107(C9), 3118. 813 814 Stark, J., Ridley, J., Martin, M., Hines, A., 05 2008. Sea ice concentration and motion assimilation in a sea ice-ocean model. J. Geophys. Res. 113. 815 Stoessel, A., 2008. Employing satellite-derived sea ice concentration to con- 816 strain upper-ocean temperature in a global ocean gcm. J. Clim. 21, 4498– 817 4513. 818 Utke, J., Harscoet, L., Heimbach, P., Hill, C., Hovland, P., Naumann, U., 2009. 819 Toward adjointable mpi. In: Proceedings of the 23rd IEEE International 820 Parallel and Distributed Processing Symposium. Vol. in press. Rome, Italy, 821 p. . 822 Utke, J., Naumann, U., Fagan, M., Tallent, N., Strout, M., Heimbach, P., 823 Hill, C., Ozyurt, D., Wunsch, C., 2008. Openad/f: A modular open source 824 tool for automatic differentiation of fortran codes. ACM Transactions on 825 Mathematical Software 34(4), . 826 Veneziani, M., Edwards, C., Moore, A., 2009. A Central California modeling 827 study. part ii: Adjoint sensitivities to local and remote driving mechanisms. 828 J. Geophys. Res. in press, . 829 830 831 832 833 Wessel, P., Smith, W. H. F., 1996. A global self-consistent, hierarchical, highresolution shoreline database. J. Geophys. Res. 101 (B4), 8741–8743. Wunsch, C., 1996. The ocean circulation inverse problem. Cambridge University Press, Cambridge (UK). Wunsch, C., 2006. Discrete Inverse and State Estimation Problems: With Geo- 45 834 835 836 837 838 physical Fluid Applications. Cambridge University Press. Wunsch, C., Heimbach, P., 2007. Practical global oceanic state estimation. Physica D 230(1-2), 197–208. Zhang, J., Hibler III, W. D., 1997. On an efficient numerical method for modeling sea ice dynamics. J. Geophys. Res. 102, 8691–8702. 46

* Your assessment is very important for improving the work of artificial intelligence, which forms the content of this project

Download PDF

advertisement