/[MITgcm]/MITgcm_contrib/articles/ceaice/ceaice_adjoint.tex
ViewVC logotype

Diff of /MITgcm_contrib/articles/ceaice/ceaice_adjoint.tex

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.1 by dimitri, Tue Feb 26 19:27:26 2008 UTC revision 1.4 by mlosch, Wed Jun 4 13:34:41 2008 UTC
# Line 3  Line 3 
3    
4  \subsection{The adjoint of MITsim}  \subsection{The adjoint of MITsim}
5    
6  The ability to generate tangent linear and adjoint model components  The adjoint model of the MITgcm has become an invaluable
7  of the MITsim has been a main design task.  tool for sensitivity analysis as well as state estimation \citep[for a
8  For the ocean the adjoint capability has proven to be an  recent summary, see][]{heim:08}. The code has been developed and
9  invaluable tool for sensitivity analysis as well as state estimation.  tailored to be readily used with automatic differentiation tools for
10  In short, the adjoint enables very efficient computation of the gradient  adjoint code generation. This route was also taken in developing and
11  of scalar-valued model diagnostics (called cost function or objective function)  adapting the sea-ice compontent MITsim, so that tangent linear and
12  with respect to many model "variables".  adjoint components can be obtained and kept up to date without
13  These variables can be two- or three-dimensional fields of initial  excessive effort.
14  conditions, model parameters such as mixing coefficients, or  
15  time-varying surface or lateral (open) boundary conditions.  The adjoint model operator (ADM) is the transpose of the tangent
16  When combined, these variables span a potentially high-dimensional  linear model operator (TLM) of the full (in general nonlinear) forward
17  (e.g. O(10$^8$)) so-called control space. Performing parameter perturbations  model, in this case the MITsim. This operator computes the gradients
18  to assess model sensitivities quickly becomes prohibitive at these scales.  of scalar-valued model diagnostics (so-called cost function or
19  Alternatively, (time-varying) sensitivities of the objective function  objective function) with respect to many model inputs (so-called
20  to any element of the  control space can be computed very efficiently in  independent or control variables).  These inputs can be two- or
21  one single adjoint  three-dimensional fields of initial conditions of the ocean or sea-ice
22  model integration, provided an efficient adjoint model is available.  state, model parameters such as mixing coefficients, or time-varying
23    surface or lateral (open) boundary conditions.  When combined, these
24  [REFERENCES]  variables span a potentially high-dimensional (e.g.  O(10$^8$))
25    so-called control space. At this problem dimension, perturbing
26    individual parameters to assess model sensitivities quickly becomes
27  The adjoint operator (ADM) is the transpose of the tangent linear operator (TLM)  prohibitive. By contrast, transient sensitivities of the objective
28  of the full (in general nonlinear) forward model, i.e. the MITsim.  function to any element of the control and model state space can be
29  The TLM maps perturbations of elements of the control space  computed very efficiently in one single adjoint model integration,
30  (e.g. initial ice thickness distribution)  provided an adjoint model is available.
31  via the model Jacobian  
32  to a perturbation in the objective function  In anology to the TLM and ADM components of the MITgcm we rely on the
33  (e.g. sea-ice export at the end of the integration interval).  autmomatic differentiation (AD) tool ``Transformation of Algorithms in
34  \textit{Tangent} linearity ensures that the derivatives are evaluated  Fortran'' (TAF) developed by Fastopt \citep{gier-kami:98} to generate
35  with respect to the underlying model trajectory at each point in time.  TLM and ADM code of the MITsim \citep[for details see][]{maro-etal:99,
36  This is crucial for nonlinear trajectories and the presence of different    heim-etal:05}.  In short, the AD tool uses the nonlinear parent
37  regimes (e.g. effect of the seaice growth term at or away from the  model code to generate derivative code for the specified control space
38  freezing point of the ocean surface).  and objective function. Advantages of this approach have been pointed
39  Ensuring tangent linearity can be easily achieved by integrating  out, for example by \cite{gier-kami:98}.
40  the full model in sync with the TLM to provide the underlying model state.  
41  Ensuring \textit{tangent} adjoints is equally crucial, but much more  Many issues of generating efficient exact adjoint sea-ice code are
42  difficult to achieve because of the reverse nature of the integration:  similar to those for the ocean model's adjoint.  Linearizing the model
43  the adjoint accumulates sensitivities backward in time,  around the exact nonlinear model trajectory is a crucial aspect in the
44  starting from a unit perturbation of the objective function.  presence of different regimes (e.g., is the thermodynamic growth term
45  The adjoint model requires the model state in reverse order.  for sea-ice evaluated near or far away from the freezing point of the
46  This presents one of the major complications in deriving an  ocean surface?). Adapting the (parent) model code to support the AD
47  exact, i.e. \textit{tangent} adjoint model.  tool in providing exact and efficient adjoint code represents the main
48    work load initially. For legacy code, this task may become
49  Following closely the development and maintenance of TLM and ADM  substantial, but it is fairly straightforward when writing new code
50  components of the MITgcm we have relied heavily on the  with an AD tool in mind. Once this initial task is completed,
51  autmomatic differentiation (AD) tool  generating the adjoint code of a new model configuration takes about
52  "Transformation of Algorithms in Fortran" (TAF)  10 minutes.
 developed by Fastopt (Giering and Kaminski, 1998)  
 to derive TLM and ADM code of the MITsim.  
 Briefly, the nonlinear parent model is fed to the AD tool which produces  
 derivative code for the specified control space and objective function.  
 Following this approach has (apart from its evident success)  
 several advantages:  
 (1) the adjoint model is the exact adjoint operator of the parent model,  
 (2) the adjoint model can be kept up to date with respect to ongoing  
 development of the parent model, and adjustments to the parent model  
 to extend the automatically generated adjoint are incremental changes  
 only, rather than extensive re-developments,  
 (3) the parallel structure of the parent model is preserved  
 by the adjoint model, ensuring efficient use in high performance  
 computing environments.  
   
 Some initial code adjustments are required to support dependency analysis  
 of the flow reversal and certain language limitations which may lead  
 to irreducible flow graphs (e.g. GOTO statements).  
 The problem of providing the required model state in reverse order  
 at the time of evaluating nonlinear or conditional  
 derivatives is solved via balancing  
 storing vs. recomputation of the model state in a multi-level  
 checkpointing loop.  
 Again, an initial code adjustment is required to support TAFs  
 checkpointing capability.  
 The code adjustments are sufficiently simple so as not to cause  
 major limitations to the full nonlinear parent model.  
 Once in place, an adjoint model of a new model configuration  
 may be derived in about 10 minutes.  
53    
54  [HIGHLIGHT COUPLED NATURE OF THE ADJOINT!]  [HIGHLIGHT COUPLED NATURE OF THE ADJOINT!]
55    
# Line 93  may be derived in about 10 minutes. Line 64  may be derived in about 10 minutes.
64  * approximate adjoints  * approximate adjoints
65    
66    
67  \subsection{An example: sensitivities of sea-ice export through Fram Strait}  \subsection{An example: sensitivities of sea-ice export through
68    the Lancaster and Jones Sound}
69    
70  We demonstrate the power of the adjoint method  We demonstrate the power of the adjoint method
71  in the context of investigating sea-ice export sensitivities through Fram Strait  in the context of investigating sea-ice export sensitivities through
72  (for details of this study see Heimbach et al., 2007).  Lancaster and Jones Sound. The rationale for doing so is to complement
73  %\citep[for details of this study see][]{heimbach07}. %Heimbach et al., 2007).  the analysis of sea-ice dynamics in the presence of narrow straits.
74  The domain chosen is a coarsened version of the Arctic face of the  Lancaster Sound is one of the main outflow paths of sea-ice flowing
75    through the Canadian Arctic Archipelago (CAA).
76    Export sensitivities reflect dominant
77    pathways through the CAA as resolved by the model.
78    Sensitivity maps can shed a very detailed light on various quantities
79    affecting the sea-ice export (and thus the underlying pathways).
80    Note that while the dominant circulation through Lancaster Sound is
81    toward the East, there is a small Westward flow to the North,
82    hugging the coast of Devon Island [ARE WE RESOLVING THIS?],
83    see e.g. \cite{mell:02, mich-etal:06,muen-etal:06}.
84    
85    The model domain is a coarsened version of the Arctic face of the
86  high-resolution cubed-sphere configuration of the ECCO2 project  high-resolution cubed-sphere configuration of the ECCO2 project
87  \citep[see][]{menemenlis05}. It covers the entire Arctic,  \citep[see][]{menemenlis05}. It covers the entire Arctic,
88  extends into the North Pacific such as to cover the entire  extends into the North Pacific such as to cover the entire
# Line 112  The adjoint models run efficiently on 80 Line 95  The adjoint models run efficiently on 80
95  (benchmarks have been performed both on an SGI Altix as well as an  (benchmarks have been performed both on an SGI Altix as well as an
96  IBM SP5 at NASA/ARC).  IBM SP5 at NASA/ARC).
97    
98  Following a 1-year spinup, the model has been integrated for four  Following a 3-year spinup, the model has been integrated for four
99  years between 1992 and 1995. It is forced using realistic 6-hourly  years and five months between January 1989 and May 1993.
100    It is forced using realistic 6-hourly
101  NCEP/NCAR atmospheric state variables. Over the open ocean these are  NCEP/NCAR atmospheric state variables. Over the open ocean these are
102  converted into air-sea fluxes via the bulk formulae of  converted into air-sea fluxes via the bulk formulae of
103  \citet{large04}.  Derivation of air-sea fluxes in the presence of  \citet{large04}.  Derivation of air-sea fluxes in the presence of
104  sea-ice is handled by the ice model as described in \refsec{model}.  sea-ice is handled by the ice model as described in \refsec{model}.
105  The objective function chosen is sea-ice export through Fram Strait  The objective function is chosen $J$ as the
106  computed for December 1995.  The adjoint model computes sensitivities  sea-ice export through
107  to sea-ice export back in time from 1995 to 1992 along this  Lancaster Sound at XX$^{\circ}$W
108    averaged over an 8-month period between October 1992 and May 1993.  
109    
110    The adjoint model computes sensitivities
111    to sea-ice export back in time from 1993 to 1989 along this
112  trajectory.  In principle all adjoint model variable (i.e., Lagrange  trajectory.  In principle all adjoint model variable (i.e., Lagrange
113  multipliers) of the coupled ocean/sea-ice model are available to  multipliers) of the coupled ocean/sea-ice model
114  analyze the transient sensitivity behaviour of the ocean and sea-ice  as well as the surface atmospheric state are available to
115  state.  Over the open ocean, the adjoint of the bulk formula scheme  analyze the transient sensitivity behaviour.  
116    Over the open ocean, the adjoint of the bulk formula scheme
117  computes sensitivities to the time-varying atmospheric state.  Over  computes sensitivities to the time-varying atmospheric state.  Over
118  ice-covered parts, the sea-ice adjoint converts surface ocean  ice-covered parts, the sea-ice adjoint converts surface ocean
119  sensitivities to atmospheric sensitivities.  sensitivities to atmospheric sensitivities.
120    
121    DISCUSS FORWARD STATE, INCLUDING SOME NUMBERS ON SEA-ICE EXPORT
122    
123    \subsection{Sensitivities to the sea-ice state}
124    
125    \paragraph{Sensitivities to the sea-ice thickness}
126    
127    The most readily interpretable ice-export sensitivity is that
128    to effective ice thickness, $\partial{J} / \partial{h}$.
129    Fig. XXX depcits transient $\partial{J} / \partial{h}$ using free-slip
130    (left column) and no-slip (right column) boundary conditions.
131    Sensitivity snapshots are depicted for (from top to bottom)
132    12, 24, 36, and 48 months prior to May 2003.
133    The dominant features are\ml{ in accordance with expectations/as expected}:
134    
135    (*)
136    Dominant pattern (for the free-slip run) is that of positive sensitivities, i.e.
137    a unit increase in sea-ice thickness in most places upstream
138    of Lancaster Sound will increase sea-ice export through Lancaster Sound.
139    The dominant pathway follows (backward in time) through Barrow Strait
140    into Viscount Melville Sound, and from there trough M'Clure Strait
141    into the Arctic Ocean (the "Northwest Passage").
142    Secondary paths are Northward from
143    Viscount Melville Sound through Byam Martin Channel into
144    Prince Gustav Adolf Sea and through Penny Strait into MacLean Strait.
145    
146    (*)
147    As expected, at any given time the
148    region of influence is larger for the free-slip than no-slip simulation.
149    For the no-slip run, the region of influence is confined, after four years,
150    to just West of Barrow Strait (North of Prince of Wales Island),
151    and to the South of Penny Strait.
152    In contrast, sensitivities of the free-slip run extend
153    all the way to the Arctic interior both to the West
154    (M'Clure St.) and to the North (Ballantyne St., Prince Gustav Adolf Sea,
155    Massey Sound).
156    
157    (*)
158    sensitivities seem to spread out in "pulses" (seasonal cycle)
159    [PLOT A TIME SERIES OF ADJheff in Barrow Strait)
160    
161    (*)
162    The sensitivity in Baffin Bay are more complex.
163    The pattern evolves along the Western boundary, connecting
164    the Lancaster Sound Polynya, the Coburg Island Polynya, and the
165    North Water Polynya, and reaches into Nares Strait and the Kennedy Channel.
166    The sign of sensitivities has an oscillatory character
167    [AT FREQUENCY OF SEASONAL CYCLE?].
168    First, we need to establish whether forward perturbation runs
169    corroborate the oscillatory behaviour.
170    Then, several possible explanations:
171    (i) connection established through Nares Strait throughflow
172    which extends into Western boundary current in Northern Baffin Bay.
173    (ii) sea-ice concentration there is seasonal, i.e. partly
174    ice-free during the year. Seasonal cycle in sensitivity likely
175    connected to ice-free vs. ice-covered parts of the year.
176    Negative sensitivities can potentially be attributed
177    to blocking of Lancaster Sound ice export by Western boundary ice
178    in Baffin Bay.
179    (iii) Alternatively to (ii), flow reversal in Lancaster Sound is a possibility
180    (in reality there's a Northern counter current hugging the coast of
181    Devon Island which we probably don't resolve).
182    
183    Remote control of Kennedy Channel on Lancaster Sound ice export
184    seems a nice test for appropriateness of free-slip vs. no-slip BCs.
185    
186    \paragraph{Sensitivities to the sea-ice area}
187    
188    Fig. XXX depcits transient sea-ice export sensitivities
189    to changes in sea-ice concentration
190     $\partial J / \partial area$ using free-slip
191    (left column) and no-slip (right column) boundary conditions.
192    Sensitivity snapshots are depicted for (from top to bottom)
193    12, 24, 36, and 48 months prior to May 2003.
194    Contrary to the steady patterns seen for thickness sensitivities,
195    the ice-concentration sensitivities exhibit a strong seasonal cycle
196    in large parts of the domain (but synchronized on large scale).
197    The following discussion is w.r.t. free-slip run.
198    
199    (*)
200    Months, during which sensitivities are negative:
201    \\
202    0 to 5   Db=N/A, Dr=5 (May-Jan) \\
203    10 to 17 Db=7, Dr=5 (Jul-Jan) \\
204    22 to 29 Db=7, Dr=5 (Jul-Jan) \\
205    34 to 41 Db=7, Dr=5 (Jul-Jan) \\
206    46 to 49 D=N/A \\
207    %
208    These negative sensitivities seem to be connected to months
209    during which main parts of the CAA are essentially entirely ice-covered.
210    This means that increase in ice concentration during this period
211    will likely reduce ice export due to blocking
212    [NEED TO EXPLAIN WHY THIS IS NOT THE CASE FOR dJ/dHEFF].
213    Only during periods where substantial parts of the CAA are
214    ice free (i.e. sea-ice concentration is less than one in larger parts of
215    the CAA) will an increase in ice-concentration increase ice export.
216    
217    (*)
218    Sensitivities peak about 2-3 months before sign reversal, i.e.
219    max. negative sensitivities are expected end of July
220    [DOUBLE CHECK THIS].
221    
222    (*)
223    Peaks/bursts of sensitivities for months
224    14-17, 19-21, 27-29, 30-33, 38-40, 42-45
225    
226    (*)
227    Spatial "anti-correlation" (in sign) between main sensitivity branch
228    (essentially Northwest Passage and immediate connecting channels),
229    and remote places.
230    For example: month 20, 28, 31.5, 40, 43.
231    The timings of max. sensitivity extent are similar between
232    free-slip and no-slip run; and patterns are similar within CAA,
233    but differ in the Arctic Ocean interior.
234    
235    (*)
236    Interesting (but real?) patterns in Arctic Ocean interior.
237    
238    \paragraph{Sensitivities to the sea-ice velocity}
239    
240    (*)
241    Patterns of ADJuice at almost any point in time are rather complicated
242    (in particular with respect to spatial structure of signs).
243    Might warrant perturbation tests.
244    Patterns of ADJvice, on the other hand, are more spatially coherent,
245    but still hard to interpret (or even counter-intuitive
246    in many places).
247    
248    (*)
249    "Growth in extent of sensitivities" goes in clear pulses:
250    almost no change between months: 0-5, 10-20, 24-32, 36-44
251    These essentially correspond to months of
252    
253    
254    \subsection{Sensitivities to the oceanic state}
255    
256    \paragraph{Sensitivities to theta}
257    
258    \textit{Sensitivities at the surface (z = 5 m)}
259    
260    (*)
261    mabye redo with caxmax=0.02 or even 0.05
262    
263    (*)
264    Core of negative sensitivities spreading through the CAA as
265    one might expect [TEST]:
266    Increase in SST will decrease ice thickness and therefore ice export.
267    
268    (*)
269    What's maybe unexpected is patterns of positive sensitivities
270    at the fringes of the "core", e.g. in the Southern channels
271    (Bellot St., Peel Sound, M'Clintock Channel), and to the North
272    (initially MacLean St., Prince Gustav Adolf Sea, Hazen St.,
273    then shifting Northward into the Arctic interior).
274    
275    (*)
276    Marked sensitivity from the Arctic interior roughly along 60$^{\circ}$W
277    propagating into Lincoln Sea, then
278    entering Nares Strait and Smith Sound, periodically
279    warming or cooling[???] the Lancaster Sound exit.
280    
281    \textit{Sensitivities at depth (z = 200 m)}
282    
283    (*)
284    Negative sensitivities almost everywhere, as might be expected.
285    
286    (*)
287    Sensitivity patterns between free-slip and no-slip BCs
288    are quite similar, except in Lincoln Sea (North of Nares St),
289    where the sign is reversed (but pattern remains similar).
290    
291    \paragraph{Sensitivities to salt}
292    
293    T.B.D.
294    
295    \paragraph{Sensitivities to velocity}
296    
297    T.B.D.
298    
299    \subsection{Sensitivities to the atmospheric state}
300    
301    \begin{itemize}
302    %
303    \item
304    plot of ATEMP for 12, 24, 36, 48 months
305    %
306    \item
307    plot of HEFF for 12, 24, 36, 48 months
308    %
309    \end{itemize}
310    
311    
312    
313  \reffig{4yradjheff}(a--d) depict sensitivities of sea-ice export  \reffig{4yradjheff}(a--d) depict sensitivities of sea-ice export
314  through Fram Strait in December 1995 to changes in sea-ice thickness  through Fram Strait in December 1995 to changes in sea-ice thickness
315  12, 24, 36, 48 months back in time. Corresponding sensitivities to  12, 24, 36, 48 months back in time. Corresponding sensitivities to
# Line 152  Primary features are the effect of the h Line 333  Primary features are the effect of the h
333  Atlantic current which feeds into the West Spitsbergen current,  Atlantic current which feeds into the West Spitsbergen current,
334  the circulation around Svalbard, and ...  the circulation around Svalbard, and ...
335    
336    
337    \ml{[based on the movie series
338      zzz\_run\_export\_canarch\_freeslip\_4yr\_1989\_ADJ*:]} The ice
339    export through the Canadian Archipelag is highly sensitive to the
340    previous state of the ocean-ice system in the Archipelago and the
341    Western Arctic. According to the \ml{(adjoint)} senstivities of the
342    eastward ice transport through Lancaster Sound (\reffig{arctic_topog},
343    cross-section G) with respect to ice volume (effective thickness), ocean
344    surface temperature, and vertical diffusivity near the surface
345    (\reffig{fouryearadj}) after 4 years of integration the following
346    mechanisms can be identified: near the ``observation'' (cross-section
347    G), smaller vertical diffusivities lead to lower surface temperatures
348    and hence to more ice that is available for export. Further away from
349    cross-section G, the sensitivity to vertical diffusivity has the
350    opposite sign, but temperature and ice volume sensitivities have the
351    same sign as close to the observation.
352    
353  \begin{figure}[t!]  \begin{figure}[t!]
354  \centerline{  \centerline{
355  \subfigure[{\footnotesize -12 months}]  \subfigure[{\footnotesize -12 months}]
# Line 161  the circulation around Svalbard, and ... Line 359  the circulation around Svalbard, and ...
359  \subfigure[{\footnotesize -24 months}]  \subfigure[{\footnotesize -24 months}]
360  {\includegraphics*[width=0.44\linewidth]{\fpath/run_4yr_ADJheff_arc_lev1_tim145_cmax2.0E+02.eps}}  {\includegraphics*[width=0.44\linewidth]{\fpath/run_4yr_ADJheff_arc_lev1_tim145_cmax2.0E+02.eps}}
361  }  }
362    %
 \centerline{  
 \subfigure[{\footnotesize  
 -36 months}]  
 {\includegraphics*[width=0.44\linewidth]{\fpath/run_4yr_ADJheff_arc_lev1_tim218_cmax2.0E+02.eps}}  
 %  
 \subfigure[{\footnotesize  
 -48 months}]  
 {\includegraphics*[width=0.44\linewidth]{\fpath/run_4yr_ADJheff_arc_lev1_tim292_cmax2.0E+02.eps}}  
 }  
363  \caption{Sensitivity of sea-ice export through Fram Strait in December 2005 to  \caption{Sensitivity of sea-ice export through Fram Strait in December 2005 to
364  sea-ice thickness at various prior times.  sea-ice thickness at various prior times.
365  \label{fig:4yradjheff}}  \label{fig:4yradjheff}}
366  \end{figure}  \end{figure}
367    
368    
369  \begin{figure}[t!]  %%% Local Variables:
370  \centerline{  %%% mode: latex
371  \subfigure[{\footnotesize -12 months}]  %%% TeX-master: "ceaice"
372  {\includegraphics*[width=0.44\linewidth]{\fpath/run_4yr_ADJtheta_arc_lev1_tim072_cmax5.0E+01.eps}}  %%% End:
 %\includegraphics*[width=.3\textwidth]{H_c.bin_res_100_lev1.pdf}  
 %  
 \subfigure[{\footnotesize -24 months}]  
 {\includegraphics*[width=0.44\linewidth]{\fpath/run_4yr_ADJtheta_arc_lev1_tim145_cmax5.0E+01.eps}}  
 }  
   
 \centerline{  
 \subfigure[{\footnotesize  
 -36 months}]  
 {\includegraphics*[width=0.44\linewidth]{\fpath/run_4yr_ADJtheta_arc_lev1_tim218_cmax5.0E+01.eps}}  
 %  
 \subfigure[{\footnotesize  
 -48 months}]  
 {\includegraphics*[width=0.44\linewidth]{\fpath/run_4yr_ADJtheta_arc_lev1_tim292_cmax5.0E+01.eps}}  
 }  
 \caption{Same as \reffig{4yradjheff} but for sea surface temperature  
 \label{fig:4yradjthetalev1}}  
 \end{figure}  

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.4

  ViewVC Help
Powered by ViewVC 1.1.22