<<prev file | next file >>    view single page | view frames    summary: fields | routine    details: routine

Interpolation/

extrapolate.pro

extrapolate data (zinput) where maskinput eq 0 by filling step by step the coastline points with the mean value of the 8 neighbourgs (weighted by their mask value).

topextrapolate Interpolation

result = extrapolate(zinput, maskinput[, nb_iteration], x_periodic=scalar, 0 or 1, MINVAL=scalar, MAXVAL=scalar, GE0=scalar 0 or 1)

Return value

{type=2d array} the extrapolated array

Parameters

zinput        in required type: 2d array

data to be extrapolate

maskinput        in required type: 2d array or -1

a 2D array, the land-sea mask of the output data (1 on ocean, 0 on land) put -1 if input data are not masked

nb_iteration        in optional type: integer scalar default: 10.E20

Maximum number if iterations done in the extrapolation process. If there is no more masked values we exit extrapolate before reaching nb_iteration (to be sure to fill everything, you can use a very large value)

Keywords

x_periodic        type: scalar, 0 or 1 default: 0

put 1 to specify that the data are periodic along x axis

MINVAL        type: scalar default: not used

to specify a minimum value to the extrapolated values

MAXVAL        type: scalar default: not used

to specify a maximum value to the extrapolated values

GE0        type: scalar 0 or 1 default: 0

put 1 to force the extrapolated values to be larger than 0, same as using minval=0.

Examples

IDL> a=extrapolate(dist(jpi,jpj),tmask[*,*,0],/x_periodic) IDL> tvplus, a IDL> tvplus, a*(1-tmask[*,*,0]) get the coastline: IDL> a=extrapolate(tmask[*,*,0],tmask[*,*,0],1,/x_periodic) IDL> tvplus, a-tmask[*,*,0]

Version history

Version

$Id: extrapolate.pro 202 2007-01-12 11:00:06Z smasson $

History

Originaly written by G. Roulet Sebastien Masson (smasson@lodyc.jussieu.fr)

Statistics

McCabe cyclic 13
McCabe essential 1
McCabe modular design 1
Produced by IDLdoc 2.0.