1 | \magnification =\magstep1 |
---|
2 | \count0=90 |
---|
3 | %definitions |
---|
4 | |
---|
5 | %end of definitions |
---|
6 | |
---|
7 | |
---|
8 | \centerline{ Olivier Thual, June 30$^{\rm th}$ 1992} |
---|
9 | \bigskip |
---|
10 | |
---|
11 | \centerline{\bf SIMPLE OCEAN-ATMOSPHERE INTERPOLATION.} |
---|
12 | \centerline{\bf PART B: SOFTWARE IMPLEMENATION} |
---|
13 | |
---|
14 | |
---|
15 | \bigskip |
---|
16 | |
---|
17 | |
---|
18 | A set of FORTRAN subroutines constitutes an implementation the ``naive'' |
---|
19 | grid-to-grid interpolation method which has been exposed in the previous |
---|
20 | Part A of this letter. This implementation is tested for both idealized, |
---|
21 | EMERAUDE or OPA grids, masks and scalar fields. These |
---|
22 | subroutines can be used in the first version the ocean-atmosphere coupler. |
---|
23 | |
---|
24 | |
---|
25 | |
---|
26 | |
---|
27 | |
---|
28 | \beginsection 1. INTRODUCTION |
---|
29 | |
---|
30 | Coupling two atmospheric and oceanic general circulation models (AGCM |
---|
31 | and OGCM) having two different grids and sea-land masks, requires the |
---|
32 | interpolation of fluxes from the atmosphere to the ocean grids and of the |
---|
33 | sea surface temperature (SST) in the reverse direction. A simple method |
---|
34 | to perform these interpolations have been presented in the previous Epicoa |
---|
35 | Letter [1] called ``Simple ocean-atmosphere interpolation. Part A: the method'' as a |
---|
36 | particular case of a more general class of interpolations based on |
---|
37 | optimization theory (Lagrangian formalism). |
---|
38 | |
---|
39 | \medskip |
---|
40 | |
---|
41 | The name of ``naive method'' which has been given to denote one of the simplest |
---|
42 | interpolation among this class, comes from the motivations |
---|
43 | which have governed its implementation. It was designed with simplicity |
---|
44 | requirement and short deadlines in order to reach as quickly as possible a |
---|
45 | first version of an ocean-atmosphere coupler. A more ``sovarphisticated |
---|
46 | method'' is beeing studied in parallel by Norman BARTH [2]. This method |
---|
47 | imposes the conservation of the field integral on each mesh of the coarser |
---|
48 | grid, and requires, in order to satisfy these multiple constraints, the |
---|
49 | mutiplication by matrices of the coarser grid size square for each |
---|
50 | interpolation. |
---|
51 | |
---|
52 | A lot of the concepts which are used in the ``naive method'', comes from |
---|
53 | the ones that are considered in the ``sovarphisticated method'' [3,2], but retain |
---|
54 | only the low cost ones. The coupler will offer the possibility of choosing |
---|
55 | between the ``naive'' or ``sovarphisticated'' methods, depending on various |
---|
56 | constraints (memory space, computer time, efficiency, accuracy, etc...). |
---|
57 | Other methods, like the one of Philippe DANDIN [4], will also be pluged into |
---|
58 | the coupler. |
---|
59 | |
---|
60 | |
---|
61 | |
---|
62 | |
---|
63 | |
---|
64 | \medskip |
---|
65 | |
---|
66 | |
---|
67 | |
---|
68 | |
---|
69 | |
---|
70 | The ``naive method'' can be summarized in few words: knowing the values |
---|
71 | of a field on a source grid, the values on a point of the target grid is |
---|
72 | calculated by summing the values if its $L$th closest neighbors, with a |
---|
73 | weight which quicky decreases with the interdistance. |
---|
74 | |
---|
75 | |
---|
76 | |
---|
77 | \medskip |
---|
78 | |
---|
79 | In Section 2, I recall the definition of the ``naive method'' in a concise |
---|
80 | way. In Section 3, I briefly |
---|
81 | describe the ``naive method library'', which is the set of FORTRAN |
---|
82 | subroutines that I have written to implement the method, and focus on the |
---|
83 | visible part of the iceberg that the coupler will need to know. Some basic |
---|
84 | tests of this method are presented, showing that there is no trivial bug |
---|
85 | left. |
---|
86 | |
---|
87 | |
---|
88 | |
---|
89 | |
---|
90 | |
---|
91 | |
---|
92 | |
---|
93 | |
---|
94 | |
---|
95 | \beginsection 2. THE NAIVE METHOD |
---|
96 | |
---|
97 | In Part A of this letter [1] general considerations about grid-to-grid |
---|
98 | interpolation have been presented, and a ``simple ocean-atmosphere method'' have be |
---|
99 | presented in this general framework. Here I only present the materials |
---|
100 | necessary to its implementation. |
---|
101 | |
---|
102 | |
---|
103 | |
---|
104 | \beginsection 2.1 Interpolation without constraints (SST) |
---|
105 | |
---|
106 | Let $(b_j), j=1,N^b$ be the SST (sea surface temperature) on the ocean grid |
---|
107 | B, defined by the points $(r^b_j), j=1,N^b$. Only the umasked points are |
---|
108 | considered in this definition of the grids and the following formula. The |
---|
109 | values $(a_i), i=1,N^a$ of the SST on the atmospheric grid A, defined by |
---|
110 | the points $(r^a_i), i=1,N^a$, are given, in the naive method, by: |
---|
111 | $$ |
---|
112 | a_i={1\over Z^b( r^a_i)} \sum_{m\in J(r_i^a)} b_i \; |
---|
113 | \phi\left( {\left| r_j^b-r_i^a\right| \over \sigma_b } \right) |
---|
114 | \eqno(2.1)\; , |
---|
115 | $$ |
---|
116 | where $J(r)=\{j_1(r), j_2(r), ..., j_{L^b}(r)\}$ is the set containing the |
---|
117 | indices of the $L^b$ closest neighbors $r_m^b$ in grid B, of a point $r$ |
---|
118 | located anywhere, and the normalizing function $Z^b$, defined for all grids |
---|
119 | points of the gird A is: |
---|
120 | $$ |
---|
121 | Z^b( r^a_i)= \sum_{m\in J(r_i^a)} |
---|
122 | \phi\left( {\left| r_j^b-r_i^a\right| \over \sigma_b } \right) \; . |
---|
123 | \eqno(2.2) |
---|
124 | $$ |
---|
125 | |
---|
126 | |
---|
127 | |
---|
128 | In its present implementation the weight function $\phi$ is a gaussian: |
---|
129 | $$ |
---|
130 | \phi(u) = e^{-u^2 \over 2} |
---|
131 | \eqno(2.3) \;. |
---|
132 | $$ |
---|
133 | |
---|
134 | The variance $ \sigma_b$ is of the order one or two times the average |
---|
135 | mesh size of the grid B. Other choices of the weight functions are |
---|
136 | discussed below. |
---|
137 | |
---|
138 | |
---|
139 | |
---|
140 | |
---|
141 | |
---|
142 | |
---|
143 | |
---|
144 | |
---|
145 | |
---|
146 | |
---|
147 | |
---|
148 | \beginsection 2.2 Summary of the Lagrangian formalism |
---|
149 | |
---|
150 | As explained in Part A [1], the extension of the above grid-to-grid |
---|
151 | interpolation to an interpolation with constraints can be defined through a |
---|
152 | formalism in which a Lagrangian functionnal is to be minimized under |
---|
153 | these constraints. |
---|
154 | |
---|
155 | |
---|
156 | |
---|
157 | In this formalism, both the source grid A (on which $N^a$ values $a_i$ are |
---|
158 | known) and the target grid B (on which $N^b$ values $b_i$ are to be found) |
---|
159 | are associated to an interpolation which reads: |
---|
160 | |
---|
161 | $$ |
---|
162 | f(r)= \sum_{i=1}^{N^a} a_i \varphi_i(r) |
---|
163 | \eqno(2.4) |
---|
164 | $$ |
---|
165 | for grid A, which is made of $N^a$ grid points, and |
---|
166 | $$ |
---|
167 | g(r)= \sum_{j=1}^{N^b} b_j \psi_j(r) |
---|
168 | \eqno(2.5) |
---|
169 | $$ |
---|
170 | for grid B, which is made of $N^b$ grid points. |
---|
171 | |
---|
172 | |
---|
173 | |
---|
174 | If we impose that the equality of the integrals of the two functions $f$ |
---|
175 | and $g$ (fluxes) on the two respective domains that the two grids are |
---|
176 | covering, a constrained interpolation method is defined by the |
---|
177 | minimization of the Lagrangian: |
---|
178 | $$ |
---|
179 | L(b_1,b_2,...,b_{N^b}) = \int [f(r)-g(r)]^2 \; dr + |
---|
180 | \lambda \int [f(r)-g(r)] \; dr |
---|
181 | \eqno(2.6) |
---|
182 | $$ |
---|
183 | subject to the constraints $ \int [f(r)-g(r)] \; dr =0$. |
---|
184 | |
---|
185 | With the matrix notations $B=(b_j)$, $A=(a_i)$, $H=(\int \psi_j dr)$, $G=(\int |
---|
186 | \varphi_i dr)$ and $V=(\int \psi_m \psi_j dr)$, where $i=1,N^a$ and $j$ |
---|
187 | or $m=1,N^b$, the solution of the minimization of $L$, subject to the |
---|
188 | constraint $HB=GA$, is given by $B=B^*-\lambda |
---|
189 | V^{-1}H$, where $B^*= V^{-1}UA$ is the solution without constraint and |
---|
190 | $\lambda$, the Lagragian multiplicator, is given by |
---|
191 | $$ |
---|
192 | \lambda= { HB^*-GA \over HV^{-1}H} |
---|
193 | \eqno(2.7) \;. |
---|
194 | $$ |
---|
195 | |
---|
196 | |
---|
197 | |
---|
198 | The solution with constraints reads, in its final form |
---|
199 | $$ |
---|
200 | \eqalign{ |
---|
201 | B=& B^* -{ HB^* - GA \over HV^{-1}H } V^{-1}H \cr |
---|
202 | =& V^{-1}UA- {HV^{-1}UA - GA\over HV^{-1}H} V^{-1}H } |
---|
203 | \eqno(2.8) \;. |
---|
204 | $$ |
---|
205 | (NB: this expression |
---|
206 | and Equation 2.6 gives the errata of Equations 4.4, 4.6 and 4.7 of the first |
---|
207 | version {\bf 0615} of the Part A |
---|
208 | of this letter, now revised [1]). |
---|
209 | |
---|
210 | \beginsection 2.3 Interpolation with one constraint (Flux) |
---|
211 | |
---|
212 | The easiest implementation of the above interpolation with constraint is |
---|
213 | obtained when $V$ is the unity matrix, that is when the interpolation |
---|
214 | associated with the target grid is the ``closest neighbor'' interpolation |
---|
215 | (see Part A [1] for details). |
---|
216 | |
---|
217 | |
---|
218 | |
---|
219 | The above naive method, combined with this global conservation constraint |
---|
220 | of the integrals over the two domains (total fluxes) read: |
---|
221 | |
---|
222 | $$ |
---|
223 | b_j=b^*_j - \lambda h_j |
---|
224 | \eqno(2.9) |
---|
225 | $$ |
---|
226 | where the unconstrained solution is |
---|
227 | $$ |
---|
228 | b^*_j={1\over Z^a( r^b_j)} \sum_{m\in I(r_j^b)} a_i |
---|
229 | \phi\left( {\left| r_i^a-r_j^b\right| \over \sigma_a } \right) |
---|
230 | \eqno(2.10)\; , |
---|
231 | $$ |
---|
232 | and the Lagrangian multiplier is given by |
---|
233 | $$ |
---|
234 | \lambda = {\sum_{j=1}^{N^b} h_j b^*_j - \sum_{i=1}^{N^a} g_i a^*_i |
---|
235 | \over \sum_{j=1}^{N^b} h_j h_j } |
---|
236 | \eqno(2.11) |
---|
237 | $$ |
---|
238 | where $I(r)=\{i_1(r), i_2(r), ..., i_{L^b}(r)\}$ is the set containing the indices |
---|
239 | of the $L^a$ closest neighbors $r_m^a$ in grid A, of a point $r$ located |
---|
240 | anywhere, and the normalizing function $Z^a$, defined for all grids points |
---|
241 | of the gird B is: |
---|
242 | $$ |
---|
243 | Z^a( r^b_j)= \sum_{m\in I(r_j^b)} |
---|
244 | \phi\left( {\left| r_i^a-r_j^b\right| \over \sigma_a } \right) \; . |
---|
245 | \eqno(2.12) |
---|
246 | $$ |
---|
247 | |
---|
248 | |
---|
249 | |
---|
250 | In the above expressions, $h_j$ is the area of the grid B meshes (see Part |
---|
251 | A [1]) and |
---|
252 | $$ |
---|
253 | g_i= \int {1\over Z^a( r)} \phi\left( {\left|r- r_i^a\right| \over \sigma_a |
---|
254 | }\right)\; dr |
---|
255 | \eqno(2.12) |
---|
256 | $$ |
---|
257 | |
---|
258 | In the present implementation of the software, these coefficients have been |
---|
259 | approximated by the surface of the meshes, i.e., $g_i$ is |
---|
260 | the surface of the set of all the points which admit $r_i^a$ as their |
---|
261 | closest neighbor. This is as if the closest neighbor |
---|
262 | interpolation were chosen in the constraint, while another interpolation is |
---|
263 | chosen in the quadratic term of the Lagrangain. |
---|
264 | However, in the future evolution of the |
---|
265 | software, more elabored values of $g_i$ will be possible. |
---|
266 | |
---|
267 | |
---|
268 | |
---|
269 | |
---|
270 | |
---|
271 | \vfill\eject |
---|
272 | |
---|
273 | |
---|
274 | |
---|
275 | |
---|
276 | |
---|
277 | |
---|
278 | |
---|
279 | |
---|
280 | |
---|
281 | \beginsection 3. IMPLEMENTATION OF THE METHOD |
---|
282 | |
---|
283 | The above method have been implemented through a set of FORTRAN subroutines |
---|
284 | which constitutes the ``naive method library''. Some practical details |
---|
285 | are given in view of its use in the coupler, or for testing purposes. |
---|
286 | A first set of basic tests |
---|
287 | is shown, and the future evolution of this library is hinted. |
---|
288 | |
---|
289 | |
---|
290 | |
---|
291 | \beginsection 3.1 The ``naive method library'' |
---|
292 | |
---|
293 | The directory |
---|
294 | {\tt greenh@cerfacs.fr:/usr1/pub/numlab/naiv} contains a software |
---|
295 | environment and a set of subroutines constituting the current |
---|
296 | implementation of the ``naive'' grid-to-grid interpolation method. These |
---|
297 | FORTRAN subroutines have been written following the DOCTOR norm [5, 6]. |
---|
298 | A main program performs various tests of these subroutines, and give |
---|
299 | examples of the use of theses subroutines. |
---|
300 | |
---|
301 | |
---|
302 | |
---|
303 | \bigskip |
---|
304 | |
---|
305 | |
---|
306 | |
---|
307 | The initialization of the grids, the masks and the fields is dependant of the |
---|
308 | atmospheric and oceanic GCMs to be coupled, and will communicated by |
---|
309 | them to the coupler independantly of the interpolation task. However, the |
---|
310 | present library also contains subroutines which generates academic grids, |
---|
311 | masks or fields for testing purposes, and, so far, the initialization of a |
---|
312 | 128x64 EMERAUDE grid, a 228x94 OPA-Pacific grid and some EMERAUDE |
---|
313 | fluxes. Extension to other realistic grids for testing purposes are planned. |
---|
314 | |
---|
315 | |
---|
316 | \beginsection 3.2 A first draft for a manual |
---|
317 | |
---|
318 | This library is written is such a way that only a few items |
---|
319 | need to be visible from the coupler. The names of these subroutines |
---|
320 | start with {\tt NA}. These high level subroutines call basic subroutines |
---|
321 | with, most of the time, |
---|
322 | a name starting with {\tt PL}. |
---|
323 | A very preliminary draft is given through the name of these |
---|
324 | subroutines. |
---|
325 | |
---|
326 | |
---|
327 | \medskip |
---|
328 | \medskip |
---|
329 | \noindent{\bf Include files} |
---|
330 | \medskip |
---|
331 | |
---|
332 | These are, at first, three include files containing the commons which |
---|
333 | describe the grids: |
---|
334 | |
---|
335 | |
---|
336 | |
---|
337 | \medskip |
---|
338 | |
---|
339 | \item{}{\tt NAGRA.H}, containing the common for the arrays of grid A (e.g. |
---|
340 | atmsopheric). |
---|
341 | |
---|
342 | |
---|
343 | |
---|
344 | \medskip |
---|
345 | |
---|
346 | \item{}{\tt NAGRB.H}, containing the common for the arrays grid B (e.g. |
---|
347 | ocean). |
---|
348 | |
---|
349 | |
---|
350 | |
---|
351 | \medskip |
---|
352 | |
---|
353 | \item{}{\tt NAGAB.H}, containing the commons for the weight arrays used |
---|
354 | in the grid-to-grid interpolations. |
---|
355 | |
---|
356 | |
---|
357 | |
---|
358 | \medskip |
---|
359 | \medskip |
---|
360 | \noindent{\bf Grid initializations subroutines} |
---|
361 | \medskip |
---|
362 | |
---|
363 | The two first sets of commons of {\tt NAGRA.H} and {\tt NABRB.H}, for grid |
---|
364 | A and grid B, can be initialized by the subroutines: |
---|
365 | |
---|
366 | |
---|
367 | |
---|
368 | \medskip |
---|
369 | |
---|
370 | \item{} {\tt NAGRDA }, to initialize idealized A grids. |
---|
371 | |
---|
372 | |
---|
373 | |
---|
374 | \medskip |
---|
375 | |
---|
376 | \item{} {\tt NAGRDB }, to initialize idealized B grids. |
---|
377 | |
---|
378 | |
---|
379 | |
---|
380 | \medskip |
---|
381 | |
---|
382 | \item{} {\tt NAGMRO }, to initialize the A grid from the EMERAUDE |
---|
383 | 128x64 global grid. |
---|
384 | |
---|
385 | |
---|
386 | |
---|
387 | \medskip |
---|
388 | |
---|
389 | \item{} {\tt NAGOPA}, to initialize idealized B grid from the OPA |
---|
390 | 226x94 Pacific grid. |
---|
391 | |
---|
392 | |
---|
393 | |
---|
394 | |
---|
395 | \medskip |
---|
396 | \medskip |
---|
397 | \noindent{\bf Interpolations subroutines} |
---|
398 | \medskip |
---|
399 | |
---|
400 | The last set of common, in {\tt NAGAB.H} are calculated in the subourtine: |
---|
401 | |
---|
402 | \medskip |
---|
403 | |
---|
404 | \item{} {\tt NASET(amesh,bmesh)}, |
---|
405 | to initialize the weight arrays of the interpolation, given the variances |
---|
406 | of the weight functions {\tt amesh} and {\tt amesh}. |
---|
407 | |
---|
408 | |
---|
409 | \medskip |
---|
410 | |
---|
411 | |
---|
412 | |
---|
413 | Once the three initialisations are done, the grid A to grid B, and grid B to |
---|
414 | grid A interpolations are performed by the two subroutines: |
---|
415 | |
---|
416 | |
---|
417 | |
---|
418 | \medskip |
---|
419 | |
---|
420 | |
---|
421 | |
---|
422 | \item{} {\tt NASST(ssta,sstb)}, to interpolate a field from grid B to |
---|
423 | grid A without constraint |
---|
424 | (e.g. the SST). |
---|
425 | |
---|
426 | \medskip |
---|
427 | |
---|
428 | \item{} {\tt NAFLUX(fluxb,fluxa)}, to interpolate a field from grid A to |
---|
429 | grid B while conserving |
---|
430 | its average between the two unmasked domains (e.g., fluxes). |
---|
431 | |
---|
432 | \medskip |
---|
433 | \medskip |
---|
434 | \noindent{\bf Basic subroutines} |
---|
435 | \medskip |
---|
436 | |
---|
437 | These suboutines are called by the higher level subroutines, and need not to |
---|
438 | be known by the first time user: |
---|
439 | |
---|
440 | |
---|
441 | {\tt |
---|
442 | PLDIS2.f PLGPRI.f PLGRDU.f PLQQT.f PLSCAR.f PLSST.f PLVISU.f |
---|
443 | |
---|
444 | |
---|
445 | PLFLUX.f PLGRDC.f PLINS.f PLRHAL.f PLSORT.f PLSTAT.f |
---|
446 | |
---|
447 | |
---|
448 | PLGAUS.f PLGRDP.f PLMASQ.f PLRHO.f PLSSPH.f PLTMRO.f |
---|
449 | |
---|
450 | |
---|
451 | IMPR.f IMPRI.f |
---|
452 | } |
---|
453 | |
---|
454 | \medskip |
---|
455 | \medskip |
---|
456 | \noindent{\bf Testing subroutines} |
---|
457 | \medskip |
---|
458 | |
---|
459 | |
---|
460 | Examples of the use of these ``coupler-visible'' subroutines (with names |
---|
461 | starting by {\tt NA}), or of the ``basic'' subroutines (with names starting by PL) |
---|
462 | can be found in several test performing subroutines: |
---|
463 | |
---|
464 | \medskip |
---|
465 | |
---|
466 | \item{} {\tt NATFX(fluxb,fluxa)}: |
---|
467 | call {\tt NAFLUX} and visualizes the fields. |
---|
468 | |
---|
469 | \medskip |
---|
470 | |
---|
471 | \item{} {\tt NATST(ssta,sstb)}: call {\tt NASST} and visualizes the fields. |
---|
472 | |
---|
473 | \medskip |
---|
474 | |
---|
475 | \item{} {\tt NATES1(flda,fldb,fldaa)}: calls |
---|
476 | {\tt NASST} and then {\tt NAFLUX}, visualizes the fields, and compares the |
---|
477 | intial and final fields. |
---|
478 | |
---|
479 | \medskip |
---|
480 | |
---|
481 | \item{} {\tt NATES2(flda,fldb,fldaa)}: calls |
---|
482 | {\tt NAFLUX} and then {\tt NASST}, and compares the |
---|
483 | intial and final fields. |
---|
484 | \medskip |
---|
485 | |
---|
486 | \item{} {\tt NATES3(flda,fldb,fldaa,kvisuo}: calls |
---|
487 | {\tt NAFLUX} and then {\tt NASST} and visualizes the fields in a way that |
---|
488 | allows animations. |
---|
489 | Typically, the influence of the variance of the weight functions can be |
---|
490 | studied with this subroutine, through animation of the error field. |
---|
491 | |
---|
492 | \medskip |
---|
493 | \medskip |
---|
494 | |
---|
495 | These testing subroutines assume |
---|
496 | that the grids and the interpolation coefficients have already been |
---|
497 | initialized. |
---|
498 | |
---|
499 | |
---|
500 | |
---|
501 | \beginsection 3.3 Tests of the grid-to-grid interpolation |
---|
502 | |
---|
503 | Various tests have been performed to check that the library of subroutines of |
---|
504 | was free of trivial tests. However, systematic tests of the performance of |
---|
505 | the ``naive method'' and its sensibility to its adjustable parameters (shape |
---|
506 | and variance of the weight functions, number of neighbours, relative |
---|
507 | positions of the masks, ...) still remain to be done. |
---|
508 | |
---|
509 | |
---|
510 | |
---|
511 | \medskip |
---|
512 | |
---|
513 | In the following tests, the weight function $\phi$ |
---|
514 | is a Gaussian, with a uniform |
---|
515 | variance on a given grid. |
---|
516 | |
---|
517 | \medskip |
---|
518 | |
---|
519 | |
---|
520 | |
---|
521 | The most trivial test was to check that with a one neighbour interpolation, |
---|
522 | and the same grid, the interpolation was giving the same field. |
---|
523 | |
---|
524 | |
---|
525 | |
---|
526 | \medskip |
---|
527 | |
---|
528 | |
---|
529 | |
---|
530 | The second test has been made with an analytically generated field $f(x,y)=$ |
---|
531 | $\cos (k1 x)$ $\cos(k_2 y)$ interpolation forward (NAFLUX) an backward |
---|
532 | (NASST) between a cartesian square grid and a polar disk grid, with |
---|
533 | non-coincident masks. Figure show an example in which |
---|
534 | small neighbour number has been given |
---|
535 | to the naive method. This test shows that the original field is well |
---|
536 | recovered, excepted, of course, in the regions where the mask are far from |
---|
537 | coincidence. |
---|
538 | |
---|
539 | \medskip |
---|
540 | |
---|
541 | |
---|
542 | |
---|
543 | |
---|
544 | |
---|
545 | The third test uses two grids of very different resolutions, with a mask |
---|
546 | defined by an analytical curve. The case of a circle is shown on Figure 2, |
---|
547 | and more complex contour should be used in future tests of this kind. |
---|
548 | |
---|
549 | \medskip |
---|
550 | |
---|
551 | |
---|
552 | |
---|
553 | |
---|
554 | |
---|
555 | The fourth test (Figure 3) studies the interpolation between an |
---|
556 | analytically defined field $f(x,y)$ on the masked EMERAUDE grid |
---|
557 | (Atmospheric GCM) and the unmasked Pacific OPA (Ocean GCM). In the |
---|
558 | forward interpolation (NAFLUX), the trace of the EMERAUDE mask can be |
---|
559 | seen on the unmasked OPA domain. In the backward direction (NASST), the |
---|
560 | original field is well recovered on the tropical Pacific, and, of course, |
---|
561 | meaninless far from this region. |
---|
562 | |
---|
563 | |
---|
564 | |
---|
565 | The last test (Figure 4) deals with a realistic flux field (stress $\tau_ x$ |
---|
566 | in the longitudinal direction) of EMERAUDE and shows it interpolation on |
---|
567 | the Pacific OPA masked grid. Comparison with Philippe Dandin's |
---|
568 | interpolation's method is under progress. |
---|
569 | |
---|
570 | |
---|
571 | |
---|
572 | \beginsection 3.4 Future developments |
---|
573 | |
---|
574 | In the present state of the ``naive method library'', |
---|
575 | the coupler-visible items are |
---|
576 | ready to be used in the coupler. However, they are at the |
---|
577 | stage of a $\beta$-release, and will be improved by furthers tunings. The |
---|
578 | possibility of choosing weight functions which shape and variance can vary |
---|
579 | with the index of the grid point will be given. This will allow, for instance, |
---|
580 | to use ``non-smoothing'' function, e.g. the functions associated to the |
---|
581 | spectral method used on the grid [7]. This will also allow to pay special |
---|
582 | attention to land-sea regions, or implement interpolation method based on |
---|
583 | ``wavelet decomposition''. |
---|
584 | |
---|
585 | |
---|
586 | |
---|
587 | %The calculation of the grid surface elements is not yet properly |
---|
588 | %implemented for spherical grids. |
---|
589 | |
---|
590 | |
---|
591 | |
---|
592 | \beginsection 4. CONCLUSION |
---|
593 | |
---|
594 | The present letter can be considered as a first draft of a user manual of |
---|
595 | the ``naive method''. A concise presentation |
---|
596 | of the method has been presented, |
---|
597 | as well ot its possible future evolution. Pratical details for the |
---|
598 | use of the ``naive method library'' have been given in the spirit of its |
---|
599 | integration into the coupler. The names of testing subroutines which can be |
---|
600 | read as examples have been given. |
---|
601 | |
---|
602 | |
---|
603 | |
---|
604 | Further steps need to be done in order to reach a clean version of this |
---|
605 | ``naive method library'', with a more complete user manual. However, these |
---|
606 | first steps in the organisation of a sofware product, with the respect of |
---|
607 | the DOCTOR norm, the separation between subroutines ``visible'' from a |
---|
608 | calling code, with a minimal list of argument and extensive use of |
---|
609 | commons, and ``basic'' subroutines free of commons, can be helpfull for |
---|
610 | the organization of our future software development. Such an organization |
---|
611 | is also found in the ``Spectral Interface Library'' [8]. |
---|
612 | |
---|
613 | |
---|
614 | |
---|
615 | \beginsection Acknowledgments |
---|
616 | |
---|
617 | I thank Dominique ASTRUC for helping to use his visualization software [9] |
---|
618 | with which the Figure have been produced. |
---|
619 | |
---|
620 | |
---|
621 | |
---|
622 | |
---|
623 | \beginsection REFERENCES |
---|
624 | |
---|
625 | |
---|
626 | \def\ref{\parskip 12pt \leftskip 20pt \parindent -20pt} |
---|
627 | \def\endref{\parskip 0pt \leftskip 0pt \parindent 20pt} |
---|
628 | |
---|
629 | |
---|
630 | \ref |
---|
631 | |
---|
632 | [1] |
---|
633 | O. THUAL, Simple ocean-atmosphere interpolation. Part A: the method, |
---|
634 | {\it Epicoa \ } {\bf 0315} (1992). |
---|
635 | |
---|
636 | |
---|
637 | |
---|
638 | [2] |
---|
639 | N. H. BARTH, A Conservative Scheme for Passing Variables Between |
---|
640 | Coupled Models of the Ocean an Atmosphere |
---|
641 | {\it Technical Report \ }, CERFACS (1992). |
---|
642 | |
---|
643 | |
---|
644 | |
---|
645 | [3] |
---|
646 | O. THUAL, Gathering information for a coupler, |
---|
647 | {\it Epicoa \ } {\bf 0119} (1992). |
---|
648 | |
---|
649 | |
---|
650 | |
---|
651 | |
---|
652 | [4] |
---|
653 | P. DANDIN, th\`ese de doctorat, in preparation (1992). |
---|
654 | |
---|
655 | |
---|
656 | |
---|
657 | [5] J. CLOCHARD, Norme de codage ``DOCTOR'' pour le projet ARPEGE,{\it Note de |
---|
658 | travail ``AREPEGE''} {\bf No. 4} (1988). |
---|
659 | |
---|
660 | |
---|
661 | |
---|
662 | [6] J. K. GIBSON, The Doctor system - A DOCumentary ORiented programming |
---|
663 | system, {\it ECMWF Technical Memorandum} {\bf No. 52} (1982). |
---|
664 | |
---|
665 | |
---|
666 | [7] P. BERNARDET, private communication (1992). |
---|
667 | |
---|
668 | [8] O. THUAL, Spectral Interfaces Library Version 2.2, CERFACS (1990). |
---|
669 | |
---|
670 | |
---|
671 | [9] D. ASTRUC, Visuo: manuel de l'utilisateur, {\it Internal Report} |
---|
672 | (1990). |
---|
673 | |
---|
674 | \endref |
---|
675 | |
---|
676 | |
---|
677 | \vfill\eject |
---|
678 | \centerline{ Exchange of Projects and Ideas for Coupling Ocean and |
---|
679 | Atmosphere (Epicoa)} |
---|
680 | \centerline{ Appendix to Olivier Thual(8) , June 30$^{\rm th}$ 1992} |
---|
681 | \bigskip |
---|
682 | |
---|
683 | |
---|
684 | \centerline{\bf SOURCE OF THE NAIVE METHOD LIBRARY} |
---|
685 | \bigskip |
---|
686 | |
---|
687 | \centerline{ Version naiv01, 92 06 30 } |
---|
688 | |
---|
689 | |
---|
690 | |
---|
691 | \bigskip \bigskip |
---|
692 | |
---|
693 | This version is contained in {\tt |
---|
694 | greenh@cerfacs.fr:/usr1/pub/numlab/naiv/cnaiv01} |
---|
695 | |
---|
696 | \bigskip \bigskip |
---|
697 | |
---|
698 | |
---|
699 | |
---|
700 | \beginsection 1. Include files |
---|
701 | |
---|
702 | {\tt |
---|
703 | |
---|
704 | NAGAB.H NAGRA.H NAGRB.H |
---|
705 | |
---|
706 | |
---|
707 | } |
---|
708 | |
---|
709 | \beginsection 2. Main Program |
---|
710 | |
---|
711 | |
---|
712 | |
---|
713 | {\tt |
---|
714 | |
---|
715 | ANAIV.f |
---|
716 | |
---|
717 | } |
---|
718 | |
---|
719 | |
---|
720 | |
---|
721 | \beginsection 3. Coupler visible subroutines {\tt NA - - - -} |
---|
722 | |
---|
723 | |
---|
724 | |
---|
725 | {\tt |
---|
726 | |
---|
727 | NAFLUX.f NAGMRO.f NAGRA.H NAGRDA.f NASET.f NATES1.f NATES3.f NATST.f |
---|
728 | |
---|
729 | |
---|
730 | NAGAB.H NAGOPA.f NAGRB.H NAGRDB.f NASST.f NATES2.f NATFX.f |
---|
731 | |
---|
732 | |
---|
733 | |
---|
734 | } |
---|
735 | |
---|
736 | |
---|
737 | |
---|
738 | \beginsection 4. Basic subroutines {\tt PL - - - -} |
---|
739 | |
---|
740 | |
---|
741 | |
---|
742 | {\tt |
---|
743 | |
---|
744 | PLDIS2.f PLGPRI.f PLGRDU.f PLQQT.f PLSCAR.f PLSST.f PLVISU.f |
---|
745 | |
---|
746 | |
---|
747 | PLFLUX.f PLGRDC.f PLINS.f PLRHAL.f PLSORT.f PLSTAT.f |
---|
748 | |
---|
749 | |
---|
750 | PLGAUS.f PLGRDP.f PLMASQ.f PLRHO.f PLSSPH.f PLTMRO.f |
---|
751 | |
---|
752 | |
---|
753 | |
---|
754 | |
---|
755 | } |
---|
756 | |
---|
757 | |
---|
758 | |
---|
759 | \beginsection 5. Subroutine stolen from outside |
---|
760 | |
---|
761 | |
---|
762 | |
---|
763 | {\tt |
---|
764 | |
---|
765 | IMPR.f IMPRI.f |
---|
766 | |
---|
767 | |
---|
768 | } |
---|
769 | |
---|
770 | |
---|
771 | |
---|
772 | \end |
---|
773 | |
---|
774 | |
---|
775 | |
---|