The remapping algorithms described above are based on a geographical
localization of the points or cells on the target and source
grids. However, some of the fields exchanged in a coupled experiment, like
the water runoff of rivers or the water added to the oceans by the
melting icebergs, do not fit these interpolation schemes, since these events
occur at some specific place and so we would like to model them as
occurring at specific places. This locality implies that the remapping
should associate some specific points of the source grid with some
specific points of the target grid with a user-defined weight. There is
no true "interpolation" ; instead, the
computation of a value of the target function is defined by a weighted
sum of a few values of the source function, taken from specific points
of the source grid. The user-defined remapping is illustrated at
Figure 4.1.
|
|
In order to achieve this, the user has to define,
in a separate NetCDF file, the links associating specific points of the
source grid with specific points of the target grid and the
weights corresponding to each link. This is the "user-defined
weight-and-address file". This file has to provide for each of the
nlinks links, the index of the source point in each dimension of
the source grid and the index of the target point in each dimension of
the target grid. The links, source and target indices for the
user-defined remapping illustrated at Figure 4.1 are
detailed in Figure 4.2
|
|
An example of a toy model using a user-defined remapping
can be found at
https://oasistrac.cerfacs.fr/browser/trunk/prism/dev_ex/user3d-auto
. For this example, the content of the user-defined
weight-and-address NetCDF file is:
netcdf weights_addresses {
dimensions:
nlinks = 10 ;
variables:
int src_ind1(nlinks) ;
src_ind1:title = "source grid first index" ;
int src_ind2(nlinks) ;
src_ind2:title = "source grid 2nd index" ;
int src_ind3(nlinks) ;
src_ind3:title = "source grid third index" ;
int tgt_ind1(nlinks) ;
tgt_ind1:title = "target grid first index" ;
int tgt_ind2(nlinks) ;
tgt_ind2:title = "target grid 2nd index" ;
int tgt_ind3(nlinks) ;
tgt_ind3:title = "target grid third index" ;
double weight(nlinks) ;
weight:title = "weight" ;
}