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

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.3

  ViewVC Help
Powered by ViewVC 1.1.22