source: CPL/oasis3-mct/branches/OASIS3-MCT_2.0_branch/doc/UG4_Transformations.tex @ 4775

Last change on this file since 4775 was 4775, checked in by aclsce, 5 years ago
  • Imported oasis3-mct from Cerfacs svn server (not suppotred anymore).

The version has been extracted from https://oasis3mct.cerfacs.fr/svn/branches/OASIS3-MCT_2.0_branch/oasis3-mct@1818

  • Property svn:executable set to *
File size: 30.6 KB
Line 
1\newpage
2\chapter{Transformations and interpolations}
3\label{sec_transformations}
4
5Different transformations and 2D interpolations are available in
6OASIS3-MCT to adapt the coupling fields from a source model grid to a
7target model grid.  In the following paragraphs, a description of each
8transformation with its corresponding configuration lines that the
9user has to write in the {\it namcouple} file is given.  Features that
10are now deprecated (non functional) compared to prior versions will be
11noted with the string UNUSED but not described.
12
13\section{Time transformations}
14\label{subsec_timetrans}
15
16\begin{itemize}
17
18\item {\bf LOCTRANS}:
19
20  {\tt LOCTRANS} requires one configuring line on which a time
21  transformation, automatically performed below the call to {\tt
22    oasis\_put}, should be indicated:
23
24  \begin{verbatim}
25 # LOCTRANS operation
26   $TRANSFORM
27\end{verbatim}
28  % $
29  \vspace{-0.2cm} where {\tt \$TRANSFORM} can be
30  \begin{itemize}
31  \item {\tt INSTANT}: no time transformation, the instantaneous field
32    is transferred;
33  \item {\tt ACCUMUL}: the field accumulated over the previous
34    coupling period is exchanged (the accumulation is simply done over
35    the arrays {\tt field\_array} provided as third argument to the
36    {\tt oasis\_put} calls, not weighted by the time interval between
37    these calls);
38  \item {\tt AVERAGE}: the field averaged over the previous coupling
39    period is transferred (the average is simply done over the arrays
40    {\tt field\_array} provided as third argument to the {\tt
41      oasis\_put} calls, not weighted by the time interval between
42    these calls);
43  \item {\tt T\_MIN}: the minimum value of the field for each source
44    grid point over the previous coupling period is transferred;
45  \item {\tt T\_MAX}: the maximum value of the field for each source
46    grid point over the previous coupling period is transferred;
47  \item {\tt ONCE}: UNUSED ; {\bf not supported in OASIS3-MCT.}
48  \end{itemize}
49
50  With OASIS3-MCT, time transformations are supported more generally
51  with use of the coupling restart file.  The coupling restart file
52  allows the partial time transformation to be saved at the end of a
53  run for exact restart at the start of the next run.  For that
54  reason, coupling restart filenames are now required for all {\it
55    namcouple} entries that use LOCTRANS (with non INSTANT
56  values). This is the reason an optional restart file is now provided
57  on the OUTPUT {\it namcouple} input line.
58
59\end{itemize}
60
61\section{The pre-processing transformations}
62\label{subsec_preproc}
63
64\begin{itemize}
65
66\item {\bf REDGLO} UNUSED
67
68\item {\bf INVERT}: UNUSED
69
70\item {\bf MASK}: UNUSED
71 
72\item {\bf EXTRAP}: UNUSED
73
74\item {\bf CHECKIN}:
75
76  {\tt CHECKIN} calculates the global minimum, the maximum and the sum
77  of the source field values (not weighted by the grid cell area) and
78  prints them to the OASIS3-MCT debug file (for the master process of
79  the source component model only). These informations are found in
80  the debug file of the master process of the source model under the
81  attribute ``diags''.
82  This operation does not transform the field.
83
84  The generic input line is as follows:
85 \begin{verbatim}
86 # CHECKIN operation
87     INT = 1 
88\end{verbatim}
89
90\item {\bf CORRECT}: UNUSED
91
92\item {\bf BLASOLD}:
93
94  {\tt BLASOLD} allows the source field to be scaled and allows a
95  scalar to be added to the field.  The prior ability to perform a
96  linear combination of the current coupling field with other coupling
97  fields has been deprecated in OASIS3-MCT.  This transformation
98  occurs before the interpolation {\it per se}.
99
100  This transformation requires at least one configuring line with two
101  parameters:
102 \begin{verbatim}
103# BLASOLD operation
104     $XMULT   $NBFIELDS
105\end{verbatim}
106  % \vspace{-0.2cm}
107  where {\tt \$XMULT} is the multiplicative coefficient of the source
108  field, which must be given as a REAL value (e.g 2.0 and not 2). {\tt
109    \$NBFIELDS} must be 0 if no scalar needs to be added or 1 if a
110  scalar needs to be added. In this last case, an additional input
111  line is required where {\tt \$AVALUE} is the scalar to be added to
112  the field, which must also be given as a REAL value :
113\begin{verbatim}
114     CONSTANT  $AVALUE
115\end{verbatim} 
116\end{itemize}
117
118% subsection{The pre-processing transformations}
119
120\section{The remapping (interpolation)}
121\label{subsec_interp}
122
123\begin{itemize}
124
125\item {\bf MAPPING}:
126
127  The {\tt MAPPING} keyword is used to specify an input file to be
128  read and used for mapping (ie. regridding or interpolation); the
129  {\tt MAPPING} file must follow the {\tt SCRIPR} format.  This is an
130  alternative method to {\tt SCRIPR} for setting the mapping file.
131 
132  Since OASIS3-MCT\_2.0, {\tt MAPPING} can be used for higher order
133  remapping. Up to 5 different sets of weights (see section
134  \ref{subsec_mapdata} for the weight file format) can be applied to
135  up to 5 different fields transfered as {\tt oasis\_put} arguments
136  (see section \ref{prismput}).
137
138  This transformation requires at least one configuring line with one
139  filename and two optional string values:
140\begin{verbatim}
141     $MAPNAME  $MAPLOC  $MAPSTRATEGY
142\end{verbatim}
143  \begin{itemize}
144  \item {\tt \$MAPNAME} is the name of the mapping file to read.  This
145    is a NetCDF file consistent with the SCRIPR map file format (see
146    section \ref{subsec_inputdata}).
147
148  \item {\tt \$MAPLOC} is optional and can be either {\tt src} or {\tt
149      dst}.  With {\tt src}, the mapping will be done in parallel on
150    the source processors before communication to the destination
151    model processes; this is the default.  With {\tt dst}, the mapping
152    is done on the destination processes after the source grid data is
153    sent from the source model.
154
155  \item {\tt \$MAPSTRATEGY} is optional and can be either {\tt bfb},
156    {\tt sum}, or {\tt opt}.  In {\tt bfb} mode, the mapping is done
157    using a strategy that produces bit-for-bit identical results
158    regardless of the grid decompositions without leveraging a partial
159    sum computation; this is the default.  With {\tt sum}, the
160    transform is done using the partial sum approach which generally
161    introduces roundoff level changes in the results on different
162    processor counts. Option {\tt opt} allows the coupling layer to
163    choose either approach based on an analysis of which strategy is
164    likely to run faster. Usually, partial sums will be used if the
165    source grid has a higher resolution than the target grid as this
166    should reduce the overall communication (e.g. for conservative
167    remapping).
168
169  \end{itemize}
170
171  Note that if {\tt SCRIPR} (see below) is used to calculate the
172  remapping file, {\tt MAPPING} can still be listed in the {\tt
173    namcouple} to specify a name for the remapping file generated by
174  {\tt SCRIPR} different from the default and/or to specify a {\tt
175    \$MAPLOC} or {\tt \$MAPSTRATEGY} option.
176
177\item {\bf SCRIPR}:
178 
179  {\tt SCRIPR} gathers the interpolation techniques offered by Los
180  Alamos National Laboratory SCRIP 1.4 library
181  \citep{Jones99}\footnote{See also
182    http://climate.lanl.gov/Software/SCRIP/ and the copyright
183    statement in appendix \ref{sec_SCRIP}.}.  {\tt SCRIPR} routines
184  are in {\tt oasis3-mct/lib/scrip}. See the SCRIP 1.4 documentation
185  in {\tt oasis3/doc/SCRIPusers.pdf} for more details on the
186  interpolation algorithms.
187
188  When the SCRIP library performs a remapping, it first checks if the
189  file containing the corresponding remapping weights and addresses
190  exists; if it exists, it reads them from the file; if not, it
191  calculates them and store them in a file. The file is created in the
192  working directory and is called {\tt rmp\_{\it srcg}\_to\_{\it
193      tgtg}\_{\it INTTYPE}\_{\it NORMAOPT}.nc}, where {\it srcg} and
194  {\it tgtg} are the acronyms of respetively the source and the target
195  grids, {\it INTTYPE} is the interpolation type, i.e. {\tt DISTWGT},
196  {\tt GAUSWGT}, {\tt BILINEAR} ({\bf not BILINEA as in OASIS3.3}) or
197  {\tt CONSERV} -see below, and {\it NORMAOPT} is the normalization
198  option, i.e. {\tt DESTAREA}, {\tt FRACAREA} or {\tt FRACNNEI} for
199  {\tt CONSERV} only -see below). One has to take care that the
200  remapping file will have the same name even if other details, like
201  the grid masks, are changed. When reusing a remapping file, one has
202  to be sure that it was generated in exactly the same conditions than
203  the ones it is used for.
204
205  The following types of interpolations are available:
206
207  \begin{itemize}
208
209  \item {\tt DISTWGT} performs a distance weighted nearest-neighbour
210    interpolation (N neighbours). All types of grids are supported.
211
212    \begin{itemize}
213
214    \item Masked target grid points: the zero value is associated to
215      masked target grid points.
216
217    \item Non-masked target grid points having some of the N source
218      nearest neighbours masked: a nearest neighbour algorithm using
219      the remaining non masked source nearest neighbours is applied.
220
221    \item Non-masked target grid points having all of the N source
222      nearest neighbours masked: by default, the nearest non-masked
223      source neighbour is used (logical {\tt ll\_nnei} hard-coded to
224      {\tt .true.} in {\tt oasis3-mct/lib/scrip/src/remap\_distwgt.F};
225      same default behaviour as OASIS3.3).
226
227    \end{itemize}
228
229    The configuring line is:
230
231  \begin{verbatim}
232 # SCRIPR (for DISWGT) 
233     $CMETH $CGRS $CFTYP $REST $NBIN $NV $ASSCMP $PROJCART
234\end{verbatim}
235    where:
236    % \vspace{-0.5cm}
237    \begin{itemize}
238    \item {\tt \$CMETH = DISTWGT}.
239    \item {\tt \$CGRS} is the source grid type ({\tt LR}, {\tt D} or
240      {\tt U})- see appendix \ref{subsec_gridtypes}.
241
242    \item {\tt \$CFTYP} is the field type: {\tt SCALAR}. The option
243      {\tt VECTOR}, which in fact leads to a scalar treatment of the
244      field (as in the previous versions), is still accepted. {\bf
245        VECTOR\_I or VECTOR\_J, i.e. vector fields, are not supported
246        anymore in OASIS3-MCT.}. See ``Support of vector fields with
247      the SCRIPR remappings'' below.
248
249    \item {\tt \$REST} is the search restriction type: {\tt LATLON} or
250      {\tt LATITUDE} (see SCRIP 1.4 documentation SCRIPusers.pdf).
251    \item {\tt \$NBIN} the number of restriction bins (see SCRIP 1.4
252      documentation SCRIPusers.pdf). Note that for D or U grid, the
253      restriction with more than 1 bin is not allowed : choose LATLON or
254      LATITUDE and \$NBIN=1
255    \item {\tt \$NV} is the number of neighbours used.
256    \item {\tt \$ASSCMP}: UNUSED; {\bf vector fields are not supported
257        anymore in OASIS3-MCT.} See ``Support of vector fields with
258      the SCRIPR remappings'' below.
259    \item {\tt \$PROJCART}: UNUSED; {\bf vector fields are not
260        supported anymore in OASIS3-MCT.} See ``Support of vector
261      fields with the SCRIPR remappings'' below.
262    \end{itemize}
263
264  \item {\tt GAUSWGT} performs a N nearest-neighbour interpolation
265    weighted by their distance and a gaussian function. All grid types
266    are supported.
267    \begin{itemize}
268
269    \item Masked target grid points: the zero value is associated to
270      masked target grid points.
271
272    \item Non-masked target grid points having some of the N source
273      nearest neighbours masked: a nearest neighbour algorithm using
274      the remaining non masked source nearest neighbours is applied.
275
276    \item Non-masked target grid points having all of the N source
277      nearest neighbours masked: by default, the nearest non-masked
278      source neighbour is used (logical {\tt ll\_nnei} hard-coded to
279      {\tt .true.} in {\tt
280        oasis3-mct/lib/scrip/src/remap\_gauswgt.F}); {\bf this is NOT
281        the same default behaviour as OASIS3.3}; to have the same
282      default behaviour as in OASIS3.3, put {\tt ll\_nnei=.false.}.
283    \end{itemize}
284
285    The configuring line is:
286  \begin{verbatim}
287 # SCRIPR (for GAUSWGT)
288     $CMETH  $CGRS  $CFTYP  $REST  $NBIN  $NV $VAR
289\end{verbatim}
290    %
291    % \vspace{-0.5cm}
292    where:
293    % $
294    all entries are as for {\tt DISTWGT}, except that:
295    \begin{itemize}
296    \item {\tt \$CMETH = GAUSWGT}
297    \item {\tt \$VAR}, which must be given as a REAL value (e.g 2.0
298      and not 2), defines the weight given to a neighbour source grid
299      point as proportional to $exp(-1/2 \cdot d^2/\sigma^2)$ where
300      $d$ is the distance between the source and target grid points,
301      and $\sigma^2 = \$VAR \cdot \overline{d}^2$ where
302      $\overline{d}^2$ is the average distance between two source grid
303      points (calculated automatically by OASIS3-MCT).
304    \end{itemize}
305
306  \item {\tt BILINEAR} performs an interpolation based on a local
307    bilinear approximation (see details in chapter 4 of SCRIP 1.4
308    documentation SCRIPusers.pdf). Logically-Rectangular (LR) and
309    Reduced (D) source grid types are supported.
310
311  \item {\tt BICUBIC} performs an interpolation based on a local
312    bicubic approximation for Logically-Rectangular (LR) grids (see
313    details in chapter 5 of SCRIP 1.4 documentation SCRIPusers.pdf),
314    and on a 16-point stencil for Gaussian Reduced (D) grids.  Note
315    that for Logically-Rectangular grids, 4 weights for each of the 4
316    enclosing source neighbours are required corresponding to the
317    field value at the point, the gradient of the field with respect
318    to {\it i}, the gradient of the field with respect to {\it j}, and
319    the cross gradient with respect to {\it i} and {\it j} in that
320    order. OASIS3-MCT will calculate the remapping weights and
321    addresses (if they are not already provided) but will not, at run
322    time, calculate the two gradients and the cross-gradient of the
323    source field (as was the case with OASIS3.3). These 3 extra fields
324    need to be calculated by the source code and transfered as extra
325    arguments of the {\tt oasis\_put} (see {\tt fld2, fld3, fld4} in
326    section \ref{prismput}).
327
328    For both {\tt BILINEAR} and {\tt BICUBIC}:
329    \begin{itemize}
330    \item Masked target grid points: the zero value is associated to
331      masked target grid points.
332
333    \item Non-masked target grid points having some of the source
334      points normally used in the bilinear or bicubic interpolation
335      masked: a N nearest neighbour algorithm using the remaining non
336      masked source points is applied.
337
338    \item Non-masked target grid points having all bilinear or bicubic
339      neighbours masked: by default, the nearest non-masked source
340      neighbour is used ({\tt ll\_nnei} hard-coded to {\tt .true.} in
341      {\tt oasis3-mct/lib/scrip/src/remap\_bilinear.f}, {\tt
342        remap\_bicubic.f} and {\tt remap\_bicubic\_reduced.f}); {\bf
343        this is not the same default behaviour as OASIS3.3}; to have
344      the same default behaviour as in OASIS3.3, put {\tt
345        ll\_nnei=.false.} in the appropriate routine.
346    \end{itemize}
347 
348    For both {\tt BILINEAR} and {\tt BICUBIC}, the configuring line
349    is:
350
351  \begin{verbatim}
352 # SCRIPR  (for BILINEAR or BICUBIC)
353     $CMETH  $CGRS  $CFTYP  $REST  $NBIN
354\end{verbatim}
355    \vspace{-0.5cm} where:
356    % $
357    \begin{itemize}
358    \item {\tt \$CMETH = BILINEAR} or {\tt BICUBIC}
359    \item {\tt \$CGRS} is the source grid type: LR or D.
360    \item {\tt \$CFTYP}, {\tt \$NBIN} are as for {\tt DISTWGT}.
361    \item {\tt \$REST} is as for {\tt DISTWGT}, except that only {\tt
362        LATITUDE} is possible for a Reduced (D) source grid.
363    \end{itemize}
364
365  \item {\tt CONSERV} performs 1st or 2nd order conservative
366    remapping, which means that the weight of a source cell is
367    proportional to area intersected by the target cell (plus some
368    other terms proportional to the gradient of the field in the
369    longitudinal and latitudinal directions for the second order).
370
371    The configuring line is:
372  \begin{verbatim}
373 # SCRIPR (for CONSERV)
374     $CMETH  $CGRS  $CFTYP  $REST  $NBIN  $NORM  $ORDER
375\end{verbatim}
376    % $
377    \vspace{-0.5cm} where:
378    \begin{itemize}
379    \item {\tt \$CMETH = CONSERV}
380    \item {\tt \$CGRS} is the source grid type: LR, D and U. Note that
381      the grid corners have to given by the user in the grid data file
382      {\tt grids.nc} or by the code itself in the initialisation phase
383      by calling routine {\tt oasis\_write\_corner} (see section
384      \ref{subsubsec_griddef}) ; OASIS3-MCT will not attempt to
385      automatically calculate them as OASIS3.3.
386      % For second-order remapping, only LR is supported because the
387      % gradient of the coupling field used in the transformation has
388      % to be calculated automatically by OASIS3.
389    \item {\tt \$CFTYP, \$REST}, {\tt \$NBIN} are as for {\tt
390        DISTWGT}.
391    \item {\tt \$NORM} is the NORMalization option:
392      \begin{itemize}
393      \item {\tt FRACAREA}: The sum of the non-masked source cell
394        intersected areas is used to NORMalise each target cell field
395        value: the flux is not locally conserved, but the flux value
396        itself is reasonable.
397      \item {\tt DESTAREA}: The total target cell area is used to
398        NORMalise each target cell field value even if it only partly
399        intersects non-masked source grid cells: local flux
400        conservation is ensured, but unreasonable flux values may
401        result.
402      \item {\tt FRACNNEI}: as {\tt FRACAREA}, except that at least
403        the source nearest unmasked neighbour is used for unmasked
404        target cells that intersect only masked source cells.  Note
405        that a zero value will be assigned to a target cell that does
406        not intersect any source cells (masked or unmasked), even with
407        FRACNNEI option.
408      \end{itemize}
409    \item {\tt \$ORDER}: {\tt FIRST} or {\tt SECOND} for first or
410      second order conservative remapping respectively (see SCRIP 1.4
411      documentation).
412
413      For {\tt CONSERV/SECOND}, 3 weigths are needed; OASIS3-MCT will
414      calculate these weights and corresponding addresses (if they are
415      not already provided) but will not, at run time, calculate the
416      two extra terms to which the second and third weights should be
417      applied; these terms, respectively the gradient of the field
418      with respect to the longitude ($\theta$) $\frac{\delta f}{\delta
419        \theta}$ and the gradient of the field with respect to the
420      latitude ($\phi$) $\frac{1}{cos \theta}\frac{\delta f}{\delta
421        \phi}$ need to be calculated by the source code and transfered
422      as extra arguments of the {\tt oasis\_put} (see {\tt fld2, fld3}
423      in section \ref{prismput}).  Note that {\tt CONSERV/SECOND} is
424      not positive definite and has not been fully validated yet.
425
426    \end{itemize}
427
428  \end{itemize}
429
430  {\bf Precautions related to the use of the SCRIPR/CONSERV remapping}
431
432  \begin{itemize}
433
434  \item For the 1st order conservative remapping: the weight of a
435    source cell is proportional to area of the source cell intersected
436    by target cell.  Using the divergence theorem, the SCRIP library
437    evaluates this area with the line integral along the cell borders
438    enclosing the area. As the real shape of the borders is not known
439    (only the location of the 4 corners of each cell is known), the
440    library assumes that the borders are linear in latitude and
441    longitude between two corners.  This assumption becomes less valid
442    closer to the pole and for latitudes above the {\tt north\_thresh}
443    or below the {\tt south\_thresh} values (see {\tt
444      oasis3-mct/lib/scrip/remap\_conserv.F}, the library evaluates
445    the intersection between two border segments using a Lambert
446    equivalent azimuthal projection. Problems were observed in some
447    cases for the grid cell located around this {\tt north\_thresh} or
448    {\tt south\_thresh} latitude.
449
450  \item Another limitation of the SCRIP 1st order conservative
451    remapping algorithm is that is also supposes, for line integral
452    calculation, that $sin(latitude)$ is linear in longitude on the
453    cell borders which again is in general not valid close to the
454    pole.
455    % A projection or at least a normalization by the
456    % true area of the cells (i.e. by the areas as considered by the
457    % component models) is needed.
458
459  \item For a proper consevative remapping, the corners of a cell have
460    to coincide with the corners of its neighbour cell, with no
461    ``holes'' between the cells.
462 
463  \item If two cells of one same grid overlay, at least the one with
464    the greater numerical index must be masked for a proper
465    conservative remapping.  For example, if the grid cells with {\it
466      i=1} overlays the grid cells with {\it i=imax}, the latter must
467    be masked.  If this is not the case given the mask defined in {\it
468      masks.nc}, OASIS3-MCT must be compiled with the CPP key {\tt
469      TREAT\_OVERLAY} which will ensure that these rules are
470    respected. This CPP key was introduced in OASIS3.3.
471     
472  \item A target grid cell intersecting no source cell (either masked
473    or non masked) at all i.e. falling in a ``hole'' of the source
474    grid will in all cases get a zero value.
475   
476  \item If a target grid cell intersects only masked source cells, it
477    will still get a zero value unless the {\tt FRACNNEI}
478    normalisation option is used, in which case it will get the
479    nearest non masked neighbour value. {\bf Note that the option of
480      having the value 1.0E+20 assigned to these target grid cell
481      intersecting only masked source cells (for easier
482      identification) is not yet availble in OASIS3-MCT.}
483   
484
485    % The target grid mask is never considered in {\tt CONSERV},
486    % except with normalisation option {\tt FRACNNEI} (see below). To
487    % have a value calculated, a target grid cell must intersect at
488    % least one source cell. However, the NORMlisation option (that
489    % takes into account the source grid mask, see below) may result
490    % in a null value calculated for those target grid cells. In that
491    % case (i.e.  at least one intersecting source cell, but a null
492    % value finally calculated because of the normalisation option),
493    % the value 1.0E+20 is assigned to those target grid points if
494    % {\tt prism/src/lib/scrip/src/scriprmp.f} or {\tt vector.F90}
495    % (for vector interpolation) are compiled with {\tt
496    %   ll\_weightot=.true.}.
497   
498   
499  \end{itemize}
500
501  % {\bf Precautions related to the use of all SCRIPR remappings}
502
503  % \begin{itemize}
504
505  % \item For using {\tt SCRIPR} interpolations, linking with the
506  %   NetCDF library is mandatory and the grid data files (see section
507  %   \ref{subsec_griddata}) must be NetCDF files (binary files are
508  %   not supported).
509
510
511
512  %   the weights and addresses will also differ whether or not the
513  %   {\tt MASK} and {\tt EXTRAP} transformations are first activated
514  %   during the pre-processing phase (see section
515  %   \ref{subsec_preproc}) and this option is not stored in the
516  %   remapping file name. Therefore, the remapping file used will be
517  %   the one created for the first field having the same source grid,
518  %   target grid, and interpolation type (and the same normalization
519  %   option for {\tt CONSERV}), even if the {\tt MASK} and {\tt
520  %     EXTRAP} transformations are used or not for that field.  (This
521  %   inconsistency is however usually not a problem as the {\tt MASK}
522  %   and {\tt EXTRAP} transformations are usually used for all fields
523  %   having the same source grid, target grid, and interpolation
524  %   type, or not at all.)
525  % \end{itemize}
526
527  {\bf Support of vector fields with the SCRIPR remappings}
528
529  Vector mapping is NOT supported and will not be supported by
530  OASIS3-MCT. For proper treatment of vector fields, the component
531  model has to send the 3 components of the vector projected in a
532  Cartesian coordinate system.
533
534\item {\bf INTERP}: UNUSED
535
536\item {\bf MOZAIC}: UNUSED; note that {\tt MAPPING} (see above) is the
537  NetCDF equivalent to {\tt MOZAIC}.
538
539\item {\bf NOINTERP}: UNUSED
540
541\item {\bf FILLING}: UNUSED
542
543\end{itemize}
544
545\section{The post-processing stage}
546\label{subsec_cooking}
547
548\begin{itemize}
549
550\item {\bf CONSERV}:
551
552  {\tt CONSERV} ensures a global modification of the coupling field.
553  This analysis requires the source and target grid mesh areas to be
554  transfered to the coupler with {\tt oasis\_write\_area} (see section
555  \ref{subsubsec_griddef}). {\bf For a correct CONSERV operation,
556    overlapping grid cells on the source grid or on the target grid
557    must be masked.} In the {\it namcouple}, {\tt CONSERV} requires
558  one input line with one argument and one optional argument:
559
560 \begin{verbatim}
561# CONSERV operation
562     $CMETH  $CONSOPT
563\end{verbatim}
564  \vspace{-0.5cm} where:
565  \begin{itemize}
566  \item {\tt \$CMETH} is the method desired with the following choices
567    \begin{itemize}
568    \item with {\tt \$CMETH = GLOBAL}, the field is integrated on both
569      source and target grids, without considering values of masked
570      points, and the residual (target - source) is uniformly
571      distributed on the target grid; this option ensures global
572      conservation of the field
573    \item with {\tt \$CMETH = GLBPOS}, the same operation is performed
574      except that the residual is distributed proportionally to the
575      value of the original field; this option ensures the global
576      conservation of the field and does not change the sign of the
577      field
578    \item with {\tt \$CMETH = BASBAL}, the operation is analogous to
579      {\tt GLOBAL} except that the non masked surface of the source
580      and the target grids are taken into account in the calculation
581      of the residual; this option does not ensure global conservation
582      of the field but ensures that the energy received is
583      proportional to the non masked surface of the target grid
584    \item with {\tt \$CMETH = BASPOS}, the non masked surface of the
585      source and the target grids are taken into account and the
586      residual is distributed proportionally to the value of the
587      original field; therefore, this option does not ensure global
588      conservation of the field but ensures that the energy received
589      is proportional to the non masked surface of the target grid and
590      it does not change the sign of the field.
591    \end{itemize}
592  \item {\tt \$CONSOPT} is an optional argument specifying the
593    algorithm.  {\tt \$CONSOPT} can be {\tt bfb} or {\tt opt}.  The
594    {\tt bfb} option enforces a bit-for-bit transformation regardless
595    of the grid decomposition or process count.  The {\tt opt} option
596    carries out the conservation using an optimal algorithm using less
597    memory and a faster approach. Option {\tt bfb} is the default
598    setting.
599  \end{itemize}
600
601
602
603\item {\bf SUBGRID}: UNUSED
604
605  % {\tt SUBGRID} can be used to interpolate a field from a coarse
606  % grid to a finer target grid (the target grid must be finer over
607  % the whole domain). Two types of subgrid interpolation can be
608  % performed, depending on the type of the field.
609%
610  % For solar type of flux field ({\tt \$SUBTYPE = SOLAR}), the
611  % operation performed is:
612%$$\Phi_{i} = \frac{1-\alpha_i}{1-\alpha} F$$ where $\Phi_{i}$ ($F$) is
613%the flux on the fine (coarse) grid, $\alpha_i$ ($\alpha$) an
614% auxiliary field on the fine (coarse) grid (e.g. the albedo).  The
615% whole operation is interpolated from the coarse grid with a
616% grid-mapping type of interpolation; the dataset of weights and
617% addresses has to be given by the user.
618%
619% For non-solar type of field ({\tt \$SUBTYPE = NONSOLAR}), a
620% first-order Taylor expansion of the field on the fine grid
621% relatively to a state variable is performed (for instance, an
622% expansion of the total heat flux relatively to the SST):
623%$$\Phi_{i} = F + \frac{\partial F}{\partial T} ( T_i - T ) $$ where
624%$\Phi_{i}$ ($F$) is the heat flux on the fine (coarse) grid, $T_i$
625% ($T$) an auxiliary field on the fine (coarse) grid (e.g. the SST)
626% and $\frac{\partial F}{\partial T}$ the derivative of the flux
627% versus the auxiliary field on the coarse grid. This operation is
628% interpolated from the coarse grid with a grid-mapping type of
629% interpolation; the dataset of weights and addresses has to be given
630% by the user.
631%
632% This analysis requires one input line with 7 or 8 arguments
633% depending on the type of subgrid interpolation.
634%
635% \begin{enumerate}
636% \item If the the {\tt SUBGRID} operation is performed on a solar
637%   flux, the 7-argument input line is:
638%\begin{verbatim}
639%# SUBGRID operation with $SUBTYPE=SOLAR
640%  $CFILE  $NUMLU  $NID  $NV  $SUBTYPE  $CCOARSE $CFINE\end{verbatim}where
641%{\tt \$CFILE} and {\tt \$NUMLU} are the subgrid-mapping file name and
642%associated logical unit (see section \ref{subsec_transformationdata} for the
643%structure of this file); {\tt \$NID} the identificator for this
644%subgrid-mapping dataset within the file build by OASIS based on all
645%the different {\tt SUBGRID} analyses in the present coupling; {\tt
646%\$NV} is the maximum number of target grid points use in the
647%subgrid-mapping; {\tt \$SUBTYPE = SOLAR} is the type of subgrid
648%  interpolation; {\tt \$CCOARSE} is the
649%auxiliary field name on the coarse grid (corresponding to $\alpha$)
650%and {\tt \$CFINE} is the auxiliary field name on fine grid
651%(corresponding to $\alpha_i$).
652%These two fields needs to be exchanged between their original model
653%and OASIS3 main process, at least as {\tt AUXILARY} fields.
654%This analysis is performed from the coarse grid with a grid-mapping type
655%of interpolation based on the {\tt \$CFILE} file.
656%
657% \item If the the SUBGRID operation is performed on a nonsolar flux,
658%   the 8-argument input line is:
659%\begin{verbatim}
660%# SUBGRID operation with $SUBTYPE=NONSOLAR
661%  $CFILE $NUMLU $NID $NV $SUBTYPE $CCOARSE $CFINE $CDQDT
662%\end{verbatim} where {\tt \$CFILE},  {\tt \$NUMLU},  {\tt \$NID}, 
663%{\tt \$NV} are as for a solar subgrid interpolation; {\tt
664%\$SUBTYPE = NONSOLAR}; {\tt \$CCOARSE} is the auxiliary
665%field name on the coarse grid (corresponding to $T$) and {\tt \$CFINE}
666%is the auxiliary field name on fine grid (corresponding to $T_i$); the
667%additional argument {\tt \$CDQDT} is the coupling ratio on the coarse
668%grid (corresponding to $\frac{\partial F}{\partial T}$) These three
669%fields need to be exchanged between their original model and OASIS3
670%main process as {\tt AUXILARY} fields. This operation is performed from the
671%coarse grid with a grid-mapping type of interpolation based on the {\tt
672%\$CFILE} file.
673%
674% \end{enumerate}
675
676\item {\bf BLASNEW}:
677 
678  {\tt BLASNEW} performs a scalar multiply or scalar add to any
679  destination field.  This is the equivalent of BLASOLD on the
680  destination side.  The prior feature that supported linear
681  combinations of the current coupling field with any other fields
682  after the interpolation has been deprecated.
683
684  This analysis requires the same input line(s) as {\tt BLASOLD}.
685
686\item {\bf MASKP}: UNUSED
687
688\item {\bf REVERSE}: UNUSED
689
690\item {\bf CHECKOUT}:
691
692  {\tt CHECKOUT} calculates the global minimum, the maximum and the
693  sum of the target field values (not weighted by the grid cell area)
694  and prints them to the OASIS3-MCT debug file (for the master process
695  of the target component model only). These informations are found in
696  the debug file of the master process of the target model under the
697  attribute ``diags''. This operation does not
698  transform the field.  The generic input line is as for {\tt CHECKIN}
699  (see above).
700
701\item {\bf GLORED}: UNUSED
702
703\end{itemize}
704
705
Note: See TracBrowser for help on using the repository browser.